electron NSIS:如何根据所选语言加载不同的许可证文件 | 您所在的位置:网站首页 › nsis配置 › electron NSIS:如何根据所选语言加载不同的许可证文件 |
我试图使一个NSIS安装程序与电子建设者。我需要显示不同的许可证文件所选择的语言为基础的用户。 包. json *"devDependencies": { "electron": "22.0.1", "electron-builder": "^23.6.0" }, "build": { "directories": { "output": "out" }, "win": { "target": "nsis", "icon": "images/logo.ico" }, "nsis": { "oneClick": false, "deleteAppDataOnUninstall": true, "uninstallerIcon": "images/logo.ico", "installerIcon": "images/logo.ico", "displayLanguageSelector": true, "installerLanguages": ["en_US", "bg_BG"], "multiLanguageInstaller": true, "perMachine": true, "include": "build/preInstall.nsh" } } }预安装. nsh *!include MUI2.nsh !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE $(translatedlicensefile) !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH !insertmacro MUI_LANGUAGE English LicenseLangString translatedlicensefile ${LANG_ENGLISH} "build/license/license_en.txt" !insertmacro MUI_LANGUAGE Bulgarian LicenseLangString translatedlicensefile ${LANG_BULGARIAN} "build/license/license_bg.txt"得到这个错误: Error output: LicenseLangString: open failed "build/license/license_en.txt" Usage: LicenseLangString name lang_id|0 license_path !include: error in script: "/Users/..../preInstall.nsh" on line 32 Error in script "" on line 51 -- aborting creation process第32行 LicenseLangString translatedlicensefile ${LANG_ENGLISH} "build/license/license_en.txt"我尝试了许多例子,包括官方的一个,并认为使用电子建设者搞砸了NSIS脚本的流程,我不能包括在这一点上的任何修改。先谢了。 |
CopyRight 2018-2019 实验室设备网 版权所有 |