Building PBS Professional Under Windows: PBS v. <19.4
Originally created by Hiren Vadalia.
This guide shows how to build PBS Pro version < 19.4 on Windows.
Step-by-step guide to build PBSPro (Open Source)
Prerequisites
- Windows machine with Internet access (below steps are written for Windows 7 SP1 64bit)
- One user who is member of local Administrators group on windows machine (for this guide it will be pbsbuild)
Prepare System to build PBSPro
Install MinGW and MSYS
- Download MinGW installer from here
- Click Install then click Continue then again click Continue (This should start MinGW GUI installer)
- Under 'Basic Setup' select 'mingw-developer-toolkit', 'mingw32-base' and 'msys-base'
- Under 'All Packages→MSYS' select 'msys-gcc' (class Bin)
- Click on Installation→Apply Changes then click Apply and wait for installation to complete then click Close then close MinGW GUI Installer
Install Curl
- Download curl for windows from here
- Extract downloaded zip
- Create C:\Tools directory
- Copy <extracted directory>\src\curl.exe to C:\Tools\
- Add C:\Tools to PATH using Start→Right click on Computer→Properties→Advance System Settings→Environment Variables→System Variables→Select PATH→click Edit→In 'Variable value' got to start add 'C:\Tools;' and click Ok→Ok→Ok and close System Setting window
Install Unzip
- Open C:\MinGW\msys\1.0\msys.bat
- run
mingw-get.exe install msys-unzip
in MSYS terminal - Copy C:\MinGW\msys\1.0\bin\unzip.exe to C:\Tools\ (Make sure you have C:\Tools directory created and added to PATH see steps 3 and 5 under 'Install Curl section')
- Copy C:\MinGW\msys\1.0\bin\msys-1.0.dll to C:\Tools\
Install SVN
- Download Open Source TortoiseSVN from here
- Run downloaded MSI.
- Click Next→Next then select 'Entire feature will be installed on local hard drive' from drop down list of 'TortoiseSVN'
- Click Next→Install to begin installation and wait for installation to complete
- Click Finish
Install Perl
- Download Strawberry Perl from here
- Run downloaded MSI
- Click Next and accept license and click Next→Next→Install to begin installation and wait for installation to complete
- Uncheck ReadMe check box then click Finish
- Open CMD as 'Run as Administrator'
- run
cpanm -f -n Module::Install
in CMD terminal
Install CMake
- Download CMake from here
- Run downloaded MSI
- Click Next and accept license and click Next
- Select 'Add CMake to the system PATH for all users' then click Next→Next→Install to start installation and wait for installation to complete
- Click Finish
Install VC++ 2008 Express Edition
- Download VC++ 2008 Express edition from here
- Extract ISO and run Setup.hta from extracted directory
- Select 'Visual C++ 2008 Express Edition'
- Click Next
- Accept license and click Next
- Uncheck both checkbox (Optional) and click Next
- Click Install and wait for installation to complete
- Click Exit
Install Windows SDK 7.0
- Make sure there are no .Net Frameworks installed in system... if any version of .Net Framework (or any component of .Net Framework of any version) is installed, please remove it then restart machine once (This is require because Windows SDK 7.0 installer need specific .Net Framework version 4.0.30319)
- Download .Net Framework 4.0.30319 from here
- Run downloaded exe and accept license then click Install and wait for installation to complete then click Finish
- If you don't want to uninstall and install .Net Framework 4.0.30319 then do workaround specified at here, but this is not tested so do it at your own risk!
- Download Windows SDK 7.0 from here
- Run winsdk_web.exe and if you get any warning regarding some component cannot be installed then check installed .Net Frameworks versions and make sure you have only 4.0.30319 installed.
- Click Next and accept license and click Next
- Click Next to select which component to install from SDK
- Make sure you select all under 'Developer Tools' (rest all check boxes are optional, select it if you want to install that component) then Click Next
- Click Next to begin installation and wait for installation to complete
- Uncheck any checked box (Optional) and click Finish
Run 'Start→All Programs→Microsoft Windows SDK v7.0→Visual Studio Registration→Windows SDK Configuration Tool' then in drop down list select v7.0 and click on 'Make Current' and click Ok to finish
(Optional) Just to confirm whether Windows SDK 7.0 is installed properly or not run CMD then in run 'call "%ProgramFiles%\Microsoft SDKs\Windows\v7.0\Bin\SetEnv.cmd" /x64 /Release' in newly opened CMD and if you see below output then Windows SDK is properly set.
Output of SetEnv.cmdSetting SDK environment relative to C:\Program Files\Microsoft SDKs\Windows\v7.0\. Targeting Windows 7 x64 Release C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>
Install Wix Toolset v3.11
- Download Wix Toolset v3.11 from here
- Run downloaded wix311.exe
- Click on Install and wait for installation to complete
- click Exit
- Add 'C:\Program Files (x86)\WiX Toolset v3.11\bin' to PATH using Start→Right click on Computer→Properties→Advance System Settings→Environment Variables→System Variables→Select PATH→click Edit→In 'Variable value' got to start add 'C:\Program Files (x86)\WiX Toolset v3.11\bin;' and click Ok→Ok→Ok and close System Setting window
Install Python2.7 (Optional)
- Download Python 2.7.13 from here
- Run downloaded MSI
- Click Next→Next then select 'Entire feature will be installed on local hard drive' from drop down list of 'Python'
- Click Next and wait for installation to complete
- Click Finish
Get PBSPro source
- Create C:\Users\pbsbuild\builds directory
- Download PBSPro source from https://github.com/PBSPro/pbspro/tree/master and copy pbspro directory to C:\Users\pbsbuild\builds directory
Build PBSPro
- Open CMD
- Change directory to C:\Users\pbsbuild\builds\pbspro
- Command:
cd C:\Users\pbsbuild\builds\pbspro
- Command:
- (Optional, but Mandatory only if your network connections are behind proxy) set HTTP_PROXY and HTTPS_PROXY environment variable
- Command:
set HTTP_PROXY=http://<proxy_user>:<proxy_user_pass>@<proxy_ip>:<proxy_port>
- Command:
set HTTPS_PROXY=http://<proxy_user>:<proxy_user_pass>@<proxy_ip>:<proxy_port>
- Command:
- (Optional, but Mandatory only if you have not installed Python 2.7.13 as per mentioned under section 'Install Python 2.7.13 (Optional)') run .appveyor\build_python.bat
- Command:
call .appveyor\build_python.bat 1>build_python.bat.out 2>&1
- Command:
- run .appveyor\appveyor_helper.bat to compile all PBS deps
- Command:
call .appveyor\appveyor_helper.bat
- Command:
- setup VS2008 tools
- Command:
call "%VS90COMNTOOLS%vsvars32.bat"
- Command:
- Build PBSPro
- Command:
vcbuild win_configure\pbs_windows_VS2008.sln "Release|Win32"
- Command:
- Generate PBSPro MSI Installer
- Command:
call .appveyor\generate_installer.bat
- Command:
- Check win_configure\msi\wix\PBSPro.msi
- Expected results:
PBSPro.msi should exists in win_configure\msi\wix directory
- Expected results: