Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If the path contains Chinese characters, packaging will fail. #6232

Closed
qq326943819 opened this issue Sep 6, 2021 · 5 comments
Closed

If the path contains Chinese characters, packaging will fail. #6232

qq326943819 opened this issue Sep 6, 2021 · 5 comments
Labels

Comments

@qq326943819
Copy link

qq326943819 commented Sep 6, 2021

  • Electron-Builder Version:
    ^22.11.7
  • Node Version:
    v14.17.5
  • Electron Version:
    ^13.1.8
  • Electron Type (current, beta, nightly):
    current
  • Target:
    win64

Some output information:

 OKAY  take it away `electron-builder`

  • electron-builder  version=22.11.7 os=10.0.19042
  • loaded configuration  file=D:\wewin\南宁-部队仓储\operation\electron-builder.yml
  • description is missed in the package.json  appPackageFile=D:\wewin\南宁-部队仓储\operation\package.json
  • author is missed in the package.json  appPackageFile=D:\wewin\南宁-部队仓储\operation\package.json     
  • writing effective config  file=build\builder-effective-config.yaml
  • packaging       platform=win32 arch=x64 electron=13.1.8 appOutDir=build\win-unpacked
  • asar usage is disabled — this is strongly not recommended  solution=enable asar and use asarUnpack to unpack files that must be externally available
  • asar usage is disabled — this is strongly not recommended  solution=enable asar and use asarUnpack to unpack files that must be externally available
  • building        target=nsis file=build\南宁部队操作台 Setup 1.0.0.exe archs=x64 oneClick=true perMachine=false
  ⨯ C:\Users\32694\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\Bin\makensis.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Output:
Command line defined: "APP_ID=com.make-id.nanning-operation desk"
Command line defined: "APP_GUID=edb3f8ab-771f-5770-b0e8-31209c075f66"
Command line defined: "UNINSTALL_APP_KEY=edb3f8ab-771f-5770-b0e8-31209c075f66"
Command line defined: "PRODUCT_NAME=�������Ӳ���̨"
Command line defined: "PRODUCT_FILENAME=�������Ӳ���̨"
Command line defined: "APP_FILENAME=electron-vite-template"
Command line defined: "APP_DESCRIPTION="
Command line defined: "VERSION=1.0.0"
Command line defined: "PROJECT_DIR=D:\wewin\����-���Ӳִ�\operation"
Command line defined: "BUILD_RESOURCES_DIR=D:\wewin\����-���Ӳִ�\operation\build"
Command line defined: "APP_PACKAGE_NAME=electron-vite-template"
Command line defined: "MUI_ICON=D:\wewin\����-���Ӳִ�\operation\build\icons\icon.ico"
Command line defined: "MUI_UNICON=D:\wewin\����-���Ӳִ�\operation\build\icons\icon.ico"
Command line defined: "APP_64=D:\wewin\����-���Ӳִ�\operation\build\electron-vite-template-1.0.0-x64.nsis.7z"
Command line defined: "APP_64_NAME=electron-vite-template-1.0.0-x64.nsis.7z"
Command line defined: "APP_64_HASH=D5DDD8A5D7FBE27A303C289EC2C2EA745C0108BF83B1459FAD93E36C4E2F33F272AA6D370395E98D47E4B48C8B7436B06340EBDCD9DB8905DA84A15BBFEC5032"
Command line defined: "APP_PRODUCT_FILENAME=�������Ӳ���̨"
Command line defined: "APP_INSTALLER_STORE_FILE=electron-vite-template-updater\installer.exe"
Command line defined: "COMPRESSION_METHOD=7z"
Command line defined: "ONE_CLICK"
Command line defined: "RUN_AFTER_FINISH"
Command line defined: "SHORTCUT_NAME=�������Ӳ���̨"
Command line defined: "UNINSTALL_DISPLAY_NAME=�������Ӳ���̨ 1.0.0"
Command line defined: "ESTIMATED_SIZE=192725"
Command line defined: "COMPRESS=auto"
Command line defined: "BUILD_UNINSTALLER"
Command line defined: "UNINSTALLER_OUT_FILE=D:\wewin\����-���Ӳִ�\operation\build\__uninstaller-nsis-electron-vite-template.exe"
Processing config: C:\Users\32694\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\nsisconf.nsh
Processing script file: "<stdin>" (ACP)

Error output:
!include: could not find: "D:\wewin\南宁-部队仓储\operation\node_modules\app-builder-lib\templates\nsis\include\StdUtils.nsh"
Error in script "<stdin>" on line 1 -- aborting creation process
  failedTask=build stackTrace=Error: C:\Users\32694\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\Bin\makensis.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
@github-actions github-actions bot added the nsis label Sep 6, 2021
@mmaietta
Copy link
Collaborator

Willing to give this patch file a shot using patch-package?
app-builder-lib+22.14.2.patch

