mirror of
https://github.com/PreMiD/PreMiD.git
synced 2026-04-06 04:41:58 +02:00
✨ New installer
This commit is contained in:
463
installer_assets/PreMiD-Upgrade.xml
Normal file
463
installer_assets/PreMiD-Upgrade.xml
Normal file
@@ -0,0 +1,463 @@
|
||||
<project>
|
||||
<shortName>PreMiD</shortName>
|
||||
<fullName>PreMiD</fullName>
|
||||
<version>2.1</version>
|
||||
<installerFilename>upgrader.${platform_exec_suffix}</installerFilename>
|
||||
<debugLevel>0</debugLevel>
|
||||
<licenseFile>../LICENSE</licenseFile>
|
||||
<wrapLicenseFileText>0</wrapLicenseFileText>
|
||||
<leftImage>leftSide.png</leftImage>
|
||||
<logoImage>logo.png</logoImage>
|
||||
<splashImage>logo.png</splashImage>
|
||||
<componentList>
|
||||
<component>
|
||||
<name>default</name>
|
||||
<description>Default Component</description>
|
||||
<canBeEdited>1</canBeEdited>
|
||||
<selected>1</selected>
|
||||
<show>1</show>
|
||||
<folderList>
|
||||
<folder>
|
||||
<description>Program Files</description>
|
||||
<destination>${installdir}</destination>
|
||||
<name>programfiles</name>
|
||||
<platforms>all</platforms>
|
||||
<shortcutList>
|
||||
<shortcut>
|
||||
<comment>Uninstall</comment>
|
||||
<exec>${installdir}/${uninstallerName}</exec>
|
||||
<icon></icon>
|
||||
<name>Uninstall ${product_fullname}</name>
|
||||
<path>${installdir}</path>
|
||||
<platforms>all</platforms>
|
||||
<runAsAdmin>0</runAsAdmin>
|
||||
<runInTerminal>0</runInTerminal>
|
||||
<windowsExec>${installdir}/${uninstallerName}.exe</windowsExec>
|
||||
<windowsExecArgs></windowsExecArgs>
|
||||
<windowsIcon></windowsIcon>
|
||||
<windowsPath>${installdir}</windowsPath>
|
||||
</shortcut>
|
||||
</shortcutList>
|
||||
</folder>
|
||||
<folder>
|
||||
<description>Program Files</description>
|
||||
<destination>${installdir}</destination>
|
||||
<name>programfileslinux</name>
|
||||
<platforms>linux</platforms>
|
||||
</folder>
|
||||
<folder>
|
||||
<description>Program Files</description>
|
||||
<destination>${installdir}</destination>
|
||||
<name>programfileslinux64</name>
|
||||
<platforms>linux-x64</platforms>
|
||||
</folder>
|
||||
<folder>
|
||||
<description>Program Files</description>
|
||||
<destination>${installdir}</destination>
|
||||
<name>programfileswindows</name>
|
||||
<platforms>windows</platforms>
|
||||
</folder>
|
||||
<folder>
|
||||
<description>Program Files</description>
|
||||
<destination>${installdir}</destination>
|
||||
<name>programfileswindows64</name>
|
||||
<platforms>windows-x64</platforms>
|
||||
</folder>
|
||||
<folder>
|
||||
<description>Program Files</description>
|
||||
<destination>${installdir}</destination>
|
||||
<name>programfilesosx</name>
|
||||
<platforms>osx</platforms>
|
||||
</folder>
|
||||
</folderList>
|
||||
<startMenuShortcutList>
|
||||
<startMenuShortcut>
|
||||
<comment>Uninstall ${product_fullname}</comment>
|
||||
<name>Uninstall ${product_fullname}</name>
|
||||
<runAsAdmin>0</runAsAdmin>
|
||||
<runInTerminal>0</runInTerminal>
|
||||
<windowsExec>${installdir}/${uninstallerName}.exe</windowsExec>
|
||||
<windowsExecArgs></windowsExecArgs>
|
||||
<windowsIcon></windowsIcon>
|
||||
<windowsPath>${installdir}/</windowsPath>
|
||||
</startMenuShortcut>
|
||||
<startMenuShortcut>
|
||||
<comment>Rich Presence for web services.</comment>
|
||||
<name>PreMiD</name>
|
||||
<runAsAdmin>0</runAsAdmin>
|
||||
<runInTerminal>0</runInTerminal>
|
||||
<windowsExec>${installdir}/PreMiD.${platform_exec_suffix}</windowsExec>
|
||||
<windowsExecArgs></windowsExecArgs>
|
||||
<windowsIcon></windowsIcon>
|
||||
<windowsPath></windowsPath>
|
||||
</startMenuShortcut>
|
||||
</startMenuShortcutList>
|
||||
</component>
|
||||
</componentList>
|
||||
<initializationActionList>
|
||||
<setInstallerVariable>
|
||||
<name>project.installationType</name>
|
||||
<value>upgrade</value>
|
||||
<ruleList>
|
||||
<fileExists>
|
||||
<path>${installdir}</path>
|
||||
</fileExists>
|
||||
</ruleList>
|
||||
</setInstallerVariable>
|
||||
</initializationActionList>
|
||||
<preInstallationActionList>
|
||||
<actionGroup>
|
||||
<progressText>Killing ${product_fullname}...</progressText>
|
||||
<actionList>
|
||||
<kill>
|
||||
<abortOnError>0</abortOnError>
|
||||
<name>${product_fullname}.exe</name>
|
||||
<showMessageOnError>0</showMessageOnError>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</kill>
|
||||
<runProgram>
|
||||
<program>pkill</program>
|
||||
<programArguments>PreMiD</programArguments>
|
||||
<runAs>${env(USER)}</runAs>
|
||||
<useMSDOSPath>0</useMSDOSPath>
|
||||
<workingDirectory>${installdir}/</workingDirectory>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>osx</type>
|
||||
</platformTest>
|
||||
<processTest>
|
||||
<logic>is_running</logic>
|
||||
<name>PreMiD</name>
|
||||
</processTest>
|
||||
</ruleList>
|
||||
</runProgram>
|
||||
</actionList>
|
||||
</actionGroup>
|
||||
</preInstallationActionList>
|
||||
<readyToInstallActionList>
|
||||
<actionGroup>
|
||||
<actionList>
|
||||
<!-- Remove the old ARP Entry
|
||||
Get the old version -->
|
||||
<registryGet>
|
||||
<key>HKEY_LOCAL_MACHINE\Software\${project.windowsSoftwareRegistryPrefix}</key>
|
||||
<name>Version</name>
|
||||
<variable>oldVersion</variable>
|
||||
</registryGet>
|
||||
|
||||
<!-- Delete the old ARP registry keys -->
|
||||
<registryDelete>
|
||||
<key>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${project.fullName} ${oldVersion}</key>
|
||||
<name></name>
|
||||
</registryDelete>
|
||||
<registryDelete>
|
||||
<key>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Management\ARPCache\${project.fullName} ${oldVersion}</key>
|
||||
<name></name>
|
||||
</registryDelete>
|
||||
</actionList>
|
||||
<ruleList>
|
||||
<platformTest type="windows"/>
|
||||
<isTrue value="${isUpgradeMode}"/>
|
||||
</ruleList>
|
||||
</actionGroup>
|
||||
<actionGroup>
|
||||
<customErrorMessage>Couldn't download release... Try again later.</customErrorMessage>
|
||||
<progressText>Downloading latest release...</progressText>
|
||||
<actionList>
|
||||
<httpGet>
|
||||
<customErrorMessage>${platform_name}</customErrorMessage>
|
||||
<filename>${system_temp_directory}/PreMiD-release.zip</filename>
|
||||
<url>https://dl.premid.app/PreMiD-win32-x64.zip</url>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows-x64</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</httpGet>
|
||||
<httpGet>
|
||||
<customErrorMessage>${platform_name}</customErrorMessage>
|
||||
<filename>${system_temp_directory}/PreMiD-release.zip</filename>
|
||||
<url>https://dl.premid.app/PreMiD-win32-x86.zip</url>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows-x86</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</httpGet>
|
||||
<httpGet>
|
||||
<customErrorMessage>${platform_name}</customErrorMessage>
|
||||
<filename>${system_temp_directory}/PreMiD-release.zip</filename>
|
||||
<url>https://dl.premid.app/PreMiD-osx.zip</url>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>osx</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</httpGet>
|
||||
</actionList>
|
||||
</actionGroup>
|
||||
</readyToInstallActionList>
|
||||
<postInstallationActionList>
|
||||
<unzip>
|
||||
<addToUninstaller>0</addToUninstaller>
|
||||
<destinationDirectory>${installdir}</destinationDirectory>
|
||||
<progressText>Extracting release...</progressText>
|
||||
<zipFile>${system_temp_directory}/PreMiD-release.zip</zipFile>
|
||||
</unzip>
|
||||
<addDirectoriesToUninstaller>
|
||||
<addContents>1</addContents>
|
||||
<files>${installdir}/</files>
|
||||
</addDirectoriesToUninstaller>
|
||||
<registrySet>
|
||||
<key>HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Google\Chrome\Extensions\agjnjboanicjcpenljmaaigopkgdnihi</key>
|
||||
<name>update_url</name>
|
||||
<progressText>Adding Extension (Chrome only)</progressText>
|
||||
<type>REG_SZ</type>
|
||||
<value>https://clients2.google.com/service/update2/crx</value>
|
||||
<wowMode>64</wowMode>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</registrySet>
|
||||
</postInstallationActionList>
|
||||
<preUninstallationActionList>
|
||||
<actionGroup>
|
||||
<progressText>Killing ${product_fullname}...</progressText>
|
||||
<actionList>
|
||||
<kill>
|
||||
<abortOnError>0</abortOnError>
|
||||
<name>${product_fullname}.exe</name>
|
||||
<showMessageOnError>0</showMessageOnError>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</kill>
|
||||
<runProgram>
|
||||
<program>pkill</program>
|
||||
<programArguments>PreMiD</programArguments>
|
||||
<runAs>${env(USER)}</runAs>
|
||||
<useMSDOSPath>0</useMSDOSPath>
|
||||
<workingDirectory>${installdir}/</workingDirectory>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>osx</type>
|
||||
</platformTest>
|
||||
<processTest>
|
||||
<logic>is_running</logic>
|
||||
<name>PreMiD</name>
|
||||
</processTest>
|
||||
</ruleList>
|
||||
</runProgram>
|
||||
</actionList>
|
||||
</actionGroup>
|
||||
</preUninstallationActionList>
|
||||
<postUninstallationActionList>
|
||||
<actionGroup>
|
||||
<actionList>
|
||||
<showQuestion>
|
||||
<default>yes</default>
|
||||
<text>Uninstall browser extension?</text>
|
||||
<variable>removeExtension</variable>
|
||||
</showQuestion>
|
||||
<registryDelete>
|
||||
<key>HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Google\Chrome\Extensions\agjnjboanicjcpenljmaaigopkgdnihi</key>
|
||||
<name></name>
|
||||
<ruleList>
|
||||
<isTrue>
|
||||
<value>${removeExtension}</value>
|
||||
</isTrue>
|
||||
</ruleList>
|
||||
</registryDelete>
|
||||
</actionList>
|
||||
<ruleList>
|
||||
<registryTest>
|
||||
<key>HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Google\Chrome\Extensions\agjnjboanicjcpenljmaaigopkgdnihi</key>
|
||||
<logic>exists</logic>
|
||||
<name></name>
|
||||
<wowMode>64</wowMode>
|
||||
</registryTest>
|
||||
</ruleList>
|
||||
</actionGroup>
|
||||
</postUninstallationActionList>
|
||||
<checkForUpdates>1</checkForUpdates>
|
||||
<compressionAlgorithm>lzham-ultra</compressionAlgorithm>
|
||||
<defaultInstallationMode>unattended</defaultInstallationMode>
|
||||
<description>Rich Presence for web services.</description>
|
||||
<disableSplashScreen>1</disableSplashScreen>
|
||||
<enableRollback>0</enableRollback>
|
||||
<enableSslSupport>1</enableSslSupport>
|
||||
<enableTimestamp>1</enableTimestamp>
|
||||
<installationScope>user</installationScope>
|
||||
<installationType>upgrade</installationType>
|
||||
<licenseFileEncoding>utf-8</licenseFileEncoding>
|
||||
<osxApplicationBundleIcon>appIcon.icns</osxApplicationBundleIcon>
|
||||
<osxApplicationBundleIdentifier>eu.Timeraa.PreMiD</osxApplicationBundleIdentifier>
|
||||
<osxUninstallerApplicationBundleIcon>appIcon.icns</osxUninstallerApplicationBundleIcon>
|
||||
<outputDirectory>../dist/installer</outputDirectory>
|
||||
<overwritePolicy>onlyIfNewer</overwritePolicy>
|
||||
<productDisplayIcon>C:/Users/metzf/Documents/Development/PreMiD/PreMiD/installer_assets/appIcon.ico</productDisplayIcon>
|
||||
<productUrlHelpLink>https://discord.gg/PreMiD</productUrlHelpLink>
|
||||
<productUrlInfoAbout>https://premid.app</productUrlInfoAbout>
|
||||
<readmeFileEncoding>utf-8</readmeFileEncoding>
|
||||
<removeLogFile>1</removeLogFile>
|
||||
<removeUninstallationLogFile>1</removeUninstallationLogFile>
|
||||
<saveRelativePaths>1</saveRelativePaths>
|
||||
<summary>Rich Presence for web services.</summary>
|
||||
<updateInformationURL>https://api.premid.app/app/update</updateInformationURL>
|
||||
<vendor>Timeraa</vendor>
|
||||
<versionId>200</versionId>
|
||||
<windowsExecutableIcon>appIcon.ico</windowsExecutableIcon>
|
||||
<windowsResourceFileDescription>Rich Presence for web services.</windowsResourceFileDescription>
|
||||
<windowsUninstallerExecutableIcon>appIcon.ico</windowsUninstallerExecutableIcon>
|
||||
<licenseFileList>
|
||||
<licenseFile>
|
||||
<code>en</code>
|
||||
<encoding>utf-8</encoding>
|
||||
<file>../LICENSE</file>
|
||||
</licenseFile>
|
||||
</licenseFileList>
|
||||
<parameterList>
|
||||
<directoryParameter>
|
||||
<name>installdir</name>
|
||||
<description>Installer.Parameter.installdir.description</description>
|
||||
<explanation>Installer.Parameter.installdir.explanation</explanation>
|
||||
<value></value>
|
||||
<default>${platform_install_prefix}/${product_shortname}</default>
|
||||
<allowEmptyValue>0</allowEmptyValue>
|
||||
<ask>yes</ask>
|
||||
<cliOptionName>prefix</cliOptionName>
|
||||
<mustBeWritable>yes</mustBeWritable>
|
||||
<mustExist>0</mustExist>
|
||||
<width>40</width>
|
||||
</directoryParameter>
|
||||
<parameterGroup>
|
||||
<name>post_install_page</name>
|
||||
<title>Installation Finished</title>
|
||||
<explanation></explanation>
|
||||
<value></value>
|
||||
<default></default>
|
||||
<insertAfter>installation</insertAfter>
|
||||
<parameterList>
|
||||
<labelParameter>
|
||||
<name>general</name>
|
||||
<description>General</description>
|
||||
<explanation></explanation>
|
||||
<image></image>
|
||||
</labelParameter>
|
||||
<booleanParameter>
|
||||
<name>addDesktop</name>
|
||||
<description>Create Desktop Icon</description>
|
||||
<explanation></explanation>
|
||||
<value>false</value>
|
||||
<default>false</default>
|
||||
<displayStyle>checkbox-left</displayStyle>
|
||||
</booleanParameter>
|
||||
<booleanParameter>
|
||||
<name>launchApp</name>
|
||||
<description>Launch App</description>
|
||||
<explanation></explanation>
|
||||
<value>true</value>
|
||||
<default>true</default>
|
||||
<displayStyle>checkbox-left</displayStyle>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</booleanParameter>
|
||||
<labelParameter>
|
||||
<name>extra</name>
|
||||
<description>Extra</description>
|
||||
<explanation></explanation>
|
||||
<image></image>
|
||||
</labelParameter>
|
||||
<booleanParameter>
|
||||
<name>openStore</name>
|
||||
<description>Open Presence Store</description>
|
||||
<explanation></explanation>
|
||||
<value>true</value>
|
||||
<default>true</default>
|
||||
<displayStyle>checkbox-left</displayStyle>
|
||||
</booleanParameter>
|
||||
</parameterList>
|
||||
<postShowPageActionList>
|
||||
<createShortcuts>
|
||||
<destination>${windows_folder_desktopdirectory}</destination>
|
||||
<ruleList>
|
||||
<isTrue>
|
||||
<value>${addDesktop}</value>
|
||||
</isTrue>
|
||||
</ruleList>
|
||||
<shortcutList>
|
||||
<quickLaunchShortcut>
|
||||
<comment>Rich Presence for web services.</comment>
|
||||
<name>PreMiD</name>
|
||||
<runAsAdmin>0</runAsAdmin>
|
||||
<runInTerminal>0</runInTerminal>
|
||||
<windowsExec>${installdir}/PreMiD.${platform_exec_suffix}</windowsExec>
|
||||
<windowsExecArgs></windowsExecArgs>
|
||||
<windowsIcon></windowsIcon>
|
||||
<windowsPath></windowsPath>
|
||||
</quickLaunchShortcut>
|
||||
</shortcutList>
|
||||
</createShortcuts>
|
||||
<runProgram>
|
||||
<abortOnError>0</abortOnError>
|
||||
<program>PreMiD.exe</program>
|
||||
<programArguments>&</programArguments>
|
||||
<progressText>Launching PreMiD...</progressText>
|
||||
<showMessageOnError>0</showMessageOnError>
|
||||
<workingDirectory>${installdir}</workingDirectory>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
<isTrue>
|
||||
<value>${launchApp}</value>
|
||||
</isTrue>
|
||||
</ruleList>
|
||||
</runProgram>
|
||||
<runProgram>
|
||||
<abortOnError>0</abortOnError>
|
||||
<program>open</program>
|
||||
<programArguments>${installdir}/PreMiD.app</programArguments>
|
||||
<progressText>Launching PreMiD...</progressText>
|
||||
<runAs>${env(USER)}</runAs>
|
||||
<showMessageOnError>0</showMessageOnError>
|
||||
<useMSDOSPath>0</useMSDOSPath>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>osx</type>
|
||||
</platformTest>
|
||||
<isTrue>
|
||||
<value>${launchApp}</value>
|
||||
</isTrue>
|
||||
</ruleList>
|
||||
</runProgram>
|
||||
<launchBrowser>
|
||||
<url>https://premid.app/store</url>
|
||||
<ruleList>
|
||||
<isTrue>
|
||||
<value>${openStore}</value>
|
||||
</isTrue>
|
||||
</ruleList>
|
||||
</launchBrowser>
|
||||
<exit/>
|
||||
</postShowPageActionList>
|
||||
</parameterGroup>
|
||||
</parameterList>
|
||||
<platformOptionsList>
|
||||
<platformOptions>
|
||||
<platform>windows</platform>
|
||||
</platformOptions>
|
||||
</platformOptionsList>
|
||||
</project>
|
||||
|
||||
460
installer_assets/PreMiD.xml
Normal file
460
installer_assets/PreMiD.xml
Normal file
@@ -0,0 +1,460 @@
|
||||
<project>
|
||||
<shortName>PreMiD</shortName>
|
||||
<fullName>PreMiD</fullName>
|
||||
<version>latest</version>
|
||||
<installerFilename>${product_shortname}-${platform_name}-installer.${platform_exec_suffix}</installerFilename>
|
||||
<debugLevel>0</debugLevel>
|
||||
<licenseFile>../LICENSE</licenseFile>
|
||||
<leftImage>leftSide.png</leftImage>
|
||||
<logoImage>logo.png</logoImage>
|
||||
<splashImage>logo.png</splashImage>
|
||||
<componentList>
|
||||
<component>
|
||||
<name>default</name>
|
||||
<description>Default Component</description>
|
||||
<canBeEdited>1</canBeEdited>
|
||||
<selected>1</selected>
|
||||
<show>1</show>
|
||||
<folderList>
|
||||
<folder>
|
||||
<description>Program Files</description>
|
||||
<destination>${installdir}</destination>
|
||||
<name>programfiles</name>
|
||||
<platforms>all</platforms>
|
||||
<shortcutList>
|
||||
<shortcut>
|
||||
<comment>Uninstall</comment>
|
||||
<exec>${installdir}/${uninstallerName}</exec>
|
||||
<icon></icon>
|
||||
<name>Uninstall ${product_fullname}</name>
|
||||
<path>${installdir}</path>
|
||||
<platforms>all</platforms>
|
||||
<runAsAdmin>0</runAsAdmin>
|
||||
<runInTerminal>0</runInTerminal>
|
||||
<windowsExec>${installdir}/${uninstallerName}.exe</windowsExec>
|
||||
<windowsExecArgs></windowsExecArgs>
|
||||
<windowsIcon></windowsIcon>
|
||||
<windowsPath>${installdir}</windowsPath>
|
||||
</shortcut>
|
||||
</shortcutList>
|
||||
</folder>
|
||||
<folder>
|
||||
<description>Program Files</description>
|
||||
<destination>${installdir}</destination>
|
||||
<name>programfileslinux</name>
|
||||
<platforms>linux</platforms>
|
||||
</folder>
|
||||
<folder>
|
||||
<description>Program Files</description>
|
||||
<destination>${installdir}</destination>
|
||||
<name>programfileslinux64</name>
|
||||
<platforms>linux-x64</platforms>
|
||||
</folder>
|
||||
<folder>
|
||||
<description>Program Files</description>
|
||||
<destination>${installdir}</destination>
|
||||
<name>programfileswindows</name>
|
||||
<platforms>windows</platforms>
|
||||
</folder>
|
||||
<folder>
|
||||
<description>Program Files</description>
|
||||
<destination>${installdir}</destination>
|
||||
<name>programfileswindows64</name>
|
||||
<platforms>windows-x64</platforms>
|
||||
</folder>
|
||||
<folder>
|
||||
<description>Program Files</description>
|
||||
<destination>${installdir}</destination>
|
||||
<name>programfilesosx</name>
|
||||
<platforms>osx</platforms>
|
||||
</folder>
|
||||
</folderList>
|
||||
<startMenuShortcutList>
|
||||
<startMenuShortcut>
|
||||
<comment>Uninstall ${product_fullname}</comment>
|
||||
<name>Uninstall ${product_fullname}</name>
|
||||
<runAsAdmin>0</runAsAdmin>
|
||||
<runInTerminal>0</runInTerminal>
|
||||
<windowsExec>${installdir}/${uninstallerName}.exe</windowsExec>
|
||||
<windowsExecArgs></windowsExecArgs>
|
||||
<windowsIcon></windowsIcon>
|
||||
<windowsPath>${installdir}/</windowsPath>
|
||||
</startMenuShortcut>
|
||||
<startMenuShortcut>
|
||||
<comment>Rich Presence for web services.</comment>
|
||||
<name>PreMiD</name>
|
||||
<runAsAdmin>0</runAsAdmin>
|
||||
<runInTerminal>0</runInTerminal>
|
||||
<windowsExec>${installdir}/PreMiD.${platform_exec_suffix}</windowsExec>
|
||||
<windowsExecArgs></windowsExecArgs>
|
||||
<windowsIcon></windowsIcon>
|
||||
<windowsPath></windowsPath>
|
||||
</startMenuShortcut>
|
||||
</startMenuShortcutList>
|
||||
</component>
|
||||
</componentList>
|
||||
<initializationActionList>
|
||||
<setInstallerVariable>
|
||||
<name>project.installationType</name>
|
||||
<value>upgrade</value>
|
||||
<ruleList>
|
||||
<fileExists>
|
||||
<path>${installdir}</path>
|
||||
</fileExists>
|
||||
</ruleList>
|
||||
</setInstallerVariable>
|
||||
</initializationActionList>
|
||||
<preInstallationActionList>
|
||||
<actionGroup>
|
||||
<progressText>Killing ${product_fullname}...</progressText>
|
||||
<actionList>
|
||||
<kill>
|
||||
<abortOnError>0</abortOnError>
|
||||
<name>${product_fullname}.exe</name>
|
||||
<showMessageOnError>0</showMessageOnError>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</kill>
|
||||
<runProgram>
|
||||
<program>pkill</program>
|
||||
<programArguments>PreMiD</programArguments>
|
||||
<runAs>${env(USER)}</runAs>
|
||||
<useMSDOSPath>0</useMSDOSPath>
|
||||
<workingDirectory>${installdir}/</workingDirectory>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>osx</type>
|
||||
</platformTest>
|
||||
<processTest>
|
||||
<logic>is_running</logic>
|
||||
<name>PreMiD</name>
|
||||
</processTest>
|
||||
</ruleList>
|
||||
</runProgram>
|
||||
</actionList>
|
||||
</actionGroup>
|
||||
</preInstallationActionList>
|
||||
<readyToInstallActionList>
|
||||
<actionGroup>
|
||||
<actionList>
|
||||
<!-- Remove the old ARP Entry
|
||||
Get the old version -->
|
||||
<registryGet>
|
||||
<key>HKEY_LOCAL_MACHINE\Software\${project.windowsSoftwareRegistryPrefix}</key>
|
||||
<name>Version</name>
|
||||
<variable>oldVersion</variable>
|
||||
</registryGet>
|
||||
|
||||
<!-- Delete the old ARP registry keys -->
|
||||
<registryDelete>
|
||||
<key>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${project.fullName} ${oldVersion}</key>
|
||||
<name></name>
|
||||
</registryDelete>
|
||||
<registryDelete>
|
||||
<key>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Management\ARPCache\${project.fullName} ${oldVersion}</key>
|
||||
<name></name>
|
||||
</registryDelete>
|
||||
</actionList>
|
||||
<ruleList>
|
||||
<platformTest type="windows"/>
|
||||
<isTrue value="${isUpgradeMode}"/>
|
||||
</ruleList>
|
||||
</actionGroup>
|
||||
<actionGroup>
|
||||
<customErrorMessage>Couldn't download release... Try again later.</customErrorMessage>
|
||||
<progressText>Downloading latest release...</progressText>
|
||||
<actionList>
|
||||
<httpGet>
|
||||
<customErrorMessage>${platform_name}</customErrorMessage>
|
||||
<filename>${system_temp_directory}/PreMiD-release.zip</filename>
|
||||
<url>https://dl.premid.app/PreMiD-win32-x64.zip</url>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows-x64</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</httpGet>
|
||||
<httpGet>
|
||||
<customErrorMessage>${platform_name}</customErrorMessage>
|
||||
<filename>${system_temp_directory}/PreMiD-release.zip</filename>
|
||||
<url>https://dl.premid.app/PreMiD-win32-x86.zip</url>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows-x86</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</httpGet>
|
||||
<httpGet>
|
||||
<customErrorMessage>${platform_name}</customErrorMessage>
|
||||
<filename>${system_temp_directory}/PreMiD-release.zip</filename>
|
||||
<url>https://dl.premid.app/PreMiD-osx.zip</url>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>osx</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</httpGet>
|
||||
</actionList>
|
||||
</actionGroup>
|
||||
</readyToInstallActionList>
|
||||
<postInstallationActionList>
|
||||
<unzip>
|
||||
<addToUninstaller>0</addToUninstaller>
|
||||
<destinationDirectory>${installdir}</destinationDirectory>
|
||||
<progressText>Extracting release...</progressText>
|
||||
<zipFile>${system_temp_directory}/PreMiD-release.zip</zipFile>
|
||||
</unzip>
|
||||
<addDirectoriesToUninstaller>
|
||||
<addContents>1</addContents>
|
||||
<files>${installdir}/</files>
|
||||
</addDirectoriesToUninstaller>
|
||||
<registrySet>
|
||||
<key>HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Google\Chrome\Extensions\agjnjboanicjcpenljmaaigopkgdnihi</key>
|
||||
<name>update_url</name>
|
||||
<progressText>Adding Extension (Chrome only)</progressText>
|
||||
<type>REG_SZ</type>
|
||||
<value>https://clients2.google.com/service/update2/crx</value>
|
||||
<wowMode>64</wowMode>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</registrySet>
|
||||
</postInstallationActionList>
|
||||
<preUninstallationActionList>
|
||||
<actionGroup>
|
||||
<progressText>Killing ${product_fullname}...</progressText>
|
||||
<actionList>
|
||||
<kill>
|
||||
<abortOnError>0</abortOnError>
|
||||
<name>${product_fullname}.exe</name>
|
||||
<showMessageOnError>0</showMessageOnError>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</kill>
|
||||
<runProgram>
|
||||
<program>pkill</program>
|
||||
<programArguments>PreMiD</programArguments>
|
||||
<runAs>${env(USER)}</runAs>
|
||||
<useMSDOSPath>0</useMSDOSPath>
|
||||
<workingDirectory>${installdir}/</workingDirectory>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>osx</type>
|
||||
</platformTest>
|
||||
<processTest>
|
||||
<logic>is_running</logic>
|
||||
<name>PreMiD</name>
|
||||
</processTest>
|
||||
</ruleList>
|
||||
</runProgram>
|
||||
</actionList>
|
||||
</actionGroup>
|
||||
</preUninstallationActionList>
|
||||
<postUninstallationActionList>
|
||||
<actionGroup>
|
||||
<actionList>
|
||||
<showQuestion>
|
||||
<default>yes</default>
|
||||
<text>Uninstall browser extension?</text>
|
||||
<variable>removeExtension</variable>
|
||||
</showQuestion>
|
||||
<registryDelete>
|
||||
<key>HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Google\Chrome\Extensions\agjnjboanicjcpenljmaaigopkgdnihi</key>
|
||||
<name></name>
|
||||
<ruleList>
|
||||
<isTrue>
|
||||
<value>${removeExtension}</value>
|
||||
</isTrue>
|
||||
</ruleList>
|
||||
</registryDelete>
|
||||
</actionList>
|
||||
<ruleList>
|
||||
<registryTest>
|
||||
<key>HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Google\Chrome\Extensions\agjnjboanicjcpenljmaaigopkgdnihi</key>
|
||||
<logic>exists</logic>
|
||||
<name></name>
|
||||
<wowMode>64</wowMode>
|
||||
</registryTest>
|
||||
</ruleList>
|
||||
</actionGroup>
|
||||
</postUninstallationActionList>
|
||||
<checkForUpdates>1</checkForUpdates>
|
||||
<compressionAlgorithm>lzham-ultra</compressionAlgorithm>
|
||||
<description>Rich Presence for web services.</description>
|
||||
<disableSplashScreen>1</disableSplashScreen>
|
||||
<enableRollback>0</enableRollback>
|
||||
<enableSslSupport>1</enableSslSupport>
|
||||
<enableTimestamp>1</enableTimestamp>
|
||||
<installationScope>user</installationScope>
|
||||
<licenseFileEncoding>utf-8</licenseFileEncoding>
|
||||
<osxApplicationBundleIcon>appIcon.icns</osxApplicationBundleIcon>
|
||||
<osxApplicationBundleIdentifier>eu.Timeraa.PreMiD</osxApplicationBundleIdentifier>
|
||||
<osxUninstallerApplicationBundleIcon>appIcon.icns</osxUninstallerApplicationBundleIcon>
|
||||
<outputDirectory>../dist/installer</outputDirectory>
|
||||
<overwritePolicy>onlyIfNewer</overwritePolicy>
|
||||
<productDisplayIcon>C:/Users/metzf/Documents/Development/PreMiD/PreMiD/installer_assets/appIcon.ico</productDisplayIcon>
|
||||
<productUrlHelpLink>https://discord.gg/PreMiD</productUrlHelpLink>
|
||||
<productUrlInfoAbout>https://premid.app</productUrlInfoAbout>
|
||||
<readmeFileEncoding>utf-8</readmeFileEncoding>
|
||||
<removeLogFile>1</removeLogFile>
|
||||
<removeUninstallationLogFile>1</removeUninstallationLogFile>
|
||||
<saveRelativePaths>1</saveRelativePaths>
|
||||
<summary>Rich Presence for web services.</summary>
|
||||
<updateInformationURL>https://api.premid.app/app/update</updateInformationURL>
|
||||
<vendor>Timeraa</vendor>
|
||||
<versionId>200</versionId>
|
||||
<windowsExecutableIcon>appIcon.ico</windowsExecutableIcon>
|
||||
<windowsResourceFileDescription>Rich Presence for web services.</windowsResourceFileDescription>
|
||||
<windowsUninstallerExecutableIcon>appIcon.ico</windowsUninstallerExecutableIcon>
|
||||
<licenseFileList>
|
||||
<licenseFile>
|
||||
<code>en</code>
|
||||
<encoding>utf-8</encoding>
|
||||
<file>../LICENSE</file>
|
||||
</licenseFile>
|
||||
</licenseFileList>
|
||||
<parameterList>
|
||||
<directoryParameter>
|
||||
<name>installdir</name>
|
||||
<description>Installer.Parameter.installdir.description</description>
|
||||
<explanation>Installer.Parameter.installdir.explanation</explanation>
|
||||
<value></value>
|
||||
<default>${platform_install_prefix}/${product_shortname}</default>
|
||||
<allowEmptyValue>0</allowEmptyValue>
|
||||
<ask>yes</ask>
|
||||
<cliOptionName>prefix</cliOptionName>
|
||||
<mustBeWritable>yes</mustBeWritable>
|
||||
<mustExist>0</mustExist>
|
||||
<width>40</width>
|
||||
</directoryParameter>
|
||||
<parameterGroup>
|
||||
<name>post_install_page</name>
|
||||
<title>Installation Finished</title>
|
||||
<explanation></explanation>
|
||||
<value></value>
|
||||
<default></default>
|
||||
<insertAfter>installation</insertAfter>
|
||||
<parameterList>
|
||||
<labelParameter>
|
||||
<name>general</name>
|
||||
<description>General</description>
|
||||
<explanation></explanation>
|
||||
<image></image>
|
||||
</labelParameter>
|
||||
<booleanParameter>
|
||||
<name>addDesktop</name>
|
||||
<description>Create Desktop Icon</description>
|
||||
<explanation></explanation>
|
||||
<value>false</value>
|
||||
<default>false</default>
|
||||
<displayStyle>checkbox-left</displayStyle>
|
||||
</booleanParameter>
|
||||
<booleanParameter>
|
||||
<name>launchApp</name>
|
||||
<description>Launch App</description>
|
||||
<explanation></explanation>
|
||||
<value>true</value>
|
||||
<default>true</default>
|
||||
<displayStyle>checkbox-left</displayStyle>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</booleanParameter>
|
||||
<labelParameter>
|
||||
<name>extra</name>
|
||||
<description>Extra</description>
|
||||
<explanation></explanation>
|
||||
<image></image>
|
||||
</labelParameter>
|
||||
<booleanParameter>
|
||||
<name>openStore</name>
|
||||
<description>Open Presence Store</description>
|
||||
<explanation></explanation>
|
||||
<value>true</value>
|
||||
<default>true</default>
|
||||
<displayStyle>checkbox-left</displayStyle>
|
||||
</booleanParameter>
|
||||
</parameterList>
|
||||
<postShowPageActionList>
|
||||
<createShortcuts>
|
||||
<destination>${windows_folder_desktopdirectory}</destination>
|
||||
<ruleList>
|
||||
<isTrue>
|
||||
<value>${addDesktop}</value>
|
||||
</isTrue>
|
||||
</ruleList>
|
||||
<shortcutList>
|
||||
<quickLaunchShortcut>
|
||||
<comment>Rich Presence for web services.</comment>
|
||||
<name>PreMiD</name>
|
||||
<runAsAdmin>0</runAsAdmin>
|
||||
<runInTerminal>0</runInTerminal>
|
||||
<windowsExec>${installdir}/PreMiD.${platform_exec_suffix}</windowsExec>
|
||||
<windowsExecArgs></windowsExecArgs>
|
||||
<windowsIcon></windowsIcon>
|
||||
<windowsPath></windowsPath>
|
||||
</quickLaunchShortcut>
|
||||
</shortcutList>
|
||||
</createShortcuts>
|
||||
<runProgram>
|
||||
<abortOnError>0</abortOnError>
|
||||
<program>PreMiD.exe</program>
|
||||
<programArguments>&</programArguments>
|
||||
<progressText>Launching PreMiD...</progressText>
|
||||
<showMessageOnError>0</showMessageOnError>
|
||||
<workingDirectory>${installdir}</workingDirectory>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
<isTrue>
|
||||
<value>${launchApp}</value>
|
||||
</isTrue>
|
||||
</ruleList>
|
||||
</runProgram>
|
||||
<runProgram>
|
||||
<abortOnError>0</abortOnError>
|
||||
<program>open</program>
|
||||
<programArguments>${installdir}/PreMiD.app</programArguments>
|
||||
<progressText>Launching PreMiD...</progressText>
|
||||
<runAs>${env(USER)}</runAs>
|
||||
<showMessageOnError>0</showMessageOnError>
|
||||
<useMSDOSPath>0</useMSDOSPath>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>osx</type>
|
||||
</platformTest>
|
||||
<isTrue>
|
||||
<value>${launchApp}</value>
|
||||
</isTrue>
|
||||
</ruleList>
|
||||
</runProgram>
|
||||
<launchBrowser>
|
||||
<url>https://premid.app/store</url>
|
||||
<ruleList>
|
||||
<isTrue>
|
||||
<value>${openStore}</value>
|
||||
</isTrue>
|
||||
</ruleList>
|
||||
</launchBrowser>
|
||||
<exit/>
|
||||
</postShowPageActionList>
|
||||
</parameterGroup>
|
||||
</parameterList>
|
||||
<platformOptionsList>
|
||||
<platformOptions>
|
||||
<platform>windows</platform>
|
||||
</platformOptions>
|
||||
</platformOptionsList>
|
||||
</project>
|
||||
|
||||
@@ -1,265 +0,0 @@
|
||||
<project>
|
||||
<shortName>PreMiD</shortName>
|
||||
<fullName>PreMiD</fullName>
|
||||
<version>VERSION</version>
|
||||
<installerFilename>${product_fullname}-${product_version}-installer_64bit.${platform_exec_suffix}</installerFilename>
|
||||
<wrapLicenseFileText>0</wrapLicenseFileText>
|
||||
<logoImage>../installer_assets/appIcon.png</logoImage>
|
||||
<osxApplicationBundleIcon>../installer_assets/appIcon.icns</osxApplicationBundleIcon>
|
||||
<componentList>
|
||||
<component>
|
||||
<name>default</name>
|
||||
<description>Default Component</description>
|
||||
<canBeEdited>1</canBeEdited>
|
||||
<selected>1</selected>
|
||||
<show>1</show>
|
||||
<folderList>
|
||||
<folder>
|
||||
<description>Program Files</description>
|
||||
<destination>${installdir}</destination>
|
||||
<name>programfiles</name>
|
||||
<platforms>all</platforms>
|
||||
<distributionFileList>
|
||||
<distributionFile>
|
||||
<origin>update.ini</origin>
|
||||
</distributionFile>
|
||||
</distributionFileList>
|
||||
</folder>
|
||||
<folder>
|
||||
<description>Program Files</description>
|
||||
<destination>${installdir}</destination>
|
||||
<name>programfileslinux</name>
|
||||
<platforms>linux</platforms>
|
||||
</folder>
|
||||
<folder>
|
||||
<description>Program Files</description>
|
||||
<destination>${installdir}</destination>
|
||||
<name>programfileswindows</name>
|
||||
<platforms>windows</platforms>
|
||||
<distributionFileList>
|
||||
<distributionDirectory allowWildcards="1">
|
||||
<origin>../dist/PACKAGEDNAME/*</origin>
|
||||
</distributionDirectory>
|
||||
<distributionFile>
|
||||
<origin>../installer_assets/appIcon.ico</origin>
|
||||
</distributionFile>
|
||||
<distributionFile>
|
||||
<origin>../installer_assets/updater.exe</origin>
|
||||
</distributionFile>
|
||||
</distributionFileList>
|
||||
</folder>
|
||||
<folder>
|
||||
<description>Program Files</description>
|
||||
<destination>${installdir}</destination>
|
||||
<name>programfilesosx</name>
|
||||
<platforms>osx</platforms>
|
||||
<distributionFileList>
|
||||
<distributionFile>
|
||||
<origin>../installer_assets/updater.app</origin>
|
||||
</distributionFile>
|
||||
<distributionFile>
|
||||
<origin>../dist/PACKAGEDNAME/PreMiD.app</origin>
|
||||
</distributionFile>
|
||||
</distributionFileList>
|
||||
</folder>
|
||||
</folderList>
|
||||
<startMenuShortcutList>
|
||||
<startMenuShortcut>
|
||||
<comment></comment>
|
||||
<name>${product_fullname}</name>
|
||||
<runAsAdmin>0</runAsAdmin>
|
||||
<runInTerminal>0</runInTerminal>
|
||||
<windowsExec>${installdir}/PreMiD.exe</windowsExec>
|
||||
<windowsExecArgs></windowsExecArgs>
|
||||
<windowsIcon></windowsIcon>
|
||||
<windowsPath>${installdir}/</windowsPath>
|
||||
</startMenuShortcut>
|
||||
</startMenuShortcutList>
|
||||
</component>
|
||||
</componentList>
|
||||
<preInstallationActionList>
|
||||
<kill>
|
||||
<abortOnError>0</abortOnError>
|
||||
<name>${product_fullname}.exe</name>
|
||||
<progressText>Killing ${product_fullname}</progressText>
|
||||
<showMessageOnError>0</showMessageOnError>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</kill>
|
||||
<runProgram>
|
||||
<program>pkill</program>
|
||||
<programArguments>PreMiD</programArguments>
|
||||
<runAs>${env(USER)}</runAs>
|
||||
<useMSDOSPath>0</useMSDOSPath>
|
||||
<workingDirectory>${installdir}/</workingDirectory>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>osx</type>
|
||||
</platformTest>
|
||||
<processTest>
|
||||
<logic>is_running</logic>
|
||||
<name>PreMiD</name>
|
||||
</processTest>
|
||||
</ruleList>
|
||||
</runProgram>
|
||||
<runProgram>
|
||||
<program>${windows_folder_local_appdata}\premid\Update.exe</program>
|
||||
<programArguments>--uninstall</programArguments>
|
||||
<onErrorActionList>
|
||||
<deleteFile>
|
||||
<matchHiddenFiles>1</matchHiddenFiles>
|
||||
<path>${windows_folder_local_appdata}\premid</path>
|
||||
</deleteFile>
|
||||
</onErrorActionList>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
<fileExists>
|
||||
<path>${windows_folder_local_appdata}\premid\PreMiD.exe</path>
|
||||
</fileExists>
|
||||
</ruleList>
|
||||
</runProgram>
|
||||
<runProgram>
|
||||
<program>${windows_folder_common_appdata}\${system_username}\premid\Update.exe</program>
|
||||
<programArguments>--uninstall</programArguments>
|
||||
<onErrorActionList>
|
||||
<deleteFile>
|
||||
<matchHiddenFiles>1</matchHiddenFiles>
|
||||
<path>${windows_folder_common_appdata}\${system_username}\premid</path>
|
||||
</deleteFile>
|
||||
</onErrorActionList>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
<fileExists>
|
||||
<path>${windows_folder_common_appdata}\${system_username}\premid\PreMiD.exe</path>
|
||||
</fileExists>
|
||||
</ruleList>
|
||||
</runProgram>
|
||||
</preInstallationActionList>
|
||||
<postInstallationActionList>
|
||||
<runProgram>
|
||||
<abortOnError>0</abortOnError>
|
||||
<program>PreMiD.exe</program>
|
||||
<programArguments>&</programArguments>
|
||||
<progressText>Launching PreMiD</progressText>
|
||||
<show>0</show>
|
||||
<showMessageOnError>0</showMessageOnError>
|
||||
<workingDirectory>${installdir}</workingDirectory>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</runProgram>
|
||||
<setInstallerVariableFromRegEx show="0">
|
||||
<name>escaped_installdir</name>
|
||||
<pattern> </pattern>
|
||||
<substitution>\\ </substitution>
|
||||
<text>${installdir}</text>
|
||||
</setInstallerVariableFromRegEx>
|
||||
<runProgram>
|
||||
<program>open</program>
|
||||
<programArguments> ${escaped_installdir}/PreMiD.app</programArguments>
|
||||
<progressText>Launching PreMiD</progressText>
|
||||
<runAs>${env(USER)}</runAs>
|
||||
<useMSDOSPath>0</useMSDOSPath>
|
||||
<workingDirectory>${installdir}/</workingDirectory>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>osx</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</runProgram>
|
||||
<deleteFile>
|
||||
<path>${installdir}/update</path>
|
||||
</deleteFile>
|
||||
<addDirectoriesToUninstaller>
|
||||
<addContents>1</addContents>
|
||||
<files>${installdir}</files>
|
||||
</addDirectoriesToUninstaller>
|
||||
<deleteFile>
|
||||
<path>${windows_folder_local_appdata}\premid</path>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</deleteFile>
|
||||
</postInstallationActionList>
|
||||
<preUninstallationActionList>
|
||||
<kill>
|
||||
<abortOnError>0</abortOnError>
|
||||
<name>${product_fullname}.exe</name>
|
||||
<progressText>Killing ${product_fullname}</progressText>
|
||||
<showMessageOnError>0</showMessageOnError>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>windows</type>
|
||||
</platformTest>
|
||||
</ruleList>
|
||||
</kill>
|
||||
<runProgram>
|
||||
<program>pkill</program>
|
||||
<programArguments>PreMiD</programArguments>
|
||||
<runAs>${env(USER)}</runAs>
|
||||
<useMSDOSPath>0</useMSDOSPath>
|
||||
<workingDirectory>${installdir}/</workingDirectory>
|
||||
<ruleList>
|
||||
<platformTest>
|
||||
<type>osx</type>
|
||||
</platformTest>
|
||||
<processTest>
|
||||
<logic>is_running</logic>
|
||||
<name>PreMiD</name>
|
||||
</processTest>
|
||||
</ruleList>
|
||||
</runProgram>
|
||||
<deleteFile>
|
||||
<path>${installdir}/update/</path>
|
||||
</deleteFile>
|
||||
<deleteFile>
|
||||
<matchHiddenFiles>1</matchHiddenFiles>
|
||||
<path>${windows_folder_appdata}/${product_fullname}</path>
|
||||
</deleteFile>
|
||||
</preUninstallationActionList>
|
||||
<defaultInstallationMode>unattended</defaultInstallationMode>
|
||||
<deleteOnExit>1</deleteOnExit>
|
||||
<enableRollback>0</enableRollback>
|
||||
<enableTimestamp>1</enableTimestamp>
|
||||
<installationScope>user</installationScope>
|
||||
<overwritePolicy>onlyIfNewer</overwritePolicy>
|
||||
<osxApplicationBundleIdentifier>eu.Timeraa.PreMiD</osxApplicationBundleIdentifier>
|
||||
<outputDirectory>../dist/installer</outputDirectory>
|
||||
<overwritePolicy>onlyIfNewer</overwritePolicy>
|
||||
<productComments>Your Rich Presence for web services!</productComments>
|
||||
<productDisplayIcon>${installdir}/appIcon.ico</productDisplayIcon>
|
||||
<productUrlHelpLink>https://discord.premid.app</productUrlHelpLink>
|
||||
<productUrlInfoAbout>https://premid.app</productUrlInfoAbout>
|
||||
<removeLogFile>1</removeLogFile>
|
||||
<removeUninstallationLogFile>1</removeUninstallationLogFile>
|
||||
<saveRelativePaths>1</saveRelativePaths>
|
||||
<singleInstanceCheck>1</singleInstanceCheck>
|
||||
<unattendedModeUI>minimal</unattendedModeUI>
|
||||
<vendor>Timeraa</vendor>
|
||||
<windowsExecutableIcon>../installer_assets/appIcon.ico</windowsExecutableIcon>
|
||||
<parameterList>
|
||||
<directoryParameter>
|
||||
<name>installdir</name>
|
||||
<description>Installer.Parameter.installdir.description</description>
|
||||
<explanation>Installer.Parameter.installdir.explanation</explanation>
|
||||
<value></value>
|
||||
<default>${platform_install_prefix}/${product_shortname}</default>
|
||||
<allowEmptyValue>0</allowEmptyValue>
|
||||
<cliOptionName>prefix</cliOptionName>
|
||||
<mustBeWritable>1</mustBeWritable>
|
||||
<mustExist>0</mustExist>
|
||||
<width>40</width>
|
||||
</directoryParameter>
|
||||
</parameterList>
|
||||
</project>
|
||||
BIN
installer_assets/leftSide.png
Normal file
BIN
installer_assets/leftSide.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
BIN
installer_assets/logo.png
Normal file
BIN
installer_assets/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -1,6 +1,6 @@
|
||||
[Update]
|
||||
|
||||
url=https://api.premid.app/app/update/64bit/
|
||||
version_id= ?
|
||||
url=https://api.premid.app/app/update/
|
||||
version_id=?
|
||||
check_for_updates=1
|
||||
update_download_location=${installer_directory}/update
|
||||
update_download_location=${installer_directory}
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
<singleInstanceCheck>1</singleInstanceCheck>
|
||||
<requestedExecutionLevel>asInvoker</requestedExecutionLevel>
|
||||
<enableSslSupport>1</enableSslSupport>
|
||||
<outputDirectory>./</outputDirectory>
|
||||
<outputDirectory>../dist/app/</outputDirectory>
|
||||
<installerFilename>updater.${platform_exec_suffix}</installerFilename>
|
||||
</autoUpdateProject>
|
||||
369
pkg.ts
369
pkg.ts
@@ -1,6 +1,6 @@
|
||||
import * as electronPackager from "electron-packager";
|
||||
import { platform, arch } from "os";
|
||||
import { existsSync, readFileSync, writeFileSync } from "fs";
|
||||
import { existsSync, readFileSync, writeFileSync, copyFileSync } from "fs";
|
||||
import { resolve } from "path";
|
||||
import { exec } from "child_process";
|
||||
import { removeSync, ensureDirSync } from "fs-extra";
|
||||
@@ -9,225 +9,192 @@ import * as prompts from "prompts";
|
||||
import * as ora from "ora";
|
||||
|
||||
(async () => {
|
||||
let response = {
|
||||
os: "current",
|
||||
arch: "all",
|
||||
installer: false
|
||||
};
|
||||
let response = {
|
||||
os: "current",
|
||||
arch: "all",
|
||||
installer: false
|
||||
};
|
||||
|
||||
if (process.env.NODE_ENV !== "DePloY")
|
||||
response = await prompts([
|
||||
{
|
||||
type: "select",
|
||||
name: "arch",
|
||||
message: "What architecture?",
|
||||
choices: [
|
||||
{
|
||||
title: "current",
|
||||
value: "current"
|
||||
},
|
||||
{
|
||||
title: "all",
|
||||
value: "all"
|
||||
},
|
||||
{
|
||||
title: "arm64",
|
||||
value: "arm64"
|
||||
},
|
||||
{
|
||||
title: "armv7l",
|
||||
value: "armv7l"
|
||||
},
|
||||
{
|
||||
title: "ia32",
|
||||
value: "ia32"
|
||||
},
|
||||
{
|
||||
title: "mips64el",
|
||||
value: "mips64el"
|
||||
},
|
||||
{
|
||||
title: "x64",
|
||||
value: "x64"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
name: "os",
|
||||
message: "What operating system?",
|
||||
choices: [
|
||||
{
|
||||
title: "current",
|
||||
value: "current"
|
||||
},
|
||||
{
|
||||
title: "all",
|
||||
value: "all"
|
||||
},
|
||||
{
|
||||
title: "darwin",
|
||||
value: "darwin"
|
||||
},
|
||||
{
|
||||
title: "linux",
|
||||
value: "linux"
|
||||
},
|
||||
{
|
||||
title: "mas",
|
||||
value: "mas"
|
||||
},
|
||||
{
|
||||
title: "win32",
|
||||
value: "win32"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: "confirm",
|
||||
name: "installer",
|
||||
message: "With installer?"
|
||||
}
|
||||
]);
|
||||
if (process.env.NODE_ENV !== "DePloY")
|
||||
response = await prompts([
|
||||
{
|
||||
type: "select",
|
||||
name: "arch",
|
||||
message: "What architecture?",
|
||||
choices: [
|
||||
{
|
||||
title: "current",
|
||||
value: "current"
|
||||
},
|
||||
{
|
||||
title: "all",
|
||||
value: "all"
|
||||
},
|
||||
{
|
||||
title: "arm64",
|
||||
value: "arm64"
|
||||
},
|
||||
{
|
||||
title: "armv7l",
|
||||
value: "armv7l"
|
||||
},
|
||||
{
|
||||
title: "ia32",
|
||||
value: "ia32"
|
||||
},
|
||||
{
|
||||
title: "mips64el",
|
||||
value: "mips64el"
|
||||
},
|
||||
{
|
||||
title: "x64",
|
||||
value: "x64"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
name: "os",
|
||||
message: "What operating system?",
|
||||
choices: [
|
||||
{
|
||||
title: "current",
|
||||
value: "current"
|
||||
},
|
||||
{
|
||||
title: "all",
|
||||
value: "all"
|
||||
},
|
||||
{
|
||||
title: "darwin",
|
||||
value: "darwin"
|
||||
},
|
||||
{
|
||||
title: "linux",
|
||||
value: "linux"
|
||||
},
|
||||
{
|
||||
title: "mas",
|
||||
value: "mas"
|
||||
},
|
||||
{
|
||||
title: "win32",
|
||||
value: "win32"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "installer",
|
||||
type: "confirm",
|
||||
message: "Updater?"
|
||||
}
|
||||
]);
|
||||
|
||||
//#region WIP
|
||||
let installerXml = readFileSync(`installer_assets/installer.xml`, "utf-8");
|
||||
if (!response.os) {
|
||||
process.exit();
|
||||
}
|
||||
|
||||
installerXml = installerXml.replace(
|
||||
"{{VERSION}}",
|
||||
require("./package.json").version
|
||||
);
|
||||
installerXml = installerXml.replace(
|
||||
/(PACKAGEDNAME)/g,
|
||||
`PreMiD-${platform()}-${arch()}`
|
||||
);
|
||||
let icon: string;
|
||||
|
||||
ensureDirSync("tmp");
|
||||
writeFileSync("tmp/installer.xml", installerXml);
|
||||
//#endregion
|
||||
if (
|
||||
response.os == "darwin" ||
|
||||
(response.os === "current" && platform() === "darwin")
|
||||
)
|
||||
icon = "./installer_assets/appIcon.icns";
|
||||
if (["ia32", "x64"].includes(response.arch) || platform() === "win32")
|
||||
icon = "./installer_assets/appIcon.ico";
|
||||
|
||||
if (!response.os) {
|
||||
process.exit();
|
||||
return;
|
||||
}
|
||||
if (existsSync("./dist/app/update.ini")) removeSync("./dist/app/update.ini");
|
||||
if (existsSync("./dist/app/updater.app"))
|
||||
removeSync("./dist/app/updater.app");
|
||||
if (existsSync("./dist/app/updater.exe"))
|
||||
removeSync("./dist/app/updater.exe");
|
||||
|
||||
let icon: string;
|
||||
let versionId = "0" + require("./package.json").version.replace(/[.]/g, ""),
|
||||
updateIni = parse(readFileSync("./installer_assets/update.ini", "utf-8"));
|
||||
|
||||
if (
|
||||
response.os == "darwin" ||
|
||||
(response.os === "current" && platform() === "darwin")
|
||||
)
|
||||
icon = "./installer_assets/appIcon.icns";
|
||||
if (["ia32", "x64"].includes(response.arch) || platform() === "win32")
|
||||
icon = "./installer_assets/appIcon.ico";
|
||||
updateIni.Update.version_id = versionId;
|
||||
|
||||
if (existsSync("./dist/app/update.ini")) removeSync("./dist/app/update.ini");
|
||||
if (existsSync("./dist/app/updater.app"))
|
||||
removeSync("./dist/app/updater.app");
|
||||
if (existsSync("./dist/app/updater.exe"))
|
||||
removeSync("./dist/app/updater.exe");
|
||||
writeFileSync("./dist/app/update.ini", stringify(updateIni));
|
||||
|
||||
let spinner = ora("Packaging app").start(),
|
||||
packagingOptions: electronPackager.Options = {
|
||||
dir: "./dist/app",
|
||||
out: "./dist",
|
||||
darwinDarkModeSupport: true,
|
||||
icon: icon,
|
||||
overwrite: true,
|
||||
quiet: true,
|
||||
appBundleId: "eu.Timeraa.PreMiD",
|
||||
appCategoryType: "Utilities",
|
||||
appCopyright: `Timeraa 2018-${new Date().getFullYear()}`,
|
||||
prune: true,
|
||||
// @ts-ignore
|
||||
arch: response.arch,
|
||||
// @ts-ignore
|
||||
platform: response.os
|
||||
};
|
||||
let spinner = ora("Packaging app").start(),
|
||||
packagingOptions: electronPackager.Options = {
|
||||
dir: "./dist/app",
|
||||
out: "./dist",
|
||||
darwinDarkModeSupport: true,
|
||||
icon: icon,
|
||||
overwrite: true,
|
||||
quiet: true,
|
||||
appBundleId: "eu.Timeraa.PreMiD",
|
||||
appCategoryType: "Utilities",
|
||||
appCopyright: `Timeraa 2018-${new Date().getFullYear()}`,
|
||||
prune: true,
|
||||
// @ts-ignore
|
||||
arch: response.arch,
|
||||
// @ts-ignore
|
||||
platform: response.os
|
||||
};
|
||||
|
||||
if (response.arch === "current") delete packagingOptions.arch;
|
||||
if (response.os === "current") delete packagingOptions.platform;
|
||||
if (response.arch === "current") delete packagingOptions.arch;
|
||||
if (response.os === "current") delete packagingOptions.platform;
|
||||
|
||||
// @ts-ignore
|
||||
electronPackager(packagingOptions).then(() => {
|
||||
if (!response.installer) {
|
||||
spinner.text = "Done!";
|
||||
spinner.succeed();
|
||||
process.exit();
|
||||
return;
|
||||
}
|
||||
// @ts-ignore
|
||||
electronPackager(packagingOptions).then(() => {
|
||||
if (!response.installer) {
|
||||
spinner.text = "Done!";
|
||||
spinner.succeed();
|
||||
process.exit();
|
||||
}
|
||||
|
||||
let versionId = "0" + require("./package.json").version.replace(/[.]/g, ""),
|
||||
updateIni = parse(readFileSync("./installer_assets/update.ini", "utf-8"));
|
||||
let bitRockUpdater = "";
|
||||
|
||||
updateIni.Update.version_id = versionId;
|
||||
if (platform() === "win32") {
|
||||
bitRockUpdater = resolve(
|
||||
"C:/Program Files (x86)/BitRock InstallBuilder Enterprise 19.12.0/autoupdate/bin/customize.exe"
|
||||
);
|
||||
}
|
||||
|
||||
ensureDirSync("./tmp");
|
||||
writeFileSync("./tmp/update.ini", stringify(updateIni));
|
||||
if (platform() === "darwin") {
|
||||
bitRockUpdater = resolve(
|
||||
"/Applications/Installbuilder/autoupdate/bin/customize.sh"
|
||||
);
|
||||
}
|
||||
|
||||
let bitRockBuilder = "",
|
||||
bitRockUpdater = "";
|
||||
if (!existsSync(bitRockUpdater)) {
|
||||
spinner.fail("Bitrock installation not found.");
|
||||
process.exit();
|
||||
}
|
||||
|
||||
if (platform() === "win32") {
|
||||
bitRockBuilder = resolve(
|
||||
"C:/Program Files (x86)/BitRock InstallBuilder Enterprise 19.8.0/bin/builder-cli.exe"
|
||||
);
|
||||
bitRockUpdater = resolve(
|
||||
"C:/Program Files (x86)/BitRock InstallBuilder Enterprise 19.8.0/autoupdate/bin/customize.exe"
|
||||
);
|
||||
}
|
||||
spinner.text = "Building updater";
|
||||
|
||||
if (platform() === "darwin") {
|
||||
bitRockBuilder = resolve(
|
||||
"/Applications/Installbuilder/bin/Builder.app/Contents/MacOS/installbuilder.sh"
|
||||
);
|
||||
bitRockUpdater = resolve(
|
||||
"/Applications/Installbuilder/autoupdate/bin/customize.sh"
|
||||
);
|
||||
}
|
||||
let updater = exec(
|
||||
`"${bitRockUpdater}" build installer_assets/updater.xml ${
|
||||
platform() === "win32" ? "windows" : "osx"
|
||||
}`
|
||||
);
|
||||
|
||||
if (!existsSync(bitRockBuilder) || !existsSync(bitRockUpdater)) {
|
||||
spinner.fail("Bitrock installation not found.");
|
||||
process.exit();
|
||||
return;
|
||||
}
|
||||
updater.once("exit", (code, signal) => {
|
||||
if (![0, 1].includes(code)) {
|
||||
spinner.fail(`Updater failed with code ${code}: ${signal}`);
|
||||
process.exit();
|
||||
}
|
||||
|
||||
spinner.text = "Building updater";
|
||||
copyFileSync(
|
||||
"./dist/app/update.ini",
|
||||
`./dist/PreMiD-${
|
||||
response.os === "current" ? platform() : response.os
|
||||
}-${response.arch === "current" ? arch() : response.arch}/update.ini`
|
||||
);
|
||||
|
||||
let updater = exec(
|
||||
`"${bitRockUpdater}" build installer_assets/updater.xml ${
|
||||
platform() === "win32" ? "windows" : "osx"
|
||||
}`
|
||||
);
|
||||
copyFileSync(
|
||||
"./dist/app/updater.exe",
|
||||
`./dist/PreMiD-${
|
||||
response.os === "current" ? platform() : response.os
|
||||
}-${response.arch === "current" ? arch() : response.arch}/updater.exe`
|
||||
);
|
||||
|
||||
updater.once("exit", (code, signal) => {
|
||||
if (![0, 1].includes(code)) {
|
||||
spinner.fail(`Updater failed with code ${code}: ${signal}`);
|
||||
process.exit();
|
||||
return;
|
||||
}
|
||||
|
||||
spinner.text = "Building installer";
|
||||
let builder = exec(
|
||||
`"${bitRockBuilder}" build tmp/installer.xml ${
|
||||
platform() === "win32" ? "windows" : "osx"
|
||||
}`
|
||||
);
|
||||
|
||||
builder.once("exit", code => {
|
||||
removeSync("./tmp");
|
||||
|
||||
if (code !== 0) {
|
||||
spinner.fail(`Error code: ${code}`);
|
||||
process.exit();
|
||||
return;
|
||||
}
|
||||
|
||||
spinner.text = "Done!";
|
||||
spinner.succeed();
|
||||
process.exit();
|
||||
return;
|
||||
});
|
||||
});
|
||||
});
|
||||
spinner.succeed();
|
||||
process.exit();
|
||||
});
|
||||
});
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user