HedgeroidGuide.wiki
changeset 158 3c2429fd0b51
parent 122 8a5eb06794eb
child 159 b9af15388627
equal deleted inserted replaced
157:90dd08518805 158:3c2429fd0b51
    12 * [http://developer.android.com/sdk/index.html Android SDK] (Latest version will do)<br>
    12 * [http://developer.android.com/sdk/index.html Android SDK] (Latest version will do)<br>
    13 * [http://developer.android.com/sdk/ndk/index.html Android NDK] (current version is r5b but anything up will probably work)<br>
    13 * [http://developer.android.com/sdk/ndk/index.html Android NDK] (current version is r5b but anything up will probably work)<br>
    14 * [http://freepascal.org/down/source/sources.var FreePascal] (Latest (stable) version will do)<br>
    14 * [http://freepascal.org/down/source/sources.var FreePascal] (Latest (stable) version will do)<br>
    15 * [http://www.libsdl.org/tmp/android-project.zip SDL]<br>
    15 * [http://www.libsdl.org/tmp/android-project.zip SDL]<br>
    16 * [http://www.lua.org/ftp/lua-5.1.4.tar.gz Lua] (Current version is 5.1.4 but anything higher will probably work)<br>
    16 * [http://www.lua.org/ftp/lua-5.1.4.tar.gz Lua] (Current version is 5.1.4 but anything higher will probably work)<br>
       
    17 * [http://ant.apache.org/ Ant] (Linux distro should just use their package manager to get it, version isn't really important)
       
    18 * Java compiler, make sure you get JDK (not JRE) version 6 and up
    17 
    19 
    18 ==Hedgewars Source==
    20 ==Hedgewars Source==
    19 
    21 
    20 Using mercurial you can pull the hedgeroid branch using
    22 Using mercurial you can pull the hedgeroid branch using
    21 {{{
    23 {{{
    25 
    27 
    26 ==Android SDK==
    28 ==Android SDK==
    27 
    29 
    28 Download the latest version using the link above. And unzip it at a place you can remember, I’ll refer to the location with `<`SDK`>`. Once you’ve unzipped/extracted the tar navigate to `<`SDK`>`/tools and execute ‘android’. This should bring up a GUI select ‘Available packages’, then ‘Android Repository’ and check atleast SDK Platform Android 1.6 / 2.1 / 2.2. I would recommend checking all of them, but it’s up to you. Next select ‘Install Selected’ press ‘Next’ a couple of times and you should have the SDK installed.
    30 Download the latest version using the link above. And unzip it at a place you can remember, I’ll refer to the location with `<`SDK`>`. Once you’ve unzipped/extracted the tar navigate to `<`SDK`>`/tools and execute ‘android’. This should bring up a GUI select ‘Available packages’, then ‘Android Repository’ and check atleast SDK Platform Android 1.6 / 2.1 / 2.2. I would recommend checking all of them, but it’s up to you. Next select ‘Install Selected’ press ‘Next’ a couple of times and you should have the SDK installed.
    29 
    31 
    30 Optionally you could add `<`SDK`>`/platform-tools to your PATH, this makes it easier to use ‘adb’. Adb is the main program to communicate with Android, think logging/pushing and pulling files/shell.
    32 Optionally you could permanently add `<`SDK`>`/platform-tools to your $PATH, this makes it easier to use ‘adb’. Adb is the main program to communicate with Android, think logging/pushing and pulling files/shell.
    31 
    33 
    32 If you do not have a real android device you can create an emulator if you do I’d skip this and continue at Android NDK
    34 If you do not have a real android device you can create an emulator if you do I’d skip this and continue at Android NDK
    33 
    35 
    34 You can use either the GUI, run android and follow the signs or from cli
    36 You can use either the GUI, run android and follow the signs or from cli
    35 
    37 
    67 
    69 
    68 ==Final==
    70 ==Final==
    69 
    71 
    70 Next we will create the scripts to compile hedgewars and move SDL directories first you’ll need to make sure cmake knows where all the compilers are
    72 Next we will create the scripts to compile hedgewars and move SDL directories first you’ll need to make sure cmake knows where all the compilers are
    71 
    73 
    72 open hedgeroid/project_files/Android-build/CMakeLists.txt with your favorite editor and change the first five lines.
    74 Add <NDK>:<SDK>/platform-tools:<FPC>/compiler to your path, on debian based system I would do it as follows:
    73 
    75 
    74 Change 
    76 {{{
       
    77 export PATH=$PATH:/home/xeli/SoftDev/android/ndk
       
    78 export PATH=$PATH:/home/xeli/SoftDev/android/sdk/platform-tools
       
    79 export PATH=$PATH:/home/xeli/SoftDev/android/fpc-2.4.4/compiler
       
    80 }}}
    75 
    81 
    76 {{{/home/richard/SoftDev/what/ever}}}
    82 (Check google on how to do it for your specific OS if you don't know how)
    77 
       
    78 to the location where you have stored the Android NDK/SDK, FPC crosscompiler, SDL (android-project) and LUA
       
    79 
       
    80 Only the first 3 lines are needed. The forth and fifth moves the SDL and Lua directories for you if you do not want to do it manually (It’s recommended you let cmake handle this and change these lines!)
       
    81 
    83 
    82 Next you can use cmake to create the scripts
    84 Next you can use cmake to create the scripts
    83 
    85 
    84 {{{
    86 {{{
    85 cd <hedgewars-root>
    87 cd <hedgewars-root>
    87 }}}
    89 }}}
    88 And that’s it. To compile:
    90 And that’s it. To compile:
    89 
    91 
    90 {{{
    92 {{{
    91 cd <hedgewars-root>/project_files/Android-build/
    93 cd <hedgewars-root>/project_files/Android-build/
    92 ./complete_build.sh
    94 make -f Makefile.android
    93 }}}
    95 }}}
    94 and it should be installed on your emulator/device if it was connected.
    96 and it should be installed on your emulator/device if it was connected.
    95 
    97 
    96 On the device/emulator start the application up :)
    98 On the device/emulator start the application up :)
    97 
    99 
    98 
   100 
    99 
   101 
   100 
   102 
   101 
   103 
   102 
       
   103 
       
   104 
       
   105 TODO verify that it works on Windows and OS X add dependency list of utilities (ant, fpc compiler for host, make etcetc)
   104 TODO verify that it works on Windows and OS X add dependency list of utilities (ant, fpc compiler for host, make etcetc)