Patching GHost
From CodeLain GHost++ Community Wiki
Contents |
Windows Users
Preparation
Make sure that you have the .patch file you want to apply ready to go and waiting on the desktop. Once you do, you will need to download 2 more things, both of which are free:
1) Tortoise SVN
2) Microsoft's Visual Studio 2008 C++ Express Edition
Step-by-Step instructions
SVN Checkout
Before you can apply the .patch file, you will need to do an SVN Checkout of GHost++/GHost CB. You will need to have Tortoise SVN installed in order to do this.
1) Create a new folder on your desktop and name it whatever you want.
2) Right-click the folder -> click SVN Checkout...
3) Depending on if you want to apply the patch to GHost++ or GHost CB, this step varies.
For GHost++ - In the URL of repository: put http://ghostplusplus.googlecode.com/svn/trunk/ For GHost CB - In the URL of repository put http://ghostcb.googlecode.com/svn/trunk/
Please note, due to the fact that the GHostOne SVN has been closed you can not do this step for GHostOne. You can try to download another instance of GHostOne via .zip or through the Installer instead.
Applying the .patch
In this guide, we will be using the !FF Patch.patch created by Kampfhamster91 from codelain.com/forum. Please note that this guide will work for any other .patch file.
1) Right-click the folder that you did the SVN Checkout on -> click Tortoise SVN - > click Apply Patch 2) Once prompted, locate and click on the !FF Patch.patch file -> click OK 3) Two new windows should appear, one smaller and one larger. Right click on the smaller one -> click Patch All 4) Close the Tortoise Merge window.
Compiling patched ghost.exe
Now that we have applied the patch changes to the source code of our GHost++, we need to compile it in order to get a new GHost.exe. This step is very similar to the Modifiying ghost.exe wiki page but with a few exceptions.
You will need to have Microsoft's Visual Studio 2008 C++ Express Edition installed before continuing.
1) Turn on file extension viewing:
a) In Windows XP, open any folder and go to Tools --> Folder Options.. --> Click the View tab, and ensure that Hide extensions for known file types is unchecked.
b) In Windows Vista, open any folder and click Organize --> Folder and Search Options --> Click the View tab, and ensure that Hide extensions for known file types is unchecked.
2) Go to the SVN folder in which you did the checkout. In that main folder, open the ghost.sln file with the Microsoft VS C++ 2008 compiler.
3) Download the boost header library from boost.org 1.38 Libraries. Extract it somewhere. For example to "C:\", i.e now the library is in "C:\boost_1_38_0\boost". Now open the start menu and navigate there to "Visual C++ 2008 Express Edition" and then to "Visual Studio Tools" and run Visual Studio 2008 Command Prompt. This should have opened a new command prompt. In the command prompt change the directory to the boost directory, for example if you extracted it in "C:\boost_1_38_0\boost", you would do "cd C:\boost_1_38_0\boost\". Now type ".\bootstrap" and hit enter. It should tell you it is building the Boost.Jam engine. After that is completed, type ".\bjam" and hit enter. This will take a while, but it will compile the boost libraries that you need.
Back in Visual Studio, at the top of the screen you have your standard menu, with headings File - Edit - View - Project - Build - Debug - Tools - Window - Help
Go to Tools -> Options -> Projects and Solutions (click the triangle to expand it and click)-> VC++ Directories. In the top right corner, there is an option called Show directories for:. Select Include files from the drop-down list. Now add the path to the boost folder, removing the boost folder from the path. If you did what was suggested, you would put C:\boost_1_38_0. Visual Studio will automatically look for a boost folder inside the boost_1_38_0 folder when you compile, and it will now work.
Click Ok to close the Options menu.
4) Download the precompiled headers here. Unzip the contents of this archive to the "boost\lib\" subdirectory of the folder in which you did the SVN Checkout. Visual C++ will automatically link to them when you compile.
5) At the top of the screen you have your standard menu, with headings File - Edit - View - Project - Build - Debug - Tools - Window - Help
Go to Build -> Configuration Manager.. and the Active solution configuration is probably set to Debug, change that to Release MySQL. Click Close. Press F7 to compile it to GHost.exe. When it is done you will find a Ghost.exe in a folder called Release which is found in the same directory where Ghost.sln was (ex. Ghost\Ghost.sln & GHost\Release\Ghost.exe)
6) Take the Ghost.exe from the Release folder and put it in place of Ghost.exe wherever your original Ghost folder is.
Linux Users
Sorry, there is no current info available on this.