Compiling the Windows version

• May 21, 2011 - 04:16

Already when David Bolton had computer problems and couldn't compile and upload the Windows versions a few months ago, I started reading the compile page for Windows and downloaded the requirements. The page was out of date, and Dave updated it quite a bit since. However, now I am attempting to follow it in the hopes of being able to compile my own nightlies. I already have the SVN trunk brought in and have been synchronizing them nightly. I've downloaded everything I needed from the list on the page, but have one problem... I don't know what version of QT to bring in.

The compile page refers to 4.7.0 but the Nokia downloads section (for LGPL) show 4.7.3 and I _really_ don't know which file to choose from. I thought that the latest version would be required for the nightly, so I brought in "Qt libraries 4.7.3 for Windows (minGW 4.4, 322 MB)" (on the Framework side) but that doesn't appear to be what I need as no MinGW is included. So then I brought in "Qt SDK for Windows* (15 MB)" which is the online SDK installer, but it fails the install at about 83% with the error:

""runInstall(ExitCode: 9) went wrong
'd:\QtSDK/Maemo/4.6.2/bin/env.exe -i /bin/sh --login d:\QtSDK/Maemo/4.6.2/postinstall/postinstall.sh --nosleepontrap'" ...

bash.exe: warning: could not find /tmp, please create!

Creating default target fremantle-pr13 ...
This may take a while ...

Working on sysroot fremantle-arm-sysroot-20.2010.36-2-slim"

Any ideas? I created a TMP folder on both the root of C and D (D is the install drive), and one in the QT install folder, but the installer keeps trying and failing.

I do have the "qt-sdk-win-opensource-2010.05.exe" file, but that is the older 4.7.0. Do I not need 4.7.3?


Comments

In reply to by [DELETED] 5

Given how much detail I gave, I think I explained the situation. The Windows compile page doesn't go into enough detail regarding some aspects of the compile so I am looking to rectify that. One of the parts that isn't detailed enough is the QT download. The only version available from Nokia right now is 4.7.3 and the error below is what I get when installing the SDK. I don't know if I need this "Maemo" part. Eventually I will get an error dialog where I can ignore the error and the install continued and finished, but just this QT installation took a long time as it was online and pulling packages down on the fly from Nokia.

"bash.exe: warning: could not find /tmp, please create!

Creating default target fremantle-pr13 ...
This may take a while ...
"runInstall(ExitCode: 1) went wrong
'd:\QtSDK/Maemo/4.6.2/bin/env.exe -i /bin/sh --login d:\QtSDK/Maemo/4.6.2/postinstall/postinstall.sh --nosleepontrap'"

"d:\QtSDK/Maemo/rebase/msysgit_rebase.exe -b 0x30000000 -o 0x10000 -v d:\QtSDK/Maemo/4.6.2/bin/msys-crypt-0.dll d:\QtSDK/Maemo/4.6.2/bin/msys-minires.dll d:\QtSDK/Maemo/4.6.2/bin/msys-gdbm-3.dll d:\QtSDK/Maemo/4.6.2/bin/msys-bz2-1.dll d:\QtSDK/Maemo/4.6.2/bin/msys-z.dll d:\QtSDK/Maemo/4.6.2/bin/msys-ssl-0.9.8.dll d:\QtSDK/Maemo/4.6.2/bin/msys-perl5_6.dll d:\QtSDK/Maemo/4.6.2/bin/msys-crypto-0.9.8.dll d:\QtSDK/Maemo/4.6.2/bin/msys-1.0.dll "

There does not appear to be a full offline installer exe available anymore. So I guess I am looking for comfirmation from someone who has done this recently on Windows, using the latest installation versions and files, including QT SDK 4.7.3, and what they experienced.

In reply to by [DELETED] 5

Thanks, Lasconic. My D: drive is FAT32, I'd forgotten I left it that way. I stopped using FAT32 some time ago, but haven't re-formatted my other drives to NTFS yet. The 4.7.3 online install did eventually complete, so I will continue with my compiling setup.

Regarding the 2010.05 download, where did you find that? I could find no reference to any older versions on the QT download page. I thought the nightlies needed the latest QT, esp to fix specific QT-related bugs evident in MS?

In reply to by schepers

The complete archives of Qt release is here : http://get.qt.nokia.com/qtsdk/ (I found out by removing the filename from the path :)

My mistake, The trunk requires 4.6 for compilation only but serious development (by Werner) is done with a git (nightly) version of Qt4.8 on Kubuntu. David is compiling his nightly with Qt4.7.3 I think. I compiled the Mac ones with Qt4.6.2.

