Data files downloaded from SF.net by default for all apps

This commit is contained in:
pelya
2010-10-18 15:50:08 +03:00
parent 695077be94
commit 54ee84958a
21 changed files with 58 additions and 51 deletions

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.enigmagame.enigma"
android:versionCode="1"
android:versionName="0.1"
package="de.schwardtnet.alienblaster"
android:versionCode="110012"
android:versionName="1.1.0.12 - bundled data file with application, re-run startup config and select 'Very small' audio buffer to make audio lag less"
android:installLocation="preferExternal"
>
<application android:label="@string/app_name"

View File

@@ -1,6 +1,6 @@
# The namespace in Java file, with dots replaced with underscores
SDL_JAVA_PACKAGE_PATH := org_enigmagame_enigma
SDL_JAVA_PACKAGE_PATH := de_schwardtnet_alienblaster
# Path to shared libraries - Android 1.6 cannot load them properly, thus we have to specify absolute path here
# SDL_SHARED_LIBRARIES_PATH := /data/data/de.schwardtnet.alienblaster/lib
@@ -10,7 +10,7 @@ SDL_JAVA_PACKAGE_PATH := org_enigmagame_enigma
# Typically /sdcard/alienblaster
# Or /data/data/de.schwardtnet.alienblaster/files if you're planning to unpack data in application private folder
# Your application will just set current directory there
SDL_CURDIR_PATH := org.enigmagame.enigma
SDL_CURDIR_PATH := de.schwardtnet.alienblaster
# Android Dev Phone G1 has trackball instead of cursor keys, and
# sends trackball movement events as rapid KeyDown/KeyUp events,
@@ -23,9 +23,9 @@ SDL_TRACKBALL_KEYUP_DELAY := 1
# resized in HW-accelerated way, however it eats a tiny bit of CPU
SDL_VIDEO_RENDER_RESIZE := 1
SDL_VIDEO_RENDER_RESIZE_KEEP_ASPECT := 1
SDL_VIDEO_RENDER_RESIZE_KEEP_ASPECT := 0
COMPILED_LIBRARIES := sdl_mixer sdl_image sdl_ttf intl lua png xerces
COMPILED_LIBRARIES := sdl_mixer sdl_image
APPLICATION_ADDITIONAL_CFLAGS := -finline-functions -O2
@@ -37,7 +37,7 @@ APPLICATION_CUSTOM_BUILD_SCRIPT :=
SDL_ADDITIONAL_CFLAGS := -DSDL_ANDROID_KEYCODE_MOUSE=UNKNOWN -DSDL_ANDROID_KEYCODE_0=RETURN -DSDL_ANDROID_KEYCODE_1=LCTRL -DSDL_ANDROID_KEYCODE_2=PAGEUP -DSDL_ANDROID_KEYCODE_3=PAGEDOWN -DSDL_ANDROID_KEYCODE_4=LCTRL
SDL_VERSION := 1.2
SDL_VERSION := 1.3
# If SDL_Mixer should link to libMAD
SDL_MIXER_USE_LIBMAD :=

View File

@@ -2,7 +2,7 @@ APP_PROJECT_PATH := $(call my-dir)/..
# Available libraries: mad sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx intl xml2 lua jpeg png tremor freetype xerces
APP_MODULES := application sdl-1.2 sdl_main stlport tremor png jpeg freetype xerces sdl_mixer sdl_image sdl_ttf intl lua png xerces
APP_MODULES := application sdl-1.3 sdl_main stlport tremor png jpeg freetype xerces sdl_mixer sdl_image
# To filter out static libs from all libs in makefile
APP_AVAILABLE_STATIC_LIBS := jpeg png tremor freetype xerces

View File

@@ -1,23 +1,26 @@
# The application settings for Android libSDL port
AppSettingVersion=10
AppSettingVersion=12
LibSdlVersion=1.3
AppName="Alien Blaster"
AppFullName=de.schwardtnet.alienblaster
ScreenOrientation=h
InhibitSuspend=n
AppDataDownloadUrl="Data size is 2 Mb|alienblaster110_data.zip|http://sites.google.com/site/xpelyax/Home/alienblaster110_data.zip?attredirects=0&d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/alienblaster110_data.zip"
SdlVideoResize=y
SdlVideoResizeKeepAspect=n
NeedDepthBuffer=n
AppUsesMouse=n
AppNeedsArrowKeys=y
AppUsesJoystick=n
AppHandlesJoystickSensitivity=n
AppUsesMultitouch=n
NonBlockingSwapBuffers=n
RedefinedKeys="RETURN LCTRL PAGEUP PAGEDOWN LCTRL"
AppTouchscreenKeyboardKeysAmount=4
AppTouchscreenKeyboardKeysAmountAutoFire=1
MultiABI=n
AppVersionCode=110011
AppVersionName="1.1.0.11 - fixed keys stuck sometimes for on-screen keyboard, fixed restoring app from background"
AppVersionCode=110012
AppVersionName="1.1.0.12 - bundled data file with application, re-run startup config and select 'Very small' audio buffer to make audio lag less"
CompiledLibraries="sdl_mixer sdl_image"
CustomBuildScript=n
AppCflags='-finline-functions -O2'

