Skip to content

Commit 45132f9

Browse files
committed
use mac x64 during narive:run
instead of old x86 binary. This was a naming misnomer. The binary is no longer updated. Also updated the naming of the npm build scripts & command arguments
1 parent cf0e000 commit 45132f9

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

resources/electron/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
"publish:win-x64": "cross-env npm run build && cross-env node ./node_modules/electron-builder/cli.js -p always --win --config electron-builder.mjs --x64",
2222
"publish:mac": "cross-env npm run publish:mac-arm64 -- --x64",
2323
"publish:mac-arm64": "cross-env npm run build && cross-env node ./node_modules/electron-builder/cli.js -p always --mac --config electron-builder.mjs --arm64 -p always",
24-
"publish:mac-x86": "cross-env npm run build && cross-env node ./node_modules/electron-builder/cli.js -p always --mac --config electron-builder.mjs --x64 -p always",
24+
"publish:mac-x64": "cross-env npm run build && cross-env node ./node_modules/electron-builder/cli.js -p always --mac --config electron-builder.mjs --x64 -p always",
2525
"publish:linux": "cross-env npm run publish:linux-x64",
2626
"publish:linux-x64": "cross-env npm run build && cross-env node ./node_modules/electron-builder/cli.js --linux --config electron-builder.mjs --x64 -p always",
2727
"build:all": "cross-env npm run build:mac && cross-env npm run build:win && cross-env npm run build:linux",
2828
"build:win": "cross-env npm run build:win-x64",
2929
"build:win-x64": "cross-env npm run build && cross-env node ./node_modules/electron-builder/cli.js -p never --win --config electron-builder.mjs --x64",
3030
"build:mac": "cross-env npm run build:mac-arm64 -- --x64",
3131
"build:mac-arm64": "cross-env npm run build && cross-env node ./node_modules/electron-builder/cli.js -p never --mac --config electron-builder.mjs --arm64",
32-
"build:mac-x86": "cross-env npm run build && cross-env node ./node_modules/electron-builder/cli.js -p never --mac --config electron-builder.mjs --x64",
32+
"build:mac-x64": "cross-env npm run build && cross-env node ./node_modules/electron-builder/cli.js -p never --mac --config electron-builder.mjs --x64",
3333
"build:linux": "cross-env npm run build:linux-x64",
3434
"build:linux-x64": "cross-env npm run build && cross-env node ./node_modules/electron-builder/cli.js -p never --linux --config electron-builder.mjs --x64",
3535
"plugin:build": "rimraf electron-plugin/dist/ && node node_modules/typescript/bin/tsc --project electron-plugin",

resources/electron/php.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ const platform = {
2424

2525
if (isWindows) {
2626
platform.os = 'win';
27-
platform.phpBinary += '.exe';
2827
platform.arch = 'x64';
28+
platform.phpBinary += '.exe';
2929
}
3030

3131
if (isLinux) {
@@ -35,7 +35,7 @@ if (isLinux) {
3535

3636
if (isDarwin) {
3737
platform.os = 'mac';
38-
platform.arch = 'x86';
38+
platform.arch = 'x64';
3939
}
4040

4141
if (isArm64) {
@@ -46,7 +46,6 @@ if (isArm64) {
4646
if (isBuilding) {
4747
// Only one will be used by the configured build commands in package.json
4848
platform.arch = process.argv.includes('--x64') ? 'x64' : platform.arch;
49-
platform.arch = process.argv.includes('--x86') ? 'x86' : platform.arch;
5049
platform.arch = process.argv.includes('--arm64') ? 'arm64' : platform.arch;
5150
}
5251

@@ -65,6 +64,9 @@ if (platform.phpBinary) {
6564

6665
ensureDirSync(binaryDestDir);
6766

67+
console.log('FOOOOO')
68+
console.dir(binarySrcDir);
69+
6870
// Unzip the files
6971
unzip.open(binarySrcDir, {lazyEntries: true}, function (err, zipfile) {
7072
if (err) throw err;

src/Drivers/Electron/Commands/BuildCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class BuildCommand extends Command
2828

2929
protected $signature = 'native:build
3030
{os? : The operating system to build for (all, linux, mac, win)}
31-
{arch? : The Processor Architecture to build for (x64, x86, arm64)}
31+
{arch? : The Processor Architecture to build for (x64, arm64)}
3232
{--publish : to publish the app}';
3333

3434
protected array $availableOs = ['win', 'linux', 'mac', 'all'];

src/Drivers/Electron/Commands/PublishCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class PublishCommand extends Command
1717

1818
protected $signature = 'native:publish
1919
{os? : The operating system to build for (all, linux, mac, win)}
20-
{arch? : The Processor Architecture to build for (x64, x86, arm64)}';
20+
{arch? : The Processor Architecture to build for (x64, arm64)}';
2121

2222
protected array $availableOs = ['win', 'linux', 'mac', 'all'];
2323

src/Drivers/Electron/Traits/OsAndArch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function getArchitectureForOs(string $os): array
4545
{
4646
$archs = match ($os) {
4747
'win' => ['x64'],
48-
'mac' => ['x86', 'arm64'],
48+
'mac' => ['x64', 'arm64'],
4949
'linux' => ['x64'],
5050
default => throw new \InvalidArgumentException('Invalid OS'),
5151
};

0 commit comments

Comments
 (0)