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

Windows: Installer fails and dist/ folder structured differently since 3.21.0 #402

Closed
mikew opened this issue May 13, 2016 · 7 comments · May be fixed by qcif/data-curator#563
Closed

Windows: Installer fails and dist/ folder structured differently since 3.21.0 #402

mikew opened this issue May 13, 2016 · 7 comments · May be fixed by qcif/data-curator#563

Comments

@mikew
Copy link

mikew commented May 13, 2016

In version 3.20.0, after building for windows we were left with two folders:

  1. win-x64/ contained the installer and nupkg file
  2. ProductName-win32-x64/ was the electron package ready to be tested or zipped, without installation.

3 20 0

After 3.21.0, we have 2 different folders:

  1. win/ seems to be the same as win-x64, with the installer and nupkg file
  2. win-unpacked/ is ... not really sure what. There's a folder win-unpacked/lib/net45 that looks like the old ProductName-win32-x64/

3 21 0

The restructuring is fine, but the resulting installer no longer works after 3.21.0. Here's what my SquirrelSetup log says:

2016-05-13 13:51:51> Program: Starting Squirrel Updater: --install .
2016-05-13 13:51:51> Program: Starting install, writing to C:\Users\mike\AppData\Local\SquirrelTemp
2016-05-13 13:51:51> Program: About to install to: C:\Users\mike\AppData\Local\dronefuse
2016-05-13 13:51:51> CheckForUpdateImpl: Couldn't write out staging user ID, this user probably shouldn't get beta anything: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\mike\AppData\Local\dronefuse\packages\.betaId'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   at System.IO.File.WriteAllText(String path, String contents, Encoding encoding)
   at Squirrel.UpdateManager.CheckForUpdateImpl.getOrCreateStagedUserId()
2016-05-13 13:51:51> CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\mike\AppData\Local\dronefuse\packages\RELEASES'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Squirrel.Utility.LoadLocalReleases(String localReleaseFile)
   at Squirrel.UpdateManager.CheckForUpdateImpl.<CheckForUpdate>d__2.MoveNext()
2016-05-13 13:51:51> CheckForUpdateImpl: Reading RELEASES file from C:\Users\mike\AppData\Local\SquirrelTemp
2016-05-13 13:51:51> CheckForUpdateImpl: First run or local directory is corrupt, starting from scratch

If it helps, there's a space in my productName in the app's package.json

@develar
Copy link
Member

develar commented May 13, 2016

Reproduced.

@develar
Copy link
Member

develar commented May 13, 2016

Do you build it on Windows, right?

@develar
Copy link
Member

develar commented May 13, 2016

Hmmm... reproduce if I build on windows, works if I build on OS X/Linux.

@develar
Copy link
Member

develar commented May 14, 2016

Windows sucks, OS X / Linux zip creates correct ZIP, powershell creates incorrect. Since nuget/.net zip also suck and don't support all standard zips, it cannot handle such ZIP.

@develar
Copy link
Member

develar commented May 14, 2016

Solution — use http://www.info-zip.org instead of windows shit.

develar added a commit to develar/electron-builder that referenced this issue May 14, 2016
develar added a commit to develar/electron-builder that referenced this issue May 14, 2016
develar added a commit to develar/electron-builder that referenced this issue May 14, 2016
@anaisbetts
Copy link

Windows sucks, OS X / Linux zip creates correct ZIP, powershell creates incorrect. Since nuget/.net zip also suck and don't support all standard zips, it cannot handle such ZIP.

It's as if I predicted something exactly like this would happen ;)

@develar
Copy link
Member

develar commented May 18, 2016

@paulcbetts No one can write perfect code the first time. Especially for Windows. Error was detected immediately when pre-release was marked as latest and available for all. So, what is the answer to "use nuget pack for years" vs "fix and stabilise fix in one week and then it will be used for years by thousands developers"? I decided to fix. There are no conceptual issues, it is just error because nuget/squirrel.windows don't support all standards ZIP (7zip zip is not supported also).

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.

3 participants