forked from po-devs/pokemon-online
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathHowToBuild.txt
82 lines (63 loc) · 3.72 KB
/
HowToBuild.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---- How to build ----
Prerequisites:
- Qt SDK, version 4.5 or newer. Currently, version 4.8.2 recommended.
Get it from http://qt.nokia.com
- C++ compiler which manages new C++0x stuff. GCC 4.5+ required.
- libzip installation. Windows .dll is included, others can download
from http://www.nih.at/libzip/
- libqrencode is required for QRCodePlugin (po_clientplugins)
- Optional: git for updating the source
- Optional: Shaders plugin for QML for the new battle window.
Homepage: https://qt.gitorious.org/qt-labs/qml1-shadersplugin
Platform specific notes:
- For Windows, mingw 4.5 that comes from Qt SDK download is good.
- For Mac, you need to get newer GCC from Macports or some other place.
Apple default Clang/GCC 4.2 does not support compiling PO.
Furthermore, this requires you to heavily modify .pro files
or make yourself new mkspecs for qmake to take advantage of the new compiler.
- Linux users can get most of these from package repository.
For Ubuntu:
$ sudo apt-get install libzip-dev qt4-dev-tools qt4-qmake libqt4-declarative-shaders
should pull most of the dependencies
Building:
There are two ways.
* You can use Qt Creator and add individual modules to the Qt Creator session.
Use File -> Open Project File to add these.
Required modules for building the client are:
src/Utilities src/PokemonInfo src/BattleManager src/Teambuilder
Required modules for building the server are
src/Utilities src/PokemonInfo src/Server
Inside Qt Creator just hit Build button to compile projects.
* Command line users can issue following commands from the root director of Pokemon Online:
qmake && make
By default this builds only client. There are several configure flags to be passed for qmake
to configure the build.
"CONFIG += po_client": Builds the client (the default)
"CONFIG += po_server": Builds the server.
"CONFIG += po_clientplugins": Build CSSChanger, QRCodePlugin and ThemeManager as client plugins.
"CONFIG += po_serverplugins": Build UsageStatistics and BattleLogs as server plugins.
Also BattleManager is build as dependency of BattleLogs and
StatsExtracter to actually generate stats from Usage Statistics.
"CONFIG += po_all": Builds everything mentioned above.
"CONFIG += shadow": Builds in shadow directory, for use with Release / Debug builds.
Building and be configured by selecting qmakespec with -spec <specname> or configuring
src/Shared/Common.pri, which is included in all mentioned modules.
Example for building the client for Mac using shadow build and custom mkspecs,
including debug information:
qmake -spec macx-g++0x "CONFIG += po_client po_clientplugins shadow debug" && make
Run make clean if you want to clean the source tree (after running qmake at least once).
Running:
* On Windows, Qt Creator can launch the project by pressing F5.
If you want to launch outside Qt Creator you need to add all dependency libs to PATH
or to the same path as Pokemon-Online.exe
* On Mac the resulting binary in bundled as Mac application.
Run bin/bundle_mac_app.sh to copy resources inside before opening Pokemon-Online.app
* On Linux you probably need to set LD_LIBRARY_PATH to include bin/ as some shared objects
are there. Or you can just use start-client and start-server scripts which set it for you.
Additional resources available at Pokemon Online forums.
Relevant forums sections:
http://pokemon-online.eu/forums/forumdisplay.php?6-General
http://pokemon-online.eu/forums/forumdisplay.php?7-Developer-s-Den
http://pokemon-online.eu/forums/forumdisplay.php?16-Help
Somewhat outdated help thread for Windows users:
http://pokemon-online.eu/forums/showthread.php?2666-How-to-run-from-the-source-on-Windows