windows-installer icon indicating copy to clipboard operation
windows-installer copied to clipboard

Unable to package a installer.

Open liudonghua123 opened this issue 7 years ago • 5 comments

I created a web app wrap using nativefier --name ynu_courses -a ia32 --app-version 1.0.0 --build-version 1.0.0 -c --disable-context-menu http://113.55.12.52:50120/, then I want to create a installer for this built app. Then I write a script named build.js which the contents of the file is belows.

// build.js
var electronInstaller = require('electron-winstaller');

resultPromise = electronInstaller.createWindowsInstaller({
    appDirectory: 'ynu_courses-win32-ia32',
    outputDirectory: 'dist',
    authors: 'Liu.D.H',
    exe: 'ynu-courses.exe',
    version: '1.0.0',
    title: 'ynu-courses'
  });

resultPromise.then(() => console.log("It worked!"), (e) => console.log(`No dice: ${e.message}`));
D:\code\weixin\ynu_courses>node build.js
No dice: Failed with exit code: 4294967295
Output:

System.AggregateException: One or more errors occurred. ---> System.Exception: Failed to compile WiX template, command invoked was: 'candle.exe -nologo -ext WixNetFxExtension -out "D:\code\weixin\ynu_courses\dist\Setup.wixobj" "D:\code\weixin\ynu_courses\dist\Setup.wxs"'

Output was:
Setup.wxs
D:\code\weixin\ynu_courses\dist\Setup.wxs(3) : error CNDL0108 : The Product/@Version attribute's value, '!(bind.FileVersion.ynu-courses-nativefier-0256db.exe)', is not a valid version.  Legal version values should look like 'x.x.x.x' where x is an integer from 0 to 65534.
D:\code\weixin\ynu_courses\dist\Setup.wxs(3) : error CNDL0010 : The Product/@Version attribute was not found; it is required.

I noted the error was related to the Product/@Version attribute, but I have specified in the build.js. Any suggestion about this problem.

liudonghua123 avatar Aug 25 '18 13:08 liudonghua123

Is there a Solution for this problem?

robertdudaa avatar Jan 30 '19 09:01 robertdudaa

I also have this issue. A setup.exe is created and works ok, but the .wix always fails. If you only need the .exe, check your output folder and see if it's there.

MarkGeeRomano avatar Jan 30 '19 16:01 MarkGeeRomano

Now using electron-forge instead. Works pretty well.

robertdudaa avatar Jan 31 '19 12:01 robertdudaa

Had the same problem and fixed it with the help of @Kurmaev in #203 (10x Kurmaev)

In my case, my app name in package.json was "xxxx-xxxxx", when I removed the (-), having it "xxxxxxxx", I was able to successfully build the installer. 🤘

benshabatnoam avatar May 01 '19 10:05 benshabatnoam

Problem is actual. If set name in package.json without any - (dashes) its works. Also, possible to set name in configuration without - (dashes) and its works too.

In all cases installer works fine. You can just ignore this error.

Can @MarshallOfSound please fix it?

TTATPuOT avatar Jan 15 '20 16:01 TTATPuOT