View File

@@ -1,17 +1,18 @@
# The application settings for Android libSDL port
AppSettingVersion=11
AppSettingVersion=12
LibSdlVersion=1.2
AppName="enigma"
AppFullName=org.enigmagame.enigma
ScreenOrientation=h
InhibitSuspend=y
AppDataDownloadUrl="Enigma Game Data (6.5 MiB)|http://sites.google.com/site/droidsdl/data/enigma-data32.zip?attredirects=0&d=1"
AppDataDownloadUrl="Enigma Game Data (6.5 MiB)|http://sourceforge.net/projects/libsdl-android/files/Enigma/enigma-data32.zip/download|http://sites.google.com/site/droidsdl/data/enigma-data32.zip?attredirects=0&d=1"
SdlVideoResize=y
SdlVideoResizeKeepAspect=y
NeedDepthBuffer=n
AppUsesMouse=y
AppNeedsArrowKeys=n
AppUsesJoystick=y
AppHandlesJoystickSensitivity=y
AppUsesMultitouch=n
NonBlockingSwapBuffers=n
RedefinedKeys="RETURN LCTRL PAGEUP PAGEDOWN LCTRL"

View File

@@ -2,7 +2,7 @@ LibSdlVersion=1.2
AppName="Jooleem"
AppFullName=net.sourceforge.jooleem
ScreenOrientation=h
AppDataDownloadUrl="http://sites.google.com/site/xpelyax/Home/jooleem_0.1.4_data.zip?attredirects=0&d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/jooleem_0.1.4_data.zip"
AppDataDownloadUrl="Data files are 10 Mb|http://sourceforge.net/projects/libsdl-android/files/Jooleem/jooleem_0.1.4_data.zip/download|http://sites.google.com/site/xpelyax/Home/jooleem_0.1.4_data.zip?attredirects=0&d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/jooleem_0.1.4_data.zip"
SdlVideoResize=y
NeedDepthBuffer=n
AppUsesMouse=y

View File

@@ -4,7 +4,7 @@ LibSdlVersion=1.2
AppName="OpenTyrian"
AppFullName=com.googlecode.opentyrian
ScreenOrientation=h
AppDataDownloadUrl="Data files size is 11 Mb|http://sites.google.com/site/xpelyax/Home/tyrian21-data.zip?attredirects=0&d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/tyrian21-data.zip"
AppDataDownloadUrl="Data files size is 11 Mb|http://sourceforge.net/projects/libsdl-android/files/OpenTyrian/tyrian21-data.zip/download|http://sites.google.com/site/xpelyax/Home/tyrian21-data.zip?attredirects=0&d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/tyrian21-data.zip"
SdlVideoResize=y
NeedDepthBuffer=n
AppUsesMouse=y

View File

