Downloading the Source
- Downloading via SubVersion
- OSX and most Linux installs should already include svn, if not, then go here.
- SVN client integrated with Windows Explorer: Tortoise SVN
- SVN client for Windows (cmd line interface, small footprint): Silk SVN
- Downloading release code
- All releases include the source code used to build that release
- Helpful if you want to simply insert a quick modification (or fix a bug!)
- Not really helpful if you want to live on the bleeding edge of ongoing development
- Note that the Qt DLLs shipped with Windows releases are typically built with MSVC.
Building SimulationCraft
- Building the command line interface (CLI) is very easy on all platforms
- Building the graphical user interface (GUI) is considerably harder
- The GUI was built using Qt
- Building the GUI requires that the Qt SDK or Framework be downloaded and installed
- Qt DLLs are used at runtime, so a subset must be copied into the build area
- Refer to platform-specific directions below
Building SimulationCraft on Linux
Command Line Interface
- Your Linux distro should have come with svn and g++ by default.
- If not, use the built-in software update mechanism to download and install a developer suite.
- cd your_simc_source_dir/engine
- make OS=UNIX
- This builds an optimized executable named simc
Graphical User Interface using Qt SDK (not just the Qt Framework)
- Download and install the Qt SDK for Linux at Qt
- Choose "Go LPGL"
- Select the appropriate "SDK for Linux" for your hardware
- Start QTCreator (qtcreator)
- Open the project file your_simc_source_dir/simcqt.pro
- Choose a target of Desktop
- Build and run
Building SimulationCraft on OSX
Command Line Interface
- cd your_simc_source_dir/engine
- make OS=UNIX
- This builds an optimized executable named simc
Graphical User Interface
- Get and install Sparkle
- Install Sparkle.framework to /Library/Frameworks
- Get and install Qt
- Open your_simc_source_dir/simc.xcodeproj
- Build libsimc target
- Build "Generate Qt Project" target
- Build simc target
- You should now have
- your_simc_source_dir/simc, the command line simulator, and
- your_simc_source_dir/simcqt.app, the simulator GUI.
Building SimulationCraft on Windows
Command Line Interface using MSVC
- Download Microsoft Visual Studio Express
- Open your_simc_source_dir\simc.sln project file
- Make sure configuration is set to Release and not Debug (found on task bar)
- Build Solution
- Creates executable your_simc_source_dir\simc.exe
Command Line Interface using MinGW
- Use these instructions to download the MinGW compiler.
- I recommend using the mingw-get-inst graphical user interface installer
- After installed, you need to update your PATH environment variable
- Right-Click My Computer and choose Properties
- Click Advanced tab
- Click Environment Variables button
- Scroll System Variables and select Path
- Click Edit button
- Add the directory where your MinGW binaries are at the end of the PATH, separated by ;. Typically ;c:\mingw\bin.
- Open command prompt window and run
- cd your_simc_source_dir\engine
- mingw32-make
- Creates executable your_simc_source_dir\engine\simc.exe
- 64bit:
- Get MinGW-w64 ( http://mingw-w64.sourceforge.net/ )
- Add \mingw-w64\bin to your PATH environment variable ( remove potential Mingw32 PATH variable )
- run mingw32-make BITS=64
Graphical User Interface using MSVC and Qt Framework
- Download and install the appropriate OpenSSL package for your system, either Win32OpenSSL-1_0_0<letter>.exe or Win64OpenSSL-1_0_0<letter>.exe. If in doubt just install both.
- Download Microsoft Visual Studio Express
- Download Qt 4.7.4 Framework built with MSVC 2008 (QT 4.8.0 does not work currently)
- If you choose not to install it in the standard c:\qt\X.X.X directory then you will have to update the simcqt.vcproj for MSVC 2008 or simcqt.vcxproj for MSVC 2010 and qt_dll_setup.bat files
- Run your_simc_source_dir/qt_dll_setup.bat to copy DLLs from Qt into your build area
- Open your_simc_source_dir/simcqt.sln project file
- Make sure configuration is set to Release and not Debug (found on task bar)
- Build Solution
- Creates executable your_simc_source_dir\SimulationCraft.exe
Graphical User Interface using MinGW
- Install QtSDK.
- The SDK includes the QtCreator IDE, and optionally a ton of modules for writing applications on environments ranging from desktops to smart phones.
- You really only need the IDE and Desktop QT for MinGW (4.8.0 as of this writing). The docs for QtCreator, the SDK, and Qt itself will come in handy of you intend to work on the actual GUI.
- Edit your_simc_source_dir/qt_dll_setup.bat
- Change the qt_dir= and mingw_dir= lines to point at the folders where you installed the QtSDK and MinGW respectively.
- If you install in default locations, no editing should be necessary.
- Run your_simc_source_dir/qt_dll_setup.bat to copy DLLs from Qt and MinGW into your build area
- Open the simcqt.pro project file with QTCreator; it will prompt you to setup Debug & Release build configurations:
- Be sure to specify the external MinGW toolchain for building, and not the older 4.4 version of MinGW that you may have installed as part of the SDK.
- Build All (From the build menu, click the hammer icon in the lower left, or hit Control-B)
- Creates executable your_simc_source_dir\release\SimulationCraft.exe or your_simc_source_dir\debug\SimulationCraft.exe depending on whether you have the Release or Debug build selected.
- Clicking the computer icon in the lower left (Control-T) pops up the target selector that lets you pick Debug or Release config.
- You can run from inside IDE with the green triangle icon (Control-R). If you want to be able to run your SimulationCraft.exe from outside the IDE, you need to move it from the debug or release folder into the top-level source folder where you copied all of those DLLs many steps ago.
Tips and Tricks
- GNU Make Options:
- Add -j n where n is the number of threads used for compiling
- The GCC flag -dM will stop the compiler after the preprocessing pass and make it dump all #define
Usign Git-svn
Importing from svn
Import "mop" branch from revision N up to HEAD
$ git svn clone -rN https://simulationcraft.googlecode.com/svn/branches/mop <projectname>
$ cd <projectname>
$ git svn rebase
Import complete "mop" branch svn history - This may take a long time
$ git svn clone https://simulationcraft.googlecode.com/svn/branches/mop <projectname>
Import complete simc svn history - This will take a VERY LONG time Create new local branch 'simc_mop' from remote branch 'mop'
$ git svn clone --stdlayout https://simulationcraft.googlecode.com/svn <projectname>
$ git branch simc_mop refs/remotes/mop
$ git checkout simc_mop
Commiting changes
In git commiting a change is a local operation on your own repository, and hast nothing to do with the remote svn or git server. It is advised to ommit medium sized, grouped blocks of changes regularly and not to create one massive commit.
$ git commit -m <commit message>
Updating from the central svn repository
$ git svn rebase
If there are merge conflicts, solve them and add the conflicting files back to the git index with
$ git add <filename>
Continue with
$ git rebase --continue
to continue merging.
Pushing to the central svn repository
Please update your repository with 'git svn rebase' first!
$ git svn dcommit
hello creator...how to see the gear image ...its complicated by seing the code ...like "flamewakers_headguard,heroic=1,type=mail,ilevel=391,quality=epic,stats=2214armor_400agi_689sta_278crit_272haste,gems=agile_shadowspirit_20agi_20crit_30agi,enchant=60agi_35haste "