Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Squirrel.Windows doesn't escape " in the description #378

Closed
TylerLeonhardt opened this issue May 4, 2016 · 17 comments · May be fixed by qcif/data-curator#563
Closed

Squirrel.Windows doesn't escape " in the description #378

TylerLeonhardt opened this issue May 4, 2016 · 17 comments · May be fixed by qcif/data-curator#563

Comments

@TylerLeonhardt
Copy link

Hi,

I was trying to run npm run dist:win64 which calls: ./node_modules/.bin/build --platform win32 --arch x64

I'm getting the following error:

project-lightning git:(master) ✗ npm run dist:win64

> @ dist:win64 /Users/tylerleonhardt/Desktop/CompSci/Javascript/electron/project-lightning
> build --platform win32 --arch x64

license in the development package.json is deprecated, please move to the application package.json
Skip app dependencies rebuild because platform is different
Removing /Users/tylerleonhardt/Desktop/CompSci/Javascript/electron/project-lightning/dist/win-x64
Downloading electron-v0.36.12-win32-x64.zip
[============================================>] 100.0% of 50.41 MB (10.61 MB/s)
Packaging app for platform win32 x64 using electron v0.36.12
System.UriFormatException: Invalid URI: The URI scheme is not valid.
  at System.Uri.Parse (UriKind kind, System.String uriString) <0x10ffc1610 + 0x000e0> in <filename unknown>:0
  at System.Uri.ParseUri (UriKind kind) <0x10ffc14d0 + 0x00028> in <filename unknown>:0
  at System.Uri..ctor (System.String uriString, Boolean dontEscape) <0x110f90360 + 0x001d8> in <filename unknown>:0
  at System.Uri..ctor (System.String uriString) <0x110f90330 + 0x0001b> in <filename unknown>:0
  at NuGet.ManifestMetadata.NuGet.IPackageMetadata.get_IconUrl () <0x111162310 + 0x00059> in <filename unknown>:0
  at NuGet.LocalPackage.ReadManifest (System.IO.Stream manifestStream) <0x110f95800 + 0x00202> in <filename unknown>:0
  at NuGet.ZipPackage.EnsureManifest () <0x10ffbf9b0 + 0x00161> in <filename unknown>:0
  at NuGet.ZipPackage..ctor (System.String filePath, Boolean enableCaching) <0x10ffbf750 + 0x00199> in <filename unknown>:0
  at NuGet.ZipPackage..ctor (System.String filePath) <0x10ffbf640 + 0x0001b> in <filename unknown>:0
  at Squirrel.ReleasePackage.get_SuggestedReleaseFileName () <0x10ffbf5c0 + 0x00049> in <filename unknown>:0
  at Squirrel.Update.Program.ReleasifyElectron (System.String package, System.String targetDir, System.String packagesDir, System.String bootstrapperExe, System.String backgroundGif, System.String signingOpts, System.String baseUrl, System.String setupIcon, Boolean generateMsi) <0x10ffbdf30 + 0x0061c> in <filename unknown>:0
  at Squirrel.Update.Program.executeCommandLine (System.String[] args) <0x10d695a40 + 0x018fa> in <filename unknown>:0
  at Squirrel.Update.Program.main (System.String[] args) <0x10d6912c0 + 0x002bd> in <filename unknown>:0
Error: mono failed with exit code: 255
    at ChildProcess.<anonymous> (/Users/tylerleonhardt/Desktop/CompSci/Javascript/electron/project-lightning/node_modules/electron-winstaller-fixed/lib/spawn-promise.js:33:16)
    at emitTwo (events.js:100:13)
    at ChildProcess.emit (events.js:185:7)
    at maybeClose (internal/child_process.js:850:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
From previous event:
    at spawn (/Users/tylerleonhardt/Desktop/CompSci/Javascript/electron/project-lightning/node_modules/electron-winstaller-fixed/lib/spawn-promise.js:22:10)
    at /Users/tylerleonhardt/Desktop/CompSci/Javascript/electron/project-lightning/node_modules/electron-winstaller-fixed/lib/index.js:168:38
    at [object Generator].next (native)
From previous event:
    at releasify (/Users/tylerleonhardt/Desktop/CompSci/Javascript/electron/project-lightning/node_modules/electron-winstaller-fixed/lib/index.js:171:16)
    at Object.<anonymous> (/Users/tylerleonhardt/Desktop/CompSci/Javascript/electron/project-lightning/node_modules/electron-winstaller-fixed/lib/index.js:94:11)
    at [object Generator].next (native)
    at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
    at Object.createWindowsInstaller (/Users/tylerleonhardt/Desktop/CompSci/Javascript/electron/project-lightning/node_modules/electron-winstaller-fixed/lib/index.js:118:16)
    at WinPackager.<anonymous> (/Users/tylerleonhardt/Desktop/CompSci/Javascript/electron/project-lightning/node_modules/electron-builder/src/winPackager.ts:161:48)
    at [object Generator].next (native)
From previous event:
    at tsAwaiter (/Users/tylerleonhardt/Desktop/CompSci/Javascript/electron/project-lightning/node_modules/electron-builder/src/awaiter.ts:10:51)
    at Object.build (/Users/tylerleonhardt/Desktop/CompSci/Javascript/electron/project-lightning/node_modules/electron-builder/src/builder.ts:30:59)
    at Object.<anonymous> (/Users/tylerleonhardt/Desktop/CompSci/Javascript/electron/project-lightning/node_modules/electron-builder/src/build-cli.ts:47:2)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:141:18)
    at node.js:933:3

npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dist:win64"
npm ERR! node v5.8.0
npm ERR! npm  v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! @ dist:win64: `build --platform win32 --arch x64`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the @ dist:win64 script 'build --platform win32 --arch x64'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     build --platform win32 --arch x64
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/tylerleonhardt/Desktop/CompSci/Javascript/electron/project-lightning/npm-debug.log

wine: wine-1.8.1
mono: Mono JIT compiler version 4.2.3 (Stable 4.2.3.4/832de4b Wed Mar 30 13:57:48 PDT 2016)

Let me know what I can do!

@develar
Copy link
Member

develar commented May 5, 2016

System.UriFormatException: Invalid URI: The URI scheme is not valid.

Please ensure that iconUrl is correct (see https://github.com/electron-userland/electron-builder/wiki/Options#buildwin about iconUrl).

@TylerLeonhardt
Copy link
Author

@develar: I tried build/icon.ico and .build/icon.ico and no luck. I ended up removing it and it worked.

Just to let you know, my description in my app package.json was

"description": "The complete Socket.io test client. Think of it as \"Postman for Socket.io\"",

which caused an error because the "'s weren't properly escaped in:

--set-version-string "ProductName" "The complete Socket.io test client. Think of it as "Postman for Socket.io""

Output was:
Fatal error: Unexpected trailing arguments

I just changed the " to ' and no error. I'm not sure if the exe works yet though. Is there a way to build a release for 32bit windows?

@develar develar reopened this May 5, 2016
@develar
Copy link
Member

develar commented May 5, 2016

Is there a way to build a release for 32bit windows?

--arch=ia32 (https://github.com/electron-userland/electron-builder#cli-usage). But please for windows consider only distributing 64-bit versions (#359 (comment)).

@TylerLeonhardt
Copy link
Author

Thanks for that. Where does the application file go when installing on Windows?

I ran the MyAppSetup-0.0.8-ia32.exe and it installed correctly and the program launched but after closing the program I'm unsure how to launch it again. Doing a search with Cortana couldn't seem to find it.

The next time I installed it, I pinned it to the taskbar. I closed it and then reopened it and it worked. Where is this located?

@develar
Copy link
Member

develar commented May 6, 2016

@tylerl0706 See https://github.com/electron/windows-installer#handling-squirrel-events You should "Install desktop and start menu shortcuts".

@framerate
Copy link

Hi -

Where is

--platform win32 --arch x64

documented? I can't seem to get Windows to build on OSX.

@dknutsen
Copy link

@framerate I believe those are passed straight through to electron-packager so they are documented here. Would definitely like to see more documentation on the PlatformPackager options in this repo though.

@framerate
Copy link

Yeah it's a black hole. I feel like I've read all the docs a few times and had no idea why I wasn't building for windows since I have a build.win entry in package.json and followed all the directions...

(I did find on a random issue that msi's don't build on OSX... but I don't think that's documented anywhere yet either)

@develar
Copy link
Member

develar commented May 10, 2016

@framerate

--platform win32 --arch x64

See https://github.com/electron-userland/electron-builder#cli-usage "Execute node_modules/.bin/build --help to get actual CLI usage guide."

If you use programmatic API, see https://github.com/electron-userland/electron-builder#programmatic-usage.

What is not clear in the sample (comment "platform, arch and other properties, see PackagerOptions in the node_modules/electron-builder/out/electron-builder.d.ts" and "build and other properties, see https://goo.gl/5jVxoO")?

@framerate
Copy link

Well as I mentioned, I setup my package.json to have entries for build.osx and build.win

So from a new user to this platform, I would expect npm run dist to build my dmg and my msi. But instead I get OSX .app and dmg and no mention of windows.

It's not very clear when this and this offer directions to setup your package to build for Windows on OSX and the output only builds for OSX.

@framerate
Copy link

I would expect one of two things:

  1. electron-builder sees that I have build.win in package.json and attempts to build windows for me.
    or
  2. electron-builder sees that I have build.win in package.json and alerts me directions as to how to build for windows on OSX.

@develar
Copy link
Member

develar commented May 10, 2016

@framerate Thanks for proposal, --platform=all should be documented.

@develar develar changed the title Issue packaging Windows on OS X Squirrel.Windows doesn't escape " in the description May 11, 2016
develar added a commit to develar/electron-builder that referenced this issue May 12, 2016
develar added a commit to develar/electron-builder that referenced this issue May 12, 2016
@TylerLeonhardt
Copy link
Author

@develar about the link that you sent me... is windows-installer built into electron or electron-builder or is it its own separate entity that I need to set up?

@TylerLeonhardt
Copy link
Author

Electron has a lot of moving pieces haha... I'm trying to soak it all in

@develar
Copy link
Member

develar commented May 15, 2016

@tylerl0706 It is only docs, Squirrel.windows is part of electron-builder — you don't need to set up yet another tool.

@TylerLeonhardt
Copy link
Author

@develar So how do you change the gif that's playing while it's installing on win32?

@develar
Copy link
Member

develar commented May 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants