diff --git a/.gitignore b/.gitignore index b56eb20..9385e0b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .DS_Store *.pro.user build* -*/data/* +/installer/packages/com.dkmtech.pacalculator/data/* \ No newline at end of file diff --git a/installer/config/config.xml b/installer/config/config.xml index cdb516c..f53ce97 100644 --- a/installer/config/config.xml +++ b/installer/config/config.xml @@ -1,9 +1,9 @@ PA Calculator - 1.0.0 + 0.2 PA Calculator Installer DKM-Tech PA Tools - @ApplicationsDir + @ApplicationsDirX64@\DKM-Tech\PA Calculator diff --git a/installer/packages/com.dkm-tech.pa-calculator/meta/installscript.qs b/installer/packages/com.dkm-tech.pa-calculator/meta/installscript.qs deleted file mode 100644 index db08eb1..0000000 --- a/installer/packages/com.dkm-tech.pa-calculator/meta/installscript.qs +++ /dev/null @@ -1,7 +0,0 @@ -Component.prototype.createOperations = function() -{ - component.createOperations(); - if (systemInfo.productType === "windows") { - component.addOperation("CreateShortcut", "@TargetDir@/PA Calculator.exe", "@DesktopLocation@/PA Calculator.lnk" - } -} diff --git a/installer/packages/com.dkmtech.installer/meta/package.xml b/installer/packages/com.dkmtech.installer/meta/package.xml new file mode 100644 index 0000000..99bde6f --- /dev/null +++ b/installer/packages/com.dkmtech.installer/meta/package.xml @@ -0,0 +1,10 @@ + + + Installer + DKM-Tech Software Installer + 0.2 + 2021-11-07 + com.dkmtech.installer + true + First Installer + \ No newline at end of file diff --git a/installer/packages/com.dkmtech.pacalculator/meta/installscript.qs b/installer/packages/com.dkmtech.pacalculator/meta/installscript.qs new file mode 100644 index 0000000..4daf530 --- /dev/null +++ b/installer/packages/com.dkmtech.pacalculator/meta/installscript.qs @@ -0,0 +1,22 @@ +function Component() +{ +} + +Component.prototype.createOperations = function() +{ + try { + // call the base create operations function + component.createOperations(); + if (installer.value("os") == "win") { + try { + var userProfile = installer.environmentVariable("USERPROFILE"); + installer.setValue("UserProfile", userProfile); + component.addOperation("CreateShortcut", "@TargetDir@\\PA_Calculator.exe", "@UserProfile@\\Desktop\\PA Calculator.lnk"); + } catch (e) { + // Do nothing if key doesn't exist + } + } + } catch (e) { + print(e); + } +} \ No newline at end of file diff --git a/installer/packages/com.dkm-tech.pa-calculator/meta/license.txt b/installer/packages/com.dkmtech.pacalculator/meta/license.txt similarity index 100% rename from installer/packages/com.dkm-tech.pa-calculator/meta/license.txt rename to installer/packages/com.dkmtech.pacalculator/meta/license.txt diff --git a/installer/packages/com.dkm-tech.pa-calculator/meta/package.xml b/installer/packages/com.dkmtech.pacalculator/meta/package.xml similarity index 97% rename from installer/packages/com.dkm-tech.pa-calculator/meta/package.xml rename to installer/packages/com.dkmtech.pacalculator/meta/package.xml index 93a1bf8..04b37b5 100644 --- a/installer/packages/com.dkm-tech.pa-calculator/meta/package.xml +++ b/installer/packages/com.dkmtech.pacalculator/meta/package.xml @@ -9,4 +9,4 @@ true - +