diff --git a/node_modules/app-builder-lib/out/targets/nsis/NsisTarget.js b/node_modules/app-builder-lib/out/targets/nsis/NsisTarget.js
index a4f7526..174ef78 100644
--- a/node_modules/app-builder-lib/out/targets/nsis/NsisTarget.js
+++ b/node_modules/app-builder-lib/out/targets/nsis/NsisTarget.js
@@ -468,6 +468,7 @@ class NsisTarget extends core_1.Target {
     }
     async executeMakensis(defines, commands, script) {
         const args = this.options.warningsAsErrors === false ? [] : ["-WX"];
+        args.push("-INPUTCHARSET", "UTF8");
         for (const name of Object.keys(defines)) {
             const value = defines[name];
             if (value == null) {

@qq326943819
Copy link
Author

Willing to give this patch file a shot using patch-package?
app-builder-lib+22.14.2.patch

diff --git a/node_modules/app-builder-lib/out/targets/nsis/NsisTarget.js b/node_modules/app-builder-lib/out/targets/nsis/NsisTarget.js
index a4f7526..174ef78 100644
--- a/node_modules/app-builder-lib/out/targets/nsis/NsisTarget.js
+++ b/node_modules/app-builder-lib/out/targets/nsis/NsisTarget.js
@@ -468,6 +468,7 @@ class NsisTarget extends core_1.Target {
     }
     async executeMakensis(defines, commands, script) {
         const args = this.options.warningsAsErrors === false ? [] : ["-WX"];
+        args.push("-INPUTCHARSET", "UTF8");
         for (const name of Object.keys(defines)) {
             const value = defines[name];
             if (value == null) {

Thanks,but I don't know how to use it.

@mmaietta
Copy link
Collaborator

using patch-package?

@qq326943819
Copy link
Author

using patch-package?

Do you mean that using patch-package to operate app-builder-lib can solve my problem?

@axetroy
Copy link

axetroy commented Nov 1, 2021

Willing to give this patch file a shot using patch-package? app-builder-lib+22.14.2.patch

diff --git a/node_modules/app-builder-lib/out/targets/nsis/NsisTarget.js b/node_modules/app-builder-lib/out/targets/nsis/NsisTarget.js
index a4f7526..174ef78 100644
--- a/node_modules/app-builder-lib/out/targets/nsis/NsisTarget.js
+++ b/node_modules/app-builder-lib/out/targets/nsis/NsisTarget.js
@@ -468,6 +468,7 @@ class NsisTarget extends core_1.Target {
     }
     async executeMakensis(defines, commands, script) {
         const args = this.options.warningsAsErrors === false ? [] : ["-WX"];
+        args.push("-INPUTCHARSET", "UTF8");
         for (const name of Object.keys(defines)) {
             const value = defines[name];
             if (value == null) {

This seem not works for me

mmaietta added a commit that referenced this issue Jan 16, 2022
* Adding INPUTxxx and OUTPUTxxx CHARSETS to makensis
Fixes: #4898 #6232 #6259

* Adding additional details to error console logging

* Breaking change: Removing Bintray support since it was sunset. Ref: https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/

* fix: force strip path separators for backslashes on Windows

* fix: Force authentication for local Mac Squirrel update server

* Breaking Change: Fail-fast for signature verification failures. Adding `-LiteralPath` to update file for injected wildcards

* Adding changeset and eslint

* Fix error: `-OUTPUTCHARSET is disabled for non Win32 platforms.`

* feat(mac): ElectronAsarIntegrity in electron@15 (#6511)

* feat(mac): ElectronAsarIntegrity in electron@15
See: electron/electron#30667
Fix: #6506
Fix: #6507

* fix(msi): MSI fails to install when deployed machine-wide via GPO (#6514)

* fix(msi): MSI fails to install when deployed machine-wide via GPO
* Disable advertised shortcuts, since MSIs with advertised Start Menu shortcuts that have a
Shortcut Property fails to install when deployed machine-wide via GPO but works fine in all
other contexts. This might be a bug in Windows or a misdiagnosis; see #6508 for more details.
Closes #6508
* BREAKING CHANGE: Admins using advertisement must apply an MST to re-enable it. See #6508.

* Don't set GitHub Releases draft title since it automatically pulls it from tag name. Fixes #3683

* feat(snap): add lzo to Snap compression options (also as new default) (#6201)

* feat(msi): add fileAssociation support for MSI target (#6530)

* fix(win): iconId sometimes containing invalid characters, and iconId config option being ignored.
* fix(msi): change the fallback value for generated MSI Ids to a unique string for the product.

* BREAKING CHANGE: remove MSI option `iconId`

* fix: stabilizing tests by moving updater tests to its own node to explicitly segment env.___TOKEN integration tests from other standard unit tests

* chore: synchronizing docs and schema plus prettier

* Adding changset to set as alpha

* Updating changeset documentation

* feat(msi): support assisted installer for MSI target (#6550)

* Add basic support for assisted installer, with UI to choose between per-user and per-machine. Supported config settings: runAfterFinish, perMachine, oneClick. Not supported: license (EULA), allowToChangeInstallationDirectory, etc. Also prevent oneClick's runAfterFinish from executing when installed silently.

Co-authored-by: Fedor Indutny <[email protected]>
Co-authored-by: Alex Plumley <[email protected]>
Co-authored-by: Mike Maietta <[email protected]>
Co-authored-by: Omer Akram <[email protected]>
Co-authored-by: Maximilian Federle <[email protected]>
@mmaietta mmaietta closed this as completed Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants