electron-userland / electron-wix-msi

:dvd: Create traditional MSI installers for your Electron app
MIT License
318 stars 91 forks source link

add options: codepage #165

Closed nicolas830316 closed 1 year ago

nicolas830316 commented 1 year ago

bug:

If the name, description, and other options contain Chinese or Japanese characters, an error message is displayed:

error LGHT0311 : A string was provided with characters that are not available in the specified database code page '1252'. Either change these characters to ones that exist in the database's code page, or update the database's code page by modifying one of the following attributes: Product/@Codepage, Module/@Codepage, Patch/@Codepage, PatchCreation/@Codepage, or WixLocalization/@Codepage.

fix:

const msiCreator = new MSICreator({
  appDirectory: '/path/to/built/app',
  description: '中文产品描述',
  exe: 'kittens',
  name: 'Kittens',
  manufacturer: '深圳云艺帆教育科技有限公司',
  version: '1.1.2',
  outputDirectory: '/path/to/output/folder',
  lang: 2052, 
  // use codepage to fix bug
  codepage: '936'
});