README-android.txt
changeset 7793 6463a850229d
parent 7501 b27825bb5879
child 7804 1f85fb33694b
equal deleted inserted replaced
7792:b8d4be87970a 7793:6463a850229d
    36 
    36 
    37 ================================================================================
    37 ================================================================================
    38  Building an app
    38  Building an app
    39 ================================================================================
    39 ================================================================================
    40 
    40 
    41 Instructions:
    41 For simple projects you can use the script located at build-scripts/androidbuild.sh
       
    42 
       
    43 There's two ways of using it:
       
    44 
       
    45 androidbuild.sh com.yourcompany.yourapp < sources.list
       
    46 androidbuild.sh com.yourcompany.yourapp source1.c source2.c ...sourceN.c
       
    47 
       
    48 sources.list should be a text file with a source file name in each line
       
    49 Filenames should be specified relative to the current directory, for example if
       
    50 you are in the build-scripts directory and want to create the testgles.c test, you'll
       
    51 run:
       
    52     
       
    53 ./androidbuild.sh org.libsdl.testgles ../test/testgles.c
       
    54 
       
    55 One limitation of this script is that all sources provided will be aggregated into
       
    56 a single directory, thus all your source files should have a unique name.
       
    57 
       
    58 Once the project is complete the script will tell you where the debug APK is located.
       
    59 If you want to create a signed release APK, you can use the project created by this
       
    60 utility to generate it.
       
    61 
       
    62 Finally, a word of caution: re running androidbuild.sh wipes any changes you may have
       
    63 done in the build directory for the app!
       
    64 
       
    65 
       
    66 For more complex projects, follow these instructions:
       
    67     
    42 1. Copy the android-project directory wherever you want to keep your projects
    68 1. Copy the android-project directory wherever you want to keep your projects
    43    and rename it to the name of your project.
    69    and rename it to the name of your project.
    44 2. Move or symlink this SDL directory into the <project>/jni directory
    70 2. Move or symlink this SDL directory into the <project>/jni directory
    45 3. Edit <project>/jni/src/Android.mk to include your source files
    71 3. Edit <project>/jni/src/Android.mk to include your source files
    46 4. Run 'ndk-build' (a script provided by the NDK). This compiles the C source
    72 4. Run 'ndk-build' (a script provided by the NDK). This compiles the C source