shoes3 icon indicating copy to clipboard operation
shoes3 copied to clipboard

Migrating from NSIS Unicode to QtIFW

Open IanTrudel opened this issue 7 years ago • 11 comments

This is a pull request for you to test. https://github.com/Shoes3/shoes3/pull/330

Overall everything is better with QtIFW, a bit of a learning curve though, and reading Windows attributes (i.e. registry) a bit challenging. This first attempt should be fun enough. Your feedback is welcomed.

IanTrudel avatar Feb 28 '17 00:02 IanTrudel

Should it be tagged for 3.3.3 milestone?

IanTrudel avatar Feb 28 '17 02:02 IanTrudel

Not sure yet. Msys2 is being very difficult for me - can't build libyaml.dll so I can't build ruby and many others deps to build before Shoes and I can test your installer.

ccoupe avatar Feb 28 '17 04:02 ccoupe

3.3.3 will be a huge release at this rate. Many key elements are changing. For what it's worth, this installer need some testing and small tuning but then it should be good to go.

What is the hold up with libyaml? It's a ./configure, make and make install kind of thing. Usually easy to build.

Maybe a patch for MSYS2 would help ? https://github.com/Alexpux/MSYS2-packages/tree/master/yaml

IanTrudel avatar Feb 28 '17 06:02 IanTrudel

I found a yaml patch from the rubyinstaller folks - working.. libffi is a mess (can copy) openssl is a very confusing creature when building from source. Put the make, make install into the 'not here' bucket for these deps.

ccoupe avatar Feb 28 '17 06:02 ccoupe

Your MSYS2 may have something wrong? I downloaded OpenSSL 1.1.0e from https://www.openssl.org/source/ and it compiles just fine here.

IanTrudel avatar Feb 28 '17 20:02 IanTrudel

Hopefully, you didn't install that openssl 1.1 - msys2 comes with 1.0.2k and the linux we use also use 1.0.2 and I think OSX does too.

ccoupe avatar Mar 01 '17 05:03 ccoupe

Note: The latest stable version is the 1.1.0 series of releases. Also available is the 1.0.2 series. This is also our Long Term Support (LTS) version (support will be provided until 31st December 2019).

Would be nice to stick to the newest but I might give a try to the other version and it will probably be fine. Check tomorrow and get back to you.

IanTrudel avatar Mar 01 '17 06:03 IanTrudel

OpenSSL 1.0.2k is also compiling and producing a shiny new libcrypto.a and libssl.a.

./config
make depend
make

IanTrudel avatar Mar 01 '17 16:03 IanTrudel

I finally got a chance to see qtifw in action. I modified msys/env.rb and msys/tasks.rb to allow both installers - user choice because we have users that depend on nsis although it's not in this 'space' and our use of qtifw is not yet fully baked.

I add this to msys-custom.yaml

Extloc: C:/shoesdeps/gems
#Installer: nsis
#IntallerLoc: \"C:Program Files (x86)\\NSIS\\Unicode\\makensis.exe\"
Installer: qtifw
InstallerLoc: C:/Qt/QtIFW2.0.5/bin/binarycreator 
Exts:

I also move the built exe into pkg/ where all the builds live, with a different file name. A temporary thing once we fix somethings.

  1. qtifw does not set the Windows path so shoes.exe and cshoes.exe can't be used from a terminal (of any kind)
  2. Can a user set background image and icons - I know of at least one developer who has done that with their nsis based installer called from the exe-shoes scripts

ccoupe avatar Mar 13 '17 04:03 ccoupe

qtifw does not set the Windows path so shoes.exe and cshoes.exe can't be used from a terminal (of any kind)

It does set Windows PATH but needs to either restart the session or restart the computer. The reason is that I used the safest way possible to update the path using Windows registry. NSIS uses another method that will truncate the path when it exceeds 1024 characters — a problem that you have yourself experienced in the past, isn't it?

https://github.com/Shoes3/shoes3/blob/master/platform/msw/qtifw/packages/com.shoesrb.shoes/meta/installscript.js#L40

There is also another advantage of this approach: user path is modified instead of global path. Other methods involve reading path in a way that both user and global paths are merged together, so when appending a new path, it is much easier to exceed 1024.

Can a user set background image and icons - I know of at least one developer who has done that with their nsis based installer called from the exe-shoes scripts

Absolutely. I initially replicated NSIS behaviour but found that the simplicity of QtIFW native GUI is better and modern. Less troubles for us as far as maintenance goes and it's also faster to get to play with Shoes because there are less steps to install.

Icon is already set for the installer. It may occasionally fail to add the icon to the installer for no reason, maybe caching. Regenerating the installer normally fixes the problem.

It's a bit of a judgement call here. Now you got to remember that QTiFW is multiplatform. We will be able to use it on MacOS X and Linux to generate installers for MacOS X and Linux.

IanTrudel avatar Mar 13 '17 15:03 IanTrudel

I wondered if someone else would attempt to cross compile qtifw for Linux to Windows use. Apparently so . I am not looking to learning the world of qt but it would be more fun than setting up a OracleBox Windows VM build server.

ccoupe avatar Apr 16 '17 04:04 ccoupe