-
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed (#18) and (#19) issues. - Added the icons for the MacOS/Windows builds. - Some syntax changes. - Copyright year isn't updated automatically based on the current year from now. - Splitted electron-forge configuration lines to the new JavaScript file. - Moved the application documentation to the "docs/" folder. - Improved building on Linux hosts (with additional BASH script).
- Loading branch information
1 parent
e07175b
commit fa69d3e
Showing
13 changed files
with
252 additions
and
167 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
SOURCES="$(readlink -f "$(dirname "$(which "$0")")/../..")"; | ||
case "$(uname -m)" in | ||
'x86_64') HOST='x64' ;; | ||
'x86'|'i'?'86'|'pentium4') HOST='ia32' ;; | ||
'armv7h') HOST='armv7l' ;; | ||
'aarch64') HOST='arm64' ;; | ||
'mips'*) HOST='mips64el' ;; | ||
*) HOST="$(uname -m)" ;; | ||
esac; | ||
ARCH=("x64" "ia32" "armv7l" "arm64" "mips64el"); | ||
# Makers that can be used to cross-package on any host arch: | ||
MAKERS=("electron-forge-maker-appimage" # AppImage maker | ||
"@electron-forge/maker-deb"); # DEB package maker | ||
|
||
# Package native: | ||
src="$SOURCES" bash -c 'cd "$src"; npm run make'; | ||
|
||
# Package for non-native arch: | ||
err=0 | ||
for maker in "${MAKERS[@]}"; do | ||
[[ -z "$maker_list" ]] || maker_list="${maker_list},"; | ||
maker_list="${maker_list}${maker}"; | ||
done; | ||
for cpu_arch in "${ARCH[@]}"; do | ||
[[ "$cpu_arch" == "$HOST" || "$err" != 0 ]] && break; | ||
makers="$maker_list" arch="$cpu_arch" src="$SOURCES" bash -c 'cd "$src"; npm run make -- -p linux -a "$arch" --targets "$makers"'; | ||
err=$?; | ||
done; | ||
exit $err; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* Electron Forge Config (configForge.js) | ||
*/ | ||
|
||
// Let's import some keys from the package.json: | ||
const packageJson = require(`../../package.json`); | ||
// Global variables in the config: | ||
const iconFile = "icons/app.png" | ||
|
||
module.exports = { | ||
packagerConfig: { | ||
executableName: packageJson.name, // name instead of the productName | ||
asar: true, | ||
icon: iconFile, // used in Windows and MacOS binaries | ||
extraResource: [ | ||
"docs/LICENSE.md", | ||
iconFile | ||
], | ||
quiet: true, | ||
ignore:[ | ||
"docs", | ||
"build" | ||
] | ||
}, | ||
makers: [ | ||
{ | ||
name: "@electron-forge/maker-squirrel", | ||
config: { | ||
name: "electron_discord_webapp" | ||
} | ||
}, | ||
{ | ||
name: "@electron-forge/maker-zip", | ||
platforms: [ | ||
"darwin" | ||
] | ||
}, | ||
{ | ||
name: "electron-forge-maker-appimage", | ||
config: { | ||
icon: iconFile | ||
} | ||
}, | ||
{ | ||
name: "@electron-forge/maker-deb", | ||
config: { | ||
options: { | ||
icon: iconFile | ||
} | ||
} | ||
}, | ||
{ | ||
name: "@electron-forge/maker-rpm", | ||
config: { | ||
options: { | ||
icon: iconFile | ||
} | ||
} | ||
} | ||
], | ||
publishers: [ | ||
{ | ||
name: "@electron-forge/publisher-github", | ||
config: { | ||
prerelease: true | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.