Skip to content

Commit

Permalink
Merge pull request #48 from wakatime/fix-build
Browse files Browse the repository at this point in the history
Fix build
  • Loading branch information
alanhamlett authored Oct 17, 2024
2 parents 012473c + 4f2e71f commit 2da5918
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 14 deletions.
3 changes: 0 additions & 3 deletions bin/prepare_assets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ if [ "$(which zip)" = "" ]; then
apt-get update && apt-get install -y zip
fi

mv ./release/wakatime-windows-x64.exe ./release/wakatime-win32-x64.exe
mv ./release/wakatime-windows-arm64.exe ./release/wakatime-win32-arm64.exe

# add execution permission
chmod 750 ./release/wakatime-linux-x86_64.AppImage
chmod 750 ./release/wakatime-linux-arm64.AppImage
Expand Down
31 changes: 24 additions & 7 deletions electron-builder.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,53 @@
{
"$schema": "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json",
"appId": "com.WakaTime.WakaTime",
"asar": true,
"publish": null,
"publish": [
{
"provider": "github",
"owner": "wakatime",
"repo": "desktop-wakatime",
"releaseType": "release"
}
],
"productName": "WakaTime",
"directories": {
"output": "release"
},
"files": ["dist", "dist-electron", "public"],
"files": [
"dist",
"dist-electron",
"public"
],
"win": {
"target": [
{
"target": "nsis",
"arch": ["x64", "arm64"]
"arch": [
"x64",
"arm64"
]
}
],
"artifactName": "wakatime-windows-${arch}.${ext}",
"artifactName": "wakatime-win32-${arch}.${ext}",
"icon": "./public/app-icon.ico"
},
"nsis": {
"oneClick": false,
"perMachine": false,
"allowToChangeInstallationDirectory": true,
"createStartMenuShortcut": true,
"deleteAppDataOnUninstall": false
},
"linux": {
"target": [
{
"target": "AppImage",
"arch": ["x64", "arm64"]
"arch": [
"x64",
"arm64"
]
}
],
"artifactName": "wakatime-linux-${arch}.${ext}"
}
}
}
4 changes: 1 addition & 3 deletions electron/watchers/wakatime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,14 @@ export class Wakatime {
this.tray = tray;

if (PropertiesManager.autoUpdateEnabled) {
// https://github.com/electron/update-electron-app?tab=readme-ov-file#with-updateelectronjsorg
// app will check for updates at startup, then every ten minutes
updateElectronApp({
logger: {
log: (message) => Logging.instance().log(message, LogLevel.DEBUG),
error: (message) => Logging.instance().log(message, LogLevel.ERROR),
info: (message) => Logging.instance().log(message, LogLevel.INFO),
warn: (message) => Logging.instance().log(message, LogLevel.WARN),
},
updateInterval: "1 hour",
updateInterval: "10 minutes",
});
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@
"vite-plugin-native": "^2.2.1"
},
"main": "dist-electron/main.js"
}
}

0 comments on commit 2da5918

Please sign in to comment.