mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 01:59:58 +00:00
Add build option to skip native selector build on macOS
This commit is contained in:
@@ -32,7 +32,7 @@ const { executableName
|
|||||||
|
|
||||||
// Command line args
|
// Command line args
|
||||||
const argv = minimist(process.argv.slice(2), {
|
const argv = minimist(process.argv.slice(2), {
|
||||||
boolean: [ "package" ]
|
boolean: [ "package", "skipNativeBuilds" ]
|
||||||
, string: [ "platform", "arch", "packageType" ]
|
, string: [ "platform", "arch", "packageType" ]
|
||||||
, default: {
|
, default: {
|
||||||
platform: os.platform()
|
platform: os.platform()
|
||||||
@@ -40,6 +40,7 @@ const argv = minimist(process.argv.slice(2), {
|
|||||||
, package: false
|
, package: false
|
||||||
// Linux package type (deb/rpm)
|
// Linux package type (deb/rpm)
|
||||||
, packageType: "deb"
|
, packageType: "deb"
|
||||||
|
, skipNativeBuilds: false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -195,7 +196,7 @@ async function build () {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
// Build NativeMacReceiverSelector
|
// Build NativeMacReceiverSelector
|
||||||
if (isBuildingForMacOnMac) {
|
if (isBuildingForMacOnMac && !argv.skipNativeBuilds) {
|
||||||
const selectorPath = path.join(__dirname, "../selector/mac/");
|
const selectorPath = path.join(__dirname, "../selector/mac/");
|
||||||
const derivedDataPath = path.join(__dirname, "../selector/mac/build/");
|
const derivedDataPath = path.join(__dirname, "../selector/mac/build/");
|
||||||
|
|
||||||
@@ -241,7 +242,7 @@ async function build () {
|
|||||||
, path.join(DIST_PATH, executableName[argv.platform])
|
, path.join(DIST_PATH, executableName[argv.platform])
|
||||||
, { overwrite: true });
|
, { overwrite: true });
|
||||||
|
|
||||||
if (isBuildingForMacOnMac) {
|
if (isBuildingForMacOnMac && !argv.skipNativeBuilds) {
|
||||||
fs.moveSync(
|
fs.moveSync(
|
||||||
path.join(BUILD_PATH, selectorExecutableName)
|
path.join(BUILD_PATH, selectorExecutableName)
|
||||||
, path.join(DIST_PATH, selectorExecutableName)
|
, path.join(DIST_PATH, selectorExecutableName)
|
||||||
@@ -333,9 +334,11 @@ function packageDarwin (
|
|||||||
fs.moveSync(path.join(BUILD_PATH, manifestName)
|
fs.moveSync(path.join(BUILD_PATH, manifestName)
|
||||||
, path.join(rootManifestPath, manifestName));
|
, path.join(rootManifestPath, manifestName));
|
||||||
|
|
||||||
// Move selector executable alongside main executable
|
if (isBuildingForMacOnMac && !argv.skipNativeBuilds) {
|
||||||
fs.moveSync(path.join(BUILD_PATH, selectorExecutableName)
|
// Move selector executable alongside main executable
|
||||||
, path.join(rootExecutablePath, selectorExecutableName));
|
fs.moveSync(path.join(BUILD_PATH, selectorExecutableName)
|
||||||
|
, path.join(rootExecutablePath, selectorExecutableName));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Copy static files to be processed
|
// Copy static files to be processed
|
||||||
|
|||||||
Reference in New Issue
Block a user