build-scripts/androidbuild.sh
changeset 10200 c678dcec4f44
parent 9823 9fb8a612dd7c
child 11647 5816b27073a4
equal deleted inserted replaced
10199:6ab154366a9b 10200:c678dcec4f44
    85     cp -r $SDLPATH/src $BUILDPATH/jni/SDL
    85     cp -r $SDLPATH/src $BUILDPATH/jni/SDL
    86     cp -r $SDLPATH/include $BUILDPATH/jni/SDL
    86     cp -r $SDLPATH/include $BUILDPATH/jni/SDL
    87 fi
    87 fi
    88 
    88 
    89 cp -r $SDLPATH/Android.mk $BUILDPATH/jni/SDL
    89 cp -r $SDLPATH/Android.mk $BUILDPATH/jni/SDL
    90 sed -i "s|YourSourceHere.c|$MKSOURCES|g" $BUILDPATH/jni/src/Android.mk
    90 sed -i -e "s|YourSourceHere.c|$MKSOURCES|g" $BUILDPATH/jni/src/Android.mk
    91 sed -i "s|org\.libsdl\.app|$APP|g" $BUILDPATH/AndroidManifest.xml
    91 sed -i -e "s|org\.libsdl\.app|$APP|g" $BUILDPATH/AndroidManifest.xml
    92 
    92 
    93 # Copy user sources
    93 # Copy user sources
    94 for src in "${SOURCES[@]}"
    94 for src in "${SOURCES[@]}"
    95 do
    95 do
    96     cp $src $BUILDPATH/jni/src
    96     cp $src $BUILDPATH/jni/src
   103     mkdir -p $folder
   103     mkdir -p $folder
   104     cd $folder
   104     cd $folder
   105 done
   105 done
   106 
   106 
   107 ACTIVITY="${folder}Activity"
   107 ACTIVITY="${folder}Activity"
   108 sed -i "s|SDLActivity|$ACTIVITY|g" $BUILDPATH/AndroidManifest.xml
   108 sed -i -e "s|SDLActivity|$ACTIVITY|g" $BUILDPATH/AndroidManifest.xml
   109 sed -i "s|SDLActivity|$APP|g" $BUILDPATH/build.xml
   109 sed -i -e "s|SDLActivity|$APP|g" $BUILDPATH/build.xml
   110 
   110 
   111 # Fill in a default Activity
   111 # Fill in a default Activity
   112 echo "package $APP;" >  "$ACTIVITY.java"
   112 echo "package $APP;" >  "$ACTIVITY.java"
   113 echo "import org.libsdl.app.SDLActivity;" >> "$ACTIVITY.java"
   113 echo "import org.libsdl.app.SDLActivity;" >> "$ACTIVITY.java"
   114 echo "public class $ACTIVITY extends SDLActivity {}" >> "$ACTIVITY.java"
   114 echo "public class $ACTIVITY extends SDLActivity {}" >> "$ACTIVITY.java"