Tutorial on Compiling Qt 5.1.0 and QtCreator 2.8.0 on Windows 7 using Visual Studio 2012
-
Hello everyone,
I just got everything working and I thought I would share my adventure with everyone in the chance it might help some people.
Note: Adding environment extensions...
Go to my computer and select the "System Properties" on the file tab.
On the left tab select "Advanced system settings"
Select "Environment Variables" button near the ok/cancel buttons.
In the top part (user variables) either create a new entry named PATH or edit the current PATH if it already exists and add your desired folder routes (I'll explain more later when this is needed).
Extra Note: If there are older qt routes in the PATH variable, delete it. (ONLY THE QT ROUTE... example: c:\jom;c:\perl;c:\qtOldVersion\bin Delete C:\qtOldVersion\bin but leave the c:\jom;c:\perl)- Install Visual Studio 2012
- Download and install Perl (strawberry...latest version)
- Download and install Python (latest version)
- Download and install Jom
- Download and install git gui and git bash
- Do a file search in the git folder when it's installed for perl
- I think there are 3 files that have perl in the name in the git folder... change their extension to .bak so the program does not see them.
- Install Ruby (make sure to check the "add to PATH" option during install)
- In the start menu, open VS2012 x86 Native Tools Command Console
- type perl (enter) python (enter) git (enter) jom (enter)
Whenever you hit (enter) for each of these, your console should respond to each of them... if it simply responds "I don't know what you typed" then find where you installed them... look for the .exe that runs the program... and add the path (example path: C:\Jom) to the Windows User Environment Variables PATH (see top for instructions)
NOTE: when you add something to the path, restart the console (Always use the VS2012 x86 Native Tools Command Console) and retest.
When all of these are working move to step 11.
- make a folder in C:\ called "qt5"
- start menu->git bash
This will open a console in which you can use git commands... (DONT USE THE GIT GUI) - type cd c: (enter) cd qt5 (enter)
- type git clone git://gitorious.org/qt/qt5.git qt5 (enter)
- type cd qt5 (enter)
- type git checkout stable (enter)
- type ./init-repository --no-webkit (enter)
Wait for everything to download
When finished, close the git bash console and go to step 18 - Open the VS2012 x86 Native Tools Command Console again and type cd C:\qt5\qt5\ (enter)
- type configure -developer-build -opensource -nomake examples -nomake tests (enter)
Wait for the program to configure and generate a makefile then go to step 20 - type jom (enter)
This step takes quite a while (especially if you igorned the directions and downloaded the webkit and are compiling the examples and tests)
Wait for step 20 to finish - download the qt creator source code for 2.8.0 from this website (make sure you download the source code).
- extract the source code to c:\
- Open a VS2012 x86 Native Tools Command Console again and navigate to the qt creator folder in c:\ you just created.
- make sure you are in the first folder that has the qtcreator.pro file in it.
- type qmake qtcreator.pro (enter)
- type jom (enter)
Tadaaaa, you are done.
I did exactly these steps and it worked for me perfectly. If you don't do a step or don't do what a step tells you, then I can't help you... You must have some other problem that I did not run into.
Hope this helps!