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

build a windows installer #2071

Closed
dankamongmen opened this issue Aug 17, 2021 · 17 comments
Closed

build a windows installer #2071

dankamongmen opened this issue Aug 17, 2021 · 17 comments
Assignees
Labels
hax0rs-wanted looking to hack on notcurses? try these mswindows microsoft windows packaging schlepping up distro packages
Milestone

Comments

@dankamongmen
Copy link
Owner

presumably an MSIX file. https://docs.microsoft.com/en-us/windows/msix/

this is necessary for getting into winget (#2070).

https://docs.microsoft.com/en-us/windows/msix/desktop/source-code-overview

i guess we probably need stick all our dependencies in there, as well? and we're just abandoning any attempt at using e.g. a system-wide ffmpeg? i think so, unless such a thing is available via winget. if it is, we should probably use that.

@dankamongmen dankamongmen added packaging schlepping up distro packages hax0rs-wanted looking to hack on notcurses? try these mswindows microsoft windows labels Aug 17, 2021
@dankamongmen dankamongmen added this to the 3.0.0 milestone Aug 17, 2021
@WSLUser
Copy link

WSLUser commented Aug 18, 2021

You can use an msi instead. I've seen plenty of those in winget too. But msix does provide the most security. However it does have one critical flaw: disconnected systems that install msix manually rather than through the MS Store are unable to activate due to an online verification failing (this prevents the user from using the msix app normally and have to unpackage it same way as a zip file). So msi might be a better choice.

@dankamongmen dankamongmen modified the milestones: 3.0.0, 2.4.0 Aug 24, 2021
@dankamongmen
Copy link
Owner Author

https://wiki.gnome.org/msitools looks like it might work for us

@dankamongmen
Copy link
Owner Author

otherwise, WIX might be the way to go:

@dankamongmen
Copy link
Owner Author

according to wixtoolset/issues#4381, wix might not be available in linux.

with that said, we'd be building our windows installer from a windows machine, within msys2, so i guess linux availability doesn't matter? hrmm.

@dankamongmen
Copy link
Owner Author

so it looks like what we need do is make an installer that has our DLLs in it (along with any binaries we want to install), and probably also all our dependency DLLs. we can maybe make installation of the latter optional, unsure, but it definitely seems we are expected to distribute all files on which we depend. we then throw everything into a single target directory. i don't think we'll need the msys files (since we're targeting ucrt) and we definitely shouldn't need the windows ucrt files.

@WSLUser
Copy link

WSLUser commented Aug 30, 2021

As far as I'm aware, you still require WIX when building a MSI. Still, MSITools is interesting project and if it works without WIX, that probably would make it alot easier for you. People can always use WINE to emulate the windows binary of notcurses if needed for some windows TUI application that doesn't have a Linux equivalent.

@dankamongmen dankamongmen modified the milestones: 2.4.0, 3.0.0 Sep 2, 2021
@rgwood
Copy link

rgwood commented Sep 8, 2021

FWIW I would not recommend MSIX for this. It's got a lot of baggage related to the last decade of "modern Windows" attempts, and in my experience it's unreliable and poorly documented.

Most MSIX use is because it's a requirement in the Microsoft Store, but MS is dropping that requirement with Windows 11. It's very rare to see MSIX packages outside the Store (even for Microsoft software).

Inno Setup might be worth considering. It's rock-solid (VS Code uses it!) and pretty easy to script.

@dankamongmen
Copy link
Owner Author

Most MSIX use is because it's a requirement in the Microsoft Store, but MS is dropping that requirement with Windows 11. It's very rare to see MSIX packages outside the Store (even for Microsoft software).

the microsoft store requirement was my entire reason for thinking MSIX the way to go, so this is a very relevant fact. thank you, kind stranger (i assume i've never met you, though if you're in vancouver, i thank you for goodly British Columbian herbs, the mainstay of my twenties)!

@dankamongmen dankamongmen removed this from the 3.0.0 milestone Oct 3, 2021
@dankamongmen
Copy link
Owner Author

image

@dankamongmen
Copy link
Owner Author

image

i do sometimes amaze even myself with my badassery

@dankamongmen
Copy link
Owner Author

missing icon in the add/remove programs view, yuck

dankamongmen added a commit that referenced this issue Nov 22, 2021
dankamongmen added a commit that referenced this issue Nov 22, 2021
@dankamongmen
Copy link
Owner Author

some problems:

  • doesn't seem to support "upgrade" cleanly, where the previous version would be deleted
  • do we really have to include all our dependent DLLs?
  • we're going to need to set default paths based on install location choice; ought we use a registry key?

@dankamongmen dankamongmen added this to the 3.0.0 milestone Nov 22, 2021
@dankamongmen dankamongmen self-assigned this Nov 22, 2021
@dankamongmen
Copy link
Owner Author

we're using OpenImageIO instead of ffmpeg at the moment to work around #2355, but know that this requires about 40 extra DLL files, and blows up our installer/installed by about 200MB (from 50MB).

@dankamongmen
Copy link
Owner Author

expected default is...not what i would have expected

image

@dankamongmen
Copy link
Owner Author

so i made one, and submitted a winget package around it. we'll want to automate this process, but for now, i'm calling this done. yay!

@rgwood
Copy link

rgwood commented Nov 22, 2021

Amazing work, thanks!

@dankamongmen
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hax0rs-wanted looking to hack on notcurses? try these mswindows microsoft windows packaging schlepping up distro packages
Projects
None yet
Development

No branches or pull requests

3 participants