@@ -4,7 +4,7 @@ LibSdlVersion=1.2
AppName="Ur-Quan Masters"
AppFullName=com.sourceforge.sc2
ScreenOrientation=h
AppDataDownloadUrl="Game data is 14 Mb|https://sites.google.com/site/xpelyax/Home/sc2-data.zip?attredirects=0&d=1|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/sc2-data.zip/download|http://sitesproxy.goapk.com/site/xpelyax/Home/sc2-data.zip^3DO remixed music (19 Mb) - enable it in Setup->Sound Options->3DO Remixes|:addons/3domusic/3domusic.zip:https://sites.google.com/site/xpelyax/Home/3domusic.zip?attredirects=0&d=1|:addons/3domusic/3domusic.zip:https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3domusic.zip/download|:addons/3domusic/3domusic.zip:http://sitesproxy.goapk.com/site/xpelyax/Home/3domusic.zip^UQM music remix pack (150 Mb) - enable it in Setup->Sound Options->UQM Remixes|:addons/remix/remix.zip:https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/remix.zip/download^3DO voice (115 Mb) - go to Setup->Sound Options and increase Voice volume from zero|:addons/3dovoice/3dovoice.zip:https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovoice.zip/download^3DO video support - after installing this pack copy all files from|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovideo.zip/download^your 3DO Star Control II game CD from 'duckart' dir to the SD card to dir|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovideo.zip/download^'app-data/com.sourceforge.sc2/addons/3dovideo', to extract files from 3DO disk use|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovideo.zip/download^'3DO Commander' or 'uncd-rom' apps from http://madroms.free.fr/3do/|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovideo.zip/download^Then from the game change 'Setup->PC/3DO compat->Cutscenes' to Movies, and restart game|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovideo.zip/download"
AppDataDownloadUrl="Game data is 14 Mb|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/sc2-data.zip/download|https://sites.google.com/site/xpelyax/Home/sc2-data.zip?attredirects=0&d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/sc2-data.zip^3DO remixed music (19 Mb) - enable it in Setup->Sound Options->3DO Remixes|:addons/3domusic/3domusic.zip:https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3domusic.zip/download|:addons/3domusic/3domusic.zip:https://sites.google.com/site/xpelyax/Home/3domusic.zip?attredirects=0&d=1|:addons/3domusic/3domusic.zip:http://sitesproxy.goapk.com/site/xpelyax/Home/3domusic.zip^UQM music remix pack (150 Mb) - enable it in Setup->Sound Options->UQM Remixes|:addons/remix/remix.zip:https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/remix.zip/download^3DO voice (115 Mb) - go to Setup->Sound Options and increase Voice volume from zero|:addons/3dovoice/3dovoice.zip:https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovoice.zip/download^3DO video support - after installing this pack copy all files from|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovideo.zip/download^your 3DO Star Control II game CD from 'duckart' dir to the SD card to dir|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovideo.zip/download^'app-data/com.sourceforge.sc2/addons/3dovideo', to extract files from 3DO disk use|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovideo.zip/download^'3DO Commander' or 'uncd-rom' apps from http://madroms.free.fr/3do/|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovideo.zip/download^Then from the game change 'Setup->PC/3DO compat->Cutscenes' to Movies, and restart game|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovideo.zip/download"
SdlVideoResize=y
NeedDepthBuffer=n
AppUsesMouse=n

View File

@@ -1 +1 @@
enigma
alienblaster

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">enigma</string>
<string name="app_name">Alien Blaster</string>
<string name="init">Initializing</string>

View File

@@ -1,6 +1,6 @@
// This string is autogenerated by ChangeAppSettings.sh, do not change
// spaces amount
package org.enigmagame.enigma;
package de.schwardtnet.alienblaster;
import java.util.zip.*;
import java.io.*;

View File

@@ -1,5 +1,5 @@
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
package org.enigmagame.enigma;
package de.schwardtnet.alienblaster;
import android.app.Activity;

View File

@@ -1,5 +1,5 @@
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
package org.enigmagame.enigma;
package de.schwardtnet.alienblaster;
import android.app.Activity;
import android.content.Context;

View File

@@ -18,7 +18,7 @@
fixed with a hammer and rasp to work with libSDL port */
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
package org.enigmagame.enigma;
package de.schwardtnet.alienblaster;
import java.io.Writer;
import java.util.ArrayList;

View File

