Compare commits

...

24 Commits

Author SHA1 Message Date
Florian Metz
398dedb2ae Merge pull request #363 from PreMiD/dependabot/npm_and_yarn/types/unzipper-0.10.2
Bump @types/unzipper from 0.10.1 to 0.10.2
2020-02-16 18:31:19 +01:00
Florian Metz
b9db443fe4 Merge pull request #367 from PreMiD/dependabot/npm_and_yarn/fast-glob-3.2.0
Bump fast-glob from 3.1.1 to 3.2.0
2020-02-16 18:31:12 +01:00
Florian Metz
4da95c4c15 🐛 Fix updateChecker 2020-02-16 18:30:40 +01:00
dependabot-preview[bot]
75844f00b4 Bump fast-glob from 3.1.1 to 3.2.0
Bumps [fast-glob](https://github.com/mrmlnc/fast-glob) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/mrmlnc/fast-glob/releases)
- [Commits](https://github.com/mrmlnc/fast-glob/compare/3.1.1...3.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-15 11:25:32 +00:00
dependabot-preview[bot]
e5ab4cf3b9 Merge pull request #365 from PreMiD/dependabot/npm_and_yarn/prompts-2.3.1 2020-02-14 21:34:05 +00:00
dependabot-preview[bot]
484f49346c Bump prompts from 2.3.0 to 2.3.1
Bumps [prompts](https://github.com/terkelg/prompts) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/terkelg/prompts/releases)
- [Commits](https://github.com/terkelg/prompts/compare/v2.3.0...v2.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-14 21:29:01 +00:00
dependabot-preview[bot]
7cd02f2c9a Bump @types/unzipper from 0.10.1 to 0.10.2
Bumps [@types/unzipper](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/unzipper) from 0.10.1 to 0.10.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/unzipper)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-14 18:48:54 +00:00
dependabot-preview[bot]
b965eb49c9 Merge pull request #364 from PreMiD/dependabot/npm_and_yarn/electron-8.0.1 2020-02-14 18:47:32 +00:00
dependabot-preview[bot]
b21281678b Bump electron from 8.0.0 to 8.0.1
Bumps [electron](https://github.com/electron/electron) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/master/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-14 18:43:22 +00:00
dependabot-preview[bot]
d5046d9173 Merge pull request #359 from PreMiD/dependabot/npm_and_yarn/types/node-13.7.1 2020-02-11 17:29:12 +00:00
dependabot-preview[bot]
315bd4ea96 Bump @types/node from 13.7.0 to 13.7.1
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.0 to 13.7.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-11 17:24:47 +00:00
Florian Metz
9708d78ff2 Merge pull request #356 from PreMiD/dependabot/npm_and_yarn/types/ssh2-sftp-client-4.1.3
Bump @types/ssh2-sftp-client from 4.1.2 to 4.1.3
2020-02-10 17:47:23 +01:00
Florian Metz
6dd8749cc4 Update deploy.yml 2020-02-10 17:47:10 +01:00
dependabot-preview[bot]
bb222f4858 Merge pull request #358 from PreMiD/dependabot/npm_and_yarn/rimraf-3.0.2 2020-02-09 07:14:17 +00:00
dependabot-preview[bot]
5bfb150b89 Bump rimraf from 3.0.1 to 3.0.2
Bumps [rimraf](https://github.com/isaacs/rimraf) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/isaacs/rimraf/releases)
- [Changelog](https://github.com/isaacs/rimraf/blob/master/CHANGELOG.md)
- [Commits](https://github.com/isaacs/rimraf/compare/v3.0.1...v3.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-09 07:06:14 +00:00
Florian Metz
86846c6631 ♻ Some bug fixes / features 2020-02-09 00:31:30 +01:00
dependabot-preview[bot]
5c0fd897ac Merge pull request #357 from PreMiD/dependabot/npm_and_yarn/electron-packager-14.2.1 2020-02-07 23:44:10 +00:00
dependabot-preview[bot]
61ebf7207e Bump electron-packager from 14.2.0 to 14.2.1
Bumps [electron-packager](https://github.com/electron/electron-packager) from 14.2.0 to 14.2.1.
- [Release notes](https://github.com/electron/electron-packager/releases)
- [Changelog](https://github.com/electron/electron-packager/blob/master/NEWS.md)
- [Commits](https://github.com/electron/electron-packager/compare/v14.2.0...v14.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-07 23:23:34 +00:00
dependabot-preview[bot]
57fcfc7377 Bump @types/ssh2-sftp-client from 4.1.2 to 4.1.3
Bumps [@types/ssh2-sftp-client](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ssh2-sftp-client) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ssh2-sftp-client)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-06 17:49:19 +00:00
Florian Metz
6e35f9393d Merge pull request #353 from PreMiD/dependabot/npm_and_yarn/electron-8.0.0
Bump electron from 7.1.11 to 8.0.0
2020-02-05 07:31:02 +01:00
dependabot-preview[bot]
57e83f8d46 Bump electron from 7.1.11 to 8.0.0
Bumps [electron](https://github.com/electron/electron) from 7.1.11 to 8.0.0.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/master/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v7.1.11...v8.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-03 23:56:38 +00:00
Florian Metz
7e20dba636 F 2020-02-02 01:44:46 +01:00
Florian Metz
ce4c61671e Merge branch 'stable' of https://github.com/PreMiD/PreMiD into stable 2020-02-02 01:35:58 +01:00
Florian Metz
06a330d25e 🐛 Hopefully fix everything.... 2020-02-02 01:35:57 +01:00
16 changed files with 473 additions and 632 deletions

View File

@@ -67,7 +67,6 @@ jobs:
SSHPASSWORD: ${{ secrets.SSHPASSWORD }}
run: |
tsc util/uploadFile util/zip
node util/uploadFile installer_assets/update.ini /home/PreMiD/download/util/update.ini
node util/uploadFile dist/installer/upgrader.exe /home/PreMiD/download/upgrader.exe
node util/uploadFile dist/installer/upgrader.app.zip /home/PreMiD/download/util/upgrader.app.zip
- name: Finalize build
@@ -83,10 +82,6 @@ jobs:
mv upgrader.app.tgz ../
rm -rf upgrader.app upgrader.app.zip
unzip windows-latest.zip
cp PreMiD-Updater.exe windows-latest/PreMiD-win32-x64/PreMiD-Updater.exe
cp update.ini windows-latest/PreMiD-win32-x64/update.ini
cp PreMiD-Updater.exe windows-latest/PreMiD-win32-ia32/PreMiD-Updater.exe
cp update.ini windows-latest/PreMiD-win32-ia32/update.ini
cd windows-latest/PreMiD-win32-x64/
zip -r ../../PreMiD-win32-x64.zip .
mv ../../PreMiD-win32-x64.zip /home/PreMiD/download/
@@ -96,8 +91,6 @@ jobs:
cd ../..
rm -rf windows-latest windows-latest.zip
unzip macOS-latest.zip
cp -r PreMiD-Updater.app macOS-latest/PreMiD-darwin-x64/PreMiD-Updater.app
cp update.ini macOS-latest/PreMiD-darwin-x64/update.ini
cd macOS-latest/PreMiD-darwin-x64/
zip -r ../../PreMiD-darwin-x64.zip .
mv ../../PreMiD-darwin-x64.zip /home/PreMiD/download/

View File

@@ -5,7 +5,6 @@
<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>
@@ -22,22 +21,6 @@
<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>
@@ -96,16 +79,104 @@
</componentList>
<initializationActionList>
<setInstallerVariable>
<name>project.installationType</name>
<value>upgrade</value>
<name>installdir</name>
<persist>1</persist>
<value>${windows_folder_appdata}/PreMiD</value>
<ruleList>
<fileExists>
<path>${installdir}</path>
</fileExists>
<platformTest>
<type>windows</type>
</platformTest>
</ruleList>
</setInstallerVariable>
<setInstallerVariable>
<name>installdir</name>
<persist>1</persist>
<value>${platform_install_prefix}/PreMiD</value>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</setInstallerVariable>
</initializationActionList>
<preInstallationActionList>
<readyToInstallActionList>
<actionGroup>
<customErrorMessage>Couldn't download release... Try again later.</customErrorMessage>
<progressText>Downloading latest release...</progressText>
<actionList>
<showProgressDialog>
<title>Downloading latest release...</title>
<width>450</width>
<actionList>
<httpGet>
<customErrorMessage>${platform_name}</customErrorMessage>
<filename>${system_temp_directory}/PreMiD-release.zip</filename>
<url>https://github.com/PreMiD/PreMiD/releases/latest/download/PreMiD-win32-x64.zip</url>
</httpGet>
</actionList>
<ruleList>
<platformTest>
<type>windows-x64</type>
</platformTest>
</ruleList>
</showProgressDialog>
<showProgressDialog>
<title>Downloading latest release...</title>
<actionList>
<httpGet>
<customErrorMessage>${platform_name}</customErrorMessage>
<filename>${system_temp_directory}/PreMiD-release.zip</filename>
<url>https://github.com/PreMiD/PreMiD/releases/latest/download/PreMiD-win32-ia32.zip</url>
</httpGet>
</actionList>
<ruleList>
<platformTest>
<type>windows-x86</type>
</platformTest>
</ruleList>
</showProgressDialog>
<showProgressDialog>
<title>Downloading latest release...</title>
<actionList>
<httpGet>
<customErrorMessage>${platform_name}</customErrorMessage>
<filename>${system_temp_directory}/PreMiD-release.zip</filename>
<url>https://github.com/PreMiD/PreMiD/releases/latest/download/PreMiD-darwin-x64.zip</url>
</httpGet>
</actionList>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</showProgressDialog>
</actionList>
</actionGroup>
<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>
<progressText>Killing ${product_fullname}...</progressText>
<actionList>
@@ -137,73 +208,10 @@
</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-darwin-x64.zip</url>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</httpGet>
</actionList>
</actionGroup>
</readyToInstallActionList>
<postInstallationActionList>
<unzip>
<addToUninstaller>0</addToUninstaller>
<addToUninstaller>1</addToUninstaller>
<destinationDirectory>${installdir}</destinationDirectory>
<progressText>Extracting release...</progressText>
<zipFile>${system_temp_directory}/PreMiD-release.zip</zipFile>
@@ -212,46 +220,6 @@
<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>
<runProgram>
<abortOnError>0</abortOnError>
<program>PreMiD.exe</program>
<programArguments>&amp;</programArguments>
<progressText>Launching PreMiD...</progressText>
<showMessageOnError>0</showMessageOnError>
<workingDirectory>${installdir}</workingDirectory>
<ruleList>
<platformTest>
<type>windows</type>
</platformTest>
</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>
</ruleList>
</runProgram>
</postInstallationActionList>
<preUninstallationActionList>
<actionGroup>
@@ -286,38 +254,10 @@
</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>
<createOsxBundleZip>1</createOsxBundleZip>
<defaultInstallationMode>unattended</defaultInstallationMode>
<deleteOnExit>1</deleteOnExit>
<description>Rich Presence for web services.</description>
<disableSplashScreen>1</disableSplashScreen>
<enableRollback>0</enableRollback>
@@ -338,13 +278,15 @@
<readmeFileEncoding>utf-8</readmeFileEncoding>
<removeLogFile>1</removeLogFile>
<removeUninstallationLogFile>1</removeUninstallationLogFile>
<requestedExecutionLevel>asInvoker</requestedExecutionLevel>
<saveRelativePaths>1</saveRelativePaths>
<summary>Rich Presence for web services.</summary>
<updateInformationURL>https://api.premid.app/app/update</updateInformationURL>
<unattendedModeUI>minimalWithDialogs</unattendedModeUI>
<vendor>Timeraa</vendor>
<versionId>200</versionId>
<width>625</width>
<windowsExecutableIcon>appIcon.ico</windowsExecutableIcon>
<windowsResourceFileDescription>Rich Presence for web services.</windowsResourceFileDescription>
<windowsResourceFileVersion>${product_version}</windowsResourceFileVersion>
<windowsUninstallerExecutableIcon>appIcon.ico</windowsUninstallerExecutableIcon>
<licenseFileList>
<licenseFile>
@@ -354,19 +296,6 @@
</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>
@@ -396,11 +325,6 @@
<value>true</value>
<default>true</default>
<displayStyle>checkbox-left</displayStyle>
<ruleList>
<platformTest>
<type>windows</type>
</platformTest>
</ruleList>
</booleanParameter>
<labelParameter>
<name>extra</name>
@@ -438,6 +362,39 @@
</quickLaunchShortcut>
</shortcutList>
</createShortcuts>
<runProgram>
<abortOnError>0</abortOnError>
<program>PreMiD.exe</program>
<programArguments>&amp;</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>

View File

@@ -21,22 +21,6 @@
<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>
@@ -93,7 +77,106 @@
</startMenuShortcutList>
</component>
</componentList>
<preInstallationActionList>
<initializationActionList>
<setInstallerVariable>
<name>installdir</name>
<persist>1</persist>
<value>${windows_folder_appdata}/PreMiD</value>
<ruleList>
<platformTest>
<type>windows</type>
</platformTest>
</ruleList>
</setInstallerVariable>
<setInstallerVariable>
<name>installdir</name>
<persist>1</persist>
<value>${platform_install_prefix}/PreMiD</value>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</setInstallerVariable>
</initializationActionList>
<readyToInstallActionList>
<actionGroup>
<customErrorMessage>Couldn't download release... Try again later.</customErrorMessage>
<progressText>Downloading latest release...</progressText>
<actionList>
<showProgressDialog>
<title>Downloading latest release...</title>
<width>450</width>
<actionList>
<httpGet>
<customErrorMessage>${platform_name}</customErrorMessage>
<filename>${system_temp_directory}/PreMiD-release.zip</filename>
<url>https://github.com/PreMiD/PreMiD/releases/latest/download/PreMiD-win32-x64.zip</url>
</httpGet>
</actionList>
<ruleList>
<platformTest>
<type>windows-x64</type>
</platformTest>
</ruleList>
</showProgressDialog>
<showProgressDialog>
<title>Downloading latest release...</title>
<actionList>
<httpGet>
<customErrorMessage>${platform_name}</customErrorMessage>
<filename>${system_temp_directory}/PreMiD-release.zip</filename>
<url>https://github.com/PreMiD/PreMiD/releases/latest/download/PreMiD-win32-ia32.zip</url>
</httpGet>
</actionList>
<ruleList>
<platformTest>
<type>windows-x86</type>
</platformTest>
</ruleList>
</showProgressDialog>
<showProgressDialog>
<title>Downloading latest release...</title>
<actionList>
<httpGet>
<customErrorMessage>${platform_name}</customErrorMessage>
<filename>${system_temp_directory}/PreMiD-release.zip</filename>
<url>https://github.com/PreMiD/PreMiD/releases/latest/download/PreMiD-darwin-x64.zip</url>
</httpGet>
</actionList>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</showProgressDialog>
</actionList>
</actionGroup>
<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>
<progressText>Killing ${product_fullname}...</progressText>
<actionList>
@@ -125,88 +208,10 @@
</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>
<showProgressDialog>
<title>Downloading latest release...</title>
<actionList>
<httpGet>
<customErrorMessage>${platform_name}</customErrorMessage>
<filename>${system_temp_directory}/PreMiD-release.zip</filename>
<url>https://dl.premid.app/PreMiD-win32-x64.zip</url>
</httpGet>
</actionList>
<ruleList>
<platformTest>
<type>windows-x64</type>
</platformTest>
</ruleList>
</showProgressDialog>
<showProgressDialog>
<title>Downloading latest release...</title>
<actionList>
<httpGet>
<customErrorMessage>${platform_name}</customErrorMessage>
<filename>${system_temp_directory}/PreMiD-release.zip</filename>
<url>https://dl.premid.app/PreMiD-win32-x86.zip</url>
</httpGet>
</actionList>
<ruleList>
<platformTest>
<type>windows-x86</type>
</platformTest>
</ruleList>
</showProgressDialog>
<showProgressDialog>
<title>Downloading latest release...</title>
<actionList>
<httpGet>
<customErrorMessage>${platform_name}</customErrorMessage>
<filename>${system_temp_directory}/PreMiD-release.zip</filename>
<url>https://dl.premid.app/PreMiD-darwin-x64.zip</url>
</httpGet>
</actionList>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</showProgressDialog>
</actionList>
</actionGroup>
</readyToInstallActionList>
<postInstallationActionList>
<unzip>
<addToUninstaller>0</addToUninstaller>
<addToUninstaller>1</addToUninstaller>
<destinationDirectory>${installdir}</destinationDirectory>
<progressText>Extracting release...</progressText>
<zipFile>${system_temp_directory}/PreMiD-release.zip</zipFile>
@@ -215,19 +220,6 @@
<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>
@@ -262,36 +254,9 @@
</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>
<compressionAlgorithm>lzham-ultra</compressionAlgorithm>
<createOsxBundleZip>1</createOsxBundleZip>
<deleteOnExit>1</deleteOnExit>
<description>Rich Presence for web services.</description>
<disableSplashScreen>1</disableSplashScreen>
<enableRollback>0</enableRollback>
@@ -311,11 +276,13 @@
<readmeFileEncoding>utf-8</readmeFileEncoding>
<removeLogFile>1</removeLogFile>
<removeUninstallationLogFile>1</removeUninstallationLogFile>
<requestedExecutionLevel>asInvoker</requestedExecutionLevel>
<saveRelativePaths>1</saveRelativePaths>
<summary>Rich Presence for web services.</summary>
<vendor>Timeraa</vendor>
<windowsExecutableIcon>appIcon.ico</windowsExecutableIcon>
<windowsResourceFileDescription>Rich Presence for web services.</windowsResourceFileDescription>
<windowsResourceFileVersion>${product_version}</windowsResourceFileVersion>
<windowsUninstallerExecutableIcon>appIcon.ico</windowsUninstallerExecutableIcon>
<licenseFileList>
<licenseFile>
@@ -325,19 +292,6 @@
</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>
@@ -455,3 +409,4 @@
</platformOptions>
</platformOptionsList>
</project>

View File

@@ -1,6 +0,0 @@
[Update]
url=https://api.premid.app/app/update/
version_id=?
check_for_updates=1
update_download_location=${installer_directory}

View File

@@ -1,14 +0,0 @@
<autoUpdateProject>
<fullName>PreMiD</fullName>
<shortName>PreMiD</shortName>
<vendor>Timeraa</vendor>
<version>2.0</version>
<singleInstanceCheck>1</singleInstanceCheck>
<enableSslSupport>1</enableSslSupport>
<outputDirectory>../dist/app/</outputDirectory>
<installerFilename>PreMiD-Updater.${platform_exec_suffix}</installerFilename>
<osxPlatforms>osx-intel osx-x86_64</osxPlatforms>
<createOsxBundleZip>1</createOsxBundleZip>
<windowsExecutableIcon>appIcon.ico</windowsExecutableIcon>
<osxApplicationBundleIcon>appIcon.icns</osxApplicationBundleIcon>
</autoUpdateProject>

View File

@@ -1,8 +1,8 @@
{
"name": "premid",
"productName": "PreMiD",
"description": "Discord Rich Presence for websites.",
"version": "2.1.0",
"description": "Discord Rich Presence for web services.",
"version": "2.1.2",
"repository": "https://github.com/PreMiD/PreMiD",
"scripts": {
"init": "tsc --skipLibCheck && tsc pkg util/prepare util/zip && devScript --copyOnly",
@@ -20,28 +20,27 @@
"@types/electron-packager": "14.0.0",
"@types/fs-extra": "8.0.1",
"@types/ini": "1.3.30",
"@types/node": "13.7.0",
"@types/node": "13.7.1",
"@types/prompts": "2.0.3",
"@types/request-promise-native": "1.0.17",
"@types/rimraf": "2.0.3",
"@types/socket.io": "2.1.4",
"@types/ssh2-sftp-client": "4.1.2",
"@types/unzipper": "^0.10.1",
"@types/ssh2-sftp-client": "4.1.3",
"@types/unzipper": "^0.10.2",
"archiver": "3.1.1",
"chalk": "3.0.0",
"electron": "7.1.11",
"electron-packager": "14.2.0",
"fast-glob": "3.1.1",
"electron": "8.0.1",
"electron-packager": "14.2.1",
"fast-glob": "3.2.0",
"fs-extra": "8.1.0",
"ini": "1.3.5",
"nodemon": "2.0.2",
"ora": "4.0.3",
"prompts": "2.3.0",
"rimraf": "3.0.1",
"prompts": "2.3.1",
"rimraf": "3.0.2",
"ssh2-sftp-client": "5.0.2",
"typescript": "3.7.5",
"unzipper": "0.10.7",
"yarn": "1.21.1"
"unzipper": "0.10.8",
"yarn": "1.22.0"
},
"dependencies": {
"auto-launch": "5.0.5",

90
pkg.ts
View File

@@ -1,18 +1,12 @@
import * as electronPackager from "electron-packager";
import { platform, arch } from "os";
import { existsSync, readFileSync, writeFileSync, copyFileSync } from "fs";
import { resolve } from "path";
import { exec } from "child_process";
import { removeSync } from "fs-extra";
import { parse, stringify } from "ini";
import { platform } from "os";
import * as prompts from "prompts";
import * as ora from "ora";
(async () => {
let response = {
os: "current",
arch: "all",
installer: false
arch: "all"
};
if (process.env.NODE_ENV !== "DePloY")
@@ -82,11 +76,6 @@ import * as ora from "ora";
value: "win32"
}
]
},
{
name: "installer",
type: "confirm",
message: "Updater?"
}
]);
@@ -104,19 +93,6 @@ import * as ora from "ora";
if (["ia32", "x64"].includes(response.arch) || platform() === "win32")
icon = "./installer_assets/appIcon.ico";
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 versionId = "0" + require("./package.json").version.replace(/[.]/g, ""),
updateIni = parse(readFileSync("./installer_assets/update.ini", "utf-8"));
updateIni.Update.version_id = versionId;
writeFileSync("./dist/app/update.ini", stringify(updateIni));
let spinner = ora("Packaging app").start(),
packagingOptions: electronPackager.Options = {
dir: "./dist/app",
@@ -139,65 +115,9 @@ import * as ora from "ora";
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();
}
let bitRockUpdater = "";
if (platform() === "win32") {
bitRockUpdater = resolve(
"C:/Program Files (x86)/BitRock InstallBuilder Enterprise 19.12.0/autoupdate/bin/customize.exe"
);
}
if (platform() === "darwin") {
bitRockUpdater = resolve(
"/Applications/Installbuilder/autoupdate/bin/customize.sh"
);
}
if (!existsSync(bitRockUpdater)) {
spinner.fail("Bitrock installation not found.");
process.exit();
}
spinner.text = "Building updater";
let updater = exec(
`"${bitRockUpdater}" build installer_assets/updater.xml ${
platform() === "win32" ? "windows" : "osx"
}`
);
updater.once("exit", (code, signal) => {
if (![0, 1].includes(code)) {
spinner.fail(`Updater failed with code ${code}: ${signal}`);
process.exit();
}
copyFileSync(
"./dist/app/update.ini",
`./dist/PreMiD-${
response.os === "current" ? platform() : response.os
}-${response.arch === "current" ? arch() : response.arch}/update.ini`
);
copyFileSync(
"./dist/app/PreMiD-Updater.exe",
`./dist/PreMiD-${
response.os === "current" ? platform() : response.os
}-${
response.arch === "current" ? arch() : response.arch
}/PreMiD-Updater.exe`
);
spinner.succeed();
process.exit();
});
spinner.text = "Done!";
spinner.succeed();
process.exit();
});
})();

View File

@@ -26,12 +26,18 @@ class RPCClient {
this.clientReady = true;
this.setActivity();
});
// @ts-ignore
this.client.once("disconnected", this.destroy);
this.client.once(
// @ts-ignore
"disconnected",
() =>
(rpcClients = rpcClients.filter(
client => client.clientId !== this.clientId
))
);
this.client.login({ clientId: this.clientId }).catch(this.destroy);
this.client.login({ clientId: this.clientId }).catch(() => this.destroy());
console.log("Create client");
info(`Create RPC client (${this.clientId})`);
}
setActivity(presenceData?: PresenceData) {
@@ -42,7 +48,9 @@ class RPCClient {
if (presenceData.trayTitle)
trayManager.tray.setTitle(presenceData.trayTitle);
this.client.setActivity(presenceData.presenceData).catch(this.destroy);
this.client
.setActivity(presenceData.presenceData)
.catch(() => this.destroy());
info("setActivity");
}
@@ -51,14 +59,21 @@ class RPCClient {
if (!this.clientReady) return;
this.client.clearActivity().catch(this.destroy);
this.client.clearActivity().catch(() => this.destroy());
trayManager.tray.setTitle("");
}
destroy() {
console.log("Destroy client", this.clientId);
rpcClients = rpcClients.filter(client => client.clientId !== this.clientId);
trayManager.tray.setTitle("");
async destroy() {
try {
info(`Destroy RPC client (${this.clientId})`);
this.client.clearActivity();
this.client.destroy();
trayManager.tray.setTitle("");
rpcClients = rpcClients.filter(
client => client.clientId !== this.clientId
);
} catch (err) {}
}
}
@@ -85,9 +100,7 @@ export function clearActivity(clientId: string = undefined) {
if (clientId) {
let client = rpcClients.find(c => c.clientId === clientId);
client.clearActivity();
} else {
rpcClients.forEach(c => c.clearActivity());
}
} else rpcClients.forEach(c => c.clearActivity());
}
export async function getDiscordUser() {
@@ -97,6 +110,7 @@ export async function getDiscordUser() {
return user.user;
}
app.once("will-quit", () => {
rpcClients.map(c => c.destroy());
});
app.once(
"will-quit",
async () => await Promise.all(rpcClients.map(c => c.destroy()))
);

View File

@@ -5,25 +5,25 @@ import { info } from "../util/debug";
//* Create autoLaunch object
let autoLaunch = new AutoLaunch({
name: app.name,
isHidden: true
name: app.name,
isHidden: true
});
/**
* Updates autoLaunch
*/
export async function update() {
//* If app not packaged return
//* Either enable/disable autolaunch
if (!app.isPackaged) {
//* Show debug
//* Return
info("Skipping autoLaunch.");
return;
}
if (settings.get("autoLaunch", true))
//* Enable if not enabled
autoLaunch.enable();
//* Disable if enabled
else autoLaunch.disable();
//* If app not packaged return
//* Either enable/disable autolaunch
if (!app.isPackaged) {
//* Show debug
//* Return
info("Skipping autoLaunch.");
return;
}
if (settings.get("autoLaunch", true))
//* Enable if not enabled
autoLaunch.enable();
//* Disable if enabled
else autoLaunch.disable();
}

View File

@@ -1,4 +1,4 @@
import { readdirSync, readFileSync, unwatchFile, watchFile } from "fs";
import { readdirSync, readFileSync, unwatchFile } from "fs";
import { dialog, app } from "electron";
import { socket } from "./socketManager";
import { extname } from "path";

View File

@@ -52,7 +52,7 @@ export class TrayManager {
},
{
label: "Check for Updates...",
click: () => checkForUpdate(),
click: () => checkForUpdate(false, true),
visible: !updateAvailable
},
{

View File

@@ -5,28 +5,28 @@ if (!app.isPackaged) var chalk = require("chalk");
* Show info message in console
* */
export function info(message: string) {
//* Return if app packaged
//* Show debug
if (app.isPackaged) return;
console.log(`${chalk.bgBlue(chalk.white(" INFO "))} ${message}`);
//* Return if app packaged
//* Show debug
if (app.isPackaged) return;
console.log(`${chalk.bgBlue(chalk.white(" INFO "))} ${message}`);
}
/**
* Show success message in console
* */
export function success(message: string) {
//* Return if app packaged
//* Show debug
if (app.isPackaged) return;
console.log(`${chalk.bgGreen(" SUCCESS ")} ${message}`);
//* Return if app packaged
//* Show debug
if (app.isPackaged) return;
console.log(`${chalk.bgGreen(" SUCCESS ")} ${message}`);
}
/**
* Show error message in console
* */
export function error(message: string) {
//* Return if app packaged
//* Show debug
if (app.isPackaged) return;
console.log(`${chalk.bgRed(" ERROR ")} ${message}`);
//* Return if app packaged
//* Show debug
if (app.isPackaged) return;
console.log(`${chalk.bgRed(" ERROR ")} ${message}`);
}

View File

@@ -1,29 +1,17 @@
import { exec } from "child_process";
import { resolve, dirname } from "path";
import { resolve } from "path";
import { error, info } from "./debug";
import { app, dialog } from "electron";
import { app, dialog, shell } from "electron";
import { platform } from "os";
import axios from "axios";
import { Notification } from "electron";
import { trayManager } from "..";
import { createWriteStream, existsSync, unlinkSync } from "fs";
let updaterPath: string;
export let updateAvailable = false;
//* Resolve paths for each OS
switch (platform()) {
case "darwin":
updaterPath = resolve(
`${dirname(
app.getPath("exe")
)}/../../../PreMiD-Updater.app/Contents/MacOS/installbuilder.sh`
);
break;
case "win32":
updaterPath = resolve(`${dirname(app.getPath("exe"))}/PreMiD-Updater.exe`);
break;
}
let initialNotification = true;
export async function checkForUpdate(autoUpdate = false) {
export async function checkForUpdate(autoUpdate = false, manual = false) {
//* Skip Update checker if unsupported OS / not packaged
if (!app.isPackaged || !["darwin", "win32"].includes(platform())) {
//* Show debug
@@ -32,54 +20,92 @@ export async function checkForUpdate(autoUpdate = false) {
return;
}
try {
let latestAppVersion = (
await axios.get("https://api.premid.app/v2/versions")
).data.app;
if (app.getVersion() >= latestAppVersion) return;
if (autoUpdate) {
updateTray();
update();
return;
}
} catch (err) {
error(err);
}
axios
.get("https://api.premid.app/v2/versions")
.then(({ data }) => {
if (!data?.app) return;
const updateNotification = new Notification({
title: "Update available!",
body: "A new version of PreMiD is available! Click here to update."
});
const latestAppVersion = data.app;
updateNotification.once("click", update);
updateNotification.show();
updateTray();
if (app.getVersion() >= latestAppVersion) {
if (manual)
dialog.showMessageBox(null, {
message: "There are currently no updates available.",
type: "info"
});
return;
}
if (autoUpdate) {
updateTray();
update();
return;
}
if (initialNotification) {
const updateNotification = new Notification({
title: "Update available!",
body: "A new version of PreMiD is available! Click here to update."
});
updateNotification.once("click", update);
updateNotification.show();
updateTray();
initialNotification = false;
}
})
.catch(err => {
error(err.message);
});
}
export function update() {
if (platform() === "darwin") {
exec(
`\"${updaterPath}\" --mode unattended --unattendedmodebehavior download`,
errorHandler
);
return;
}
exec(
`\"${updaterPath}\" --mode unattended --unattendedmodebehavior download`,
errorHandler
export async function update() {
if (!["win32", "darwin"].includes(platform())) return;
const updaterPath = resolve(
app.getPath("temp"),
`PreMiD-Updater${
platform() === "win32" ? ".exe" : ".app/Contents/MacOS/installbuilder.sh"
}`
);
if (existsSync(updaterPath)) unlinkSync(updaterPath);
if (existsSync(resolve(app.getPath("temp"), "PreMiD-release.zip")))
unlinkSync(resolve(app.getPath("temp"), "PreMiD-release.zip"));
const response = await axios({
url: `http://dl.premid.app/upgrader${
platform() === "win32" ? ".exe" : ".app"
}`,
method: "GET",
responseType: "stream"
});
const writer = createWriteStream(updaterPath);
response.data.pipe(writer);
new Promise((resolve, reject) => {
writer.on("finish", resolve);
writer.on("error", reject);
})
.then(() => exec(updaterPath, errorHandler))
.catch(errorHandler);
}
function errorHandler(err: Error) {
if (err.message === "User did not grant permission.") {
error(err.message);
updateTray();
} else
dialog.showErrorBox(
"Error while updating",
`${app.name} was unable to update itself. Please try again later.\n\nError: ${err.message}`
);
dialog
.showMessageBox({
title: `Error while updating ${app.name}`,
message: `If this error persists reinstall the app.`,
detail: err.message,
buttons: ["Okay", "Reinstall Application"],
type: "error"
})
.then(value => {
if (value.response === 1)
shell.openExternal("https://premid.app/downloads");
});
updateTray();
}
function updateTray() {

View File

@@ -3,11 +3,13 @@
"module": "commonjs",
"target": "es2018",
"moduleResolution": "node",
"sourceMap": true,
"inlineSourceMap": true,
"outDir": "dist/app",
"removeComments": true,
"esModuleInterop": true,
"skipLibCheck": true
"skipLibCheck": true,
"noUnusedParameters": true,
"noUnusedLocals": true
},
"include": ["src/**/*"],
"exclude": [

View File

@@ -1,17 +1,7 @@
import { readFileSync, writeFileSync } from "fs";
import { parse, stringify } from "ini";
let file = readFileSync("installer_assets/PreMiD-Upgrade.xml", "utf-8");
file = file.replace("VERSION", require("../package.json").version);
writeFileSync("installer_assets/PreMiD-Upgrade.xml", file);
let versionId = (require("../package.json").version as string)
.replace(/[.]/g, "")
.padStart(4, "0"),
updateIni = parse(readFileSync("installer_assets/update.ini", "utf-8"));
updateIni.Update.version_id = versionId;
writeFileSync("installer_assets/update.ini", stringify(updateIni));

139
yarn.lock
View File

@@ -128,10 +128,10 @@
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==
"@types/node@*", "@types/node@13.7.0":
version "13.7.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.0.tgz#b417deda18cf8400f278733499ad5547ed1abec4"
integrity sha512-GnZbirvmqZUzMgkFn70c74OQpTTUcCzlhQliTzYjQMqg+hVKcDnxdL19Ne3UdYzdMA/+W3eb646FWn/ZaT1NfQ==
"@types/node@*", "@types/node@13.7.1":
version "13.7.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.1.tgz#238eb34a66431b71d2aaddeaa7db166f25971a0d"
integrity sha512-Zq8gcQGmn4txQEJeiXo/KiLpon8TzAl0kmKH4zdWctPj05nWwp1ClMdAVEloqrQKfaC48PNLdgN/aVaLqUrluA==
"@types/node@^12.0.12":
version "12.12.26"
@@ -175,10 +175,10 @@
dependencies:
"@types/node" "*"
"@types/ssh2-sftp-client@4.1.2":
version "4.1.2"
resolved "https://registry.yarnpkg.com/@types/ssh2-sftp-client/-/ssh2-sftp-client-4.1.2.tgz#2cc20f6b398cb2a9d6895ab774c4eb89213c0e86"
integrity sha512-h+hagttBBiqRHKRmWH6bVleJ0kk2xktSxY+3mwckzncn4LLW9usBEnvUSFbYI02Ox1mMIR1JmeZcCWtnzUYfbg==
"@types/ssh2-sftp-client@4.1.3":
version "4.1.3"
resolved "https://registry.yarnpkg.com/@types/ssh2-sftp-client/-/ssh2-sftp-client-4.1.3.tgz#f1d9c57d5876971eca18b227b29aab76b75c70de"
integrity sha512-x52g1JmebxlmFKrfMQFMbg0JxYTO4LVjGu36AyX7wtLvCJzVBQCcQ40vXg/qqMN5v4q5ef5Wz7veacXNQN9HiA==
dependencies:
"@types/ssh2" "*"
"@types/ssh2-streams" "*"
@@ -203,10 +203,10 @@
resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.6.tgz#c880579e087d7a0db13777ff8af689f4ffc7b0d5"
integrity sha512-wHNBMnkoEBiRAd3s8KTKwIuO9biFtTf0LehITzBhSco+HQI0xkXZbLOD55SW3Aqw3oUkHstkm5SPv58yaAdFPQ==
"@types/unzipper@^0.10.1":
version "0.10.1"
resolved "https://registry.yarnpkg.com/@types/unzipper/-/unzipper-0.10.1.tgz#660b9c6489140e0a9c62233108bf9519f63d1be4"
integrity sha512-I53zUuPGMR/ry/s61qdlk/NkJHwhekycCqI7IXWFcJHOK+oIFUhnCPT26Wbf4UYNLpFjeujFioXGH+SWY4yUUQ==
"@types/unzipper@^0.10.2":
version "0.10.2"
resolved "https://registry.yarnpkg.com/@types/unzipper/-/unzipper-0.10.2.tgz#35c2da714d406b2cd7ada5006e1e206bdd0eb2f4"
integrity sha512-VgYoNEyj8xkz9I+RTWD00iB9JVViK/RBteNDjOIV3/kdCUPaskka7xAZfFlIxRwKGSPf77F8yje5bJt2PefofQ==
dependencies:
"@types/node" "*"
@@ -778,7 +778,7 @@ cookie@0.3.1:
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"
integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=
core-js@^3.4.1:
core-js@^3.6.4:
version "3.6.4"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.4.tgz#440a83536b458114b9cb2ac1580ba377dc470647"
integrity sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==
@@ -819,10 +819,10 @@ cross-spawn@^5.0.1:
shebang-command "^1.2.0"
which "^1.2.9"
cross-zip@^2.1.5:
version "2.1.6"
resolved "https://registry.yarnpkg.com/cross-zip/-/cross-zip-2.1.6.tgz#344d3ba9488609942987d815bb84860cff3d9491"
integrity sha512-xLIETNkzRcU6jGRzenJyRFxahbtP4628xEKMTI/Ql0Vu8m4h8M7uRLVi7E5OYHuJ6VQPsG4icJumKAFUvfm0+A==
cross-zip@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/cross-zip/-/cross-zip-3.0.0.tgz#478136c7ba2df7e5888f7fb57211a4bbd5afafb4"
integrity sha512-cm+l8PJ6WiSQmKZ/x8DGvUm2u/3FX2JFs1AFd18gdHaVhP5Lf4oE6Jrj2Jd05JYSioz5x+nIRVp0zBQuzuCRcQ==
dependencies:
rimraf "^3.0.0"
@@ -978,14 +978,14 @@ electron-osx-sign@^0.4.11:
minimist "^1.2.0"
plist "^3.0.1"
electron-packager@14.2.0:
version "14.2.0"
resolved "https://registry.yarnpkg.com/electron-packager/-/electron-packager-14.2.0.tgz#6bd143983f8ba3898e6e21591f37fa97da7f8b67"
integrity sha512-6JHv0zfRpxpFta4MJBt7RtcS6zhtl4f76ombZKqicgl5I3Ighx8WBQRYUKMdAO3tNYEq/B0i1FYsBp6oXzlTfA==
electron-packager@14.2.1:
version "14.2.1"
resolved "https://registry.yarnpkg.com/electron-packager/-/electron-packager-14.2.1.tgz#e1884eee608455e71e96342717e0527d25a329df"
integrity sha512-g6y3BVrAOz/iavKD+VMFbehrQcwCWuA3CZvVbmmbQuCfegGA1ytwWn0BNIDDrEdbuz31Fti7mnNHhb5L+3Wq9A==
dependencies:
"@electron/get" "^1.6.0"
asar "^2.0.1"
cross-zip "^2.1.5"
cross-zip "^3.0.0"
debug "^4.0.1"
electron-notarize "^0.2.0"
electron-osx-sign "^0.4.11"
@@ -1009,10 +1009,10 @@ electron-store@5.1.0:
conf "^6.2.0"
type-fest "^0.7.1"
electron@7.1.11:
version "7.1.11"
resolved "https://registry.yarnpkg.com/electron/-/electron-7.1.11.tgz#3a95e35804af083d58b590513afea5e2290c4b66"
integrity sha512-YDXfnovKY+8iZ5ISQh1kRqYIRKbpOSxGXCx2WVxPFPutEQ7Q/Xzr3h4GePEY25/NXMytMfhKaAZAYjtWUm3r9Q==
electron@8.0.1:
version "8.0.1"
resolved "https://registry.yarnpkg.com/electron/-/electron-8.0.1.tgz#7f5070a1625f423cddcece25a1eb9e6d2f1339fb"
integrity sha512-kLZAQkbrAFNjQVpcHJUnjRYQNafuuWKnsdxzag5do1ewMqN0J4Pi/hPE27+5/1YAFMcbvCrPqhWIpcMsi8mKXQ==
dependencies:
"@electron/get" "^1.0.1"
"@types/node" "^12.0.12"
@@ -1125,10 +1125,10 @@ fast-deep-equal@^3.1.1:
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4"
integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==
fast-glob@3.1.1, fast-glob@^3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.1.1.tgz#87ee30e9e9f3eb40d6f254a7997655da753d7c82"
integrity sha512-nTCREpBY8w8r+boyFYAx21iL6faSsQynliPHM4Uf56SbkyohCNxpVPEH9xrF5TXKy+IsjkPUHDKiUkzBVRXn9g==
fast-glob@3.2.0, fast-glob@^3.1.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.0.tgz#8555aac93c882e711ce40f7c24435a2e44c9e56d"
integrity sha512-x0gdwWaaubNqJ2nQV8YDALCZRiCy9zOEHlF7ScpzalxdxMKh78Qc0lcpZ4w2I0LZUfklA/IQPLlPU36YTgUozA==
dependencies:
"@nodelib/fs.stat" "^2.0.2"
"@nodelib/fs.walk" "^1.2.3"
@@ -1310,16 +1310,16 @@ glob@^7.1.3, glob@^7.1.4:
path-is-absolute "^1.0.0"
global-agent@^2.0.2:
version "2.1.7"
resolved "https://registry.yarnpkg.com/global-agent/-/global-agent-2.1.7.tgz#12d7bc2b07cd862d0fa76b0f1b2c48cd5ffcf150"
integrity sha512-ooK7eqGYZku+LgnbfH/Iv0RJ74XfhrBZDlke1QSzcBt0bw1PmJcnRADPAQuFE+R45pKKDTynAr25SBasY2kvow==
version "2.1.8"
resolved "https://registry.yarnpkg.com/global-agent/-/global-agent-2.1.8.tgz#99d153662b2c04cbc1199ffbc081a3aa656ac50f"
integrity sha512-VpBe/rhY6Rw2VDOTszAMNambg+4Qv8j0yiTNDYEXXXxkUNGWLHp8A3ztK4YDBbFNcWF4rgsec6/5gPyryya/+A==
dependencies:
boolean "^3.0.0"
core-js "^3.4.1"
core-js "^3.6.4"
es6-error "^4.1.1"
matcher "^2.0.0"
roarr "^2.14.5"
semver "^6.3.0"
matcher "^2.1.0"
roarr "^2.15.2"
semver "^7.1.2"
serialize-error "^5.0.0"
global-dirs@^0.1.0:
@@ -1339,7 +1339,7 @@ global-tunnel-ng@^2.7.1:
npm-conf "^1.1.3"
tunnel "^0.0.6"
globalthis@^1.0.0:
globalthis@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.1.tgz#40116f5d9c071f9e8fb0037654df1ab3a83b7ef9"
integrity sha512-mJPRTc/P39NH/iNG4mXa9aIhNymaQikTrnspeCa2ZuJ+mH2QN/rXwtX3XwKrHqWgUQFbNZKtHM105aHzJalElw==
@@ -1455,7 +1455,7 @@ inherits@2, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.3:
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
ini@1.3.5, ini@^1.3.4, ini@~1.3.0:
ini@^1.3.4, ini@~1.3.0:
version "1.3.5"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
@@ -1741,7 +1741,7 @@ make-dir@^3.0.0:
dependencies:
semver "^6.0.0"
matcher@^2.0.0:
matcher@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/matcher/-/matcher-2.1.0.tgz#64e1041c15b993e23b786f93320a7474bf833c28"
integrity sha512-o+nZr+vtJtgPNklyeUKkkH42OsK8WAfdgaJE2FNxcjLPg+5QbeEoT6vRj8Xq/iv18JlQ9cmKsEu0b94ixWf1YQ==
@@ -2097,13 +2097,13 @@ process-nextick-args@~2.0.0:
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
prompts@2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.3.0.tgz#a444e968fa4cc7e86689a74050685ac8006c4cc4"
integrity sha512-NfbbPPg/74fT7wk2XYQ7hAIp9zJyZp5Fu19iRbORqqy1BhtrkZ0fPafBU+7bmn8ie69DpT0R6QpJIN2oisYjJg==
prompts@2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.3.1.tgz#b63a9ce2809f106fa9ae1277c275b167af46ea05"
integrity sha512-qIP2lQyCwYbdzcqHIUi2HAxiWixhoM9OdLCWf8txXsapC/X9YdsCoeyRIXE/GP+Q0J37Q7+XN/MFqbUa7IzXNA==
dependencies:
kleur "^3.0.3"
sisteransi "^1.0.3"
sisteransi "^1.0.4"
proto-list@~1.2.1:
version "1.2.4"
@@ -2210,9 +2210,9 @@ registry-url@^3.0.3:
rc "^1.0.1"
resolve@^1.1.6, resolve@^1.10.0:
version "1.15.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.0.tgz#1b7ca96073ebb52e741ffd799f6b39ea462c67f5"
integrity sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw==
version "1.15.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8"
integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==
dependencies:
path-parse "^1.0.6"
@@ -2248,21 +2248,21 @@ rimraf@2, rimraf@^2.6.3:
dependencies:
glob "^7.1.3"
rimraf@3.0.1, rimraf@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.1.tgz#48d3d4cb46c80d388ab26cd61b1b466ae9ae225a"
integrity sha512-IQ4ikL8SjBiEDZfk+DFVwqRK8md24RWMEJkdSlgNLkyyAImcjf8SWvU1qFMDOb4igBClbTQ/ugPqXcRwdFTxZw==
rimraf@3.0.2, rimraf@^3.0.0:
version "3.0.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==
dependencies:
glob "^7.1.3"
roarr@^2.14.5:
version "2.14.6"
resolved "https://registry.yarnpkg.com/roarr/-/roarr-2.14.6.tgz#cebe8ad7ecbfd15bfa37b02dacf00809dd633912"
integrity sha512-qjbw0BEesKA+3XFBPt+KVe1PC/Z6ShfJ4wPlx2XifqH5h2Lj8/KQT5XJTsy3n1Es5kai+BwKALaECW3F70B1cg==
roarr@^2.15.2:
version "2.15.2"
resolved "https://registry.yarnpkg.com/roarr/-/roarr-2.15.2.tgz#34f6229ae3c8c12167c4ae60f58fe75e79a1e394"
integrity sha512-jmaDhK9CO4YbQAV8zzCnq9vjAqeO489MS5ehZ+rXmFiPFFE6B+S9KYO6prjmLJ5A0zY3QxVlQdrIya7E/azz/Q==
dependencies:
boolean "^3.0.0"
detect-node "^2.0.4"
globalthis "^1.0.0"
globalthis "^1.0.1"
json-stringify-safe "^5.0.1"
semver-compare "^1.0.0"
sprintf-js "^1.1.2"
@@ -2311,11 +2311,16 @@ semver-diff@^2.0.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
semver@^6.0.0, semver@^6.2.0, semver@^6.3.0:
semver@^6.0.0, semver@^6.2.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
semver@^7.1.2:
version "7.1.2"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.2.tgz#847bae5bce68c5d08889824f02667199b70e3d87"
integrity sha512-BJs9T/H8sEVHbeigqzIEo57Iu/3DG6c4QoqTfbQB3BPA4zgzAomh/Fk9E7QtjWQ8mx2dgA9YCfSF4y9k9bHNpQ==
serialize-error@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-5.0.0.tgz#a7ebbcdb03a5d71a6ed8461ffe0fc1a1afed62ac"
@@ -2345,7 +2350,7 @@ signal-exit@^3.0.0, signal-exit@^3.0.2:
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
sisteransi@^1.0.3:
sisteransi@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.4.tgz#386713f1ef688c7c0304dc4c0632898941cad2e3"
integrity sha512-/ekMoM4NJ59ivGSfKapeG+FWtrmWvA1p6FBZwXrqojw90vJu8lBmrTxCMuBCydKtkaUe2zt4PlxeTKpjwMbyig==
@@ -2691,10 +2696,10 @@ unzip-response@^2.0.1:
resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97"
integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=
unzipper@0.10.7:
version "0.10.7"
resolved "https://registry.yarnpkg.com/unzipper/-/unzipper-0.10.7.tgz#ed5d72d12337f66f790d42fef47eb9f9de0a0906"
integrity sha512-0ltrg7/F12h3KqY1zBfZB6bVnPTVlzhdK1iu2xCaGxGMF/Es9ETMAS0M89CnCB4hemPb/AoTWtj+62l7XFZKqQ==
unzipper@0.10.8:
version "0.10.8"
resolved "https://registry.yarnpkg.com/unzipper/-/unzipper-0.10.8.tgz#d7e898f572009128692641331c29b398ff3e5f16"
integrity sha512-CZRd20MbyAfWL1Xc+lqgNFYDj5e/HaH9pLEWZgseQWCvEtNfX0wOjnhaJ6PcGpNnDvifSW1ZNSCHX6GoNliR0A==
dependencies:
big-integer "^1.6.17"
binary "~0.3.0"
@@ -2864,10 +2869,10 @@ yargs-parser@^16.0.0:
camelcase "^5.0.0"
decamelize "^1.2.0"
yarn@1.21.1:
version "1.21.1"
resolved "https://registry.yarnpkg.com/yarn/-/yarn-1.21.1.tgz#1d5da01a9a03492dc4a5957befc1fd12da83d89c"
integrity sha512-dQgmJv676X/NQczpbiDtc2hsE/pppGDJAzwlRiADMTvFzYbdxPj2WO4PcNyriSt2c4jsCMpt8UFRKHUozt21GQ==
yarn@1.22.0:
version "1.22.0"
resolved "https://registry.yarnpkg.com/yarn/-/yarn-1.22.0.tgz#acf82906e36bcccd1ccab1cfb73b87509667c881"
integrity sha512-KMHP/Jq53jZKTY9iTUt3dIVl/be6UPs2INo96+BnZHLKxYNTfwMmlgHTaMWyGZoO74RI4AIFvnWhYrXq2USJkg==
yauzl@2.4.1:
version "2.4.1"