mirror of
https://github.com/PreMiD/PreMiD.git
synced 2026-04-06 04:41:58 +02:00
Compare commits
53 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c73f13baa8 | ||
|
|
a44c68ef46 | ||
|
|
218627e62d | ||
|
|
5d6e775b02 | ||
|
|
2b86cff3f3 | ||
|
|
0bc70dbc9e | ||
|
|
d1f7baad2b | ||
|
|
6d57bc2c5a | ||
|
|
8e3cf93011 | ||
|
|
51f6d17fbb | ||
|
|
b2e5229c78 | ||
|
|
87ec87e09d | ||
|
|
25bf7ac915 | ||
|
|
bcadad5564 | ||
|
|
bacda4624f | ||
|
|
9c5434e32c | ||
|
|
058421b9aa | ||
|
|
f947f50213 | ||
|
|
54688e6a71 | ||
|
|
d789bd7710 | ||
|
|
b3fa69f7c7 | ||
|
|
3ec47b2310 | ||
|
|
9bc37d8ecd | ||
|
|
dd21c46331 | ||
|
|
3c69cf7d5a | ||
|
|
97f8a0faf6 | ||
|
|
ce8b6dc995 | ||
|
|
d78eebdb0e | ||
|
|
01f78e0595 | ||
|
|
fc8e710a07 | ||
|
|
929131f5e6 | ||
|
|
4fbb0e454e | ||
|
|
3832a8811d | ||
|
|
8f6461e80f | ||
|
|
e21e12820b | ||
|
|
1edff1048f | ||
|
|
8e71e6b0ea | ||
|
|
1efd3dbea9 | ||
|
|
d02ad5a5b6 | ||
|
|
8758047ff0 | ||
|
|
c17df3c2b6 | ||
|
|
fe54d6537f | ||
|
|
dcc3516587 | ||
|
|
7039296c64 | ||
|
|
cdba36628f | ||
|
|
b2465f9bdc | ||
|
|
4b4a398c99 | ||
|
|
d292bd033f | ||
|
|
faa5683b26 | ||
|
|
ce0ae1bf04 | ||
|
|
b8f49b9312 | ||
|
|
7b9bcdfd10 | ||
|
|
72d65a18ef |
15
.github/deploy.ts
vendored
15
.github/deploy.ts
vendored
@@ -1,6 +1,7 @@
|
||||
import * as Client from "ssh2-sftp-client";
|
||||
import * as archiver from "archiver";
|
||||
import { platform, arch } from "os";
|
||||
import * as rimraf from "rimraf";
|
||||
import { platform } from "os";
|
||||
import { createWriteStream } from "fs";
|
||||
|
||||
let sftp = new Client();
|
||||
@@ -12,22 +13,18 @@ sftp
|
||||
password: process.env.SSH_PASSWORD
|
||||
})
|
||||
.then(async () => {
|
||||
rimraf.sync("../dist/app/");
|
||||
|
||||
console.log("Zipping...");
|
||||
let output = createWriteStream("app.zip"),
|
||||
archive = archiver("zip");
|
||||
|
||||
archive.directory(
|
||||
`../dist/PreMiD-${platform()}-${arch()}`,
|
||||
`PreMiD-${platform()}-${arch()}`
|
||||
);
|
||||
archive.directory(`../dist/`, platform());
|
||||
|
||||
output.on("close", function() {
|
||||
console.log("Uploading...");
|
||||
sftp
|
||||
.fastPut(
|
||||
"app.zip",
|
||||
`/home/PreMiD/builds/PreMiD-${platform()}-${arch()}.zip`
|
||||
)
|
||||
.fastPut("app.zip", `/home/PreMiD/builds/${platform()}.zip`)
|
||||
.then(() => {
|
||||
console.log("Done!");
|
||||
sftp.end();
|
||||
|
||||
65
.github/workflows/deploy.yml
vendored
65
.github/workflows/deploy.yml
vendored
@@ -1,13 +1,13 @@
|
||||
name: DePloY
|
||||
on: push
|
||||
env:
|
||||
env:
|
||||
NODE_ENV: DePloY
|
||||
jobs:
|
||||
build:
|
||||
package:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
os: [windows-latest, macOS-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: actions/setup-node@master
|
||||
@@ -23,3 +23,62 @@ jobs:
|
||||
SSH_USERNAME: ${{ secrets.SSHUSERNAME }}
|
||||
SSH_PASSWORD: ${{ secrets.SSHPASSWORD }}
|
||||
run: npm run deploy
|
||||
installer:
|
||||
needs: package
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: Prepare for installer
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.SSHHOST }}
|
||||
username: ${{ secrets.SSHUSERNAME }}
|
||||
password: ${{ secrets.SSHPASSWORD }}
|
||||
script: |
|
||||
cd /home/PreMiD/builds
|
||||
unzip darwin.zip
|
||||
unzip win32.zip
|
||||
mv darwin/PreMiD-darwin-x64 PreMiD-darwin-x64
|
||||
mv win32/PreMiD-win32-ia32 PreMiD-win32-ia32
|
||||
mv win32/PreMiD-win32-x64 PreMiD-win32-x64
|
||||
rm -r win32.zip darwin.zip darwin win32
|
||||
- name: Create installer (Windows 32bit)
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.SSHHOST }}
|
||||
username: ${{ secrets.SSHUSERNAME }}
|
||||
password: ${{ secrets.SSHPASSWORD }}
|
||||
script: |
|
||||
cd /home/PreMiD/builds
|
||||
node prepare.js PreMiD-win32-ia32
|
||||
/opt/installbuilder-19.9.0/bin/builder build installer.xml windows
|
||||
- name: Create installer (Windows 64bit)
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.SSHHOST }}
|
||||
username: ${{ secrets.SSHUSERNAME }}
|
||||
password: ${{ secrets.SSHPASSWORD }}
|
||||
script: |
|
||||
cd /home/PreMiD/builds
|
||||
node prepare.js PreMiD-win32-x64
|
||||
/opt/installbuilder-19.9.0/bin/builder build installer.xml windows
|
||||
- name: Create installer (MacOS)
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.SSHHOST }}
|
||||
username: ${{ secrets.SSHUSERNAME }}
|
||||
password: ${{ secrets.SSHPASSWORD }}
|
||||
script: |
|
||||
cd /home/PreMiD/builds
|
||||
node prepare.js PreMiD-darwin-x64
|
||||
/opt/installbuilder-19.9.0/bin/builder build installer.xml osx
|
||||
- name: Cleanup
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.SSHHOST }}
|
||||
username: ${{ secrets.SSHUSERNAME }}
|
||||
password: ${{ secrets.SSHPASSWORD }}
|
||||
script: |
|
||||
cd /home/PreMiD/builds
|
||||
rm -r PreMiD-darwin-x64 PreMiD-win32-ia32 PreMiD-win32-x64
|
||||
|
||||
|
||||
|
||||
22
@types/PreMiD/ExtensionSettings.d.ts
vendored
Normal file
22
@types/PreMiD/ExtensionSettings.d.ts
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
export default interface ExtensionSettings {
|
||||
/**
|
||||
* If extension is enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Autolaunch enabled
|
||||
*/
|
||||
autoLaunch: boolean;
|
||||
/**
|
||||
* Media keys enabled
|
||||
*/
|
||||
mediaKeys: boolean;
|
||||
/**
|
||||
* title menubar (TrayTitle)
|
||||
*/
|
||||
titleMenubar: boolean;
|
||||
/**
|
||||
* language of extension
|
||||
*/
|
||||
language: string;
|
||||
}
|
||||
16
@types/PreMiD/Presence.d.ts
vendored
Normal file
16
@types/PreMiD/Presence.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import * as Discord from "discord-rpc";
|
||||
|
||||
export default interface Presence {
|
||||
/**
|
||||
* Client ID of presence
|
||||
*/
|
||||
clientId: string;
|
||||
/**
|
||||
* Rich Procedual call connection
|
||||
*/
|
||||
rpc: Discord.Client;
|
||||
/**
|
||||
* Connection ready?
|
||||
*/
|
||||
ready: Boolean;
|
||||
}
|
||||
33
@types/PreMiD/PresenceData.d.ts
vendored
Normal file
33
@types/PreMiD/PresenceData.d.ts
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import * as Discord from "discord-rpc";
|
||||
|
||||
export default interface PresenceData {
|
||||
/**
|
||||
* Client ID of presence
|
||||
*/
|
||||
clientId: string;
|
||||
/**
|
||||
* Tray title to be shown in Mac OS tray
|
||||
*/
|
||||
trayTitle: string;
|
||||
/**
|
||||
* service name of presence
|
||||
* @deprecated
|
||||
*/
|
||||
service: string;
|
||||
/**
|
||||
* Determines if the service is currently playing something back or not, if false it will automatically hide after 1 minute
|
||||
*/
|
||||
playback: boolean;
|
||||
/**
|
||||
* Discord Presence which gets sent directly to Discord app
|
||||
*/
|
||||
presenceData: Discord.Presence;
|
||||
/**
|
||||
* Determines if the service should be hidden (clearActivity)
|
||||
*/
|
||||
hidden: boolean;
|
||||
/**
|
||||
* Determines if the service is mediaKey able / uses them
|
||||
*/
|
||||
mediaKeys: boolean;
|
||||
}
|
||||
@@ -1,236 +0,0 @@
|
||||
<project>
|
||||
<shortName>PreMiD</shortName>
|
||||
<fullName>PreMiD</fullName>
|
||||
<version>2.0</version>
|
||||
<installerFilename>${product_fullname}-${product_version}-installer_32bit.${platform_exec_suffix}</installerFilename>
|
||||
<wrapLicenseFileText>0</wrapLicenseFileText>
|
||||
<logoImage>appIcon.png</logoImage>
|
||||
<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>../tmp/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/PreMiD-win32-ia32/*</origin>
|
||||
</distributionDirectory>
|
||||
<distributionFile>
|
||||
<origin>appIcon.ico</origin>
|
||||
</distributionFile>
|
||||
<distributionFile>
|
||||
<origin>updater.exe</origin>
|
||||
</distributionFile>
|
||||
</distributionFileList>
|
||||
</folder>
|
||||
<folder>
|
||||
<description>Program Files</description>
|
||||
<destination>${installdir}</destination>
|
||||
<name>programfilesosx</name>
|
||||
<platforms>osx</platforms>
|
||||
<distributionFileList>
|
||||
<distributionFile>
|
||||
<origin>updater.app</origin>
|
||||
</distributionFile>
|
||||
<distributionFile>
|
||||
<origin>../dist/PreMiD-darwin-x64/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>
|
||||
</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>
|
||||
<enableRollback>0</enableRollback>
|
||||
<enableTimestamp>1</enableTimestamp>
|
||||
<osxPlatforms>osx-intel osx-x86_64</osxPlatforms>
|
||||
<outputDirectory>../dist/installer</outputDirectory>
|
||||
<productDisplayIcon>${installdir}/appIcon.ico</productDisplayIcon>
|
||||
<saveRelativePaths>1</saveRelativePaths>
|
||||
<unattendedModeUI>minimal</unattendedModeUI>
|
||||
<vendor>Timeraa</vendor>
|
||||
<windowsExecutableIcon>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>
|
||||
@@ -1,10 +1,11 @@
|
||||
<project>
|
||||
<shortName>PreMiD</shortName>
|
||||
<fullName>PreMiD</fullName>
|
||||
<version>2.0</version>
|
||||
<version>{{VERSION}}</version>
|
||||
<installerFilename>${product_fullname}-${product_version}-installer_64bit.${platform_exec_suffix}</installerFilename>
|
||||
<wrapLicenseFileText>0</wrapLicenseFileText>
|
||||
<logoImage>appIcon.png</logoImage>
|
||||
<logoImage>../installer_assets/appIcon.png</logoImage>
|
||||
<osxApplicationBundleIcon>../installer_assets/appIcon.icns</osxApplicationBundleIcon>
|
||||
<componentList>
|
||||
<component>
|
||||
<name>default</name>
|
||||
@@ -20,7 +21,7 @@
|
||||
<platforms>all</platforms>
|
||||
<distributionFileList>
|
||||
<distributionFile>
|
||||
<origin>../tmp/update.ini</origin>
|
||||
<origin>update.ini</origin>
|
||||
</distributionFile>
|
||||
</distributionFileList>
|
||||
</folder>
|
||||
@@ -37,13 +38,13 @@
|
||||
<platforms>windows</platforms>
|
||||
<distributionFileList>
|
||||
<distributionDirectory allowWildcards="1">
|
||||
<origin>../dist/PreMiD-win32-x64/*</origin>
|
||||
<origin>../dist/PACKAGEDNAME/*</origin>
|
||||
</distributionDirectory>
|
||||
<distributionFile>
|
||||
<origin>appIcon.ico</origin>
|
||||
<origin>../installer_assets/appIcon.ico</origin>
|
||||
</distributionFile>
|
||||
<distributionFile>
|
||||
<origin>updater.exe</origin>
|
||||
<origin>../installer_assets/updater.exe</origin>
|
||||
</distributionFile>
|
||||
</distributionFileList>
|
||||
</folder>
|
||||
@@ -54,10 +55,10 @@
|
||||
<platforms>osx</platforms>
|
||||
<distributionFileList>
|
||||
<distributionFile>
|
||||
<origin>updater.app</origin>
|
||||
<origin>../installer_assets/updater.app</origin>
|
||||
</distributionFile>
|
||||
<distributionFile>
|
||||
<origin>../dist/PreMiD-darwin-x64/PreMiD.app</origin>
|
||||
<origin>../dist/PACKAGEDNAME/PreMiD.app</origin>
|
||||
</distributionFile>
|
||||
</distributionFileList>
|
||||
</folder>
|
||||
@@ -68,7 +69,7 @@
|
||||
<name>${product_fullname}</name>
|
||||
<runAsAdmin>0</runAsAdmin>
|
||||
<runInTerminal>0</runInTerminal>
|
||||
<windowsExec>${installdir}/PreMID.exe</windowsExec>
|
||||
<windowsExec>${installdir}/PreMiD.exe</windowsExec>
|
||||
<windowsExecArgs></windowsExecArgs>
|
||||
<windowsIcon></windowsIcon>
|
||||
<windowsPath>${installdir}/</windowsPath>
|
||||
@@ -122,11 +123,29 @@
|
||||
</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>
|
||||
<program>PreMiD.exe</program>
|
||||
<programArguments>&</programArguments>
|
||||
<progressText>Launching PreMiD</progressText>
|
||||
<show>0</show>
|
||||
@@ -212,13 +231,15 @@
|
||||
<defaultInstallationMode>unattended</defaultInstallationMode>
|
||||
<enableRollback>0</enableRollback>
|
||||
<enableTimestamp>1</enableTimestamp>
|
||||
<osxPlatforms>osx-intel osx-x86_64</osxPlatforms>
|
||||
<installationScope>user</installationScope>
|
||||
<overwritePolicy>onlyIfNewer</overwritePolicy>
|
||||
<osxApplicationBundleIdentifier>eu.Timeraa.PreMiD</osxApplicationBundleIdentifier>
|
||||
<outputDirectory>../dist/installer</outputDirectory>
|
||||
<productDisplayIcon>${installdir}/appIcon.ico</productDisplayIcon>
|
||||
<saveRelativePaths>1</saveRelativePaths>
|
||||
<unattendedModeUI>minimal</unattendedModeUI>
|
||||
<vendor>Timeraa</vendor>
|
||||
<windowsExecutableIcon>appIcon.ico</windowsExecutableIcon>
|
||||
<windowsExecutableIcon>../installer_assets/appIcon.ico</windowsExecutableIcon>
|
||||
<parameterList>
|
||||
<directoryParameter>
|
||||
<name>installdir</name>
|
||||
@@ -234,4 +255,3 @@
|
||||
</directoryParameter>
|
||||
</parameterList>
|
||||
</project>
|
||||
|
||||
@@ -8,5 +8,4 @@
|
||||
<enableSslSupport>1</enableSslSupport>
|
||||
<outputDirectory>./</outputDirectory>
|
||||
<installerFilename>updater.${platform_exec_suffix}</installerFilename>
|
||||
<osxPlatforms>osx-intel osx-x86_64</osxPlatforms>
|
||||
</autoUpdateProject>
|
||||
12
package-lock.json
generated
12
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "premid",
|
||||
"version": "2.0.4",
|
||||
"version": "2.0.5",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -231,6 +231,16 @@
|
||||
"@types/request": "*"
|
||||
}
|
||||
},
|
||||
"@types/rimraf": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-2.0.2.tgz",
|
||||
"integrity": "sha512-Hm/bnWq0TCy7jmjeN5bKYij9vw5GrDFWME4IuxV08278NtU/VdGbzsBohcCUJ7+QMqmUq5hpRKB39HeQWJjztQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/glob": "*",
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/socket.io": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/socket.io/-/socket.io-2.1.4.tgz",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "premid",
|
||||
"productName": "PreMiD",
|
||||
"description": "Discord Rich Presence for websites.",
|
||||
"version": "2.0.4",
|
||||
"version": "2.0.5",
|
||||
"repository": "https://github.com/PreMiD/PreMiD",
|
||||
"scripts": {
|
||||
"init": "tsc && tsc pkg devMode && node devMode.js compile",
|
||||
@@ -23,6 +23,7 @@
|
||||
"@types/ora": "3.2.0",
|
||||
"@types/prompts": "2.0.1",
|
||||
"@types/request-promise-native": "1.0.17",
|
||||
"@types/rimraf": "^2.0.2",
|
||||
"@types/socket.io": "2.1.4",
|
||||
"@types/ssh2-sftp-client": "4.1.0",
|
||||
"archiver": "3.1.1",
|
||||
|
||||
36
pkg.ts
36
pkg.ts
@@ -1,5 +1,5 @@
|
||||
import * as electronPackager from "electron-packager";
|
||||
import { platform } from "os";
|
||||
import { platform, arch } from "os";
|
||||
import { existsSync, readFileSync, writeFileSync } from "fs";
|
||||
import { resolve } from "path";
|
||||
import { exec } from "child_process";
|
||||
@@ -11,7 +11,7 @@ import * as ora from "ora";
|
||||
(async () => {
|
||||
let response = {
|
||||
os: "current",
|
||||
arch: "current",
|
||||
arch: "all",
|
||||
installer: false
|
||||
};
|
||||
|
||||
@@ -90,7 +90,26 @@ import * as ora from "ora";
|
||||
}
|
||||
]);
|
||||
|
||||
if (!response.os) return;
|
||||
//#region WIP
|
||||
let installerXml = readFileSync(`installer_assets/installer.xml`, "utf-8");
|
||||
|
||||
installerXml = installerXml.replace(
|
||||
"{{VERSION}}",
|
||||
require("./package.json").version
|
||||
);
|
||||
installerXml = installerXml.replace(
|
||||
/(PACKAGEDNAME)/g,
|
||||
`PreMiD-${platform()}-${arch()}`
|
||||
);
|
||||
|
||||
ensureDirSync("tmp");
|
||||
writeFileSync("tmp/installer.xml", installerXml);
|
||||
//#endregion
|
||||
|
||||
if (!response.os) {
|
||||
process.exit();
|
||||
return;
|
||||
}
|
||||
|
||||
let icon: string;
|
||||
|
||||
@@ -109,7 +128,7 @@ import * as ora from "ora";
|
||||
removeSync("./dist/app/updater.exe");
|
||||
|
||||
let spinner = ora("Packaging app").start(),
|
||||
packagingOptions = {
|
||||
packagingOptions: electronPackager.Options = {
|
||||
dir: "./dist/app",
|
||||
out: "./dist",
|
||||
darwinDarkModeSupport: true,
|
||||
@@ -120,7 +139,9 @@ import * as ora from "ora";
|
||||
appCategoryType: "Utilities",
|
||||
appCopyright: `Timeraa 2018-${new Date().getFullYear()}`,
|
||||
prune: true,
|
||||
// @ts-ignore
|
||||
arch: response.arch,
|
||||
// @ts-ignore
|
||||
platform: response.os
|
||||
};
|
||||
|
||||
@@ -132,6 +153,7 @@ import * as ora from "ora";
|
||||
if (!response.installer) {
|
||||
spinner.text = "Done!";
|
||||
spinner.succeed();
|
||||
process.exit();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -166,6 +188,7 @@ import * as ora from "ora";
|
||||
|
||||
if (!existsSync(bitRockBuilder) || !existsSync(bitRockUpdater)) {
|
||||
spinner.fail("Bitrock installation not found.");
|
||||
process.exit();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -180,12 +203,13 @@ import * as ora from "ora";
|
||||
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 installer_assets/PreMiD_x64.xml ${
|
||||
`"${bitRockBuilder}" build tmp/installer.xml ${
|
||||
platform() === "win32" ? "windows" : "osx"
|
||||
}`
|
||||
);
|
||||
@@ -195,11 +219,13 @@ import * as ora from "ora";
|
||||
|
||||
if (code !== 0) {
|
||||
spinner.fail(`Error code: ${code}`);
|
||||
process.exit();
|
||||
return;
|
||||
}
|
||||
|
||||
spinner.text = "Done!";
|
||||
spinner.succeed();
|
||||
process.exit();
|
||||
return;
|
||||
});
|
||||
});
|
||||
|
||||
17
src/index.ts
17
src/index.ts
@@ -7,37 +7,26 @@ import { init as initTray } from "./managers/trayManager";
|
||||
import { update as initAutoLaunch } from "./managers/launchManager";
|
||||
import { platform } from "os";
|
||||
import { checkForUpdate } from "./util/updateChecker";
|
||||
import { info } from "./util/debug";
|
||||
|
||||
//* Define and set it to null
|
||||
//* Set AppUserModelId for task manager etc
|
||||
//* Hide app icon if Mac OS
|
||||
//* Mac OS truted accessability client
|
||||
//* When app is ready
|
||||
export let updateCheckerInterval = null;
|
||||
app.setAppUserModelId("Timeraa.PreMiD");
|
||||
if (platform() === "darwin") {
|
||||
app.dock.hide();
|
||||
|
||||
!systemPreferences.isTrustedAccessibilityClient(false)
|
||||
? systemPreferences.isTrustedAccessibilityClient(true)
|
||||
: info("Trusted accessibility client.");
|
||||
}
|
||||
|
||||
//* When app is ready
|
||||
app.whenReady().then(async () => {
|
||||
//* Init auto launch
|
||||
initAutoLaunch();
|
||||
|
||||
//* Check for updates > Update and relaunch
|
||||
//* Init socket
|
||||
//* init application tray icon
|
||||
//* If app is packaged, run an update check every 15 mins
|
||||
initAutoLaunch();
|
||||
await checkForUpdate(true);
|
||||
await initSocket();
|
||||
await initTray();
|
||||
app.isPackaged
|
||||
? (updateCheckerInterval = setInterval(checkForUpdate, 15 * 1000 * 60))
|
||||
: undefined;
|
||||
if (platform() === "darwin") app.dock.hide();
|
||||
});
|
||||
|
||||
//* If second instance started, close old one
|
||||
|
||||
@@ -3,7 +3,10 @@ import { app } from "electron";
|
||||
import { platform } from "os";
|
||||
import { tray } from "./trayManager";
|
||||
import { info } from "../util/debug";
|
||||
import { init as initKeybinds, deinit as deinitKeybinds } from "./inputManager";
|
||||
|
||||
//* Import custom types
|
||||
import Presence from "../../@types/PreMiD/Presence";
|
||||
import PresenceData from "../../@types/PreMiD/PresenceData";
|
||||
|
||||
//* Define Presence array
|
||||
let loggedInPresences: Array<Presence> = [];
|
||||
@@ -13,21 +16,18 @@ let loggedInPresences: Array<Presence> = [];
|
||||
* @param presence PresenceData to set activity
|
||||
*/
|
||||
export function setActivity(presence: PresenceData) {
|
||||
//* If presence.mediakeys defined & enabled, init
|
||||
//* If platform is darwin (Mac OS) set trayTitle if theres one
|
||||
//* Check if theres an active RPC connection that we can use
|
||||
//* If we have one, use it
|
||||
//* Else create one and use it
|
||||
//* Show debug
|
||||
if (presence.mediaKeys) initKeybinds();
|
||||
else deinitKeybinds();
|
||||
if (platform() === "darwin" && presence.trayTitle)
|
||||
tray.setTitle(presence.trayTitle);
|
||||
let rpc = loggedInPresences.find(p => p.clientId === presence.clientId);
|
||||
if (rpc) rpc.rpc.setActivity(presence.presenceData);
|
||||
if (rpc) rpc.rpc.setActivity(presence.presenceData).catch(destroy);
|
||||
else
|
||||
loginPresence(presence.clientId).then(p =>
|
||||
p.rpc.setActivity(presence.presenceData)
|
||||
p.rpc.setActivity(presence.presenceData).catch(destroy)
|
||||
);
|
||||
info("setActivity");
|
||||
}
|
||||
@@ -37,22 +37,20 @@ export function setActivity(presence: PresenceData) {
|
||||
* @param clientId clientId of presence to clear
|
||||
*/
|
||||
export function clearActivity(clientId: string = undefined) {
|
||||
//* Clear keybinds
|
||||
//* Clear tray title
|
||||
//* If clientId set
|
||||
//* Else map through presences and clear them
|
||||
//* Show Debug
|
||||
deinitKeybinds();
|
||||
if (platform() === "darwin") tray.setTitle("");
|
||||
if (clientId) {
|
||||
//* Check if this presence is logged in
|
||||
//* If it is clear its activity
|
||||
//* Return to prevent further actions
|
||||
let pTC = loggedInPresences.find(p => p.clientId === clientId);
|
||||
if (pTC) pTC.rpc.clearActivity();
|
||||
if (pTC) pTC.rpc.clearActivity().catch(destroy);
|
||||
return;
|
||||
}
|
||||
loggedInPresences.map(p => p.rpc.clearActivity());
|
||||
loggedInPresences.map(p => p.rpc.clearActivity().catch(destroy));
|
||||
info("clearActivity");
|
||||
}
|
||||
|
||||
@@ -101,7 +99,7 @@ export function destroy() {
|
||||
//* Map through loggedInPresences and destroy their rpcs
|
||||
//* Set loggedInPresences to new Array
|
||||
//* Return the promise
|
||||
if (platform() === "darwin") tray.setTitle("");
|
||||
if (platform() === "darwin" && typeof tray !== "undefined") tray.setTitle("");
|
||||
let res = Promise.all(
|
||||
loggedInPresences.map((presence: Presence) =>
|
||||
presence.rpc.destroy().catch(() => {})
|
||||
@@ -118,50 +116,3 @@ app.once("will-quit", () => {
|
||||
info("Closing rpc connections");
|
||||
destroy();
|
||||
});
|
||||
|
||||
//TODO Try to move this to a type file
|
||||
interface Presence {
|
||||
/**
|
||||
* Client ID of presence
|
||||
*/
|
||||
clientId: string;
|
||||
/**
|
||||
* Rich Procedual call connection
|
||||
*/
|
||||
rpc: Discord.Client;
|
||||
/**
|
||||
* Connection ready?
|
||||
*/
|
||||
ready: Boolean;
|
||||
}
|
||||
interface PresenceData {
|
||||
/**
|
||||
* Client ID of presence
|
||||
*/
|
||||
clientId: string;
|
||||
/**
|
||||
* Tray title to be shown in Mac OS tray
|
||||
*/
|
||||
trayTitle: string;
|
||||
/**
|
||||
* service name of presence
|
||||
* @deprecated
|
||||
*/
|
||||
service: string;
|
||||
/**
|
||||
* Determines if the service is currently playing something back or not, if false it will automatically hide after 1 minute
|
||||
*/
|
||||
playback: boolean;
|
||||
/**
|
||||
* Discord Presence which gets sent directly to Discord app
|
||||
*/
|
||||
presenceData: Discord.Presence;
|
||||
/**
|
||||
* Determines if the service should be hidden (clearActivity)
|
||||
*/
|
||||
hidden: boolean;
|
||||
/**
|
||||
* Determines if the service is mediaKey able / uses them
|
||||
*/
|
||||
mediaKeys: boolean;
|
||||
}
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
import { app, globalShortcut } from "electron";
|
||||
import { socket } from "./socketManager";
|
||||
import { info, error, success } from "./../util/debug";
|
||||
|
||||
let playPauseSwitch = null,
|
||||
playPauseTimeout = null;
|
||||
|
||||
/**
|
||||
* Register media keyboard shortcuts
|
||||
*/
|
||||
export function init() {
|
||||
//! Disabled for now
|
||||
return
|
||||
|
||||
//* If registered or not enabled return
|
||||
//* Bind mediaplaypause
|
||||
//* Bind medianexttrack
|
||||
//* Bind mediaprevioustrack
|
||||
//* Debug if bound failed/succeeded
|
||||
if (
|
||||
globalShortcut.isRegistered("mediaplaypause") ||
|
||||
globalShortcut.isRegistered("medianexttrack") ||
|
||||
globalShortcut.isRegistered("mediaprevioustrack")
|
||||
)
|
||||
return;
|
||||
let mpp = globalShortcut.register("mediaplaypause", () => {
|
||||
//* Return if not connected
|
||||
//* if playPause timeout not set set it - 500ms timeout > switch play/pause, nextrack/previoustrack
|
||||
//* Increase switch each press
|
||||
//* Show debug
|
||||
if (!socket.connected) return;
|
||||
if (!playPauseTimeout)
|
||||
playPauseTimeout = setTimeout(handlePlayPause, 500);
|
||||
playPauseSwitch++;
|
||||
info("Media Play/Pause");
|
||||
}),
|
||||
mnt = globalShortcut.register("medianexttrack", () => {
|
||||
//* send keybind to app if connected
|
||||
if (socket.connected)
|
||||
socket.emit("keybinds", {
|
||||
playback: "nextTrack"
|
||||
});
|
||||
info("Media Nextrack");
|
||||
}),
|
||||
mpt = globalShortcut.register("mediaprevioustrack", () => {
|
||||
//* send keybind to app if connected
|
||||
if (socket.connected)
|
||||
socket.emit("keybinds", {
|
||||
playback: "previousTrack"
|
||||
});
|
||||
info("Media Previoustrack");
|
||||
});
|
||||
if (mpp && mnt && mpt) success("Registered keyboard shortcuts.");
|
||||
else error("Registering keyboard shortcuts failed.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle Play/Pause media key after 500ms timeout
|
||||
*/
|
||||
function handlePlayPause() {
|
||||
//* Switch case -> emit
|
||||
//* Reset switch let
|
||||
//* Reset timeout let
|
||||
switch (playPauseSwitch) {
|
||||
case 1:
|
||||
socket.emit("keybinds", { playback: "pause" });
|
||||
break;
|
||||
case 2:
|
||||
socket.emit("keybinds", { playback: "nextTrack" });
|
||||
break;
|
||||
case 3:
|
||||
socket.emit("keybinds", { playback: "previousTrack" });
|
||||
break;
|
||||
}
|
||||
playPauseSwitch = null;
|
||||
playPauseTimeout = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregister all globalShortcuts set by app
|
||||
*/
|
||||
export function deinit() {
|
||||
//* Return if they aren't bound
|
||||
//* Clear keybinds
|
||||
//* Show debug
|
||||
if (
|
||||
!globalShortcut.isRegistered("mediaplaypause") &&
|
||||
!globalShortcut.isRegistered("medianexttrack") &&
|
||||
!globalShortcut.isRegistered("mediaprevioustrack")
|
||||
)
|
||||
return;
|
||||
globalShortcut.unregisterAll();
|
||||
info("Cleared keybinds");
|
||||
}
|
||||
|
||||
//* If app will quit deinit keybinds
|
||||
app.once("will-quit", deinit);
|
||||
@@ -2,9 +2,11 @@ import ElectronStore from "electron-store";
|
||||
import { tray } from "./trayManager";
|
||||
import { update as updateAutoLaunch } from "./launchManager";
|
||||
import { platform } from "os";
|
||||
import { deinit as deinitInputs } from "./inputManager";
|
||||
import { info } from "../util/debug";
|
||||
|
||||
//* Import custom types
|
||||
import ExtensionSettings from "../../@types/PreMiD/ExtensionSettings";
|
||||
|
||||
//* Export and set default settings
|
||||
export let settings = new ElectronStore({
|
||||
defaults: {
|
||||
@@ -16,44 +18,16 @@ export let settings = new ElectronStore({
|
||||
* Update settings of app
|
||||
* @param extensionSettings Settings from extension
|
||||
*/
|
||||
export function update(extensionSettings: extensionSettings) {
|
||||
console.log(extensionSettings);
|
||||
export function update(extensionSettings: ExtensionSettings) {
|
||||
//* Show debug
|
||||
//* remove title if disabled
|
||||
//* unbind keybinds if disabled
|
||||
//* Update autolaunch if updated
|
||||
//* Save Settings
|
||||
|
||||
info("Updated settings");
|
||||
if (!extensionSettings.titleMenubar && platform() === "darwin")
|
||||
tray.setTitle("");
|
||||
if (!extensionSettings.mediaKeys) deinitInputs();
|
||||
if (settings.get("autoLaunch") != extensionSettings.autoLaunch) {
|
||||
settings.set("autoLaunch", extensionSettings.autoLaunch);
|
||||
updateAutoLaunch();
|
||||
}
|
||||
}
|
||||
|
||||
//TODO Try to move types into file
|
||||
interface extensionSettings {
|
||||
/**
|
||||
* If extension is enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Autolaunch enabled
|
||||
*/
|
||||
autoLaunch: boolean;
|
||||
/**
|
||||
* Media keys enabled
|
||||
*/
|
||||
mediaKeys: boolean;
|
||||
/**
|
||||
* title menubar (TrayTitle)
|
||||
*/
|
||||
titleMenubar: boolean;
|
||||
/**
|
||||
* language of extension
|
||||
*/
|
||||
language: string;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ import socketIo from "socket.io";
|
||||
import { createServer, Server } from "http";
|
||||
import { app, dialog } from "electron";
|
||||
import { success, error } from "../util/debug";
|
||||
import { deinit as deinitInputs } from "./inputManager";
|
||||
import { update as updateSettings } from "./settingsManager";
|
||||
import { openFileDialog } from "./presenceDevManager";
|
||||
import { setActivity, clearActivity, destroy } from "./discordManager";
|
||||
@@ -52,10 +51,8 @@ function socketConnection(cSocket: socketIo.Socket) {
|
||||
socket.once("disconnect", () => {
|
||||
//* Show debug
|
||||
//* Destroy all open RPC connections
|
||||
//* Clear input bindings
|
||||
error("Socket disconnection.");
|
||||
destroy();
|
||||
deinitInputs();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -75,6 +72,6 @@ function socketError(e: any) {
|
||||
e.port
|
||||
}.\nIs ${app.getName()} running already?`
|
||||
);
|
||||
app.exit(0);
|
||||
app.quit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { spawn } from "child_process";
|
||||
import { spawn, exec } from "child_process";
|
||||
import { resolve } from "path";
|
||||
import { error, info } from "./debug";
|
||||
import { trayContextMenu } from "../managers/trayManager";
|
||||
@@ -12,11 +12,15 @@ import sudoPrompt from "sudo-prompt";
|
||||
let updaterPath: string;
|
||||
|
||||
export async function checkForUpdate(autoUpdate = false) {
|
||||
if (!app.isPackaged) {
|
||||
//* Skip Update checker if unsupported OS / not packaged
|
||||
if (!app.isPackaged || !["darwin", "win32"].includes(platform())) {
|
||||
//* Show debug
|
||||
//* return
|
||||
info("Skipping UpdateChecker");
|
||||
return;
|
||||
}
|
||||
|
||||
//* Resolve paths for each OS
|
||||
switch (platform()) {
|
||||
case "darwin":
|
||||
updaterPath = resolve(
|
||||
@@ -28,22 +32,17 @@ export async function checkForUpdate(autoUpdate = false) {
|
||||
break;
|
||||
}
|
||||
|
||||
// TODO remove?
|
||||
//* return if update doesn't exist
|
||||
if (!existsSync(updaterPath)) {
|
||||
error("Updater not found.");
|
||||
clearInterval(updateCheckerInterval);
|
||||
return;
|
||||
}
|
||||
|
||||
//* Spawn update checker
|
||||
let child = spawn(updaterPath, ["--mode", "unattended"]);
|
||||
|
||||
child.on("error", err => {
|
||||
// @ts-ignore
|
||||
if (err.code === "ENOENT") {
|
||||
error("Updater file not found. Skipping updater functions.");
|
||||
clearInterval(updateCheckerInterval);
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
child.on("exit", code => {
|
||||
//* If no update or error return
|
||||
if (code === 1) {
|
||||
@@ -84,13 +83,26 @@ export async function checkForUpdate(autoUpdate = false) {
|
||||
}
|
||||
|
||||
export function update() {
|
||||
if (platform() === "darwin") {
|
||||
exec(
|
||||
`\"${updaterPath}\" --mode unattended --unattendedmodebehavior download`,
|
||||
() => {
|
||||
dialog.showErrorBox(
|
||||
"Error while updating",
|
||||
`${app.getName()} was unable to update itself. Please try again later.`
|
||||
);
|
||||
}
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
sudoPrompt.exec(
|
||||
`\"${updaterPath}\" --mode unattended --unattendedmodebehavior download`,
|
||||
{
|
||||
name: app.getName()
|
||||
},
|
||||
(error: Error) => {
|
||||
dialog.showMessageBox({ message: error.message });
|
||||
dialog.showErrorBox(
|
||||
"Error while updating",
|
||||
`${app.getName()} was unable to update itself. Please try again later.`
|
||||
);
|
||||
if (error) {
|
||||
checkForUpdate();
|
||||
return;
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
"module": "commonjs",
|
||||
"target": "es2018",
|
||||
"sourceMap": true,
|
||||
"baseUrl": ".",
|
||||
"outDir": "dist/app",
|
||||
"removeComments": true,
|
||||
"esModuleInterop": true
|
||||
"esModuleInterop": true,
|
||||
"typeRoots": ["@types/*"]
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"include": ["@types/*", "src/**/*"],
|
||||
"exclude": [
|
||||
"devMode.ts",
|
||||
"pkg.ts",
|
||||
|
||||
Reference in New Issue
Block a user