mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 16:02:58 +02:00
updated packager
This commit is contained in:
parent
d5c4b0cd9f
commit
b1d0e42de8
2 changed files with 29 additions and 37 deletions
|
@ -1,25 +1,43 @@
|
||||||
var packager = require('electron-packager');
|
var packager = require('electron-packager');
|
||||||
|
var osType = require('os').type();
|
||||||
|
|
||||||
|
var platform = null;
|
||||||
|
if (osType == "Darwin" || osType == "Linux") {
|
||||||
|
platform = osType.toLowerCase();
|
||||||
|
} else if (osType == "Windows_NT") {
|
||||||
|
platform = "win32"
|
||||||
|
}
|
||||||
|
|
||||||
|
var NAME = "hifi-screenshare";
|
||||||
var options = {
|
var options = {
|
||||||
dir: __dirname,
|
dir: __dirname,
|
||||||
name: "hifi-screenshare",
|
name: NAME,
|
||||||
version: "0.1.0",
|
version: "0.1.0",
|
||||||
overwrite: true,
|
overwrite: true,
|
||||||
prune: true,
|
prune: true,
|
||||||
arch: "x64",
|
arch: "x64",
|
||||||
platform: "win32",
|
platform: platform,
|
||||||
CompanyName: "High Fidelity, Inc.",
|
|
||||||
FileDescription: "High Fidelity Screenshare",
|
|
||||||
OriginalFilename: "hifi-screenshare.exe",
|
|
||||||
ignore: "electron-packager|README.md|CMakeLists.txt|packager.js|.gitignore"
|
ignore: "electron-packager|README.md|CMakeLists.txt|packager.js|.gitignore"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// setup per OS options
|
||||||
|
if (osType == "Darwin") {
|
||||||
|
options["app-bundle-id"] = "com.highfidelity.hifi-screenshare";
|
||||||
|
} else if (osType == "Windows_NT") {
|
||||||
|
options["version-string"] = {
|
||||||
|
CompanyName: "High Fidelity, Inc.",
|
||||||
|
FileDescription: "High Fidelity Screenshare",
|
||||||
|
ProductName: NAME,
|
||||||
|
OriginalFilename: NAME + ".exe"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// call the packager to produce the executable
|
// call the packager to produce the executable
|
||||||
packager(options, function(error, appPath) {
|
packager(options)
|
||||||
if (error) {
|
.then(appPath => {
|
||||||
|
console.log("Wrote new app to " + appPath);
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
console.error("There was an error writing the packaged console: " + error.message);
|
console.error("There was an error writing the packaged console: " + error.message);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
} else {
|
});
|
||||||
console.log("Wrote new app to " + appPath);
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,26 +0,0 @@
|
||||||
var packager = require('electron-packager');
|
|
||||||
var options = {
|
|
||||||
dir: __dirname,
|
|
||||||
name: "hifi-screenshare",
|
|
||||||
version: "0.1.0",
|
|
||||||
overwrite: true,
|
|
||||||
prune: true,
|
|
||||||
arch: "x64",
|
|
||||||
platform: "darwin",
|
|
||||||
CompanyName: "High Fidelity, Inc.",
|
|
||||||
FileDescription: "High Fidelity Screenshare",
|
|
||||||
OriginalFilename: "hifi-screenshare.app",
|
|
||||||
ignore: "electron-packager|README.md|CMakeLists.txt|packager.js|.gitignore"
|
|
||||||
};
|
|
||||||
|
|
||||||
options["app-bundle-id"] = "com.highfidelity.screenshare";
|
|
||||||
|
|
||||||
// call the packager to produce the executable
|
|
||||||
packager(options, function(error, appPath) {
|
|
||||||
if (error) {
|
|
||||||
console.error("There was an error writing the packaged console: " + error.message);
|
|
||||||
process.exit(1);
|
|
||||||
} else {
|
|
||||||
console.log("Wrote new app to " + appPath);
|
|
||||||
}
|
|
||||||
});
|
|
Loading…
Reference in a new issue