Convert /projectfles readme's to markdown

[skip ci]
This commit is contained in:
aquileia 2015-04-08 11:25:34 +02:00
parent e5814560be
commit aad3e0d1f0
4 changed files with 270 additions and 271 deletions

View File

@ -1,17 +1,16 @@
Compiling Wesnoth on Windows using CodeBlocks
---------------------------------------------
## Compiling Wesnoth on Windows using CodeBlocks
(Last tested using Wesnoth 1.11.7+ on Code::Blocks 12.11.)
1. Get a Wesnoth source tarball or Git repository clone. The folder which
contains the data/, projectfiles/, and src/ subfolders is referred to as
<wesnoth_root> in this file.
`wesnoth_root` in this file.
2. Install CodeBlocks from <http://www.codeblocks.org/>.
MinGW is not needed.
3. Install tdm-gcc-4.5.2 from <http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC Installer/Previous/1.1006.0/>.
Note that the project files in <wesnoth_root>/projectfiles/CodeBlocks/ may
3. Install tdm-gcc-4.5.2 from <http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.1006.0/>.
Note that the project files in `wesnoth_root/projectfiles/CodeBlocks/` may
contain a setting to compile with OpenMP support, so you should make sure
that this option is enabled while installing the compiler (mark the
checkbox for this when choosing components to install).
@ -22,20 +21,20 @@ Compiling Wesnoth on Windows using CodeBlocks
a 64-bit Wesnoth executable on Windows is currently not supported and will
fail with the SDK package provided in the next step.
4. Download the latest CodeBlocksWinSDK*.zip package from <http://sourceforge.net/projects/wesnoth/files/unofficial/Windows%20Compile%20Stuff/>.
4. Download the latest `CodeBlocksWinSDK*.zip` package from <http://sourceforge.net/projects/wesnoth/files/unofficial/Windows%20Compile%20Stuff/>.
The package contains the right version/build combination of source headers,
build-time libraries (*.a) and run-time libraries (*.dll) needed to build
build-time libraries (`*.a`) and run-time libraries (`*.dll`) needed to build
and run Wesnoth. Older versions of the package may no longer be useful
after new dependencies are added to Wesnoth or its version requirements
change.
Unpack the file to any path of your choice, which will be referred to as
<sdk_root> for the remainder of this file.
`sdk_root` for the remainder of this file.
The exact names of the folders containing the required files may vary; take
note of them for the next steps.
5. In CodeBlocks, open <wesnoth_root>/projectfiles/CodeBlocks/wesnoth.workspace.
5. In CodeBlocks, open `wesnoth_root/projectfiles/CodeBlocks/wesnoth.workspace`.
NOTE: The first time CodeBlocks is opened you will be asked to select a
compiler. If installation from step 3 is complete it may detect it for you,
@ -49,16 +48,14 @@ Compiling Wesnoth on Windows using CodeBlocks
* Compiler's installation directory: the path to which you installed
tdm-gcc-4.5.2 (click on ... to browse for it).
* C compiler, C++ compiler, Linker for dynamic libs: g++.exe
* Linker for static libs: ar.exe
7. Change to the Search directories -> Compiler tab and choose Add; enter the
path to <sdk_root>/include_tdm_gcc/.
path to `sdk_root/include_tdm_gcc/`.
8. Change to the Search directories -> Linker tab and choose Add; enter the
path to <sdk_root>/lib_tdm_gcc/.
path to `sdk_root/lib_tdm_gcc/`.
9. OPTIONAL: By default, CodeBlocks will only run one compiler instance at a
time, making the overall build process very slow even with fast hardware.
@ -70,7 +67,7 @@ Compiling Wesnoth on Windows using CodeBlocks
10. Close the settings dialog.
11. Choose the Build -> Build workspace option in the CodeBlocks menu. Once
finished, wesnoth.exe and wesnothd.exe should appear in <wesnoth_root>.
finished, wesnoth.exe and wesnothd.exe should appear in `wesnoth_root`.
12. To be able to run your build, copy all *.dll files from the <sdk_root>/dll/
folder to <wesnoth_root> where the *.exe files are.
12. To be able to run your build, copy all `*.dll` files from the `sdk_root/dll/`
folder to `wesnoth_root` where the `*.exe` files are.

