From 2d7edf5062e0c5e69b40c060ab39ca09169999bf Mon Sep 17 00:00:00 2001 From: Kritish Dhaubanjar Date: Sat, 12 Oct 2024 21:09:32 +0545 Subject: [PATCH 1/2] fix windows php path for native:minify --- resources/js/electron-builder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/js/electron-builder.js b/resources/js/electron-builder.js index 7c19f3e..e0281f8 100644 --- a/resources/js/electron-builder.js +++ b/resources/js/electron-builder.js @@ -111,7 +111,7 @@ if (isBuilding) { const artisanPath = join(appPath, 'artisan'); // We'll use the default PATH PHP binary here, as we can cross-compile for all platforms. This shouldn't be changed. - execSync(`php ${artisanPath} native:minify ${appPath}`); + execSync(`php ${artisanPath} native:minify ${appPath}`, { cwd: appPath }); } catch (e) { console.error('====================='); console.error('Error copying app to resources'); From 0e52662e1bd51278f70652a9cff28855e34130bc Mon Sep 17 00:00:00 2001 From: Kritish Dhaubanjar Date: Tue, 29 Oct 2024 19:57:55 +0545 Subject: [PATCH 2/2] chore: remove native:minify command --- resources/js/electron-builder.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/resources/js/electron-builder.js b/resources/js/electron-builder.js index e0281f8..a65c577 100644 --- a/resources/js/electron-builder.js +++ b/resources/js/electron-builder.js @@ -1,8 +1,8 @@ -const {copySync, removeSync, writeJsonSync, existsSync} = require("fs-extra"); -const {join} = require("path"); const os = require('os'); -const {mkdtempSync} = require("fs"); -const {execSync} = require("child_process"); +const { join } = require("path"); +const { mkdtempSync } = require("fs"); +const { copySync, removeSync, writeJsonSync } = require("fs-extra"); + const isBuilding = process.env.NATIVEPHP_BUILDING; const appId = process.env.NATIVEPHP_APP_ID; const appName = process.env.NATIVEPHP_APP_NAME; @@ -108,10 +108,6 @@ if (isBuilding) { console.log('Copied app to resources'); console.log(join(process.env.APP_PATH, 'dist')); console.log('====================='); - - const artisanPath = join(appPath, 'artisan'); - // We'll use the default PATH PHP binary here, as we can cross-compile for all platforms. This shouldn't be changed. - execSync(`php ${artisanPath} native:minify ${appPath}`, { cwd: appPath }); } catch (e) { console.error('====================='); console.error('Error copying app to resources');