Skip to content

Enhance: move to msys2 and add64 bit windows build#3208

Closed
SlySven wants to merge 53 commits intoMudlet:developmentfrom
SlySven:Enhance_moveToMSYS2AndAdd64BitWindowsBuild
Closed

Enhance: move to msys2 and add64 bit windows build#3208
SlySven wants to merge 53 commits intoMudlet:developmentfrom
SlySven:Enhance_moveToMSYS2AndAdd64BitWindowsBuild

Conversation

@SlySven
Copy link
Copy Markdown
Member

@SlySven SlySven commented Oct 31, 2019

The previous powershell scripts have been renamed to include "old" in them but I have chosen to use the older Windows cmd.exe to run MinGW32/64 bash terminals (now not the case, instead I) do the commands as bash scripts rather than powershell ones.

I want to see how far the, now, two, builds get...

Signed-off-by: Stephen Lyons slysven@virginmedia.com

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
…avis]

The previous powershell scripts have been renamed to include "old" in them
but I have choosen to use the older Windows cmd.exe to run MinGW32/64
bash terminals and to do the commands as bash scripts rather than
powershell ones.

I want to see how far the, now, two, builds get...

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Oct 31, 2019

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
As the environmental variables were not being inserted in prior attempt.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
…ravis]

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Don't do a system upgrade as that is likely to need a restart to achieve!

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
We cannot access the system one because we are not privaledged
(administrator).

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
@SlySven SlySven force-pushed the Enhance_moveToMSYS2AndAdd64BitWindowsBuild branch from b76b3e8 to f5181c2 Compare November 1, 2019 16:31
…Build

Conflicts resolved in:
* .appveyor.yml

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
The `/mingw32/share/lua/5.1/luarocks/site_config.lua` file is malformed
in comparison to the `/mingw64/share/lua/5.1/luarocks/site_config.lua` and
this is enough to cause a `luarocks` invocation without any arguments to
report that the "system" configuration file is not present - which prevents
system rocks to be installed.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
…vis]

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Also allow a travis build to confirm nothing broken for them.

The Windows executable is being saved but we still need to arrangd for the
bundle to be build and then disctributed.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
This entails changing the name of the existing 32 Bits one so that another
one for 64 Bits can be placed alongside it in the same directory. The
Discord release zip file puts them (and the Linux and MacOs 64 bit ones) in
separate directories - which is a little inconvenient for us...

I have also put in some qDebug() messages - because I am having difficulty
getting the Discord RPC to respond to local builds - though it works fine
for Linux AppImages - which use the very same copy of the library for THAT
OS. They are enabled with a DEBUG_DISCORD #define visible to the
discord.cpp compilation unit...

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
…vis]

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
…ravis]

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Turns out the ones I had put in were both 32-bit ones - the ones inserted
here are described differently by the MSYS2 `file` command as:
* discord-rpc32.dll: "PE32 executable (DLL) (console) Intel 80386, for MS
                      Windows"
* discord-rpc64.dll: "PE32+ executable (DLL) (console) x86-64, for MS
                      Windows"
Further more they were certified and signed on "‎27 ‎November ‎2018 17:20" so
that is consistent with them being the (current) version 3.4.0 release
files from that same date.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Nov 3, 2019

I don't think any of the changes in TLuaI terpreter are relevant to the PR's scope. It should be able to load Mudlet libs as-is!

(Messing around with strings like that just makes work for translators, remember!)

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
@SlySven
Copy link
Copy Markdown
Member Author

SlySven commented Nov 3, 2019

I don't think any of the changes in TLuaI terpreter are relevant to the PR's scope. It should be able to load Mudlet libs as-is!

I was getting errors in that area and the messages were coming out a bit mangled, one of them was consistently moaning about Lua error:%1 is not a valid Win32 program. - notice the missing space and the unreplaced parameter. I fixed the space but eventually found out that the %1 was coming from an internal error in zip.dll because of a missing libzzip-0-13.dll and not because of a mistake I had found in our processing of the text.

