E
E
Egor Zuzlov2020-01-22 17:34:46
Node.js
Egor Zuzlov, 2020-01-22 17:34:46

What is the reason for the application installer .msi file creation error?

Hello! There was such problem: There is a certain application written on Electron, for it it is necessary to create the installer. For this I use electron-wix-msi . Further on the documentation, I wrote the following script in the build.js file:

(async () => {
  const MSICreator = require('electron-wix-msi').MSICreator

  // Step 1: Instantiate the MSICreator
  const msiCreator = new MSICreator({
    appDirectory: './',
    description: 'SomeDesc',
    exe: 'shop',
    name: 'SomeName',
    manufacturer: 'Hogwarts',
    version: '1.0.0',
    outputDirectory: './build'
  })

  // Step 2: Create a .wxs template file
  await msiCreator.create().catch(e => console.error(e))

  // Step 3: Compile the template to a .msi file
  await msiCreator.compile().catch(e => console.error(e))
})()

I tried to run it through "node build.js" and gave an error that I can't write, but I solved it by installing Wix Toolset .
Executed the code again and now it produces the following:
"light" �� ���� ����७��� ��� ���譥���������, �ᯮ��塞�� �ணࠬ��� ��� ������ 䠩���.
"candle" �� ���� ����७��� ��� ���譥
�
��������, �ᯮ��塞�� �ணࠬ��� ��� ������ 䠩���.
It appears that electron-wix-msi cannot find candle.exe or light.exe.   
Please consult the readme at https://github.com/felixrieseberg/electron-wix-msi
for information on how to install the Wix toolkit, which is required.   

Error: Could not find light.exe or candle.exe
    at MSICreator.<anonymous> (C:\Users\akyla\Documents\desktop_app\node_modules\electron-wix-msi\lib\creator.js:80:23)
    at Generator.next (<anonymous>) 
    at C:\Users\akyla\Documents\desktop_app\node_modules\electron-wix-msi\lib\creator.js:8:71
    at new Promise (<anonymous>)    
    at __awaiter (C:\Users\akyla\Documents\desktop_app\node_modules\electron-wix-msi\lib\creator.js:4:12)   
    at MSICreator.compile (C:\Users\akyla\Documents\desktop_app\node_modules\electron-wix-msi\lib\creator.js:73:16)
    at C:\Users\akyla\Documents\desktop_app\build.js:19:20

I searched the internet and couldn't find a solution to my problem. The only thing I could find out, by the elimination method, is that this function requires the same candle.exe and light.exe :
// Step 3: Compile the template to a .msi file
  await msiCreator.compile().catch(e => console.error(e))

I found someone 's solution to the problem , but I still did not understand the steps to the solution ...
I still have these questions:
  1. Where can I get these files?
  2. Where should I put them?
  3. Have I provided the correct paths?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-01-22
@firedragon

Get the files here. All tools appear in the installation folder.
For the build, create your own launcher
something like
wix.cmd

SET PATH= "c:\program files\wix toolset\bin";%PATH%
REM тут ваш код

https://wixtoolset.org/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question