248
projectfiles/VC9/README.md Normal file
View File

@ -0,0 +1,248 @@
## Compiling Wesnoth on Windows using Visual Studio
Please refer to the guide on wiki.wesnoth.org
http://wiki.wesnoth.org/CompilingWesnothOnWindows#Visual_Studio_2010_and_later
## Generating a .vcproject file using cmake
The Visual Studio project is manually updated by its maintainers, which basically
entails appending new source files as they are added to Wesnoth. Previously, it
was regenerated by cmake, for which a legacy script `msvc9-cmake.bat` exists:
1. make sure that git (formerly svn) command-line executable is in your %PATH%
2. for wesnoth 1.8 and early pre-1.9 versions: download
ftp://ftp.terraninfo.net/wesnoth/msvc9/external.zip (55mb download) and
unpack it into wesnoth's directory - so, there'll be an 'external'
folder in there.
3. for wesnoth 1.9: download
ftp://ftp.terraninfo.net/wesnoth/msvc9/external_19.zip (59mb download)
and unpack it into wesnoth's directory - so, there'll be an 'external'
folder in there.
4. install cmake http://www.cmake.org/cmake/resources/software.html and
put it into %PATH% (that can be done by the installer)
5. to allow the game to run, put full path to external/dll into %PATH%
6. run external/msvc9-cmake.bat
7. open generated project file in msvc9 and compile. the project should
pick up changes in cmake files automatically. Also, you can re-run the
.bat file to regenerate it.
## Building the prerequisites
We'll assume to have two *General Folders* for libraries and includes to store
most of the prerequisites. (Otherwise each configuration setting for each
project would need to have each and every 'lib' and 'include' folder added.)
`C:\projects\_include`
`C:\projects\_lib`
We'll now start downloading and compiling/copying the prerequisites into the necessary
folders, all version numbers are minimal requirements:
1. zlib-1.2.3 ( http://www.zlib.net/ )
Download the zlib source code
zlib123.zip
and unpack it into the projects folder to get:
`C:\projects\zlib123\`
Open the file zlib.dsw in the folder
`C:\projects\zlib123\projects\visualc6\`
with MSVC and select 'Yes To All' to convert it into a VC9 project.
Open the properties of the 'zlib' solution and in the
'Configuration Properties' select the 'DLL Release'
'Configuration'. Select 'OK' and then right-click the 'zlib'
project and select 'Build'. After a successful Build, close that
instance of MSVC.
2. libsdl-1.2.10 ( http://www.libsdl.org )
Download the development library file for Win32 as well as the
source code
SDL-1.2.10.zip
SDL-devel-1.2.10-VC8.zip
and unpack them into the projects folder to get:
`C:\projects\SDL-1.2.10\`
Copy the 'SDL.dll' and the 'SDL.lib' from the 'lib' folder
and the contents of 'include' folder into the corresponding
*General Folder* ( ...\_include\ resp. ...\_lib\ ).
Unpack the 'VisualC.zip' and open the 'SDL.sln' file with MSVC.
Follow the instructions to convert the project to VC9.
Right-click the 'SDLmain' project and select 'Build'. After a
successful Build, close that instance of MSVC.
Copy 'SDLmain.lib' from
`C:\projects\SDL-1.2.10\VisualC\SDLmain\Debug`
into the 'lib' *General Folder*.
3. libboost-1.48.0 ( http://www.boost.org/ )
Download Boost and unpack it into the folder
`C:\projects\`
This should give you a folder structure like
`C:\projects\boost_1_48_0\`
Download the pre-built bjam executable
boost-jam-3.1.17-1-ntx86.zip
from the bjam download page on sourceforge
http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=72941
and unpack and move the bjam executable it into the base folder
of boost
`C:\projects\boost_1_48_0\`
Now start the command prompt (CMD.exe) and invoke the following
commands:
```
C:\> set ZLIB_SOURCE=C:\projects\zlib123\
C:\> set ZLIB_LIBPATH=C:\projects\zlib123\projects\visualc6\Win32_DLL_Release
C:\> set ZLIB_BINARY=zlib1.dll
C:\> cd C:\projects\boost_1_48_0
C:\projects\boost_1_48_0> bjam ^
More? --toolset=msvc ^
More? --build-type=complete ^
More? --prefix="C:\projects\Boost\" install
```
If the upper last command doesn't work, replace the last line with:
```
--prefix="C:\projects\Boost" install
```
Now bjam will compile all variants of the boost library binaries
for MSVC 2008 and copies them into the folder
`C:\projects\Boost\lib\`
while all required headers are copied into
`C:\projects\Boost\include\boost-1_38\boost`
Use the time bjam is busy compiling (possibly several hours) as
you wish. (It is possible to continue downloading and copying
the include and lib files since all required compiling is done.)
Once bjam has finished building/copying, you then can delete
the folder
`C:\projects\boost_1_48_0\`
to free up space.
4. sdl-image-1.2 (with PNG support)
( http://www.libsdl.org/projects/SDL_image )
Download the binary file for Win32
SDL_image-devel-1.2.7-VC9.zip
and unpack it into the projects folder to get:
`C:\projects\SDL_image-1.2.7\`
Copy the contents of each the 'lib' and the 'include' folder
into the corresponding *General Folder*.
5. sdl-mixer-1.2.12 (with Vorbis support)
( http://www.libsdl.org/projects/SDL_mixer )
Download the binary file for Win32
SDL_mixer-devel-1.2.12-VC8.zip
and unpack it into the projects folder to get:
`C:\projects\SDL_mixer-1.2.12\`
Copy the contents of each the 'lib' and the 'include' folder
into the corresponding *General Folder*.
6. sdl-net-1.2 ( http://www.libsdl.org/projects/SDL_net )
Download the binary file for Win32
SDL_net-devel-1.2.7-VC8.zip
and unpack it into the projects folder to get:
`C:\projects\SDL_net-1.2.7\`
Copy the contents of each the 'lib' and the 'include' folder
into the corresponding *General Folder*.
7. sdl-ttf-2.0.8 ( http://www.libsdl.org/projects/SDL_ttf )
Download the binary file for Win32
SDL_ttf-devel-2.0.8-VC8.zip
and unpack it into the projects folder to get:
`C:\projects\SDL_ttf-2.0.8\`
Copy the contents of each the 'lib' and the 'include' folder
into the corresponding *General Folder*.
8. libintl-0.14.4
( http://gnuwin32.sourceforge.net/packages/gettext.htm )
Download the 'Binaries', 'Dependencies' and the
'Developer files'
gettext-0.14.4-bin.zip
gettext-0.14.4-dep.zip
gettext-0.14.4-lib.zip
and unpack them all into the projects folder to get:
`C:\projects\gettext-0.14.4\`
Copy the contents of each the 'lib' and the 'include' folder
into the corresponding *General Folder*.
Copy all dll's from the 'bin' folder into the '_lib'
*General Folder*.
9. libfontconfig-2.4.1
( http://www.gtk.org/download-windows.html )
Download the 'Fontconfig' package 'Binaries' from the
'Third Party Dependencies'
fontconfig-2.4.2-tml-20071015.zip
and unpack it into the projects folder to get:
`C:\projects\fontconfig-2.4.2\`
Copy the 'libfontconfig-1.dll' from the 'bin' folder into the
'lib' *General Folder*.
10. lua-5.1.4 ( http://luabinaries.luaforge.net/download.html )
Download the 'Windows x86 DLL and Includes (Visual C++ 2005
Compatible)'
lua5_1_4_Win32_dll8_lib.zip
and unpack it into the projects folder to get:
`C:\projects\lua-5.1.4\`
Copy the dll's and the lib's into the 'lib' *General Folder* and
the content of the 'include' folder into the corresponding
*General Folder*.
11. pangocairo-1.24.4 ( http://www.gtk.org/download-windows.html )
Download the following 'Binaryies' and 'Dev' packages from the
'GTK+ individual packages'
cairo_1.8.6-1_win32.zip
cairo-dev_1.8.6-1_win32.zip
glib_2.20.0-1_win32.zip
glib-dev_2.20.0-1_win32.zip
pango_1.24.0-1_win32.zip
pango-dev_1.24.0-1_win32.zip
and unpack them into the projects folder to get:
`C:\projects\pangocairo\`
Copy all dll's from the 'bin' folder into the '_lib'
*General Folder*.
Copy the contents (but not the subfolders) of the 'lib' folder
into the corresponding *General Folder*.
Copy the 'glibconfig.h' file from
`C:\projects\pangocairo\lib\glib-2.0\include` into the '_include'
*General Folder*.
Copy the contens (including subfolders) of the following folders
into the '_include' *General Folder*:
`C:\projects\pangocairo\include\cairo`
`C:\projects\pangocairo\include\glib-2.0`
`C:\projects\pangocairo\include\pango-1.0`

View File

@ -1,246 +0,0 @@
README.txt
==========
NEW WAY (updating the VC9 project file):
Please refer to the guide on wiki.wesnoth.org
http://wiki.wesnoth.org/CompilingWesnothOnWindows#Visual_Studio_2010_and_later
==========
OLD WAY (using cmake):
Wesnoth 1.9 (since r41888) and branches/1.8 (since r42011)
can be compiled using cmake+msvc9
1. make sure that git (formerly svn) command-line executable is in your %PATH%
2. for wesnoth 1.8 and early pre-1.9 versions: download
ftp://ftp.terraninfo.net/wesnoth/msvc9/external.zip (55mb download) and
unpack it into wesnoth's directory - so, there'll be an 'external'
folder in there.
3. for wesnoth 1.9: download
ftp://ftp.terraninfo.net/wesnoth/msvc9/external_19.zip (59mb download)
and unpack it into wesnoth's directory - so, there'll be an 'external'
folder in there.
4. install cmake http://www.cmake.org/cmake/resources/software.html and
put it into %PATH% (that can be done by the installer)
5. to allow the game to run, put full path to external/dll into %PATH%
6. run external/msvc9-cmake.bat
7. open generated project file in msvc9 and compile. the project should
pick up changes in cmake files automatically. Also, you can re-run the
.bat file to regenerate it.
==========
Building the prerequisites
We'll assume to have two 'General Folders' for libraries and includes to store
most of the prerequisites. (Otherwise each configuration setting for each
project would need to have each and every 'lib' and 'include' folder added.)
C:\projects\_include
C:\projects\_lib
We'll now start downloading and compiling/copying the prerequisites into the necessary folders:
1. >=zlib-1.2.3 ( http://www.zlib.net/ )
Download the zlib source code
zlib123.zip
and unpack it into the projects folder to get:
C:\projects\zlib123\
Open the file zlib.dsw in the folder
C:\projects\zlib123\projects\visualc6\
with MSVC and select 'Yes To All' to convert it into a VC9 project.
Open the properties of the 'zlib' solution and in the
'Configuration Properties' select the 'DLL Release'
'Configuration'. Select 'OK' and then right-click the 'zlib'
project and select 'Build'. After a successful Build, close that
instance of MSVC.
2. >=libsdl-1.2.7 ( http://www.libsdl.org )
Download the development library file for Win32 as well as the
source code
SDL-1.2.13.zip
SDL-devel-1.2.13-VC8.zip
and unpack them into the projects folder to get:
C:\projects\SDL-1.2.13\
Copy the 'SDL.dll' and the 'SDL.lib' from the 'lib' folder
and the contents of 'include' folder into the corresponding
'General Folder' ( ...\_include\ resp. ...\_lib\ ).
Unpack the 'VisualC.zip' and open the 'SDL.sln' file with MSVC.
Follow the instructions to convert the project to VC9.
Right-click the 'SDLmain' project and select 'Build'. After a
successful Build, close that instance of MSVC.
Copy 'SDLmain.lib' from
C:\projects\SDL-1.2.13\VisualC\SDLmain\Debug
into the 'lib' 'General Folder'.
3. >=libboost-1.33.0 ( http://www.boost.org/ )
Download Boost and unpack it into the folder
C:\projects\
This should give you a folder structure like
C:\projects\boost_1_38_0\
Download the pre-built bjam executable
boost-jam-3.1.17-1-ntx86.zip
from the bjam download page on sourceforge
http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=72941
and unpack and move the bjam executable it into the base folder
of boost
C:\projects\boost_1_38_0\
Now start the command prompt (CMD.exe) and invoke the following
commands:
C:\> set ZLIB_SOURCE=C:\projects\zlib123\
C:\> set ZLIB_LIBPATH=C:\projects\zlib123\projects\visualc6\Win32_DLL_Release
C:\> set ZLIB_BINARY=zlib1.dll
C:\> cd C:\projects\boost_1_38_0
C:\projects\boost_1_38_0> bjam ^
More? --toolset=msvc ^
More? --build-type=complete ^
More? --prefix="C:\projects\Boost\" install
If the upper last command doesn't work, replace the last line with:
--prefix="C:\projects\Boost" install
Now bjam will compile all variants of the boost library binaries
for MSVC 2008 and copies them into the folder
C:\projects\Boost\lib\
while all required headers are copied into
C:\projects\Boost\include\boost-1_38\boost
Use the time bjam is busy compiling (possibly several hours) as
you wish. (It is possible to continue downloading and copying
the include and lib files since all required compiling is done.)
Once bjam has finished building/copying, you then can delete
the folder
C:\projects\boost_1_38_0\
to free up space.
4. >=sdl-image-1.2 (with PNG support)
( http://www.libsdl.org/projects/SDL_image )
Download the binary file for Win32
SDL_image-devel-1.2.7-VC9.zip
and unpack it into the projects folder to get:
C:\projects\SDL_image-1.2.7\
Copy the contents of each the 'lib' and the 'include' folder
into the corresponding 'General Folder'.
5. >=sdl-mixer-1.2 (with Vorbis support)
( http://www.libsdl.org/projects/SDL_mixer )
Download the binary file for Win32
SDL_mixer-devel-1.2.8-VC8.zip
and unpack it into the projects folder to get:
C:\projects\SDL_mixer-1.2.8\
Copy the contents of each the 'lib' and the 'include' folder
into the corresponding 'General Folder'.
6. >=sdl-net-1.2 ( http://www.libsdl.org/projects/SDL_net )
Download the binary file for Win32
SDL_net-devel-1.2.7-VC8.zip
and unpack it into the projects folder to get:
C:\projects\SDL_net-1.2.7\
Copy the contents of each the 'lib' and the 'include' folder
into the corresponding 'General Folder'.
7. >=sdl-ttf-2.0.8 ( http://www.libsdl.org/projects/SDL_ttf )
Download the binary file for Win32
SDL_ttf-devel-2.0.9-VC8.zip
and unpack it into the projects folder to get:
C:\projects\SDL_ttf-2.0.9\
Copy the contents of each the 'lib' and the 'include' folder
into the corresponding 'General Folder'.
8. >=libintl-0.14.4
( http://gnuwin32.sourceforge.net/packages/gettext.htm )
Download the 'Binaries', 'Dependencies' and the
'Developer files'
gettext-0.14.4-bin.zip
gettext-0.14.4-dep.zip
gettext-0.14.4-lib.zip
and unpack them all into the projects folder to get:
C:\projects\gettext-0.14.4\
Copy the contents of each the 'lib' and the 'include' folder
into the corresponding 'General Folder'.
Copy all dll's from the 'bin' folder into the '_lib'
'General Folder'.
9. >=libfontconfig-2.4.1
( http://www.gtk.org/download-windows.html )
Download the 'Fontconfig' package 'Binaries' from the
'Third Party Dependencies'
fontconfig-2.4.2-tml-20071015.zip
and unpack it into the projects folder to get:
C:\projects\fontconfig-2.4.2\
Copy the 'libfontconfig-1.dll' from the 'bin' folder into the
'lib' 'General Folder'.
10. >=lua-5.1.4 ( http://luabinaries.luaforge.net/download.html )
Download the 'Windows x86 DLL and Includes (Visual C++ 2005
Compatible)'
lua5_1_4_Win32_dll8_lib.zip
and unpack it into the projects folder to get:
C:\projects\lua-5.1.4\
Copy the dll's and the lib's into the 'lib' 'General Folder' and
the content of the 'include' folder into the corresponding '
General Folder'.
11. >=pangocairo-1.24.4 ( http://www.gtk.org/download-windows.html )
Download the following 'Binaryies' and 'Dev' packages from the
'GTK+ individual packages'
cairo_1.8.6-1_win32.zip
cairo-dev_1.8.6-1_win32.zip
glib_2.20.0-1_win32.zip
glib-dev_2.20.0-1_win32.zip
pango_1.24.0-1_win32.zip
pango-dev_1.24.0-1_win32.zip
and unpack them into the projects folder to get:
C:\projects\pangocairo\
Copy all dll's from the 'bin' folder into the '_lib'
'General Folder'.
Copy the contents (but not the subfolders) of the 'lib' folder
into the corresponding 'General Folder'.
Copy the 'glibconfig.h' file from
C:\projects\pangocairo\lib\glib-2.0\include into the '_include'
'General Folder'.
Copy the contens (including subfolders) of the following folders
into the '_include' 'General Folder':
C:\projects\pangocairo\include\cairo
C:\projects\pangocairo\include\glib-2.0
C:\projects\pangocairo\include\pango-1.0

View File

@ -1,6 +1,6 @@
--- Building with Xcode ---
## Building with Xcode
-- Requirements --
### Requirements
* Xcode 3.0+
* Mac OS X 10.5+ (required by Xcode 3.0)
* scons and gettext-tools (if you want to compile translations)
@ -8,10 +8,10 @@
* The Headers and lib folders, which can be found in the newest zip here:
https://sourceforge.net/downloads/wesnoth/unofficial/Mac%20Compile%20Stuff/
Once you download the zip, unzip it and move "Headers" and "lib" into the same folder as the Xcode project.
Once you download the zip, unzip it and move `Headers` and `lib` into the same folder as the Xcode project.
-- Targets --
### Targets
- Wesnoth:
Builds the actual game, depends on wesnothd. If you don't want to build wesnothd, get info on the Wesnoth target, go to the General tab, and remove wesnothd from its dependencies.
@ -23,7 +23,7 @@ Builds the multiplayer server. The MP server is needed for hosting a local MP se
Builds the unit tests, but probably doesn't work currently. If it does build, there's still no good way to run it.
-- Configurations --
### Configurations
- Release:
Builds for maximum (runtime) speed and compatibility; it builds for PPC and i386 (Intel), and with the 10.4 SDK, and targets 10.4. Consequently, you need 10.4 to build it. This is what's used for official releases.
@ -32,12 +32,12 @@ Builds for maximum (runtime) speed and compatibility; it builds for PPC and i386
Builds for maximum compiling speed, and uses the current OS as the SDK. If you just want to compile for testing things yourself, this is the way to go.
-- Translations --
### Translations
To compile translations you need gettext-tools and scons. In the Terminal, cd to the Wesnoth root directory, and run "scons translations". This will compile all the translations into a translations directory, and then you can move this into Wesnoth.app/Contents/Resources/ to use it.
To compile translations you need `gettext-tools` and `scons`. In the Terminal, `cd` to the Wesnoth root directory, and run `scons translations`. This will compile all the translations into a translations directory, and then you can move this into `Wesnoth.app/Contents/Resources/` to use it.
-- Packaging --
### Packaging
* Update version numbers in Info.plist
* Update the changelog in SDLMain.nib with player_changelog