Building on Windows

From NEOSYS Dev Wiki
Jump to navigationJump to search

Software to install:

  1. WinRAR
  2. PostgresSQL
  3. TortoiseSVN 9(32 bit)
  4. Boost c++ libraries 1.34.0
  5. Visual Studio C++ Express Edition
  6. Windows Platform SDK.

Installing WinRAR

Installing Postgres

Downloading & Installing Tortoise SVN (32bit):

  1. Go to your browser, copy and paste the web address into your URL "http://subversion.tigris.org/project_packages.html".
  1. The web page should have a title of "Subversion packets", and have a dark green theme.
  2. Scroll down the page, and look for Windows NT, 2000, XP and 2003.
  3. Look through the text for "If you want a pretty Win32 GUI, TortoiseSVN integrates nicely with the Window Explorer.", near the bottom. Click on the link highlight in blue (tortoiseSVN).
  4. Look for "Latest Version" in a green bar and underneath that, in the text look for "download page" and click it.
  5. You should be looking at a web page with a blue tortoise. The title should also be "TortoiseSVN".
  6. Look for the subheading "Download Application"
  7. Click on "TortoiseSVN-1.4.5.10425-win32-svn-1.4.5.msi 32 bit.
  8. You come to a web page with a URL starting with "http://sourseforge.net/............./",either a window automatically pops up asking whether to save or run, or you right click on a beige horizontal bar at the top of the web browser window, and select "Download file".
  9. Click Save, and save the file into your download folder. (make a folder named download, if you haven't already done so) then click Run, and click Run again.
  10. When the TortoiseSVN window set-up pops up, click next.
  11. Accept the terms, and click next.
  12. Click next again, then click Install.
  13. Then installation program will ask you to restart.


Getting Project Exodus onto your Computer:

  1. Go to your desktop, and create a new folder.
  2. Right click on the folder, and got to TortoiseSVN, checkout.
  3. In the URL field type in (or copy and paste) http://svn.neosys.com/svn/trunk and click Ok.

TortoiseSVN.JPG

  1. Another window will pop up, and start listing the files you are importing onto your pc.
  2. Click Ok, once loading is finished.

For help on how to use: http://devwiki.neosys.com/index.php/Installing_and_Using_Tortoise_Subversion

Boost C++ Libraries 1.34.0

  1. Go to http://www.boost-consulting.com/products/free
  2. Click the 2nd download, Boost 1.34.0 Installer.
  3. Click Run and again.
  4. Agree to the licenses.
  5. Click Next.
  6. Tick the Visual C++ 8.0 (Visual studio 2005).
  7. Tick the Multithread, static runtime and Multithread Debug, static runtime then click Next

Multithreadstatic.jpg

  1. Now untick every box except:
    • Boost Header files
    • Boost Start menu shortcut
    • Boost Source and Documentation
    • Tools
    • Boost DateTime
    • Boost FileSystem
    • Boost IOstream
    • Boost ProgramOptions
    • Boost Regex
    • Boost Thread

Choosingcomp.jpg
9. Click Next, Install. (take note of where you saved boost).

Downloading & Installing Visual Studio C++ Express Edition:

  1. Go to http://msdn2.microsoft.com/en-gb/express/aa700735.aspx
  2. Click on the download button near the top right hand of your screen.
  3. Scroll down the web page till you see 6 different downloads e.g. Visual Basic, SQL Server and Visual C++.
  4. Select your language for Visual C++ 2005 Express Edition, as soon as you select your language a "File download" window will pop up, click Run.
  5. There should be a bit of loading, once finished click Run and again.
  6. There should be a minute or two of loading, click Next in the Visual Studio C++ set-up.
  7. Accept the terms and click Yes.
  8. Tick the Graphical IDE if it hasn't been ticked already and click Next.
  9. Browse for a location in where you would like Visual Studio C++ (although, it would be best to keep the default location in case something need to find the Visual Studio C++ folder and cannot find it in its default location) then click Next.
  10. If you have any minor jobs to do, I suggest you do so now as it will take a while, but keep checking on how the installation is coming.
  11. Then reboot your computer.
  12. Once your pc is ready look for Visual Studio C++ on icon your desktop, if its not there go to start, all programs in the start menu and look for Visual Studio C++ Edition as shown in the example:
    WhereVSC++.jpg
  13. The window below will pop up, telling you that you need to register your copy of Visual Studio C++ Express Edition.

RegisterVSC++.jpg

Downloading & Installing Platform SDK:

Part 1: Installing Platform SDK

  1. Go to http://www.microsoft.com/downloads/details.aspx?familyid=0baf2b35-c656-4969-ace8-e4c0c0716adb&displaylang=en.
  2. Click on the Continue button.
  3. Depending on your internet browser, you might have to install a plug-in. IF not, scroll down the web page and click on the Continue button.
  4. Click on the link called "Download Files Below" or you can just find the subheading Files in this Download
  5. There will be list of different types of files, depending on your processor to download.
    • If you have a 64 bit Intel processor download PSDK-ia64.exe
    • If you have a 64 bit AMD processor download PSDK-amd64.exe
    • If you have another processor type, and it's listed on the web site but not here choose that Download.
    • If you have another processor type which is not included in the list on the web page download PSDK-x86.exe


Extra: If your on a virtual computer, then check the version on windows you are using.

  1. Save the file into your download folder.
  2. Then click Run, Then click Run again.
  3. At the next window, with two button, click Cancel.
  4. Click Next.
  5. Agree to the terms, and click Next.
  6. Do a custom installation, and click Next.
  7. You come to a stage in the set-up where it asks "In which driver do you want to save you files to?". Pick the drive you prefer. To change from drive to drive you change the beginning of the location. So if you want to save SDK in the C drive, leave it as it is and if you want to save SDK to the D drive, change C to D. Or click browse. Then click Next.
  8. Click Next again, and wait for the loading.
  9. Then continue the download, till the end.

Part 2 Configuring & Compiling

  1. Run Microsoft Visual Studio C++ Express Edition.
  2. Now go to File, Open, File, Desktop, Exodus, agency, agency.sln and then open.
  3. You should see:
    NewsolutionExplor.JPG
  4. Open agency pointed to you by the red arrow, by clicking on the + sign.
  5. Remove Market and schedule.
  6. In the agency folder, open Main then double click on main.cpp
  7. You should now have C++ code to the right side of the Visual Studio program window.
  8. Go to Tools, Options, open Project and Solutions and go to VC++ Directoies
  9. Your window should look like this:
    VSC++EEoptions.JPG
  10. Do the following:
    • Click the drop down menu for Show directories for: and click Include Files, now click the button that looks like a yellow folder and in the field were the cursor is blinking copy an paste the following path, and then press Enter: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin
    • Click the drop down menu for Show directories for: and click Include Files, now click the button that looks like a yellow folder and in the field were the cursor is blinking copy an paste the following path, and then press Enter: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
    • Click the drop down menu for Show directories for: and click Library files, now click the button that looks like a yellow folder and in the field were the cursor is blinking copy an paste the following path, and then press Enter: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib
    • Click the drop down menu for Show directories for: and click Include Files, now click the button that looks like a yellow folder and in the field were the cursor is blinking copy and paste the path to the boost_1_34_0 folder you created earlier when installing the Boost libraries.
    • Click the drop down menu for Show directories for: and click Library Files, now click the button that looks like a yellow folder in the field were the cursor is blinking copy and paste the path to the boost_1_34_0\lib folder you created earlier when installing the Boost libraries.
  11. Then click Ok.

Errormessage.JPG

  1. Check whether libpq.dll is in C:\Program Files\PostgreSQL\8.1\lib\????, if not there then change project properties to reflect version on location in where you installed postgreSQL.
  2. Right click on My computer, properties, advanced, environment variables, system variables, scroll down and find Path, double click it. variable value, go to the end of the path and type a semi-colon, then copy and paste the following path after the semi-colon:
    C:\Program Files\PostgreSQL\8.1\lib\ms and close Visual Studio C++ Express Edition, and then open again.

PCconfig.JPG

Update the corewin_express.vsprops file.


One more step is needed to make the Win32 template work in Visual C++ Express. You need to edit the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults) and
Change the string that reads:

AdditionalDependencies="kernel32.lib"
to
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"

Generate and build a Win32 application to test your paths.


In Visual C++ Express, the Win32 Windows Application type is disabled in the Win32 Application Wizard. To enable that type, you need to edit the file AppSettings.htm file located in the folder %ProgramFiles%\Microsoft Visual Studio 8\VC\VCWizards\AppWiz\Generic\Application\html\1033\".
In a text editor comment out lines 441 - 444 by putting a // in front of them as shown here:

// WIN_APP.disabled = true;
// WIN_APP_LABEL.disabled = true;
// DLL_APP.disabled = true;
// DLL_APP_LABEL.disabled = true;

Save and close the file and open Visual C++ Express.

From the File menu, click New Project. In the New Project dialog box, expand the Visual C++ node in the Product Types tree and then click Win32. Click on the Win32 Console Application template and then give your project a name and click OK. In the Win32 Application Wizard dialog box, make sure that Windows application is selected as the Application type and the ATL is not selected. Click the Finish button to generate the project.
Compile by pressing F5.
Win32 application should build and run.

BY GREG BUSH 19/10/2007

Helpful Websites

  1. For help on Microsoft Visual Studio C++ Express Edition go to http://msdn2.microsoft.com/en-gb/express/aa700755.aspx
  2. For help on Boost go to http://www.boost.org
  3. For help on PostgeSQL go to http://www.postgresql.org/
  4. For help on WinRAR go to http://www.win-rar.com/winrarsupport.html
  5. For help on TortoiseSVN go to http://tortoisesvn.tigris.org/
  6. For how to use tortoiseSVN go to http://devwiki.neosys.com/index.php/Installing_and_Using_Tortoise_Subversion