diff options
author | Darkvater <darkvater@openttd.org> | 2006-12-29 00:06:31 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-12-29 00:06:31 +0000 |
commit | 88eb5014ce2b87e7428af33ee04e4b3efee17591 (patch) | |
tree | f5d230510337d060949e4550b203a47c69b53d36 | |
parent | 6b572f1e1ffea489651e57026a53af838fe2c687 (diff) | |
download | openttd-88eb5014ce2b87e7428af33ee04e4b3efee17591.tar.xz |
(svn r7605) -Update documentation of MSVC and strgen in docs/ dir and remove directmusic.txt
-rw-r--r-- | docs/HOWTO_compile_lang_files.txt | 59 | ||||
-rw-r--r-- | docs/Howto_compile_lng_files_from_CLI.txt | 34 | ||||
-rw-r--r-- | docs/Readme_Windows_MSVC.txt | 158 | ||||
-rw-r--r-- | docs/directmusic.txt | 20 |
4 files changed, 140 insertions, 131 deletions
diff --git a/docs/HOWTO_compile_lang_files.txt b/docs/HOWTO_compile_lang_files.txt new file mode 100644 index 000000000..101e50b02 --- /dev/null +++ b/docs/HOWTO_compile_lang_files.txt @@ -0,0 +1,59 @@ +STRGEN USAGE +------------ +This guide is only interesting for people who want to alter something +themselves without access to WT2 (translator2.openttd.org). Please note that +your compiled language file will only be compatible with the OpenTTD version +you have downloaded english.txt, the master language file, for. While this is +not always true, namely when changes in the code have not touched language +files, your safest bet is to assume this 'limitation'. +As a first step you need to compile strgen. This is as easy as typing +'make strgen'. You can also download a precompiled binary from a release, +nightly, etc. +strgen takes as argument a txt file and translates it to a lng file, allowing +it to be used inside OpenTTD. strgen needs the master language file +english.txt to work. Below are some examples of strgen usage. + +EXAMPLES +-------- +Example 1: +if you are in the root of your working copy (svn code), you should type +strgen/strgen -s lang lang/english.txt +to compile englist.txt into english.lng. It will be placed in the lang dir + +Example 2: +you only have the strgen executable (no working copy) and you want to compile +a txt file in the same directory. You should type +./strgen english.txt +and you will get and english.lng in the same dir + +Example 3: +you have strgen somewhere, english.txt in /usr/openttd/lang and you want the +resulting language file to go to /tmp. Use +./strgen -s /usr/openttd/lang -d /tmp english.txt + +You can interchange english.txt to whichever language you want to generate a +.lng file for. + +STRGEN COMMAND SWITCHES +----------------------- +-v | --version +strgen will tell what svn revision it was last modified + +-t | --todo +strgen will add <TODO> to any untranslated/missing strings and use the english +strings while compiling the language file + +-w | --warning +strgen will print any missing strings or wrongly translated (bad format) +to standard error output(stderr) + +-h | --help | -? +Print out a summarized help message explaining these switches + +-s | --source_dir +strgen will search for the master file english.txt in the directory specified +by this switch instead of the current directory + +-d | --dest_dir +strgen will put <language>.lng in the directory specified by this switch; if +no dest_dir is given, output is the same as source_dir diff --git a/docs/Howto_compile_lng_files_from_CLI.txt b/docs/Howto_compile_lng_files_from_CLI.txt deleted file mode 100644 index afeee7d29..000000000 --- a/docs/Howto_compile_lng_files_from_CLI.txt +++ /dev/null @@ -1,34 +0,0 @@ -This is a guide to compile strgen on gcc - -All this is done in the makefile, so it's only interesting for people, who wants to alter something themselves (translators) - -HOWTO compile lng files: - -First you get strgen compiled (look below/download nightly build/run makefile) - -strgen takes the argument of a txt file and translates it to a lng file and places that lng file in the same dir as the txt file. - -Example 1: -if you are in the root of your working copy (svn code), you should type -strgen/strgen lang/english.txt -to compile englist.lng. It will be placed in the lang dir - -Example 2: -you have strgen but not the source and you want to compile a txt file in the same dir. YOu should type -./strgen english.txt -and you will get english.lng in the same dir - -You can change english to whatever language you want - -Commands used by strgen - --v --version -strgen will tell what svn revision it is based on - --t -strgen will add <TODO> to the missing strings and use the english strings while compiling -this will need english.txt to be present - --w -strgen will print any missing strings to standard error output(stderr) -this will need english.txt to be present diff --git a/docs/Readme_Windows_MSVC.txt b/docs/Readme_Windows_MSVC.txt index 91514f38a..7b7ec490f 100644 --- a/docs/Readme_Windows_MSVC.txt +++ b/docs/Readme_Windows_MSVC.txt @@ -1,104 +1,108 @@ -Compiling OpenTTD using Microsoft Visual C++ 6.0 - - -Step 1: Ingredients - +Compiling OpenTTD using Microsoft Visual C++ +December 28, 2006 +-------------------------------------------- +PLEASE READ THE ENTIRE DOCUMENT BEFORE DOING ANY ACTUAL CHANGES!! + +SUPPORTED MSVC COMPILERS +------------------------ +OpenTTD includes projects for MSVC 2003.NET and MSVC 2005.NET. Both will +compile out of the box, providing you have the required libraries/headers; +which ones, see below. There is no support for VS6, you are therefore +strongly encouraged to either upgrade to MSVC 2005 Express (free) or use GCC. +MSVC 2002 probably works as well, but it has not been tested. + +1) REQUIRED FILES +----------------- +You might already have some of the files already installed, so check before +downloading; mostly because the DirectX SDK and Platform SDK are about +500MB each. Download the following files: - * Openttd-useful.zip (http://sourceforge.net/project/showfiles.php?group_id=103924&package_id=114307&release_id=228633) - * DirectX 8.1 SDK (http://neuron.tuke.sk/~mizanin/eng/Dx81sdk-include-lib.rar) (or alternatively the latest DirectX SDK from Microsoft) - * The February 2003 Microsoft Platform SDK (http://www.microsoft.com/msdownload/platformsdk/sdkupdate/XPSP2FULLInstall.htm) (newer SDK's do not work with MSVC6) - * afxres.h (http://www-d0.fnal.gov/d0dist/dist/packages/d0ve/devel/windows/AFXRES.H) (maybe you not need this) + * openttd-useful.zip (http://sf.net/project/showfiles.php?group_id=103924&package_id=114307) + * DirectX 8.1 SDK (http://neuron.tuke.sk/~mizanin/eng/Dx81sdk-include-lib.rar) (or alternatively the latest DirectX SDK from Microsoft) + * MS Windows Platform SDK (http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en) + * afxres.h (http://www-d0.fnal.gov/d0dist/dist/packages/d0ve/devel/windows/AFXRES.H) ...and of course the newest source from svn://svn.openttd.org/trunk -You have to have a SVN-client to download the source: - - * Command line version (Subversion 1.2.3 Win32 binaries) (http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91) - * GUI TortoiseSVN (http://tortoisesvn.tigris.org/download.html) - -Step 2: Includes and Libraries - -Put the newly downloaded files in the VC lib and include directories (Where "C:\Program Files\Microsoft Visual Studio\VC98" is your local location of VC) - - - * zconf.h [useful.zip] - * zlib.h [useful.zip] - * png.h [useful.zip] - * pngconf.h [useful.zip] - * afxres.h - -in - - C:\Program Files\Microsoft Visual Studio\VC98\Include - -and - - * zlibstat.lib [useful.zip] - * libpng.lib [useful.zip] - -in +You need an SVN-client to download the source from subversion: - C:\Program Files\Microsoft Visual Studio\VC98\Lib + * CLI Subversion (http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91) + * GUI TortoiseSVN (http://tortoisesvn.tigris.org/download.html) +2) INCLUDES AND LIBRARIES +------------------------- +Put the newly downloaded files in the VC lib\ and include\ directories; where +"C:\Program Files\Microsoft Visual Studio 8\VC" is your location of Visual C. +If you are compiling for an x64 system, use the include\ and lib\ directories +from the win64/ folder. -Step 3: DirectX SDK + * openttd-useful.zip\include\* + * afxresh.h + to > C:\Program Files\Microsoft Visual Studio 8\VC\Include -(This should work with the latest DirectX SDK as well.) + * openttd-useful.zip\lib\* + to > C:\Program Files\Microsoft Visual Studio 8\VC\Lib -There are 2 folder in the compressed file: Include and Lib +Custom directories might be recommended, check 2.2) -Copy all files from Include folder to -C:\Program Files\Microsoft Visual Studio\VC98\Include +2.1) INCLUDES AND LIBRARIES - DIRECTX/PLATFORM SDK +-------------------------------------------------- +Basically the same procedure as with the useful zip file, providing +you are not using the Microsoft installer. Put the include files in the +include\ directory and the library files to the Lib\ directory. -and all files from Lib folder to +It is recommended to use custom directories so you don't overwrite any +default header or library files. -C:\Program Files\Microsoft Visual Studio\VC98\Lib +2.2) CUSTOM DIRECTORIES +----------------------- +If you have put the above include and/or library files into custom folders, +MSVC will not find them by default. You need to add these paths to VC through: +Tools > Options > Projects and Solutions > VC++ Directories > show directories for + * Include files: Add the DirectX/Platform SDK include dir you've created + * Library files: Add the path to the SDK custom lib dir -You can also make custom directories, which is recommended so you don't overwrite VS6 files, for libraries (.lib) and includes/header files (.h) and add it to the VC paths via: - -Tools -> Options -> Directories -> show directories for: - -a) include files (the include dir: C:\Program Files\Microsoft Visual Studio\VC98\DirectX 8.1 SDK\include ) - -b) library files (the lib dir, C:\Program Files\Microsoft Visual Studio\VC98\DirectX 8.1 SDK\lib ) - -NOTE: make sure that the directory for the DirectX SDK is the first one in the list, above all others, otherwise compilation will most likely fail!! - -Step 4: TTD Graphics files +NOTE: make sure that the directory for the DirectX SDK is the first one in the +list, above all others, otherwise compilation will most likely fail!! +3) TTD GRAPHICS FILES +--------------------- Copy the following files from Transport Tycoon Deluxe to the data folder - * sample.cat - * trg1r.grf - * trgcr.grf - * trghr.grf - * trgir.grf - * trgtr.grf - + * sample.cat + * trg1r.grf + * trgcr.grf + * trghr.grf + * trgir.grf + * trgtr.grf -Step 5: Compiling - -Open trunk/openttd.dsw - -Build menu > Set active configuration > Select: "openttd - Win32 Release" +4) COMPILING +------------ +Open trunk/openttd[_vs80].sln +Set the build mode to 'Release' in +Build > Configuration manager > Active solution configuration > select "Release" Compile... +If everything works well the binary should be in trunk/Release/openttd.exe -Now it should work, it worked for me :) - -From r1319 you can compile branch/map in Debug mode (by Bociusz) - -For compiling branch/cargo-packets you have to add cargo.c and .h to this tree's openttd.dsp - -If it's not working, and you checked that you using the newest SVN (!) report to Bociusz on IRC (irc://irc.freenode.net/openttd) - -Go ahead and make that patch! Happy Hacking! :) +5) EDITING, CHANGING SOURCE CODE +-------------------------------- +Set the build mode (back to) 'Debug' +Change the startup project to openttd by right-clicking the 'openttd' project +in the Solution Explorer and selecting 'Set as Startup Project'. The 'openttd' +project should now show up bold instead of 'strgen'. -Originally written by Dribbel +6) PROBLEMS? +------------ +If compilation fails, double-check that you are using the latest SVN (!) +source. If it still doesn't work, check in on IRC (irc://irc.oftc.net/openttd), +to ask about reasons; or just wait. The problem will most likely solve itself +within a few days as the problem is noticed and fixed. -Project file updating by Bociusz +An up-to-date version of this README can be found on the wiki: +http://wiki.openttd.org/index.php/MicrosoftVisualCExpress
\ No newline at end of file diff --git a/docs/directmusic.txt b/docs/directmusic.txt deleted file mode 100644 index c64b6cbaa..000000000 --- a/docs/directmusic.txt +++ /dev/null @@ -1,20 +0,0 @@ -Notes about DirectMusic driver for Win32 ----------------------------------------- - -If compiling under MinGW32, you require the DirectX 7.0 files for MinGW32, available from -http://alleg.sourceforge.net/files/dx70_mgw.zip. - -If compiling under MSVC 6.0, you require the equivalent for MSVC, available from -http://alleg.sourceforge.net/files/dx70_min.zip. MSVC 7.0/7.1 include header files that -are recent enough. - -If you do not want to compile the DirectMusic driver, undefine WIN32_ENABLE_DIRECTMUSIC_SUPPORT -in stdafx.h. - -Bugs, etc ---------- - -- The volume control doesn't work properly. I'll fix this soon. - -Owen Rudge -14th March 2004 |