feat: update build process for Squirrel installer and add new upload steps
This commit is contained in:
@@ -100,17 +100,46 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Upload NSIS installer
|
- name: Upload Squirrel Setup (x64)
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Paarrot-Windows-x64.exe
|
name: Paarrot-Setup-x64.exe
|
||||||
path: dist-electron/Paarrot-*-win-x64.exe
|
path: dist-electron/Paarrot-*-win-x64-Setup.exe
|
||||||
|
|
||||||
- name: Upload Portable
|
- name: Upload Squirrel Setup (arm64)
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Paarrot-Windows-x64-portable.exe
|
name: Paarrot-Setup-arm64.exe
|
||||||
path: dist-electron/Paarrot-*-win-x64.portable.exe
|
path: dist-electron/Paarrot-*-win-arm64-Setup.exe
|
||||||
|
|
||||||
|
- name: List build output
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
Get-ChildItem -Path dist-electron -Recurse | Select-Object FullName
|
||||||
|
|
||||||
|
- name: Copy RELEASES file for upload
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
if (Test-Path \"dist-electron/squirrel-windows/RELEASES\") {
|
||||||
|
Copy-Item \"dist-electron/squirrel-windows/RELEASES\" -Destination \"dist-electron/RELEASES\"
|
||||||
|
} elseif (Test-Path \"dist-electron/RELEASES\") {
|
||||||
|
Write-Output \"RELEASES file already at root\"
|
||||||
|
} else {
|
||||||
|
Write-Error \"RELEASES file not found\"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: Upload Squirrel RELEASES
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: RELEASES
|
||||||
|
path: dist-electron/RELEASES
|
||||||
|
|
||||||
|
- name: Upload Squirrel nupkg (x64)
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Paarrot-x64.nupkg
|
||||||
|
path: dist-electron/Paarrot-*-win-x64-full.nupkg
|
||||||
|
|
||||||
- name: Upload Windows update metadata
|
- name: Upload Windows update metadata
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
@@ -240,7 +269,7 @@ jobs:
|
|||||||
- name: Prepare release files
|
- name: Prepare release files
|
||||||
run: |
|
run: |
|
||||||
mkdir -p release-files
|
mkdir -p release-files
|
||||||
find artifacts -type f \( -name "*.exe" -o -name "*.AppImage" -o -name "*.deb" -o -name "*.rpm" -o -name "*.dmg" -o -name "*.zip" -o -name "*.yml" \) -exec cp {} release-files/ \;
|
find artifacts -type f \( -name "*.exe" -o -name "*.AppImage" -o -name "*.deb" -o -name "*.rpm" -o -name "*.dmg" -o -name "*.zip" -o -name "*.yml" -o -name "*.nupkg" -o -name "RELEASES*" \) -exec cp {} release-files/ \;
|
||||||
ls -la release-files/
|
ls -la release-files/
|
||||||
|
|
||||||
- name: Create or Update Release
|
- name: Create or Update Release
|
||||||
|
|||||||
2
cinny
2
cinny
Submodule cinny updated: 495747af84...58966aec19
@@ -80,28 +80,24 @@
|
|||||||
"win": {
|
"win": {
|
||||||
"target": [
|
"target": [
|
||||||
{
|
{
|
||||||
"target": "nsis",
|
"target": "squirrel",
|
||||||
"arch": ["x64", "arm64"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"target": "portable",
|
|
||||||
"arch": ["x64", "arm64"]
|
"arch": ["x64", "arm64"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "icons/icon.ico",
|
"icon": "icons/icon.ico",
|
||||||
"artifactName": "${productName}-${version}-${os}-${arch}.${ext}"
|
"artifactName": "${productName}-${version}-${os}-${arch}.${ext}"
|
||||||
},
|
},
|
||||||
"nsis": {
|
"squirrelWindows": {
|
||||||
"oneClick": false,
|
"name": "Paarrot",
|
||||||
"perMachine": false,
|
"loadingGif": "icons/icon.png",
|
||||||
"allowToChangeInstallationDirectory": true,
|
"iconUrl": "https://raw.githubusercontent.com/cinnyapp/cinny-desktop/master/icons/icon.ico",
|
||||||
"deleteAppDataOnUninstall": false,
|
|
||||||
"createDesktopShortcut": true,
|
"createDesktopShortcut": true,
|
||||||
"createStartMenuShortcut": true,
|
"createStartMenuShortcut": true,
|
||||||
"shortcutName": "Paarrot"
|
"remoteReleases": false,
|
||||||
|
"useAppIdAsId": true
|
||||||
},
|
},
|
||||||
"publish": {
|
"publish": {
|
||||||
"provider": "generic",
|
"provider": "generic",
|
||||||
"url": "http://synbox.ruv.wtf:8418/litruv/cinny-desktop/releases/download/${version}"
|
"url": "http://synbox.ruv.wtf:8418/litruv/cinny-desktop/releases/download/v${version}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,63 @@ const PaarrotAPIServer = require('./api-server');
|
|||||||
const https = require('https');
|
const https = require('https');
|
||||||
const http = require('http');
|
const http = require('http');
|
||||||
|
|
||||||
|
// Handle Squirrel events for Windows installer
|
||||||
|
if (require('electron-squirrel-startup')) {
|
||||||
|
app.quit();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle Squirrel.Windows installation/update events
|
||||||
|
if (process.platform === 'win32') {
|
||||||
|
const handleSquirrelEvent = () => {
|
||||||
|
if (process.argv.length === 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const squirrelEvent = process.argv[1];
|
||||||
|
|
||||||
|
switch (squirrelEvent) {
|
||||||
|
case '--squirrel-install':
|
||||||
|
case '--squirrel-updated':
|
||||||
|
// Install desktop and start menu shortcuts
|
||||||
|
const cp = require('child_process');
|
||||||
|
const updateDotExe = path.resolve(path.dirname(process.execPath), '..', 'Update.exe');
|
||||||
|
const target = path.basename(process.execPath);
|
||||||
|
const createShortcut = `${updateDotExe} --createShortcut=${target}`;
|
||||||
|
|
||||||
|
cp.exec(createShortcut, () => {
|
||||||
|
app.quit();
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case '--squirrel-uninstall':
|
||||||
|
// Remove desktop and start menu shortcuts
|
||||||
|
const cpUninstall = require('child_process');
|
||||||
|
const updateDotExeUninstall = path.resolve(path.dirname(process.execPath), '..', 'Update.exe');
|
||||||
|
const targetUninstall = path.basename(process.execPath);
|
||||||
|
const removeShortcut = `${updateDotExeUninstall} --removeShortcut=${targetUninstall}`;
|
||||||
|
|
||||||
|
cpUninstall.exec(removeShortcut, () => {
|
||||||
|
app.quit();
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case '--squirrel-obsolete':
|
||||||
|
// This is called on the outgoing version of your app before
|
||||||
|
// we update to the new version - it's the opposite of
|
||||||
|
// --squirrel-updated
|
||||||
|
app.quit();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (handleSquirrelEvent()) {
|
||||||
|
// Squirrel event handled and app will exit in 1000ms, so don't do anything else
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const execAsync = promisify(exec);
|
const execAsync = promisify(exec);
|
||||||
const store = new Store();
|
const store = new Store();
|
||||||
|
|
||||||
|
|||||||
29
package-lock.json
generated
29
package-lock.json
generated
@@ -1,16 +1,17 @@
|
|||||||
{
|
{
|
||||||
"name": "paarrot",
|
"name": "paarrot",
|
||||||
"version": "4.11.5",
|
"version": "4.11.20",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "paarrot",
|
"name": "paarrot",
|
||||||
"version": "4.11.5",
|
"version": "4.11.20",
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"body-parser": "2.2.2",
|
"body-parser": "2.2.2",
|
||||||
"cors": "2.8.6",
|
"cors": "2.8.6",
|
||||||
|
"electron-squirrel-startup": "^1.0.1",
|
||||||
"electron-store": "^8.2.0",
|
"electron-store": "^8.2.0",
|
||||||
"electron-updater": "^6.3.9",
|
"electron-updater": "^6.3.9",
|
||||||
"express": "5.2.1",
|
"express": "5.2.1",
|
||||||
@@ -3388,6 +3389,30 @@
|
|||||||
"node": ">= 10.0.0"
|
"node": ">= 10.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/electron-squirrel-startup": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/electron-squirrel-startup/-/electron-squirrel-startup-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-sTfFIHGku+7PsHLJ7v0dRcZNkALrV+YEozINTW8X1nM//e5O3L+rfYuvSW00lmGHnYmUjARZulD8F2V8ISI9RA==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"debug": "^2.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/electron-squirrel-startup/node_modules/debug": {
|
||||||
|
"version": "2.6.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||||
|
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"ms": "2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/electron-squirrel-startup/node_modules/ms": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/electron-store": {
|
"node_modules/electron-store": {
|
||||||
"version": "8.2.0",
|
"version": "8.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/electron-store/-/electron-store-8.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/electron-store/-/electron-store-8.2.0.tgz",
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"body-parser": "2.2.2",
|
"body-parser": "2.2.2",
|
||||||
"cors": "2.8.6",
|
"cors": "2.8.6",
|
||||||
|
"electron-squirrel-startup": "^1.0.1",
|
||||||
"electron-store": "^8.2.0",
|
"electron-store": "^8.2.0",
|
||||||
"electron-updater": "^6.3.9",
|
"electron-updater": "^6.3.9",
|
||||||
"express": "5.2.1",
|
"express": "5.2.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user