From 5e4eef101bc02f489726fb3ff35d45141d4672ea Mon Sep 17 00:00:00 2001 From: liudonghua Date: Tue, 4 Jan 2022 17:47:24 +0800 Subject: [PATCH] fix packing uses the wrong qt (#164) * fix packing uses the wrong qt see https://github.com/nodegui/packer/issues/105#issuecomment-1004546762 for more details * fix PATH separator mistake --- src/win32/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/win32/index.ts b/src/win32/index.ts index 4ff91ac..ee1f4ef 100644 --- a/src/win32/index.ts +++ b/src/win32/index.ts @@ -34,6 +34,8 @@ function getAllNodeAddons(dirPath: string) { const runWinDeployQt = async (appName: string, buildDir: string) => { const winDeployQtBin = path.resolve(qtHome, "bin", "windeployqt.exe"); + // insert qtHome/bin into the PATH for windeployqt work correctly + process.env.PATH=`${path.resolve(qtHome, "bin")};${process.env.PATH}`; const distPath = path.resolve(buildDir, "dist"); const allAddons = getAllNodeAddons(distPath); @@ -50,6 +52,7 @@ const runWinDeployQt = async (appName: string, buildDir: string) => { ], { cwd: buildDir, + env: process.env, } );