30 |
30 |
31 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 |
31 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 |
32 |
32 |
33 You can use either the GUI, run android and follow the signs or from cli |
33 You can use either the GUI, run android and follow the signs or from cli |
34 |
34 |
35 {{{android create avd -n <name> -t 4}}} |
35 {{{ |
|
36 android create avd -n <name> -t 4 |
|
37 }}} |
36 -n is a name of your choice -t stands for the target ID |
38 -n is a name of your choice -t stands for the target ID |
37 |
39 |
38 See this for more information |
40 See this for more information |
39 |
41 |
40 To run the emulator navigate to `<`SDK`>`/tools and run |
42 To run the emulator navigate to `<`SDK`>`/tools and run |
54 make crossinstall CPU_TARGET=arm OS_TARGET=linux CROSSBINDIR=<ndk>/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin BINUTILSPREFIX=arm-linux-androideabi- OPT=-dFPC_ARMEL INSTALL_PREFIX=<fpc>/fpc_install |
56 make crossinstall CPU_TARGET=arm OS_TARGET=linux CROSSBINDIR=<ndk>/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin BINUTILSPREFIX=arm-linux-androideabi- OPT=-dFPC_ARMEL INSTALL_PREFIX=<fpc>/fpc_install |
55 }}} |
57 }}} |
56 |
58 |
57 ==Final== |
59 ==Final== |
58 |
60 |
59 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 |
61 We will generate the Makefile.android, which is needed to compile hedgewars, download SDL and you’ll need to make sure cmake knows where all the compilers are |
60 |
62 |
|
63 1.<br> |
61 Add `<`NDK`>`:`<`SDK`>`/platform-tools:`<`FPC`>`/compiler to your path, on debian based system I would do it as follows: |
64 Add `<`NDK`>`:`<`SDK`>`/platform-tools:`<`FPC`>`/compiler to your path, on debian based system I would do it as follows: |
62 |
65 |
63 {{{ |
66 {{{ |
64 export PATH=$PATH:/home/xeli/SoftDev/android/ndk |
67 export PATH=$PATH:/home/xeli/SoftDev/android/ndk |
65 export PATH=$PATH:/home/xeli/SoftDev/android/sdk/platform-tools |
68 export PATH=$PATH:/home/xeli/SoftDev/android/sdk/platform-tools |
66 export PATH=$PATH:/home/xeli/SoftDev/android/fpc-2.4.4/compiler |
69 export PATH=$PATH:/home/xeli/SoftDev/android/fpc-2.4.4/compiler |
67 }}} |
70 }}} |
68 |
71 |
69 (Check google on how to do it for your specific OS if you don't know how) |
72 (Check google on how to do it for your specific OS if you don't know how) |
70 |
73 |
|
74 2.<br> |
71 Now we're gonna download sdl and a couple of its libraries, if you're on linux there's a script you can use |
75 Now we're gonna download sdl and a couple of its libraries, if you're on linux there's a script you can use |
72 {{{ |
76 {{{ |
73 cd <hedgewars-root>/project_files/Android-build |
77 cd <hedgewars-root>/project_files/Android-build |
74 chmod +x download_libs.sh (might not be needed) |
78 chmod +x download_libs.sh (might not be needed) |
75 ./download_libs.sh |
79 ./download_libs.sh |
91 cd <hedgewars-root>/project_files/Android-build/ |
96 cd <hedgewars-root>/project_files/Android-build/ |
92 make -f Makefile.android |
97 make -f Makefile.android |
93 }}} |
98 }}} |
94 and it should be installed on your emulator/device if it was connected. |
99 and it should be installed on your emulator/device if it was connected. |
95 |
100 |
96 On the device/emulator start the application up :) |
101 On the device/emulator you can start the application up :) |
97 |
102 |
98 |
103 |
99 |
104 |
100 |
105 |
101 TODO verify that it works on Windows and OS X add dependency list of utilities (ant, fpc compiler for host, make etcetc) |
106 TODO verify that it works on Windows and OS X add dependency list of utilities (ant, fpc compiler for host, make etcetc) |