Pārlūkot izejas kodu

fix(nsis-gen): fix Unicode scripts reading

Evshiron Magicka 8 gadi atpakaļ
vecāks
revīzija
e9e4083363
3 mainītis faili ar 9 papildinājumiem un 7 dzēšanām
  1. 1 1
      docs/Options.md
  2. 7 5
      src/lib/nsis-gen/NsisComposer.ts
  3. 1 1
      src/lib/nsis-gen/index.ts

+ 1 - 1
docs/Options.md

@@ -48,6 +48,6 @@ Name | Type | Description
 --- | --- | ---
 icon | string | .ico icon file for NSIS installers. Defaults to `undefined`.
 unIcon | string | .ico icon file for NSIS uninstallers. Defaults to `undefined`.
-languages | string[] | Languages for NSIS installers. Multiple languages will result in a language selection dialog on startup. Defaults to `[ 'English' ]`.
+languages | string[] | Languages for NSIS installers. Multiple languages will result in a language selection dialog on startup. See [/assets/nsis/Contrib/Language files/](../assets/nsis/Contrib/Language files/) for available values. Defaults to `[ 'English' ]`.
 diffUpdaters | boolean | Whether to build diff updaters. Defaults to `false`.
 hashCalculation | boolean | Whether to calculate hashes for installers and updaters. Defaults to `true`.

+ 7 - 5
src/lib/nsis-gen/NsisComposer.ts

@@ -95,6 +95,8 @@ ${ await this.makeUninstallSection() }
 #
 ${ NsisComposer.DIVIDER }
 
+Unicode true
+
 Name "${ this.options.appName }"
 Caption "${ this.options.appName }"
 BrandingText "${ this.options.appName } ${ this.fixedVersion }"
@@ -168,11 +170,11 @@ ${
 ${ NsisComposer.DIVIDER }
 
 VIProductVersion "${ this.fixedVersion }"
-VIAddVersionKey "ProductName" "${ this.options.appName }"
-VIAddVersionKey "CompanyName" "${ this.options.companyName }"
-VIAddVersionKey "FileDescription" "${ this.options.description }"
-VIAddVersionKey "FileVersion" "${ this.fixedVersion }"
-VIAddVersionKey "LegalCopyright" "${ this.options.copyright }"`;
+VIAddVersionKey /LANG=0 "ProductName" "${ this.options.appName }"
+VIAddVersionKey /LANG=0 "CompanyName" "${ this.options.companyName }"
+VIAddVersionKey /LANG=0 "FileDescription" "${ this.options.description }"
+VIAddVersionKey /LANG=0 "FileVersion" "${ this.fixedVersion }"
+VIAddVersionKey /LANG=0 "LegalCopyright" "${ this.options.copyright }"`;
     }
 
     protected async makeHookSection(): Promise<string> {

+ 1 - 1
src/lib/nsis-gen/index.ts

@@ -17,7 +17,7 @@ export async function nsisBuild(cwd: string, script: string, options: INsisBuild
     mute: false,
 }) {
 
-    const args = [ win32.normalize(resolve(DIR_NSIS, 'makensis.exe')), '/NOCD', win32.normalize(resolve(script)) ];
+    const args = [ win32.normalize(resolve(DIR_NSIS, 'makensis.exe')), '/NOCD', '/INPUTCHARSET', 'UTF8', win32.normalize(resolve(script)) ];
     if(process.platform != 'win32') {
         args.unshift('wine');
     }