@@ -1,14 +1,14 @@
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount anywhere
package org.enigmagame.enigma;
package de.schwardtnet.alienblaster;
import android.app.Activity;
import android.content.Context;
class Globals {
public static String ApplicationName = "enigma";
public static String ApplicationName = "AlienBlaster";
// Should be zip file
public static String DataDownloadUrl = "Enigma Game Data (6.5 MiB)|http://sites.google.com/site/droidsdl/data/enigma-data32.zip?attredirects=0%26d=1";
public static String DataDownloadUrl = "Data size is 2 Mb|alienblaster110_data.zip|http://sites.google.com/site/xpelyax/Home/alienblaster110_data.zip?attredirects=0%26d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/alienblaster110_data.zip";
// Set this value to true if you're planning to render 3D using OpenGL - it eats some GFX resources, so disabled for 2D
public static boolean NeedDepthBuffer = false;
@@ -17,24 +17,26 @@ class Globals {
public static boolean HorizontalOrientation = true;
// prevent device from going to suspend mode
public static boolean InhibitSuspend = true;
public static boolean InhibitSuspend = false;
// Readme text to be shown on download page
public static String ReadmeText = "^You can press \"Home\" now - the data will be downloaded in background^Have fun playing enigma!^".replace("^","\n");
public static boolean AppUsesMouse = true;
public static String ReadmeText = "^You can press \"Home\" now - the data will be downloaded in background^In game press \"Menu\" for secondary fire, \"Volume Up/Down\" to cycle weapons".replace("^","\n");
public static boolean AppNeedsArrowKeys = false;
public static boolean AppUsesMouse = false;
public static boolean AppNeedsArrowKeys = true;
public static boolean AppUsesJoystick = false;
public static boolean AppHandlesJoystickSensitivity = false;
public static boolean AppUsesJoystick = true;
public static boolean AppUsesMultitouch = false;
public static boolean NonBlockingSwapBuffers = false;
public static int AppTouchscreenKeyboardKeysAmount = 0;
public static int AppTouchscreenKeyboardKeysAmount = 4;
public static int AppTouchscreenKeyboardKeysAmountAutoFire = 0;
public static int AppTouchscreenKeyboardKeysAmountAutoFire = 1;
// Phone-specific config
// It will download app data to /sdcard/alienblaster if set to true,
@@ -54,5 +56,5 @@ class Globals {
}
class LoadLibrary {
public LoadLibrary() { System.loadLibrary("sdl-1.2"); System.loadLibrary("sdl_mixer"); System.loadLibrary("sdl_image"); System.loadLibrary("sdl_ttf"); System.loadLibrary("intl"); System.loadLibrary("lua"); };
public LoadLibrary() { System.loadLibrary("sdl-1.3"); System.loadLibrary("sdl_mixer"); System.loadLibrary("sdl_image"); };
}

View File

@@ -1,5 +1,5 @@
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
package org.enigmagame.enigma;
package de.schwardtnet.alienblaster;
import android.app.Activity;
import android.content.Context;
@@ -25,8 +25,6 @@ public class MainActivity extends Activity {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
_tv = new TextView(this);
_tv.setText(R.string.init);
setContentView(_tv);
@@ -49,6 +47,9 @@ public class MainActivity extends Activity {
if(sdlInited)
return;
sdlInited = true;
if(Globals.UseAccelerometerAsArrowKeys)
getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
mGLView = new DemoGLSurfaceView(this);
setContentView(mGLView);
// Receive keyboard events

View File

@@ -1,5 +1,5 @@
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
package org.enigmagame.enigma;
package de.schwardtnet.alienblaster;
import android.app.Activity;
import android.content.Context;
@@ -338,8 +338,8 @@ class Settings
static void showAccelerometerConfig(final MainActivity p)
{
Globals.AccelerometerSensitivity = 0;
if( ! Globals.UseAccelerometerAsArrowKeys )
Globals.AccelerometerSensitivity = 2; // Slow, full range
if( ! Globals.UseAccelerometerAsArrowKeys || Globals.AppHandlesJoystickSensitivity )
{
showAccelerometerCenterConfig(p);
return;
@@ -368,8 +368,8 @@ class Settings
static void showAccelerometerCenterConfig(final MainActivity p)
{
Globals.AccelerometerSensitivity = 0;
if( ! Globals.UseAccelerometerAsArrowKeys )
Globals.AccelerometerCenterPos = 2; // Fixed horizontal center position
if( ! Globals.UseAccelerometerAsArrowKeys || Globals.AppHandlesJoystickSensitivity )
{
showScreenKeyboardConfig(p);
return;

View File

@@ -1,5 +1,5 @@
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
package org.enigmagame.enigma;
package de.schwardtnet.alienblaster;
import javax.microedition.khronos.opengles.GL10;

View File

@@ -87,10 +87,10 @@ check if there's "crystax" string in path to gcc toolchain, and will disable STL
NDK already contains STL library.
Application data may be bundled with app itself, or downloaded from net on first run.
Create .ZIP file with your application data, and put it on HTTP server, or to "project/assets" dir -
ChangeAppSettings.sh will ask you for the URL, if URL won't contain "http://" it will try to open file from assets.
Note that there is some limit on maximum .APK file size on Market, like 20 Mb or so, so big files should be downloaded by HTTP.
If you'll release new version of data files you should change download URL or asset file name and update your app as well -
Create .ZIP file with your application data, and put it on HTTP server, or to "project/jni/application/src/AndroidData" dir -
ChangeAppSettings.sh will ask you for the URL, if URL won't contain "http://" it will try to unzip file from AndroidData dir.
Note that there is limit on maximum .APK file size on Market, like 20 Mb or so, so big files should be downloaded by HTTP.
If you'll release new version of data files you should change download URL or data file name and update your app as well -
the app will re-download the data if URL does not match the saved URL from previous download.
If you'll add new libs - add them to project/jni/, copy Android.mk from existing lib, and