Skip to content

Instantly share code, notes, and snippets.

@genneko
Created June 23, 2019 07:04
Show Gist options
  • Save genneko/fbd6420404caf5d518563bb056cf46ed to your computer and use it in GitHub Desktop.
Save genneko/fbd6420404caf5d518563bb056cf46ed to your computer and use it in GitHub Desktop.
diff --git a/ElectronClient/app/electronRebuild.js b/ElectronClient/app/electronRebuild.js
index 4b6143f6..41ac1e5a 100644
--- a/ElectronClient/app/electronRebuild.js
+++ b/ElectronClient/app/electronRebuild.js
@@ -30,6 +30,10 @@ const isMac = () => {
return process && process.platform === 'darwin';
}
+const isFreeBSD = () => {
+ return process && process.platform === 'freebsd';
+}
+
async function main() {
// electron-rebuild --arch ia32 && electron-rebuild --arch x64
@@ -39,6 +43,9 @@ async function main() {
if (isWindows()) {
console.info(await execCommand(['"' + exePath + '"', '--arch ia32'].join(' ')));
console.info(await execCommand(['"' + exePath + '"', '--arch x64'].join(' ')));
+ } else if (isFreeBSD()) {
+ console.info(await execCommand(['"' + exePath + '"', '-e /usr/local/bin', '--version `cat /usr/local/share/electron/version`'].join(' ')));
+
} else {
console.info(await execCommand(['"' + exePath + '"'].join(' ')));
}
@@ -47,4 +54,4 @@ async function main() {
main().catch((error) => {
console.error(error);
process.exit(1);
-});
\ No newline at end of file
+});
diff --git a/ElectronClient/app/package.json b/ElectronClient/app/package.json
index dd061ff1..54d6f474 100644
--- a/ElectronClient/app/package.json
+++ b/ElectronClient/app/package.json
@@ -72,11 +72,11 @@
"app-builder-bin": "^1.9.11",
"babel-cli": "^6.26.0",
"babel-preset-react": "^6.24.1",
- "electron": "^4.1.4",
"electron-builder": "20.38.5",
"electron-rebuild": "^1.8.4"
},
"optionalDependencies": {
+ "electron": "^4.1.4",
"7zip-bin-linux": "^1.0.1",
"7zip-bin-mac": "^1.0.1",
"7zip-bin-win": "^2.1.1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment