Changed the way the uncompressed data should be downloaded

This commit is contained in:
pelya
2010-08-25 16:53:29 +03:00
parent c59c2125c9
commit 9dafe7e44d
5 changed files with 12 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/sh
CHANGE_APP_SETTINGS_VERSION=4
CHANGE_APP_SETTINGS_VERSION=5
AUTO=
if [ "X$1" = "X-a" ]; then
@@ -46,9 +46,9 @@ if [ -n "$var" ] ; then
ScreenOrientation="$var"
fi
echo -n "\nSpecify path to download application data in zip archive in the form 'Description|URL|BackupURL|...'"
echo -n "\nYou may specify paths to optional game content delimited by newlines (empty line to finish)"
echo -n "\nIf the URL starts with '-' symbol it will be downloaded as-is to game dir and not unzipped\n\n"
echo -n "\nSpecify path to download application data in zip archive in the form 'Description|http://URL|http://BackupURL|...'"
echo -n "\nYou may specify additional paths to optional game content delimited by newlines (empty line to finish)"
echo -n "\nIf the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as-is to game dir and not unzipped\n\n"
echo -n "`echo $AppDataDownloadUrl | tr '^' '\\n'`"
echo
AppDataDownloadUrl1=""

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sourceforge.sc2"
android:versionCode="1001"
android:versionName="1.0.01"
android:versionCode="1002"
android:versionName="1.0.02"
android:installLocation="preferExternal"
>
<application android:label="@string/app_name"

View File

@@ -25,7 +25,7 @@ SDL_VIDEO_RENDER_RESIZE := 1
COMPILED_LIBRARIES := sdl_image
APPLICATION_ADDITIONAL_CFLAGS := -O0 -DTHREADLIB_SDL=1 -DTIMELIB=SDL -DOVCODEC_TREMOR=1 -DNETPLAY=1 -DHAVE_REGEX=1 -DHAVE_GETOPT_LONG=1
APPLICATION_ADDITIONAL_CFLAGS := -O0 -DTHREADLIB_SDL=1 -DTIMELIB=SDL -DOVCODEC_TREMOR=1 -DNETPLAY=1 -DHAVE_REGEX=1 -DHAVE_GETOPT_LONG=1 -DHAVE_ZIP=1
APPLICATION_ADDITIONAL_LDFLAGS := -Lbin/ndk/local/armeabi -ltremor

View File

@@ -218,9 +218,9 @@ class DataDownloader extends Thread
System.out.println("Connecting to " + downloadUrls[downloadUrlIndex]);
Status.setText( "Connecting to " + downloadUrls[downloadUrlIndex] );
String url = new String(downloadUrls[downloadUrlIndex]);
if(url.indexOf("-") == 0)
if(url.indexOf(":") == 0)
{
url = url.substring(1);
url = url.substring( url.indexOf(":", 1) + 1 );
DoNotUnzip = true;
}
request = new HttpGet(url);
@@ -261,11 +261,8 @@ class DataDownloader extends Thread
if(DoNotUnzip)
{
path = getOutFilePath(downloadUrls[downloadUrlIndex].substring(
downloadUrls[downloadUrlIndex].lastIndexOf("/")+1,
downloadUrls[downloadUrlIndex].indexOf("?") > 0 ?
downloadUrls[downloadUrlIndex].indexOf("?") :
downloadUrls[downloadUrlIndex].length() ));
path = getOutFilePath(downloadUrls[downloadUrlIndex].substring( 1,
downloadUrls[downloadUrlIndex].indexOf(":", 1) ));
OutputStream out = null;
try {
out = new FileOutputStream( path );

View File

@@ -8,7 +8,7 @@ class Globals {
public static String ApplicationName = "Ur-QuanMasters";
// Should be zip file
public static String DataDownloadUrl = "Game data is 60 Mb|https://sites.google.com/site/xpelyax/Home/sc2-data.zip?attredirects=0%26d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/sc2-data.zip";
public static String DataDownloadUrl = "Game data is 14 Mb|https://sites.google.com/site/xpelyax/Home/sc2-data.zip?attredirects=0%26d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/sc2-data.zip^3DO remixed music (19 Mb)|:addons/3domusic/3domusic.zip:https://sites.google.com/site/xpelyax/Home/3domusic.zip?attredirects=0%26d=1|:addons/3domusic/3domusic.zip:http://sitesproxy.goapk.com/site/xpelyax/Home/3domusic.zip^UQM music remix pack 1 (50 Mb)|:addons/remix/uqm-remix-pack1.zip:http://sourceforge.net/projects/sc2/files/UQM%20Remix%20Packs/UQM%20Remix%20Pack%201/uqm-remix-pack1.zip/download^UQM music remix pack 2 (60 Mb)|:addons/remix/uqm-remix-pack2.zip:http://sourceforge.net/projects/sc2/files/UQM%20Remix%20Packs/UQM%20Remix%20Pack%202/uqm-remix-pack2.zip/download^UQM music remix pack 3 (40 Mb)|:addons/remix/uqm-remix-pack3.zip:http://sourceforge.net/projects/sc2/files/UQM%20Remix%20Packs/UQM%20Remix%20Pack%203/uqm-remix-pack3.zip/download";
// 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;