For the record those libs are no longer ones we download from source and compile ourselves but instead copied from the MSYS2 (32 or 64 bit as appropriate) system ones.

I did have to merge in #3200 because I needed the 64Bit Discord library - and in doing so found out that I hadn't uploaded the correct one but a copy of the 32Bit one.

@SlySven
Copy link
Copy Markdown
Member Author

SlySven commented Nov 3, 2019

Damn, all the CMake builds are failing on Travis...

@keneanung
Copy link
Copy Markdown
Member

This is why:

CMake Error at src/CMakeLists.txt:255 (add_executable):
  Cannot find source file:
    mudlet_fonts.qrc
  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx

As well as the OpenSSL needed for secure connections there were some
graphics and compression libraries that also need to be included (some
icons could not be shown on the connections dialogue). Also needed was the
SDL2 library that GamePad support needs.
libzstd.dll
liblzma-5.dll
libwebpdemux-2.dll
libwebp-7.dll
libtiff-5.dll
libjpeg-8.dll
libjasper-4.dll
libcrypto-1_1-x64.dll
libssl-1_1-x64.dll
SDL2.dll

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
mingw-w64-${BUILDCOMPONENT}-boost \
mingw-w64-${BUILDCOMPONENT}-yajl
mingw-w64-${BUILDCOMPONENT}-yajl \
mingw-w64-${BUILDCOMPONENT}-SDL2
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SDL2?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, needed by Qt for the gamepad support I think.

@SlySven
Copy link
Copy Markdown
Member Author

SlySven commented Nov 4, 2019

🤦‍♂ Oh, of course, as it proved not possible to compile the mudlet_fonts.qrc file for 32-Bit Windows as the amount of memory needed exceeded 4GB {and mingw32-make would consistently crash out} and I am not sure that amount is available within a MINGW32 environment. Given that we have done 32-Bit build using a different compiler it is not entire sure whether there might be just a bug in the one being used in this new arrangement.

As I had already pointed out to @vadi2 Windows cannot use the Noto Color Emoji fonts in even the latest Windows 10 version (except within the Edge and Chrome web-browsers) so it is pointless bundling it with that OSes packages. I took the step of making two resource files ./src/mudlet_fonts_linux.qrc - which is a rename of the existing one and ./src/mudlet_fonts_windows.qrc and I fixed the qmake project file to include the latter on Windows and the former everywhere else.

However, I forgot the CMake project files...!

Given that Color emojis are handled differently on the different OSes does our current forcing of the Noto Color Emoji font actually work on MacOs? I have some prototype code that instead of uniformly trying to force that font to be used as a substitute on all OS of all VERSIONS it tries to make a more nuanced selection and allow some flexibility for those users stuck in corner cases, however it is not clear what the Apple OS option should be...

@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Nov 4, 2019

It's definitely not something that this PR should worry about, lets talk in #mudlet-development?

@SlySven
Copy link
Copy Markdown
Member Author

SlySven commented Nov 4, 2019

Given the size of this PR I will not attempt to convert it from the Draft that it is currently. Instead, once the kinks have been ironed out I will try and squash all the experimental stuff down locally and then try and implement pieces in the smaller chunks that I know Vadim would prefer.

I suspect that, as we are including various libraries in the Windows package, either ones we compile ourselves (as at present) or provided by MSYS2 (as in this PR) we need to include all the licence documentation for the NON-GPLed free code that demands that they are mentioned as part of their terms of use, i.e. with MIT or BSD x clause or other licences!

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
@SlySven
Copy link
Copy Markdown
Member Author

SlySven commented Dec 1, 2019

Squashed down and rebased off a later start point in the development branch as #3255 - closing this draft...

@SlySven SlySven closed this Dec 1, 2019
@SlySven SlySven deleted the Enhance_moveToMSYS2AndAdd64BitWindowsBuild branch June 22, 2020 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants