summaryrefslogtreecommitdiffstats
path: root/HOWTO.txt
blob: 0dfb59374f876bc14d81d8a96ddb40057596b1bb (plain)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
EN

How to...

1. Compile the game.

 1.1 Windows:

  NOTE: currently, there are some issues when compiling on Windows, connected mostly with
        clashing macros defined in windows headers. Most probably, a special development package
        will be provided, which will include MinGW, CMake and all necessary libraries.

  1. Download and install MinGW and MSYS:
      http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/mingw-get-inst-20111118/
     When installing, select all available components.
  2. Download and install CMake:
      http://www.cmake.org/cmake/resources/software.html (the Windows zip file)
     Unpack the contents of the archive to where MinGW is installed (files from bin/ should go into bin/, etc.)
  3. Download the following libraries, installing them in your MinGW directory like with CMake:
     SDL >=1.2.10, SDL_imgage >= 1.2, SDL_ttf >= 2.0, libpng >= 1.2, GLEW >= 1.8.0, Boost >= 1.51 (with filesystem)
     Note #1: For most libraries, you can download binary packages with compiled files.
              However, you must ensure that they work with MinGW as some are built with MSVC
              and may be incompatible. If that is the case, you should compile the libraries from sources
              using MinGW.
     Note #2: For GLEW, you need to compile from source under MinGW. Since there is no automated
              make script for that, follow the instructions here: http://stackoverflow.com/questions/6005076/
  4. Run MinGW console from the shortcut in menu start.
  5. Change to the directory where you have the Colobot sources by typing "cd /c/where/the/sources/are"
  6. Type "cmake -G 'MSYS Makefiles' ."
  7. Type "make"
  8. Everything should compile without errors.

 1.2 Linux:

  Since you're running Linux, you probably know how to do this anyway ;)
  But just in case, here's what you need:
    gcc compiler (with gcc-g++), cmake, libraries with header files: SDL, SDL_image, SDL_ttf, libpng
  Instructions are the same:
    $ cmake .
    $ make

  Note: If you experience problems with OpenGL's extensions, install GLEW library and enable
        it in compilation by setting USE_GLEW to 1 in CMakeLists.txt

 1.3 Other platforms, compilers, etc.

   We haven't checked other platforms yet but the code isn't particularly tied to any compiler or platform, so in theory it should work.
   If you can, please try to compile the code on your platform and let us know how it goes.

2. Run the compiled game.

  1. Download development data package - make sure you get the latest version as the files will be changed/moved around.
     Currently the files are hosted at: http://colobot.info/files  (packages are named colobot-data-YYYY-MM-DD.zip)
  2. Unpack the data package to any place you want.
  3. Run the game with commandline option "-datadir where_you_put_the_data_dir" and enjoy the game.


PL

Jak...

1. Skompilować grę.

 1.1 Windows:

  UWAGA: obecnie występują problemy z kompilacją na Windowsie, głównie ze względu na konflikt w makrach,
         jakie definiują nagłówki windowsowe. Najprawdopodobniej, zostanie wydana specjalna paczka
         dla developerów, która będzie zawierała MinGW, CMake i wszystkie potrzebne biblioteki.

  1. Ściągamy i instalujemy MinGW i MSYS:
     http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/mingw-get-inst-20111118/
     Przy instalacji zaznaczamy wszystkie komponenty do instalacji.
  2. Ściągamy i instalujemy CMake:
     http://www.cmake.org/cmake/resources/software.html (plik zip dla Windowsa)
     Zip rozpakowujemy do katalogu, gdzie zainstalowany jest MinGW (pliki z bin/ mają trafić do bin/ itd.).
  3. Ścągamy następujące biblioteki i instalujemy je tam, gdzie MinGW, podobnie jak z CMake:
     SDL >= 1.2.10, SDL_image >= 1.2, SDL_ttf >= 2.0, libpng >= 1.2, Boost >= 1.51 (wraz z filesystem)
     Uwaga #1: W większości wymienionych bibliotek można ściągnąć paczki binarne ze skompilowanymi plikami.
               Jednak musisz się upewnić, że pliki te będą współpracowały z MinGW, bo część z nich
               jest kompilowana MSVC i może być niezgodna. W takim wypadku, musisz skompilować bibliotekę
               ze źródeł pod MinGW.

     Uwaga #2: W przypadku GLEW, musisz skompilować bibiotekę ze źródeł pod MinGW. Ponieważ nie ma skryptu
               make do tego, użyj poleceń opisanych tutaj: http://stackoverflow.com/questions/6005076/
  4. Uruchamiamy MinGW console ze skrótu w menu start.
  5. Przechodzimy do katalogu, gdzie są źródła wpisując "cd /c/tam/gdzie/sa/zrodla"
  6. Wpisujemy "cmake -G 'MSYS Makefiles' ."
  7. Wpisujemy "make"
  8. Wszystko powinno się skomplikować bez błędów.

 1.2 Linux:

  Skoro już masz Linuksa, to prawdpobodobnie wiesz co robić ;)
  Ale na wszelki wypadek, potrzebujesz tego:
    kompilator gcc (razem z gcc-g++), cmake, biblioteki wraz z nagłówkami: SDL, SDL_image, SDL_ttf, libpng
  Polecenia są takie same:
    $ cmake .
    $ make

  Uwaga: Jeśli natrafisz na problemy z rozszerzeniami OpenGL, zainstaluj bibliotekę GLEW i włącz ją
         przy kompilacji, ustawiając USE_GLEW na 1 w CMakeLists.txt

 1.3 Inne platformy, kompilatory, etc.

   Nie sprawdzaliśmy jeszcze innych platform, ale kod nie jest jakoś specjalnie związany z danym kompilatorem czy platformą, więc w teorii powinien zadziałać.
   Jeśli możesz, spróbuj skompilować kod na twojej platformie i daj nam znać jak poszło.

2. Uruchomić skompilowaną grę.

  1. Ściągamy paczkę developerską z plikami danych gry - upewnij się, że jest to najnowsza wersja, bo pliki będą zmieniane/przenoszone.
  2. Wypakowujemy pliki gdziekolwiek.
  3. Uruchamiamy grę wraz z opcją "-datadir tam_gdzie_rozpakowałeś_paczkę" i cieszymy się grą.