If everything goes well, MuseScore 2.0 should be released with Qt 4.8 binaries.

(And it's Qt by the way, QT is Quicktime)

Yeah! I managed to build the latest (4305) revision of the nightly EXE under Windows 7. I have not attempted to build the install version. Since I compiled with Qt 4.7.3, and under Win7, there's some things not mentioned that are needed to compile, some things are very wrong, or some specific details that I need verification on. I've made copious notes so I will be updating the compile page.

Some questions:

1. Why do the certain folders in the MS checkout folder structure (like the root, root\trunk, root/trunk/mscore) have a red "!"? Is this because I have modified them, adding in the dependancies and modified certain files?

2. Why is the revision number shown on the About box only 4101M? I know I am running the latest as the features are there, so it should say 4305.

In reply to by schepers

1. If you are using tortoiseSVN, indeed. It will mark folders with modified files with a red !
2. Because you need to run make -f Makefile.mingw revision (and be online) if you want the about box to be right.

In reply to by [DELETED] 5

To #1, I thought that's what it was because I had modified them.

To #2, the command "make -f Makefile.mingw revision" doesn't work as the command "make" doesn't exist. If I do "mingw32-make -f Makefile.mingw revision" then I get the following error:

FOR /F "tokens=1 delims=M" %%A IN ('svnversion -n') DO echo %%A > mscore/mscore/revision.h
'svnversion' is not recognized as an internal or external command, operable program or batch file.
mingw32-make: *** [revision] Error 1

The command "svnversion" does not exist, in either my MS checkout folder, in Qt or in tortoiseSVN and it is a hardcoded command in checkout/trunk/Makefile.mingw. My system is online all the time, but maybe that's not what you meant.

PS: I see several options for make such as "package" and "clean". Should I do a "clean" command before every build, to remove the win32build and win32install folders, or is make smart enough to know what it needs to update. When I do an svn update and rebuild the exe, it takes only minutes (which is nice) but is this recommended?

In reply to by [DELETED] 5

I wonder if you've made the Windows and Mac versions for so long that you know everything involved. I'm trying to work from the Windows compile page with little to go on and there's lot of things that are either confusing or missing. That page mentions using TortoiseSVN, which cannot possibly work with the "svnversion" command when doing "make revision". It's details like that which are frustrating.

Yes, "Make Win32" works. I haven't tried "Make Install" because I didn't download or install NSIS. But, while "Make Win32" works, it's the About revision numbers that are wrong. Why doesn't an SVN update pull in the correct version so the make creates things with all the correct details? If "make revision" fails because I'm not using subversion, but David (I think) claims on the compile page that he uses Tortoise, then how does he compile the nightly so it gets the proper version numbers?

In reply to by schepers

I wrote the first version of the windows and mac guide for compilation. They served the community well so far. Sorry if you find them frustrating... You can edit them as you know. Try to keep them concise enough though...

Make install does not required NSIS, make package does.

make version get the last version number and write it in revision.h. This file is then used to get the version number and display it in the About box. It's not only on windows, but also on linux and mac. svn update is just an svn command and it's not designed to write anything anywhere. Regarding david's way of making the nightly, I guess he will answer himself but my guess is he installed svnversion independently.

In reply to by [DELETED] 5

I've re-installed the entire compiling structure on another system, just to confirm my documentation. This time I included the NSIS tool to build the installer package, but I only checked the TRUNK code. At home I have the entire MS tree, all revisions. I finally got the compile working well. I worked around the lack of an SVN UPDATE command by scripting the build and so my script asks me for the build revision. Crude but it works.

The only issue I ran into was finding out that the mscore/mscore/CMakeLists.txt file calls the WRC and WINE batch files. WRC is also a command in the OpenWatcom package (which I also run), and it took some time to solve the compilation error I was seeing. If the path additions for OpenWatcom come before the path additions for MS and its dependancies, the OpenWatcom WRC (OpenWatcom Resource Compiler) gets executed instead of WRC.BAT causing quite a problem.

A simple fix for this issue is to edit the mscore/mscore/CMakeLists.txt file and replace the command instance of WRC with the more accurate and specific WRC.BAT (and I also replaced WINE with WINE.BAT). Can this change be made to the online nightly source trunk? I've included the file with the changes.

One last thing: the newest Qt 4.7.3 offline installer is ~1.5Gb. The installation, using defaults, now takes over 6Gb and quite some time to install. Since I am not familiar with MS's requirements, what things can be removed from the default install to reduce down the footprint?

Attachment Size
cmakelists.zip 5.52 KB

Do you still have an unanswered question? Please log in first to post your question.