Merge 'remove-sdl' branch into 'master'
20
.gitmodules
vendored
|
@ -1,21 +1,15 @@
|
|||
[submodule "jni/src/HLSDK/halflife"]
|
||||
path = jni/src/HLSDK/halflife
|
||||
url = https://github.com/SDLash3D/halflife
|
||||
[submodule "jni/src/NanoGL/nanogl"]
|
||||
path = jni/src/NanoGL/nanogl
|
||||
url = https://github.com/SDLash3D/nanogl
|
||||
[submodule "jni/src/SDL2/SDL-mirror"]
|
||||
path = jni/src/SDL2/SDL-mirror
|
||||
url = https://github.com/mittorn/SDL-mirror
|
||||
url = https://github.com/FWGS/nanogl
|
||||
[submodule "jni/src/Xash3D/xash3d"]
|
||||
path = jni/src/Xash3D/xash3d
|
||||
url = https://github.com/SDLash3D/xash3d
|
||||
url = https://github.com/FWGS/xash3d
|
||||
[submodule "xash-extras"]
|
||||
path = xash-extras
|
||||
url = https://github.com/SDLash3D/xash-extras
|
||||
[submodule "jni/src/hlsdk-client"]
|
||||
path = jni/src/hlsdk-client
|
||||
url = https://github.com/SDLash3D/hlsdk-client
|
||||
url = https://github.com/FWGS/xash-extras
|
||||
[submodule "jni/src/hlsdk-xash3d"]
|
||||
path = jni/src/hlsdk-xash3d
|
||||
url = https://github.com/SDLash3D/hlsdk-xash3d
|
||||
url = https://github.com/FWGS/hlsdk-xash3d
|
||||
[submodule "src/org/json"]
|
||||
path = src/org/json
|
||||
url = https://github.com/stleary/JSON-java
|
||||
|
|
25
.travis.yml
|
@ -21,34 +21,25 @@ before_install:
|
|||
script:
|
||||
- sh gen-version.sh travis build
|
||||
- python2 makepak.py xash-extras assets/extras.pak
|
||||
- ndk-build NDK_TOOLCHAIN_VERSION=4.8 XASH_SDL=1 SUPPORT_WEBP=false -j2 APP_CFLAGS="-w" APP_ABI="armeabi-v7a-hard"
|
||||
- ndk-build NDK_TOOLCHAIN_VERSION=4.8 SUPPORT_WEBP=false -j2 APP_CFLAGS="-w" APP_ABI="armeabi-v7a-hard"
|
||||
- ant debug
|
||||
- cp bin/xashdroid-debug.apk xashdroid-armv7.apk
|
||||
- ndk-build NDK_TOOLCHAIN_VERSION=4.8 XASH_SDL=1 SUPPORT_WEBP=false -j2 APP_CFLAGS="-w" APP_ABI="armeabi"
|
||||
- ndk-build NDK_TOOLCHAIN_VERSION=4.8 SUPPORT_WEBP=false -j2 APP_CFLAGS="-w" APP_ABI="armeabi"
|
||||
- ant debug
|
||||
- cp bin/xashdroid-debug.apk xashdroid-armv6.apk
|
||||
- ndk-build NDK_TOOLCHAIN_VERSION=4.8 XASH_SDL=1 SUPPORT_WEBP=false -j2 APP_CFLAGS="-w" APP_ABI="x86"
|
||||
- ndk-build NDK_TOOLCHAIN_VERSION=4.8 SUPPORT_WEBP=false -j2 APP_CFLAGS="-w" APP_ABI="x86"
|
||||
- ant debug
|
||||
- cp bin/xashdroid-debug.apk xashdroid-x86.apk
|
||||
- ndk-build NDK_TOOLCHAIN_VERSION=4.8 XASH_SDL=1 clean
|
||||
- ndk-build NDK_TOOLCHAIN_VERSION=4.8 XASH_SDL=1 -j2 APP_CFLAGS="-w" APP_ABI="armeabi-v7a-hard" CFLAGS_OPT_ARM="-mthumb -mfpu=vfpv3-d16 -mcpu=cortex-a9 -pipe -fPIC"
|
||||
- ndk-build NDK_TOOLCHAIN_VERSION=4.8 clean
|
||||
- ndk-build NDK_TOOLCHAIN_VERSION=4.8 -j2 APP_CFLAGS="-w" APP_ABI="armeabi-v7a-hard" CFLAGS_OPT_ARM="-mthumb -mfpu=vfpv3-d16 -mcpu=cortex-a9 -pipe -fPIC"
|
||||
- ant debug
|
||||
- cp bin/xashdroid-debug.apk xashdroid-armv7-tegra2.apk
|
||||
- ndk-build NDK_TOOLCHAIN_VERSION=4.8 XASH_SDL=1 clean
|
||||
- ndk-build NDK_TOOLCHAIN_VERSION=4.8 XASH_SDL=1 -j2 APP_CFLAGS="-w" APP_ABI="armeabi" CFLAGS_OPT_ARMv5="-marm -march=armv5te -msoft-float -fPIC"
|
||||
- ndk-build NDK_TOOLCHAIN_VERSION=4.8 clean
|
||||
- ndk-build NDK_TOOLCHAIN_VERSION=4.8 -j2 APP_CFLAGS="-w" APP_ABI="armeabi" CFLAGS_OPT_ARMv5="-marm -march=armv5te -msoft-float -fPIC"
|
||||
- ant debug
|
||||
- cp bin/xashdroid-debug.apk xashdroid-armv5.apk
|
||||
|
||||
|
||||
after_script:
|
||||
- curl --upload-file xashdroid-armv7.apk https://transfer.sh/xash3d-armv7-`date -u +%y-%m-%d_%H-%M`.apk
|
||||
- curl --upload-file xashdroid-armv6.apk https://transfer.sh/xash3d-armv6-`date -u +%y-%m-%d_%H-%M`.apk
|
||||
- curl --upload-file xashdroid-x86.apk https://transfer.sh/xash3d-x86-`date -u +%y-%m-%d_%H-%M`.apk
|
||||
- curl --upload-file xashdroid-armv7-tegra2.apk https://transfer.sh/xash3d-armv7-tegra2-`date -u +%y-%m-%d_%H-%M`.apk
|
||||
- curl --upload-file xashdroid-armv5.apk https://transfer.sh/xash3d-armv5-`date -u +%y-%m-%d_%H-%M`.apk
|
||||
- curl -T xashdroid-armv7.apk -u $YADISK_USERNAME:$YADISK_PASSWORD https://webdav.yandex.ru/XashTestVersions/xashdroid-armv7-`date -u +%y-%m-%d_%H-%M`-`git rev-parse --short HEAD`.apk
|
||||
- curl -T xashdroid-armv6.apk -u $YADISK_USERNAME:$YADISK_PASSWORD https://webdav.yandex.ru/XashTestVersions/xashdroid-armv6-`date -u +%y-%m-%d_%H-%M`-`git rev-parse --short HEAD`.apk
|
||||
- curl -T xashdroid-x86.apk -u $YADISK_USERNAME:$YADISK_PASSWORD https://webdav.yandex.ru/XashTestVersions/xashdroid-x86-`date -u +%y-%m-%d_%H-%M`-`git rev-parse --short HEAD`.apk
|
||||
- curl -T xashdroid-armv7-tegra2.apk -u $YADISK_USERNAME:$YADISK_PASSWORD https://webdav.yandex.ru/XashTestVersions/xashdroid-armv7-tegra2-`date -u +%y-%m-%d_%H-%M`-`git rev-parse --short HEAD`.apk
|
||||
- curl -T xashdroid-armv5.apk -u $YADISK_USERNAME:$YADISK_PASSWORD https://webdav.yandex.ru/XashTestVersions/xashdroid-armv5-`date -u +%y-%m-%d_%H-%M`-`git rev-parse --short HEAD`.apk
|
||||
- bash scripts/travis-upload.sh
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="in.celest.xash3d.hl"
|
||||
android:versionCode="0"
|
||||
android:versionName="0.17.1"
|
||||
android:versionName="0.18"
|
||||
android:installLocation="auto">
|
||||
|
||||
<application android:label="@string/app_name"
|
||||
|
@ -52,7 +52,7 @@
|
|||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<!--
|
||||
<activity android:name="org.libsdl.app.SDLActivity"
|
||||
android:screenOrientation="sensorLandscape"
|
||||
android:configChanges="orientation|screenSize"
|
||||
|
@ -63,12 +63,17 @@
|
|||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
-->
|
||||
<activity android:name="in.celest.xash3d.XashActivity"
|
||||
android:screenOrientation="landscape"
|
||||
android:screenOrientation="sensorLandscape"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
<action android:name="in.celest.xash3d.START" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name="in.celest.xash3d.FPicker"></activity>
|
||||
<receiver android:name="in.celest.xash3d.InstallReceiver">
|
||||
<intent-filter android:priority="100">
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
@ -86,7 +91,7 @@
|
|||
</application>
|
||||
|
||||
<!-- Some devices with Android 2.2 should support native activity, it was in unstable hidden API -->
|
||||
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="13" />
|
||||
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="19" />
|
||||
|
||||
<!-- OpenGL ES 1.1 -->
|
||||
<uses-feature android:glEsVersion="0x00010000" />
|
||||
|
|
|
@ -8,7 +8,7 @@ sh gen-version.sh test build
|
|||
rm assets/extras.pak
|
||||
python2.7 makepak.py xash-extras assets/extras.pak
|
||||
$AAPT package -m -J gen/ --rename-manifest-package in.celest.xash3d.hl -M AndroidManifest.xml -S test/res -I $ANDROID_JAR
|
||||
$JAVA_HOME/bin/javac -d bin/classes -s bin/classes -cp $ANDROID_JAR src/org/libsdl/app/SDLActivity.java gen/in/celest/xash3d/hl/R.java src/in/celest/xash3d/*
|
||||
$JAVA_HOME/bin/javac -d bin/classes -s bin/classes -cp $ANDROID_JAR gen/in/celest/xash3d/hl/R.java src/in/celest/xash3d/*.java
|
||||
$DX --dex --output=bin/classes.dex bin/classes/
|
||||
/mnt/app/apktool/aapt package -f -M test/AndroidManifest.xml -S test/res -I $ANDROID_JAR -F bin/xash3d.apk.unaligned
|
||||
zip bin/xash3d.apk.unaligned assets/*
|
||||
|
|
4
build.sh
|
@ -1,10 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
ndk-build NDK_TOOLCHAIN_VERSION=4.8 NDK_DEBUG=0 V=0 XASH_SDL=1 -j 8 APP_CFLAGS="-w -Wl,--no-undefined" APP_LDFLAGS="-Wl,--no-undefined"
|
||||
ndk-build NDK_TOOLCHAIN_VERSION=4.8 NDK_DEBUG=0 V=0 XASH_SDL=0 -j 8 APP_CFLAGS="-w -Wl,--no-undefined" APP_LDFLAGS="-Wl,--no-undefined"
|
||||
sh gen-version.sh default-release
|
||||
rm assets/extras.pak 2>/dev/null
|
||||
python2 makepak.py xash-extras assets/extras.pak
|
||||
ant release
|
||||
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../myks.keystore bin/xashdroid-release-unsigned.apk xashdroid
|
||||
rm bin/xashdroid-release.apk
|
||||
/home/a1ba/.android/android-sdk-linux/build-tools/22.0.1/zipalign 4 bin/xashdroid-release-unsigned.apk bin/xashdroid-release.apk
|
||||
#/home/a1ba/.android/android-sdk-linux/build-tools/22.0.1/zipalign 4 bin/xashdroid-release-unsigned.apk bin/xashdroid-release.apk
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
# See CPLUSPLUS-SUPPORT.html in the NDK documentation for more information
|
||||
#APP_STL := stlport_static
|
||||
|
||||
XASH_SDL ?= 1
|
||||
|
||||
XASH_SDL ?= 0
|
||||
ifeq ($(XASH_SDL),1)
|
||||
APP_PLATFORM := android-12
|
||||
else
|
||||
APP_PLATFORM := android-8
|
||||
APP_PLATFORM := android-9
|
||||
endif
|
||||
|
||||
|
||||
CFLAGS_OPT := -O3 -fomit-frame-pointer -ggdb -funsafe-math-optimizations -ftree-vectorize -fgraphite-identity -floop-interchange -funsafe-loop-optimizations -finline-limit=1024
|
||||
CFLAGS_OPT_ARM := -mthumb -mfpu=neon -mcpu=cortex-a9 -pipe -mvectorize-with-neon-quad -DVECTORIZE_SINCOS -fPIC
|
||||
CFLAGS_OPT_ARMv5 :=-march=armv6 -mfpu=vfp -marm -pipe
|
||||
CFLAGS_OPT_X86 := -mtune=atom -march=atom -mssse3 -mfpmath=sse -funroll-loops -pipe -DVECTORIZE_SINCOS
|
||||
CFLAGS_OPT := -O3 -fomit-frame-pointer -ggdb -funsafe-math-optimizations -ftree-vectorize -fgraphite-identity -floop-interchange -funsafe-loop-optimizations -finline-limit=256 -pipe
|
||||
CFLAGS_OPT_ARM := -mthumb -mfpu=neon -mcpu=cortex-a9 -pipe -mvectorize-with-neon-quad -DVECTORIZE_SINCOS -fPIC -DHAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
#CFLAGS_OPT_ARMv5 :=-mcpu=arm1136jf-s -mtune=arm1136jf-s -mthumb -mfpu=vfp -pipe -mfloat-abi=softfp
|
||||
CFLAGS_OPT_ARMv5 := -march=armv5te -mthumb -msoft-float
|
||||
CFLAGS_OPT_X86 := -mtune=atom -march=atom -mssse3 -mfpmath=sse -funroll-loops -pipe -DVECTORIZE_SINCOS -DHAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
CFLAGS_HARDFP := -D_NDK_MATH_NO_SOFTFP=1 -mhard-float -mfloat-abi=hard -DLOAD_HARDFP -DSOFTFP_LINK
|
||||
APPLICATIONMK_PATH = $(call my-dir)
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 51ccb8dbf05b56a5d01091ed7c5d3ec144d1d5d4
|
||||
Subproject commit fba28cfff8c488b83b052b92a9f58678c90f2afe
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 1f0b6ddc873a99f1bec8a4556c86bd7b6d5a85e3
|
1
jni/src/SDL2/SDL-mirror
Normal file
|
@ -0,0 +1 @@
|
|||
Place here SDL2 source code, if you want build SDL2 version of Xash3D Android. Note that this is neither maintained nor supported officially anymore.
|
|
@ -1 +1 @@
|
|||
Subproject commit 0bfac664a3de49044356a17515cdf8a17f5e2817
|
||||
Subproject commit a114800ce16bbde98d083c0b63e8782d6bbbfa2f
|
|
@ -1 +1 @@
|
|||
Subproject commit 5d96c43c65f4e26dbcbbcaffeb265a6353a245b4
|
||||
Subproject commit 29f4c35e6e6433fb990526683b70f809605e7025
|
|
@ -11,4 +11,4 @@
|
|||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-13
|
||||
target=android-19
|
||||
|
|
BIN
res/drawable/folder.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
res/drawable/ic_launcher.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
26
res/layout/activity_fpicker.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context="in.celest.xash3dVR.FPicker"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ListView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/FileView"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/folder"
|
||||
android:id="@+id/button_fpicker_select"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:onClick="onFileClick" />
|
||||
</LinearLayout>
|
|
@ -2,94 +2,304 @@
|
|||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/layout_shortcut"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:orientation="vertical"
|
||||
tools:context="in.celest.xash3d.LauncherActivity"
|
||||
android:id="@+id/layout_shortcut">
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:background="#252525"
|
||||
android:weightSum="1"
|
||||
tools:context="in.celest.xash3d.LauncherActivity" >
|
||||
<TextView
|
||||
android:id="@+id/textView_tittle"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="#555555"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/launcher_name"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textSize="25sp"
|
||||
android:drawableLeft="@drawable/ic_launcher"
|
||||
android:drawablePadding="10dp"
|
||||
android:singleLine="true"
|
||||
android:gravity="center_vertical" />
|
||||
<TabHost
|
||||
android:id="@+id/tabhost"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.0">
|
||||
android:layout_weight="1.20"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingLeft="3dp"
|
||||
android:paddingRight="3dp"
|
||||
android:paddingTop="8dp">
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#555555"
|
||||
android:orientation="vertical">
|
||||
<TabWidget
|
||||
android:id="@android:id/tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:showDividers="middle" />
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/scrollView2">
|
||||
<FrameLayout
|
||||
android:id="@android:id/tabcontent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:id="@+id/tab1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:background="#333333"
|
||||
android:orientation="vertical"
|
||||
android:text="@string/text_tab1"
|
||||
android:weightSum="0.6">
|
||||
<TextView
|
||||
android:id="@+id/textView_path1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="#444444"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/text_res_tittle2"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textSize="20sp"
|
||||
android:gravity="center_vertical|center_horizontal" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="#444444"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="1">
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="@string/volume"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
<ToggleButton
|
||||
android:id="@+id/useVolume"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="nothing"
|
||||
android:textOff="@string/no_volume"
|
||||
android:textOn="@string/use_volume" />
|
||||
<TextView
|
||||
android:id="@+id/textView_path"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="@string/text_res_path"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
<Button
|
||||
android:id="@+id/button_select"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:onClick="selectFolder"
|
||||
android:text="@string/select_folder" />
|
||||
<Button
|
||||
android:id="@+id/button_shortcut"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:onClick="createShortcut"
|
||||
android:text="@string/create_shortcut_button" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/tab2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="#333333"
|
||||
android:orientation="vertical"
|
||||
android:text="@string/text_tab2">
|
||||
<TextView
|
||||
android:id="@+id/textView_path2"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="#444444"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="13dp"
|
||||
android:text="@string/text_res_tittle3"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textSize="20sp"
|
||||
android:gravity="center_vertical|center_horizontal" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="#444444"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="1">
|
||||
<TextView
|
||||
android:id="@+id/textView_args"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/cmd_args_text"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
<EditText
|
||||
android:id="@+id/cmdArgs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="3dp" />
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="@string/text_res_path"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
<EditText
|
||||
android:id="@+id/cmdPath"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="3dp" />
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="Pixel Format"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
<Spinner
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/pixelSpinner"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="10dp" />
|
||||
<ToggleButton
|
||||
android:id="@+id/enableResizeWorkaround"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="enableResizeWorkaround"
|
||||
android:textOff="Keyboard does not resize screen"
|
||||
android:textOn="Keyboard resizes screen" />
|
||||
<CheckBox
|
||||
android:id="@+id/check_updates"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/update_button" />
|
||||
<CheckBox
|
||||
android:id="@+id/check_betas"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/update_to_beta" />
|
||||
<CheckBox
|
||||
android:id="@+id/immersive_mode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/immersive_mode" />
|
||||
<TextView
|
||||
android:id="@+id/textView7"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_weight="1"
|
||||
android:clickable="false" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
</TabHost>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#444444"
|
||||
android:layout_marginBottom="-20dp"
|
||||
android:paddingTop="5dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:orientation="horizontal">
|
||||
<Button
|
||||
android:id="@+id/button_about"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/cmd_args_text"
|
||||
android:id="@+id/textView_args" />
|
||||
|
||||
<EditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/cmdArgs" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/text_res_path"
|
||||
android:id="@+id/textView_path" />
|
||||
<EditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/cmdPath" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/select_folder"
|
||||
android:id="@+id/button_select"
|
||||
android:onClick="selectFolder" />
|
||||
|
||||
<CheckBox
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/use_volume"
|
||||
android:id="@+id/useVolume"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/about_button"
|
||||
android:id="@+id/button"
|
||||
android:onClick="aboutXash" />
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/create_shortcut_button"
|
||||
android:id="@+id/button"
|
||||
android:onClick="createShortcut" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:id="@+id/textView7"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_weight="1"
|
||||
android:clickable="false" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/launch_button"
|
||||
android:id="@+id/button_launch"
|
||||
android:onClick="startXash"
|
||||
android:layout_column="6"
|
||||
android:layout_gravity="right"
|
||||
android:layout_weight="0.0" />
|
||||
|
||||
|
||||
android:layout_gravity="left"
|
||||
android:onClick="aboutXash"
|
||||
android:text="@string/about_button" />
|
||||
<Button
|
||||
android:id="@+id/button_launch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="6"
|
||||
android:layout_marginLeft="0dp"
|
||||
android:layout_weight="0.87"
|
||||
android:onClick="startXash"
|
||||
android:text="@string/launch_button" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
|
40
res/layout/row.xml
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dip"
|
||||
android:background="#333333" android:orientation="vertical" android:layout_width="fill_parent">
|
||||
<ImageView
|
||||
android:id="@+id/fd_Icon1"
|
||||
android:layout_width="40dip"
|
||||
android:layout_height="40dip" >
|
||||
</ImageView>
|
||||
|
||||
<TextView android:text="@+id/filename"
|
||||
android:id="@+id/filename"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textStyle="bold"
|
||||
android:layout_toRightOf="@+id/fd_Icon1"
|
||||
android:layout_marginTop="5dip"
|
||||
android:layout_marginLeft="5dip">
|
||||
</TextView>
|
||||
<TextView android:text="@+id/fileitems"
|
||||
android:id="@+id/fileitems"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@+id/fd_Icon1"
|
||||
android:layout_below="@+id/filename"
|
||||
android:layout_marginLeft="10dip">
|
||||
|
||||
</TextView>
|
||||
<TextView android:text="@+id/filedate"
|
||||
android:id="@+id/filedate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/filename"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginLeft="5dip">
|
||||
</TextView>
|
||||
</RelativeLayout>
|
|
@ -1,10 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name">Xash3D</string>
|
||||
<string name="launcher_name">Xash3D</string>
|
||||
<string name="launcher_name_test">Xash3D (test)</string>
|
||||
|
||||
<string name="launch_button">Xash3D starten!</string>
|
||||
<string name="cmd_args_text">Command line arguments(experts only)</string>
|
||||
<string name="use_controls">Touch Kontroller aktivieren</string>
|
||||
|
@ -19,9 +14,8 @@
|
|||
<string name="shortcut_name">Kurzbefehl Name</string>
|
||||
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="about_main">Xash3D Android</string>
|
||||
<string name="about_copyright">Flying With Gauss steht in keinem Zusammenhang zu Valve oder einem ihrer Partners. All copyrights reserved to their respective owners.</string>
|
||||
<string name="about_authors">Portierung auf Android by Flying With Gauss: \n
|
||||
<string name="about_copyright">SDLash3D steht in keinem Zusammenhang zu Valve oder einem ihrer Partners. All copyrights reserved to their respective owners.</string>
|
||||
<string name="about_authors">Portierung auf Android by SDLash3D team: \n
|
||||
• a1batross\n
|
||||
• mittorn \n
|
||||
• nicknekit.\n
|
||||
|
@ -30,10 +24,10 @@ Spezieller Dank an:\n
|
|||
• Uncle Mike für Xash3D engine\n
|
||||
• Valve for Half-Life\n
|
||||
• libSDL2 developers.\n</string>
|
||||
<string name="about_links">Folge uns auf:
|
||||
• <a href="https://vk.com/xashdroid">VK</a>
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>
|
||||
• <a href="https://github.com/FWGS">GitHub</a></string>
|
||||
<string name="about_links">Folge uns auf:\n
|
||||
• <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>\n
|
||||
• <a href="https://github.com/SDLash3D">GitHub</a></string>
|
||||
<string name="about_button">Über Xash3D Android</string>
|
||||
<string name="create_shortcut_button">mod Kurzbefehl ersellen</string>
|
||||
<string name="select_folder">(auswahl)</string>
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name">Xash3D</string>
|
||||
<string name="launcher_name">Xash3D</string>
|
||||
<string name="launcher_name_test">Xash3D (test)</string>
|
||||
|
||||
<string name="launch_button">¡Iniciar Xash3D!</string>
|
||||
<string name="cmd_args_text">Parámetros de línea de comandos(sólo expertos)</string>
|
||||
<string name="use_controls">Activar controles táctiles</string>
|
||||
|
@ -18,11 +13,8 @@
|
|||
<string name="pkgname">Nombre del paquete del mod (sólo expertos)</string>
|
||||
<string name="shortcut_name">Nombre del acceso directo</string>
|
||||
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="about_main">Xash3D Android</string>
|
||||
<string name="about_copyright">Flying With Gauss no está afiliado con Valve o cualquiera de sus socios. Todos los derechos reservados a sus respectivos dueños.</string>
|
||||
<string name="version_string" translatable="false">v0.17.1</string>
|
||||
<string name="about_authors">Adaptación para Android por Flying With Gauss: \n
|
||||
<string name="about_copyright">SDLash3D no está afiliado con Valve o cualquiera de sus socios. Todos los derechos reservados a sus respectivos dueños.</string>
|
||||
<string name="about_authors">Adaptación para Android por SDLash3D team: \n
|
||||
• a1batross\n
|
||||
• mittorn \n
|
||||
• nicknekit.\n
|
||||
|
@ -31,10 +23,10 @@ Especial agradecimiento a:\n
|
|||
• Uncle Mike por Xash3D engine\n
|
||||
• Valve por Half-Life\n
|
||||
• Desarrolladores de libSDL2.\n</string>
|
||||
<string name="about_links">Siguenos en:
|
||||
• <a href="https://vk.com/xashdroid">VK</a>
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>
|
||||
• <a href="https://github.com/FWGS">GitHub</a></string>
|
||||
<string name="about_links">Siguenos en: \n
|
||||
• <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>\n
|
||||
• <a href="https://github.com/SDLash3D">GitHub</a></string>
|
||||
<string name="about_button">Acerca de Xash3D Android</string>
|
||||
<string name="create_shortcut_button">Crear acceso directo del mod</string>
|
||||
<string name="select_folder">(seleccionar)</string>
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Xash3D</string>
|
||||
<string name="launcher_name">Xash3D</string>
|
||||
<string name="launcher_name_test">Xash3D (آزمایشی)</string>
|
||||
<string name="launch_button">!Xash3Dاجرای</string>
|
||||
<string name="cmd_args_text">دستورات خط فرمان (فقط برای حرفه ای ها):</string>
|
||||
<string name="use_controls">فعال کردن کنترل های لمسی</string>
|
||||
|
@ -15,11 +12,9 @@
|
|||
<string name="gamedir">مسیر مود</string>
|
||||
<string name="pkgname">نام بسته مود (فقط برای حرفه ای ها):</string>
|
||||
<string name="shortcut_name">نام میانبر</string>
|
||||
<string name="about_main">Xash3D Android</string>
|
||||
<string name="about_copyright">یا شرکای آن ندارد. تمامی حقوق کپی برای صاحبان هر کدام محفوظ است. Valve هیچ نسبتی با Flying With Gauss</string>
|
||||
<string name="version_string" translatable="false">v0.17.1</string>
|
||||
<string name="about_authors">:Flying With Gauss پورت شده به اندروید توسط تیم \n • a1batross\n • mittorn \n • nicknekit.\n تشکر ویژه از:\n • Xash3Dبرای موتور Uncle Mike\n • Half-Life برای Valve\n • libSDL2 توسعه دهندگان.\n</string>
|
||||
<string name="about_links">ما را دنبال کنید در : •<a href="https://vk.com/xashdroid">VK</a>•<a href="http://moddb.com/game/xash3d-android">ModDB</a>•<a href="https://github.com/FWGS">GitHub</a></string>
|
||||
<string name="about_copyright">یا شرکای آن ندارد. تمامی حقوق کپی برای صاحبان هر کدام محفوظ است. Valve هیچ نسبتی با SDLash3D</string>
|
||||
<string name="about_authors">:SDLash3D پورت شده به اندروید توسط تیم \n • a1batross\n • mittorn \n • nicknekit.\n تشکر ویژه از:\n • Xash3Dبرای موتور Uncle Mike\n • Half-Life برای Valve\n • libSDL2 توسعه دهندگان.\n</string>
|
||||
<string name="about_links">ما را دنبال کنید در :\n •<a href="https://vk.com/xashdroid">VK</a>\n•<a href="http://moddb.com/game/xash3d-android">ModDB</a>\n•<a href="https://github.com/SDLash3D">GitHub</a></string>
|
||||
<string name="about_button">Xash3D Android درباره</string>
|
||||
<string name="create_shortcut_button">ایجاد میانبر مود</string>
|
||||
<string name="select_folder">(انتخاب)</string>
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<resources>
|
||||
<string name="app_name">Xash3D</string>
|
||||
<string name="launcher_name">Xash3D</string>
|
||||
<string name="launcher_name_test">Xash3D (테스트)</string>
|
||||
|
||||
<string name="launch_button">Xash3D 실행!</string>
|
||||
<string name="cmd_args_text">커멘드 라인 입력(고급 설정)</string>
|
||||
<string name="use_controls">터치 컨트롤 사용</string>
|
||||
|
@ -17,9 +13,8 @@
|
|||
<string name="gamedir">모드 디렉토리</string>
|
||||
<string name="pkgname">모드 패키지 이름(고급설정)</string>
|
||||
<string name="shortcut_name">바로가기 이름</string>
|
||||
<string name="about_main">Xash3D 안드로이드</string>
|
||||
<string name="about_copyright">우리 Flying With Gauss는 밸브와 상업적으로 관련이 없습니다. 모든 저작권은 소유주로 보류되어있음을 알립니다..</string>
|
||||
<string name="about_authors">안드로이드 이식 by Flying With Gauss: \n
|
||||
<string name="about_copyright">우리 SDLash3D는 밸브와 상업적으로 관련이 없습니다. 모든 저작권은 소유주로 보류되어있음을 알립니다..</string>
|
||||
<string name="about_authors">안드로이드 이식 by SDLash3D팀: \n
|
||||
• a1batross\n
|
||||
• mittorn \n
|
||||
• nicknekit.\n
|
||||
|
@ -29,10 +24,10 @@
|
|||
• 밸브의 하프라이프\n
|
||||
• libSDL2 개발자분들\n
|
||||
• 한글화 byAIC from X3A NaverCafe</string>
|
||||
<string name="about_links">
|
||||
여기서 우리를: • <a href="https://vk.com/xashdroid">VK</a>
|
||||
• <a href="http://moddb.com/game/xash3d-android">모드디비</a>
|
||||
• <a href="https://github.com/FWGS">깃허브</a>
|
||||
<string name="about_links">\n
|
||||
여기서 우리를: • <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">모드디비</a>\n
|
||||
• <a href="https://github.com/SDLash3D">깃허브</a>
|
||||
</string>
|
||||
<string name="about_button">Xash3D 안드로이드 정보</string>
|
||||
<string name="create_shortcut_button">바로가기 만들기</string>
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name">Xash3D</string>
|
||||
<string name="launcher_name">Xash3D</string>
|
||||
<string name="launcher_name_test">Xash3D (test)</string>
|
||||
|
||||
<string name="launch_button">Iniciar Xash3D!</string>
|
||||
<string name="cmd_args_text">Argumentos de linha de comando(apenas expecialistas)</string>
|
||||
<string name="use_controls">Habilitar controles de touch</string>
|
||||
|
@ -18,11 +13,8 @@
|
|||
<string name="pkgname">Nome do pacote de Mod (apenas expecialistas)</string>
|
||||
<string name="shortcut_name">Nome do atalho</string>
|
||||
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="about_main">Xash3D Android</string>
|
||||
<string name="about_copyright">Flying With Gauss não é afiliado com a Valve ou qualquer um dos seus parceiros. Todos os direitos autorais reservados aos respectivos proprietários.</string>
|
||||
<string name="version_string" translatable="false">v0.17.1</string>
|
||||
<string name="about_authors">Porta para android pelo Flying With Gauss: \n
|
||||
<string name="about_copyright">SDLash3D não é afiliado com a Valve ou qualquer um dos seus parceiros. Todos os direitos autorais reservados aos respectivos proprietários.</string>
|
||||
<string name="about_authors">Porta para android pelo time SDLash3D: \n
|
||||
• a1batross\n
|
||||
• mittorn \n
|
||||
• nicknekit.\n
|
||||
|
@ -31,10 +23,10 @@ Agradecimentos especiais para:\n
|
|||
• Uncle Mike pelo motor Xash3D\n
|
||||
• Valve pelo Half-Life\n
|
||||
• Desenvolvedores libSDL2.\n</string>
|
||||
<string name="about_links">Siga-nos no:
|
||||
• <a href="https://vk.com/xashdroid">VK</a>
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>
|
||||
• <a href="https://github.com/FWGS">GitHub</a></string>
|
||||
<string name="about_links">Siga-nos no:\n
|
||||
• <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>\n
|
||||
• <a href="https://github.com/SDLash3D">GitHub</a></string>
|
||||
<string name="about_button">Sobre Android Xash3D</string>
|
||||
<string name="create_shortcut_button">Criar atalho para o mod</string>
|
||||
<string name="select_folder">(selecionar)</string>
|
||||
|
|
|
@ -1,29 +1,58 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!--<string name="app_name" translatable="false">Xash3D</string>
|
||||
<string name="launcher_name" translatable="false">Xash3D</string>
|
||||
<string name="launcher_name_test" translatable="false">Xash3D (test)</string>-->
|
||||
|
||||
<string name="cmd_args_text">Аргументы командной строки(только для экспертов)</string>
|
||||
<string name="launch_button">Запустить Xash3D</string>
|
||||
<string name="cmd_args_text">Аргументы командной строки(только для экспертов)</string>
|
||||
<string name="use_controls">Включить экранное управление</string>
|
||||
<string name="use_volume">Использовать кнопки громкости</string>
|
||||
<string name="volume">Действие кнопок громкости</string>
|
||||
<string name="use_volume">Регулировка громкости</string>
|
||||
<string name="no_volume">Использовать в игре</string>
|
||||
<string name="text_res_path">Путь к ресурсам игры</string>
|
||||
<string name="touch_set">Настройки управления</string>
|
||||
<string name="text_shortcut">Ярлык Xash3D</string>
|
||||
<string name="text_shortcut_test">Ярлык Xash3D (тест)</string>
|
||||
<string name="shortcut_button_save">Сохранить ярлык</string>
|
||||
<string name="gamedir">Каталог мода</string>
|
||||
<string name="pkgname">Пакет мода (только для экспертов)</string>
|
||||
<string name="shortcut_name">Название ярлыка</string>
|
||||
<string name="about_authors">Порт на Android осуществлен Flying With Gauss:\n
|
||||
• a1batross\n
|
||||
• mittorn\n
|
||||
• nicknekit\n
|
||||
|
||||
Особые благодарности:\n
|
||||
• Дяде Мише за Xash3D\n
|
||||
• Valve за Half-Life\n
|
||||
• Beloko Games за поддержку сенсорного управления\n
|
||||
• Разработчикам libSDL2</string>
|
||||
<!--<string name="about_main" translatable="false">Xash3D Android</string>-->
|
||||
<string name="about_copyright">SDLash3D не связан с Valve или с любыми из их партнеров. Все авторские права принадлежат их соотвественным обладателям.</string>
|
||||
<!-- Seems Android skips any line breaks and tabs here. -->
|
||||
<string name="about_authors">
|
||||
Порт на Android осуществлен командой SDLash3D:\n
|
||||
• a1batross\n
|
||||
• mittorn\n
|
||||
• nicknekit\n
|
||||
|
||||
Особые благодарности:\n
|
||||
• Дяде Мише за Xash3D\n
|
||||
• Valve за Half-Life\n
|
||||
• Разработчикам libSDL2
|
||||
</string>
|
||||
<string name="about_links">
|
||||
Подпишись на нас: \n
|
||||
• <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>\n
|
||||
• <a href="https://github.com/SDLash3D">GitHub</a>
|
||||
</string>
|
||||
<string name="about_button">О Xash3D Android</string>
|
||||
<string name="about_copyright">Flying With Gauss не связан с Valve или с любыми из их партнеров. Все авторские права принадлежат их соотвественным обладателям.</string>
|
||||
<string name="action_settings">Настройки</string>
|
||||
<string name="text_shortcut_test">Ярлык Xash3D (тест)</string>
|
||||
<string name="create_shortcut_button">Создать ярлык</string>
|
||||
<string name="select_folder">Выбрать путь игровых файлов</string>
|
||||
|
||||
<string name="text_tab1">Стандартный</string>
|
||||
<string name="text_tab2">Продвинутый</string>
|
||||
<string name="text_res_tittle2">Стандартные настройки</string>
|
||||
<string name="text_res_tittle3">Продвинутые настройки</string>
|
||||
|
||||
<string name="update_button">Проверять обновления при запуске</string>
|
||||
<string name="update_to_beta">Обновлять до нестабильной версии, если доступно</string>
|
||||
<string name="update_message">%s доступен! Скачай его сейчас!</string>
|
||||
<string name="update">Обновить</string>
|
||||
<string name="cancel">Отмена</string>
|
||||
<string name="no_updates">Обновления не найдены</string>
|
||||
<string name="checking_updates">Работаю...</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name">Xash3D</string>
|
||||
<string name="launcher_name">Xash3D</string>
|
||||
<string name="launcher_name_test">Xash3D (test)</string>
|
||||
|
||||
<string name="launch_button">Xash3D\'yi Başlat!</string>
|
||||
<string name="cmd_args_text">Komut satırı parametreleri(uzmanlar için)</string>
|
||||
<string name="use_controls">Dokunmatik kontrolleri etkinleştir</string>
|
||||
|
@ -18,9 +13,8 @@
|
|||
<string name="pkgname">Mod\'un paket adı (uzmanlar için)</string>
|
||||
<string name="shortcut_name">Kısayol adı</string>
|
||||
|
||||
<string name="about_main">Xash3D Android</string>
|
||||
<string name="about_copyright">Flying With Gauss, Valve veya Valve\'ın herhangi bir partnerine bağlı değildir. Tüm telif hakları kendi sahiplerine aittir.</string>
|
||||
<string name="about_authors">Flying With Gauss takımından Android Port\'u: \n
|
||||
<string name="about_copyright">SDLash3D, Valve veya Valve\'ın herhangi bir partnerine bağlı değildir. Tüm telif hakları kendi sahiplerine aittir.</string>
|
||||
<string name="about_authors">SDLash3D takımından Android Port\'u: \n
|
||||
• a1batross\n
|
||||
• mittorn \n
|
||||
• nicknekit.\n
|
||||
|
@ -29,10 +23,10 @@
|
|||
• Uncle Mike for Xash3D engine\n
|
||||
• Valve for Half-Life\n
|
||||
• libSDL2 developers.\n</string>
|
||||
<string name="about_links">Bizi buralardan takip edin:
|
||||
• <a href="https://vk.com/xashdroid">VK</a>
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>
|
||||
• <a href="https://github.com/FWGS">GitHub</a></string>
|
||||
<string name="about_links">Bizi buralardan takip edin: \n
|
||||
• <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>\n
|
||||
• <a href="https://github.com/SDLash3D">GitHub</a></string>
|
||||
<string name="about_button">Xash3D Android Hakkında</string>
|
||||
<string name="create_shortcut_button">Mod kısayolu oluştur</string>
|
||||
<string name="select_folder">(seç)</string>
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Xash3D</string>
|
||||
<string name="launcher_name">Xash3D</string>
|
||||
<string name="launcher_name_test">Xash3D (test)</string>
|
||||
|
||||
<string name="launch_button">Запустити Xash3D</string>
|
||||
<string name="cmd_args_text">Аргументи командного рядка(тільки для експертів)</string>
|
||||
<string name="use_controls">Включити екранне управління</string>
|
||||
|
@ -16,10 +12,8 @@
|
|||
<string name="gamedir">Каталог мода</string>
|
||||
<string name="pkgname">Пакет мода (тільки для експертів)</string>
|
||||
<string name="shortcut_name">Назва ярлика</string>
|
||||
|
||||
<string name="about_main">Xash3D Android</string>
|
||||
<string name="about_copyright">Flying With Gauss не пов\'язаний з Valve або з будь-якими з їх партнерів. Всі авторські права належать їх відповідним власникам.</string>
|
||||
<string name="about_authors">Порт на Android здійснений Flying With Gauss:\n
|
||||
<string name="about_copyright">SDLash3D не пов\'язаний з Valve або з будь-якими з їх партнерів. Всі авторські права належать їх відповідним власникам.</string>
|
||||
<string name="about_authors">Порт на Android здійснений командою SDLash3D:\n
|
||||
• a1batross\n
|
||||
• mittorn\n
|
||||
• nicknekit\n
|
||||
|
@ -28,10 +22,10 @@
|
|||
• Дяде Мише за Xash3D\n
|
||||
• Valve за Half-Life\n
|
||||
• Розробникам libSDL2.\n</string>
|
||||
<string name="about_links">Слідуйте за нами в:
|
||||
• <a href="https://vk.com/xashdroid">VK</a>
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>
|
||||
• <a href="https://github.com/FWGS">GitHub</a></string>
|
||||
<string name="about_links">Слідуйте за нами в:\n
|
||||
• <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>\n
|
||||
• <a href="https://github.com/SDLash3D">GitHub</a></string>
|
||||
<string name="about_button">О Xash3D Android</string>
|
||||
<string name="create_shortcut_button">Створити ярлик мода</string>
|
||||
<string name="select_folder">(вибрати)</string>
|
||||
|
|
|
@ -1,77 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<resources>
|
||||
|
||||
|
||||
<string name="app_name">Xash3D</string>
|
||||
|
||||
<string name="launcher_name">Xash3D</string>
|
||||
|
||||
<string name="launcher_name_test">Xash3D (test)</string>
|
||||
|
||||
<string name="launch_button">启动 Xash3D!</string>
|
||||
|
||||
<string name="cmd_args_text">命令行参数(高级)</string>
|
||||
|
||||
<string name="use_controls">启用触摸控制</string>
|
||||
|
||||
<string name="use_volume">使用音量键</string>
|
||||
|
||||
<string name="text_res_path">游戏资源路径</string>
|
||||
|
||||
<string name="touch_set">控制设置</string>
|
||||
|
||||
<string name="text_shortcut">Xash3D 快捷方式</string>
|
||||
|
||||
<string name="text_shortcut_test">Xash3D_test 快捷方式</string>
|
||||
|
||||
<string name="shortcut_button_save">保存快捷方式</string>
|
||||
|
||||
<string name="gamedir">Mod 目录</string>
|
||||
|
||||
<string name="pkgname">Mod 资源包名字(高级)</string>
|
||||
|
||||
<string name="shortcut_name">快捷方式名字</string>
|
||||
|
||||
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
|
||||
<string name="about_main">Xash3D Android</string>
|
||||
|
||||
<string name="about_copyright">Flying With Gauss不隶属于Valve或其合作伙伴。 版权归各自所有。</string>
|
||||
|
||||
<string name="version_string" translatable="false">v0.17.1</string>
|
||||
|
||||
<string name="about_authors">由Flying With Gauss团队移植到Android系统,成员: \n
|
||||
|
||||
<string name="about_copyright">SDLash3D不隶属于Valve或其合作伙伴。 版权归各自所有。</string>
|
||||
<string name="about_authors">由SDLash3D团队移植到Android系统,成员: \n
|
||||
• a1batross\n
|
||||
|
||||
• mittorn \n
|
||||
|
||||
• nicknekit.\n
|
||||
|
||||
|
||||
特别感谢:\n
|
||||
|
||||
• Uncle Mike 制作的 Xash3D 引擎\n
|
||||
|
||||
• Valve 制作的 《半条命》\n
|
||||
|
||||
• libSDL2 开发商\n</string>
|
||||
|
||||
<string name="about_links">联系我们:
|
||||
|
||||
• <a href="https://vk.com/xashdroid">VK</a>
|
||||
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>
|
||||
|
||||
• <a href="https://github.com/FWGS">GitHub</a></string>
|
||||
|
||||
<string name="about_links">联系我们: \n
|
||||
• <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>\n
|
||||
• <a href="https://github.com/SDLash3D">GitHub</a></string>
|
||||
<string name="about_button">关于 Xash3D Android</string>
|
||||
|
||||
<string name="create_shortcut_button">创建mod快捷方式</string>
|
||||
|
||||
<string name="select_folder">(选择)</string>
|
||||
|
||||
</resources>
|
||||
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name" translatable="false">Xash3D</string>
|
||||
<string name="launcher_name" translatable="false">Xash3D</string>
|
||||
<string name="launcher_name_test" translatable="false">Xash3D (test)</string>
|
||||
<string name="version_string" translatable="false">v0.18</string>
|
||||
|
||||
<string name="app_name">Xash3D</string>
|
||||
<string name="launcher_name">Xash3D</string>
|
||||
<string name="launcher_name_test">Xash3D (test)</string>
|
||||
<string name="launch_button">Launch Xash3D!</string>
|
||||
<string name="cmd_args_text">Command line arguments(experts only)</string>
|
||||
<string name="use_controls">Enable touch controls</string>
|
||||
<string name="use_volume">Use volume keys</string>
|
||||
<string name="text_res_path">Path to game resources</string>
|
||||
<string name="touch_set">Controls settings</string>
|
||||
<string name="text_shortcut">Xash3D shortcut</string>
|
||||
|
@ -16,23 +15,46 @@
|
|||
<string name="gamedir">Mod directory</string>
|
||||
<string name="pkgname">Mod package name (experts only)</string>
|
||||
<string name="shortcut_name">Shortcut name</string>
|
||||
<string name="about_main">Xash3D Android</string>
|
||||
<string name="about_copyright">Flying With Gauss is not affiliated with Valve or any of their partners. All copyrights reserved to their respective owners.</string>
|
||||
<string name="version_string" translatable="false">v0.17.1</string>
|
||||
<string name="about_authors">Port to Android by Flying With Gauss: \n
|
||||
• a1batross\n
|
||||
• mittorn \n
|
||||
• nicknekit.\n
|
||||
|
||||
Special thanks to:\n
|
||||
• Uncle Mike for Xash3D engine\n
|
||||
• Valve for Half-Life\n
|
||||
• libSDL2 developers.\n</string>
|
||||
<string name="about_links">Follow us in:
|
||||
• <a href="https://vk.com/xashdroid">VK</a>
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>
|
||||
• <a href="https://github.com/FWGS">GitHub</a></string>
|
||||
<string name="about_button">About Xash3D Android</string>
|
||||
<string name="about_main" translatable="false">Xash3D Android</string>
|
||||
<string name="about_copyright">SDLash3D is not affiliated with Valve or any of their partners. All copyrights reserved to their respective owners.</string>
|
||||
<!-- Seems Android skips any line breaks and tabs here. -->
|
||||
<string name="about_authors">
|
||||
Port to Android by SDLash3D team: \n
|
||||
• a1batross\n
|
||||
• mittorn \n
|
||||
• nicknekit.\n
|
||||
|
||||
Special thanks to:\n
|
||||
• Uncle Mike for Xash3D engine\n
|
||||
• Valve for Half-Life\n
|
||||
• libSDL2 developers.\n
|
||||
</string>
|
||||
<string name="about_links">
|
||||
Follow us in: \n
|
||||
• <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>\n
|
||||
• <a href="https://github.com/SDLash3D">GitHub</a>
|
||||
</string>
|
||||
<string name="about_button">About</string>
|
||||
<string name="create_shortcut_button">Create mod shortcut</string>
|
||||
<string name="select_folder">(select)</string>
|
||||
<string name="select_folder">Select game data location</string>
|
||||
|
||||
<string name="text_tab1">Normal</string>
|
||||
<string name="text_tab2">Advanced</string>
|
||||
<string name="text_res_tittle2">Normal settings</string>
|
||||
<string name="text_res_tittle3">Advanced settings</string>
|
||||
<string name="volume">Volume buttons mode</string>
|
||||
<string name="use_volume">Default action</string>
|
||||
<string name="no_volume">Use in game</string>
|
||||
<string name="folder">Set current folder</string>
|
||||
|
||||
<string name="update_button">Check updates on start</string>
|
||||
<string name="update_to_beta">Update to unstable version if available</string>
|
||||
<string name="update_message">%s is available! Download it now!</string>
|
||||
<string name="update">Update</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="no_updates">No updates was found</string>
|
||||
<string name="checking_updates">Working...</string>
|
||||
<string name="immersive_mode">Enable Immersive Mode(fullscreen, KitKat or higher)</string>
|
||||
</resources>
|
||||
|
|
75
scripts/auto-rename.sh
Executable file
|
@ -0,0 +1,75 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Was used to move bunch of travis autobuilds to new path
|
||||
|
||||
# Remove unneeded info
|
||||
function clearName
|
||||
{
|
||||
echo $1 | sed 's/xashdroid-//;s/.apk//'
|
||||
}
|
||||
|
||||
function getYear
|
||||
{
|
||||
echo $1 | awk -F- '{ print $(NF-4)}'
|
||||
}
|
||||
|
||||
function getMonth
|
||||
{
|
||||
echo $1 | awk -F- '{ print $(NF-3)}'
|
||||
}
|
||||
|
||||
function getDay
|
||||
{
|
||||
echo $1 | awk -F- '{ print $(NF-2)}' | awk -F_ '{ print $1 }'
|
||||
}
|
||||
|
||||
function getHour
|
||||
{
|
||||
echo $1 | awk -F- '{ print $(NF-2)}' | awk -F_ '{ print $2 }'
|
||||
}
|
||||
|
||||
function getMinute
|
||||
{
|
||||
echo $1 | awk -F- '{ print $(NF-1)}'
|
||||
}
|
||||
|
||||
function getHash
|
||||
{
|
||||
echo $1 | awk -F- '{ print $(NF)}'
|
||||
}
|
||||
|
||||
|
||||
function getArch
|
||||
{
|
||||
local SECOND=`echo $1 | awk -F- '{ print $(NF-5)}'`
|
||||
local FIRST=`echo $1 | awk -F- '{ print $(NF-6)}'`
|
||||
|
||||
if [ "$SECOND" = "tegra2" ]; then
|
||||
echo $FIRST-$SECOND
|
||||
else
|
||||
echo $SECOND
|
||||
fi
|
||||
}
|
||||
|
||||
function getDaysSinceRelease
|
||||
{
|
||||
printf %04d $(( ( $(date -ud "$1$2$3" +'%s') - $(date -ud '150401' +'%s') )/60/60/24 ))
|
||||
}
|
||||
|
||||
|
||||
for i in *.apk;
|
||||
do
|
||||
NAME=`clearName ${i}`
|
||||
YEAR=`getYear ${NAME}`
|
||||
MONTH=`getMonth ${NAME}`
|
||||
DAY=`getDay ${NAME}`
|
||||
HOUR=`getHour ${NAME}`
|
||||
MINUTE=`getMinute ${NAME}`
|
||||
ARCH=`getArch ${NAME}`
|
||||
HASH=`getHash ${NAME}`
|
||||
DAYSSINCERELEASE=`getDaysSinceRelease ${YEAR} ${MONTH} ${DAY}`
|
||||
|
||||
echo "Moving ${i} to 20${YEAR}/${MONTH}/${DAY}/xash3d-${DAYSSINCERELEASE}-${HOUR}-${MINUTE}-${ARCH}-${HASH}.apk"
|
||||
mkdir -p 20${YEAR}/${MONTH}/${DAY}/
|
||||
mv ${i} 20${YEAR}/${MONTH}/${DAY}/xash3d-${DAYSSINCERELEASE}-${HOUR}-${MINUTE}-${ARCH}-${HASH}.apk
|
||||
done
|
63
scripts/travis-upload.sh
Executable file
|
@ -0,0 +1,63 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Upload travis generated APKs to the Transfer.sh and Yandex.Disk
|
||||
|
||||
function getDaysSinceRelease
|
||||
{
|
||||
printf %04d $(( ( $(date +'%s') - $(date -ud '150401' +'%s') )/60/60/24 ))
|
||||
}
|
||||
|
||||
DAYSSINCERELEASE=`getDaysSinceRelease`
|
||||
COMMITHASH=$(git rev-parse --short HEAD)
|
||||
CURRENTBRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
|
||||
function generateFileName
|
||||
{
|
||||
echo "xash3d-$DAYSSINCERELEASE-$(date +"%H-%M")-$1-$COMMITHASH.apk"
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Transfer.sh
|
||||
TRANSFERSH_ARMV5=`curl --upload-file xashdroid-armv5.apk https://transfer.sh/$(generateFileName armv5)`
|
||||
TRANSFERSH_ARMV6=`curl --upload-file xashdroid-armv6.apk https://transfer.sh/$(generateFileName armv6)`
|
||||
TRANSFERSH_ARMV7=`curl --upload-file xashdroid-armv7.apk https://transfer.sh/$(generateFileName armv7)`
|
||||
TRANSFERSH_ARMV7TEGRA2=`curl --upload-file xashdroid-armv7-tegra2.apk https://transfer.sh/$(generateFileName armv7-tegra2)`
|
||||
TRANSFERSH_X86=`curl --upload-file xashdroid-x86.apk https://transfer.sh/$(generateFileName x86)`
|
||||
|
||||
echo "Transfer.sh links:"
|
||||
echo "armv5: ${TRANSFERSH_ARMV5}"
|
||||
echo "armv6: ${TRANSFERSH_ARMV6}"
|
||||
echo "armv7: ${TRANSFERSH_ARMV7}"
|
||||
echo "tegra2: ${TRANSFERSH_ARMV7TEGRA2}"
|
||||
echo "x86: ${TRANSFERSH_X86}"
|
||||
|
||||
# YaDisk
|
||||
|
||||
YADISKPATH=`date +%Y/%m/%d`
|
||||
|
||||
curl -u $YADISK_USERNAME:$YADISK_PASSWORD -X MKCOL https://webdav.yandex.ru/XashTestVersions/`date +%Y`
|
||||
curl -u $YADISK_USERNAME:$YADISK_PASSWORD -X MKCOL https://webdav.yandex.ru/XashTestVersions/`date +%Y/%m`/
|
||||
curl -u $YADISK_USERNAME:$YADISK_PASSWORD -X MKCOL https://webdav.yandex.ru/XashTestVersions/`date +%Y/%m/%d`/
|
||||
|
||||
curl -T xashdroid-armv7.apk -u $YADISK_USERNAME:$YADISK_PASSWORD https://webdav.yandex.ru/XashTestVersions/$YADISKPATH/$(generateFileName armv7)
|
||||
curl -T xashdroid-armv6.apk -u $YADISK_USERNAME:$YADISK_PASSWORD https://webdav.yandex.ru/XashTestVersions/$YADISKPATH/$(generateFileName armv6)
|
||||
curl -T xashdroid-armv5.apk -u $YADISK_USERNAME:$YADISK_PASSWORD https://webdav.yandex.ru/XashTestVersions/$YADISKPATH/$(generateFileName armv5)
|
||||
curl -T xashdroid-armv7-tegra2.apk -u $YADISK_USERNAME:$YADISK_PASSWORD https://webdav.yandex.ru/XashTestVersions/$YADISKPATH/$(generateFileName armv7-tegra2)
|
||||
curl -T xashdroid-x86.apk -u $YADISK_USERNAME:$YADISK_PASSWORD https://webdav.yandex.ru/XashTestVersions/$YADISKPATH/$(generateFileName x86)
|
||||
|
||||
# Update current
|
||||
# $TRAVIS_BRANCH is predefined by Travis CI
|
||||
function generateFileName_current
|
||||
{
|
||||
echo "xash3d-current-$1-$TRAVIS_BRANCH.apk"
|
||||
}
|
||||
|
||||
curl -T xashdroid-armv7.apk -u $YADISK_USERNAME:$YADISK_PASSWORD https://webdav.yandex.ru/XashTestVersions/$(generateFileName_current armv7)
|
||||
curl -T xashdroid-armv6.apk -u $YADISK_USERNAME:$YADISK_PASSWORD https://webdav.yandex.ru/XashTestVersions/$(generateFileName_current armv6)
|
||||
curl -T xashdroid-armv5.apk -u $YADISK_USERNAME:$YADISK_PASSWORD https://webdav.yandex.ru/XashTestVersions/$(generateFileName_current armv5)
|
||||
curl -T xashdroid-armv7-tegra2.apk -u $YADISK_USERNAME:$YADISK_PASSWORD https://webdav.yandex.ru/XashTestVersions/$(generateFileName_current armv7-tegra2)
|
||||
curl -T xashdroid-x86.apk -u $YADISK_USERNAME:$YADISK_PASSWORD https://webdav.yandex.ru/XashTestVersions/$(generateFileName_current x86)
|
||||
|
||||
|
||||
exit 0
|
263
src/in/celest/xash3d/FPicker.java
Normal file
|
@ -0,0 +1,263 @@
|
|||
package in.celest.xash3d;
|
||||
//Created by Solexid
|
||||
import android.app.Activity;
|
||||
import android.app.ListActivity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Environment;
|
||||
import android.os.Bundle;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.widget.Button;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.DateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import in.celest.xash3d.hl.R;
|
||||
|
||||
public class FPicker extends Activity {
|
||||
private File currentDir;
|
||||
private FileArrayAdapter adapter;
|
||||
static ListView delta;
|
||||
public static final int sdk = Integer.valueOf(Build.VERSION.SDK);
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if ( sdk >= 21 )
|
||||
super.setTheme( 0x01030224 );
|
||||
|
||||
setContentView(R.layout.activity_fpicker);
|
||||
String path = Environment.getExternalStorageDirectory().toString();
|
||||
currentDir = new File(path);
|
||||
((Button)findViewById( R.id.button_fpicker_select )).setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
onFileClick(v);
|
||||
}
|
||||
});
|
||||
fill(currentDir);
|
||||
}
|
||||
|
||||
private void fill(File folder)
|
||||
{
|
||||
new Fill(folder).execute();
|
||||
}
|
||||
|
||||
private class Fill extends AsyncTask<Void, Void, List<Item>>
|
||||
{
|
||||
File folder;
|
||||
|
||||
public Fill(File f)
|
||||
{
|
||||
folder = f;
|
||||
}
|
||||
|
||||
protected List<Item> doInBackground(Void... voids)
|
||||
{
|
||||
File[] dirs = folder.listFiles();
|
||||
List<Item> dir = new ArrayList<Item>();
|
||||
|
||||
while( dirs == null )
|
||||
{
|
||||
folder = new File(folder.getParent());
|
||||
if( folder == null )
|
||||
return dir;
|
||||
dirs = folder.listFiles();
|
||||
}
|
||||
|
||||
|
||||
for(File ff: dirs)
|
||||
{
|
||||
Date lastModDate = new Date(ff.lastModified());
|
||||
DateFormat formater = DateFormat.getDateTimeInstance();
|
||||
String date_modify = formater.format(lastModDate);
|
||||
if(ff.isDirectory())
|
||||
{
|
||||
boolean isXashDir=false;
|
||||
File[] fbuf = ff.listFiles();
|
||||
int buf = 0;
|
||||
if(fbuf != null&&fbuf.length<20)
|
||||
{
|
||||
buf = fbuf.length;
|
||||
for (File valves: fbuf)
|
||||
{
|
||||
if (valves.isDirectory() && valves.getName().contains("valve"))
|
||||
isXashDir=true;
|
||||
}
|
||||
}
|
||||
|
||||
String num_item = String.valueOf(buf);
|
||||
if(buf == 0)
|
||||
num_item = "Some items";
|
||||
else
|
||||
num_item +=" items";
|
||||
if(isXashDir)
|
||||
{
|
||||
dir.add(new Item(ff.getName(), num_item, date_modify, ff.getAbsolutePath(), R.drawable.ic_launcher));
|
||||
}
|
||||
else
|
||||
{
|
||||
dir.add(new Item(ff.getName(), num_item, date_modify, ff.getAbsolutePath(), R.drawable.folder));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Collections.sort(dir);
|
||||
|
||||
if(folder.getName().length() > 1)
|
||||
dir.add(0, new Item( "..", "Parent Directory", "", folder.getParent(), R.drawable.folder));
|
||||
|
||||
return dir;
|
||||
}
|
||||
|
||||
protected void onPostExecute(List<Item> dir)
|
||||
{
|
||||
setTitle("Current Dir: "+folder.getName());
|
||||
|
||||
adapter = new FileArrayAdapter(FPicker.this,R.layout.row,dir);
|
||||
delta = (ListView)findViewById(R.id.FileView);
|
||||
delta.setAdapter(adapter);
|
||||
delta.setOnItemClickListener(new AdapterView.OnItemClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent , View v, int position, long id)
|
||||
{
|
||||
Item o = adapter.getItem(position);
|
||||
currentDir = new File(o.getPath());
|
||||
fill(currentDir);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void onFileClick(View v)
|
||||
{
|
||||
Toast.makeText(this, "Chosen path : " + currentDir, Toast.LENGTH_SHORT).show();
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("GetPath",currentDir.toString());
|
||||
setResult(RESULT_OK, intent);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
class FileArrayAdapter extends ArrayAdapter<Item>
|
||||
{
|
||||
private Context c;
|
||||
private int id;
|
||||
private List<Item>items;
|
||||
|
||||
public FileArrayAdapter(Context context, int textViewResourceId, List<Item> objects)
|
||||
{
|
||||
super(context, textViewResourceId, objects);
|
||||
c = context;
|
||||
id = textViewResourceId;
|
||||
items = objects;
|
||||
}
|
||||
|
||||
public Item getItem(int i)
|
||||
{
|
||||
return items.get(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
View v = convertView;
|
||||
if (v == null)
|
||||
{
|
||||
LayoutInflater vi = (LayoutInflater)c.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
v = vi.inflate(id, null);
|
||||
}
|
||||
|
||||
final Item finstance = items.get(position);
|
||||
if (finstance != null)
|
||||
{
|
||||
TextView filename = (TextView) v.findViewById(R.id.filename);
|
||||
TextView fileitems = (TextView) v.findViewById(R.id.fileitems);
|
||||
TextView filedate = (TextView) v.findViewById(R.id.filedate);
|
||||
ImageView imageicon = (ImageView) v.findViewById(R.id.fd_Icon1);
|
||||
|
||||
Drawable image = c.getResources().getDrawable(finstance.getImage());
|
||||
imageicon.setImageDrawable(image);
|
||||
|
||||
if(filename!=null)
|
||||
filename.setText(finstance.getName());
|
||||
if(fileitems!=null)
|
||||
fileitems.setText(finstance.getData());
|
||||
if(filedate!=null)
|
||||
filedate.setText(finstance.getDate());
|
||||
}
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
class Item implements Comparable<Item>{
|
||||
private String name;
|
||||
private String data;
|
||||
private String date;
|
||||
private String path;
|
||||
private int image;
|
||||
|
||||
public Item(String n,String d, String dt, String p, int img)
|
||||
{
|
||||
name = n;
|
||||
data = d;
|
||||
date = dt;
|
||||
path = p;
|
||||
image = img;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getData()
|
||||
{
|
||||
return data;
|
||||
}
|
||||
|
||||
public String getDate()
|
||||
{
|
||||
return date;
|
||||
}
|
||||
|
||||
public String getPath()
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
public int getImage()
|
||||
{
|
||||
return image;
|
||||
}
|
||||
|
||||
public int compareTo(Item o)
|
||||
{
|
||||
if(this.name != null)
|
||||
return this.name.toLowerCase().compareTo(o.getName().toLowerCase());
|
||||
else
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
}
|
|
@ -3,12 +3,46 @@ import android.content.BroadcastReceiver;
|
|||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
public class InstallReceiver extends BroadcastReceiver {
|
||||
private static final String TAG = "XASH3D";
|
||||
@Override
|
||||
public void onReceive(Context context, Intent arg1) {
|
||||
Log.d( TAG, "Install received, extracting PAK" );
|
||||
org.libsdl.app.SDLActivity.extractPAK( context, true );
|
||||
}
|
||||
private static final String TAG = "XASH3D";
|
||||
@Override
|
||||
public void onReceive(Context context, Intent arg1) {
|
||||
String pkgname = arg1.getData().getEncodedSchemeSpecificPart();
|
||||
Log.d( TAG, "Install received, package " + pkgname );
|
||||
if( context.getPackageName().equals(pkgname) )
|
||||
extractPAK(context, true);
|
||||
}
|
||||
public static SharedPreferences mPref = null;
|
||||
private static final int PAK_VERSION = 5;
|
||||
public static void extractPAK(Context context, Boolean force) {
|
||||
InputStream is = null;
|
||||
FileOutputStream os = null;
|
||||
try {
|
||||
if( mPref == null )
|
||||
mPref = context.getSharedPreferences("engine", 0);
|
||||
if( mPref.getInt( "pakversion", 0 ) == PAK_VERSION && !force )
|
||||
return;
|
||||
String path = context.getFilesDir().getPath()+"/extras.pak";
|
||||
|
||||
is = context.getAssets().open("extras.pak");
|
||||
os = new FileOutputStream(path);
|
||||
byte[] buffer = new byte[1024];
|
||||
int length;
|
||||
while ((length = is.read(buffer)) > 0) {
|
||||
os.write(buffer, 0, length);
|
||||
}
|
||||
os.close();
|
||||
is.close();
|
||||
SharedPreferences.Editor editor = mPref.edit();
|
||||
editor.putInt( "pakversion", PAK_VERSION );
|
||||
editor.commit();
|
||||
} catch( Exception e )
|
||||
{
|
||||
Log.e( TAG, "Failed to extract PAK:" + e.toString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,38 +2,74 @@ package in.celest.xash3d;
|
|||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.app.AlertDialog;
|
||||
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.Build;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.os.Environment;
|
||||
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.widget.EditText;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnDismissListener;
|
||||
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.Button;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.TabHost;
|
||||
import android.widget.ToggleButton;
|
||||
import android.widget.Toast;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Environment;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.FileOutputStream;
|
||||
|
||||
import java.net.URLConnection;
|
||||
import java.net.URL;
|
||||
|
||||
import org.json.*;
|
||||
|
||||
import in.celest.xash3d.hl.R;
|
||||
|
||||
public class LauncherActivity extends Activity {
|
||||
// public final static String ARGV = "in.celest.xash3d.MESSAGE";
|
||||
public final static int sdk = Integer.valueOf(Build.VERSION.SDK);
|
||||
public final static String UPDATE_LINK = "https://api.github.com/repos/FWGS/xash3d-android-project/releases"; // releases/latest doesn't return prerelease and drafts
|
||||
static EditText cmdArgs;
|
||||
static CheckBox useVolume;
|
||||
static EditText resPath;
|
||||
static ToggleButton useVolume;
|
||||
static ToggleButton resizeWorkaround;
|
||||
static CheckBox checkUpdates;
|
||||
static CheckBox updateToBeta;
|
||||
static CheckBox immersiveMode;
|
||||
static SharedPreferences mPref;
|
||||
static Spinner pixelSpinner;
|
||||
static TextView tvResPath;
|
||||
|
||||
String getDefaultPath()
|
||||
{
|
||||
File dir = Environment.getExternalStorageDirectory();
|
||||
|
@ -41,46 +77,125 @@ public class LauncherActivity extends Activity {
|
|||
return dir.getPath() + "/xash";
|
||||
return "/sdcard/xash";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_launcher);
|
||||
Button selectFolder = ( Button ) findViewById( R.id.button_select );
|
||||
if ( Build.VERSION.SDK_INT < 21 )
|
||||
selectFolder.setVisibility( View.GONE );
|
||||
mPref = getSharedPreferences("engine", 0);
|
||||
cmdArgs = (EditText)findViewById(R.id.cmdArgs);
|
||||
cmdArgs.setText(mPref.getString("argv","-dev 3 -log"));
|
||||
useVolume = ( CheckBox ) findViewById( R.id.useVolume );
|
||||
protected void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
//super.setTheme( 0x01030005 );
|
||||
if ( sdk >= 21 )
|
||||
{
|
||||
super.setTheme( 0x01030224 );
|
||||
}
|
||||
|
||||
setContentView(R.layout.activity_launcher);
|
||||
|
||||
TabHost tabHost = (TabHost) findViewById(R.id.tabhost);
|
||||
tabHost.setup();
|
||||
|
||||
TabHost.TabSpec tabSpec;
|
||||
tabSpec = tabHost.newTabSpec("tabtag1");
|
||||
tabSpec.setIndicator(getString(R.string.text_tab1));
|
||||
tabSpec.setContent(R.id.tab1);
|
||||
tabHost.addTab(tabSpec);
|
||||
|
||||
tabSpec = tabHost.newTabSpec("tabtag2");
|
||||
tabSpec.setIndicator(getString(R.string.text_tab2));
|
||||
tabSpec.setContent(R.id.tab2);
|
||||
tabHost.addTab(tabSpec);
|
||||
|
||||
mPref = getSharedPreferences("engine", 0);
|
||||
cmdArgs = (EditText) findViewById(R.id.cmdArgs);
|
||||
useVolume = (ToggleButton) findViewById( R.id.useVolume );
|
||||
resPath = (EditText) findViewById( R.id.cmdPath );
|
||||
checkUpdates = (CheckBox)findViewById( R.id.check_updates );
|
||||
updateToBeta = (CheckBox)findViewById( R.id.check_betas );
|
||||
pixelSpinner = (Spinner) findViewById( R.id.pixelSpinner );
|
||||
resizeWorkaround = (ToggleButton) findViewById( R.id.enableResizeWorkaround );
|
||||
tvResPath = (TextView) findViewById( R.id.textView_path );
|
||||
immersiveMode = (CheckBox) findViewById( R.id.immersive_mode );
|
||||
|
||||
final String[] list = {
|
||||
"32 bit (RGBA8888)",
|
||||
"24 bit (RGB888)",
|
||||
"16 bit (RGB565)",
|
||||
"15 bit (RGBA5551)",
|
||||
"12 bit (RGBA4444)",
|
||||
"8 bit (RGB332)"
|
||||
};
|
||||
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item, list);
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_item);
|
||||
pixelSpinner.setAdapter(adapter);
|
||||
useVolume.setChecked(mPref.getBoolean("usevolume",true));
|
||||
resPath = ( EditText ) findViewById( R.id.cmdPath );
|
||||
resPath.setText(mPref.getString("basedir", getDefaultPath()));
|
||||
checkUpdates.setChecked(mPref.getBoolean("check_updates",true));
|
||||
updateToBeta.setChecked(mPref.getBoolean("check_betas", false));
|
||||
updatePath(mPref.getString("basedir", getDefaultPath()));
|
||||
cmdArgs.setText(mPref.getString("argv","-dev 3 -log"));
|
||||
pixelSpinner.setSelection(mPref.getInt("pixelformat", 0));
|
||||
resizeWorkaround.setChecked(mPref.getBoolean("enableResizeWorkaround", true));
|
||||
|
||||
if( sdk >= 19 )
|
||||
{
|
||||
immersiveMode.setChecked(mPref.getBoolean("immersive_mode", true));
|
||||
}
|
||||
else
|
||||
{
|
||||
immersiveMode.setVisibility(View.GONE); // not available
|
||||
}
|
||||
|
||||
resPath.setOnFocusChangeListener( new View.OnFocusChangeListener()
|
||||
{
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus)
|
||||
{
|
||||
updatePath( resPath.getText().toString() );
|
||||
}
|
||||
} );
|
||||
|
||||
if(mPref.getBoolean("check_updates", true))
|
||||
{
|
||||
new CheckUpdate(true, updateToBeta.isChecked()).execute(UPDATE_LINK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void updatePath( String text )
|
||||
{
|
||||
tvResPath.setText(getResources().getString(R.string.text_res_path) + ":\n" + text );
|
||||
resPath.setText(text);
|
||||
|
||||
}
|
||||
public void startXash(View view)
|
||||
{
|
||||
Intent intent = new Intent(this, org.libsdl.app.SDLActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
Intent intent = new Intent(this, XashActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
||||
SharedPreferences.Editor editor = mPref.edit();
|
||||
editor.putString("argv", cmdArgs.getText().toString());
|
||||
editor.putBoolean("usevolume",useVolume.isChecked());
|
||||
editor.putString("basedir", resPath.getText().toString());
|
||||
editor.commit();
|
||||
editor.apply();
|
||||
startActivity(intent);
|
||||
SharedPreferences.Editor editor = mPref.edit();
|
||||
editor.putString("argv", cmdArgs.getText().toString());
|
||||
editor.putBoolean("usevolume",useVolume.isChecked());
|
||||
editor.putString("basedir", resPath.getText().toString());
|
||||
editor.putInt("pixelformat", pixelSpinner.getSelectedItemPosition());
|
||||
editor.putBoolean("enableResizeWorkaround",resizeWorkaround.isChecked());
|
||||
editor.putBoolean("check_updates", checkUpdates.isChecked());
|
||||
if( sdk >= 19 )
|
||||
editor.putBoolean("immersive_mode", immersiveMode.isChecked());
|
||||
else
|
||||
editor.putBoolean("immersive_mode", false); // just in case...
|
||||
editor.commit();
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void aboutXash(View view)
|
||||
{
|
||||
final Activity a = this;
|
||||
this.runOnUiThread(new Runnable() {
|
||||
this.runOnUiThread(new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
final Dialog dialog = new Dialog(a);
|
||||
dialog.setContentView(R.layout.about);
|
||||
dialog.setCancelable(true);
|
||||
|
||||
dialog.show();
|
||||
TextView tView6 = (TextView) dialog.findViewById(R.id.textView6);
|
||||
tView6.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
|
@ -90,26 +205,28 @@ public class LauncherActivity extends Activity {
|
|||
|
||||
public void selectFolder(View view)
|
||||
{
|
||||
Intent intent = new Intent("android.intent.action.OPEN_DOCUMENT_TREE");
|
||||
Intent intent = new Intent(this, in.celest.xash3d.FPicker.class);
|
||||
//intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
//Intent intent = new Intent("android.intent.action.OPEN_DOCUMENT_TREE");
|
||||
startActivityForResult(intent, 42);
|
||||
resPath.setEnabled(false);
|
||||
}
|
||||
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent resultData) {
|
||||
if (resultCode == RESULT_OK) {
|
||||
try{
|
||||
final List<String> paths = resultData.getData().getPathSegments();
|
||||
String[] parts = paths.get(1).split(":");
|
||||
String storagepath = Environment.getExternalStorageDirectory().getPath() + "/";
|
||||
String path = storagepath + parts[1];
|
||||
if( path != null)
|
||||
resPath.setText( path );
|
||||
resPath.setEnabled(true);
|
||||
}
|
||||
catch(Exception e)
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent resultData)
|
||||
{
|
||||
if (resultCode == RESULT_OK)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
try
|
||||
{
|
||||
if( resPath == null )
|
||||
return;
|
||||
updatePath(resultData.getStringExtra("GetPath"));
|
||||
resPath.setEnabled(true);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
resPath.setEnabled(true);
|
||||
}
|
||||
|
@ -144,4 +261,130 @@ try{
|
|||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
private class CheckUpdate extends AsyncTask<String, Void, String> {
|
||||
InputStream is = null;
|
||||
ByteArrayOutputStream os = null;
|
||||
boolean mSilent;
|
||||
boolean mBeta;
|
||||
|
||||
public CheckUpdate( boolean silent, boolean beta )
|
||||
{
|
||||
mSilent = silent;
|
||||
mBeta = beta;
|
||||
}
|
||||
|
||||
protected String doInBackground(String... urls)
|
||||
{
|
||||
try
|
||||
{
|
||||
URL url = new URL(urls[0]);
|
||||
is = url.openConnection().getInputStream();
|
||||
os = new ByteArrayOutputStream();
|
||||
|
||||
byte[] buffer = new byte[8196];
|
||||
int len;
|
||||
|
||||
while ((len = is.read(buffer)) > 0)
|
||||
{
|
||||
os.write(buffer, 0, len);
|
||||
}
|
||||
os.flush();
|
||||
|
||||
return os.toString();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
protected void onPostExecute(String result)
|
||||
{
|
||||
JSONArray releases = null;
|
||||
try
|
||||
{
|
||||
if (is != null)
|
||||
{
|
||||
is.close();
|
||||
is = null;
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (os != null)
|
||||
{
|
||||
releases = new JSONArray(os.toString());
|
||||
os.close();
|
||||
os = null;
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
if( releases == null )
|
||||
return;
|
||||
|
||||
for( int i = 0; i < releases.length(); i++ )
|
||||
{
|
||||
final JSONObject obj;
|
||||
try
|
||||
{
|
||||
obj = releases.getJSONObject(i);
|
||||
|
||||
final String version, url, name;
|
||||
final boolean beta = obj.getBoolean("prerelease");
|
||||
|
||||
if( beta && !mBeta )
|
||||
continue;
|
||||
|
||||
version = obj.getString("tag_name");
|
||||
url = obj.getString("html_url");
|
||||
name = obj.getString("name");
|
||||
Log.d("Xash", "Found: " + version +
|
||||
", I: " + getString(R.string.version_string));
|
||||
|
||||
// this is an update
|
||||
if( getString(R.string.version_string).compareTo(version) < 0 )
|
||||
{
|
||||
String dialog_message = String.format(getString(R.string.update_message), name);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getBaseContext());
|
||||
builder.setMessage(dialog_message)
|
||||
.setPositiveButton(R.string.update, new DialogInterface.OnClickListener()
|
||||
{
|
||||
public void onClick(DialogInterface dialog, int id)
|
||||
{
|
||||
final Intent intent = new Intent(Intent.ACTION_VIEW).setData(Uri.parse(url));
|
||||
startActivity(intent);
|
||||
}
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener()
|
||||
{ public void onClick(DialogInterface dialog, int id) {} } );
|
||||
builder.create().show();
|
||||
}
|
||||
else if( !mSilent )
|
||||
{
|
||||
Toast.makeText(getBaseContext(), R.string.no_updates, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
// No need to check other releases, so we will stop here.
|
||||
break;
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import android.graphics.BitmapFactory;
|
|||
import android.widget.Toast;
|
||||
import in.celest.xash3d.hl.R;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Button;
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
|
||||
|
@ -17,16 +18,26 @@ public class ShortcutActivity extends Activity
|
|||
{
|
||||
static EditText name, gamedir, pkgname, argv;
|
||||
String [] env = null;
|
||||
public static final int sdk = Integer.valueOf(Build.VERSION.SDK);
|
||||
@Override
|
||||
protected void onCreate(Bundle bundle)
|
||||
{
|
||||
super.onCreate(bundle);
|
||||
//material dialog
|
||||
if ( sdk >= 21 )
|
||||
super.setTheme( 0x01030225 );
|
||||
setContentView(R.layout.activity_shortcut);
|
||||
Intent intent=getIntent();
|
||||
name = (EditText)findViewById(R.id.shortcut_name);
|
||||
pkgname = (EditText)findViewById(R.id.shortcut_pkgname);
|
||||
gamedir = (EditText)findViewById(R.id.shortcut_gamedir);
|
||||
argv = (EditText)findViewById(R.id.shortcut_cmdArgs);
|
||||
((Button)findViewById( R.id.shortcut_buttonOk )).setOnClickListener(new View.OnClickListener(){
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
saveShortcut(v);
|
||||
}
|
||||
});
|
||||
String argvs = intent.getStringExtra("argv");
|
||||
if( argvs != null )
|
||||
argv.setText(argvs);
|
||||
|
|
1021
src/in/celest/xash3d/XashActivity.java
Normal file
1
src/org/json
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 9a81b40334ff2eba531478d013654c5d1b12ad24
|
|
@ -5,7 +5,7 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="in.celest.xash3d.hl.test"
|
||||
android:versionCode="1"
|
||||
android:versionName="0.17-beta.2"
|
||||
android:versionName="0.18-beta"
|
||||
android:installLocation="auto">
|
||||
|
||||
<!-- Create a Java class extending SDLActivity and place it in a
|
||||
|
@ -54,27 +54,35 @@
|
|||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="org.libsdl.app.SDLActivity"
|
||||
<activity android:name="in.celest.xash3d.FPicker"></activity>
|
||||
|
||||
<!--<activity android:name="org.libsdl.app.SDLActivity"
|
||||
android:screenOrientation="sensorLandscape"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:label="@string/app_name"
|
||||
android:taskAffinity="org.libsdl.app.SDLActivity"
|
||||
>
|
||||
<!--<intent-filter>
|
||||
<intent-filter>
|
||||
As user can add now empty shortcut, disable this
|
||||
<action android:name="org.libsdl.app.SDLActivity"/>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>-->
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="in.celest.xash3d.START" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!--<activity android:name="in.celest.xash3d.XashActivity"
|
||||
android:screenOrientation="landscape"
|
||||
</activity>-->
|
||||
<activity android:name="in.celest.xash3d.XashActivity"
|
||||
android:screenOrientation="sensorLandscape"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:label="@string/app_name">
|
||||
</activity> -->
|
||||
<intent-filter>
|
||||
<action android:name="in.celest.xash3d.START" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<receiver android:name="in.celest.xash3d.InstallReceiver">
|
||||
<intent-filter android:priority="100">
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
@ -90,7 +98,7 @@
|
|||
</application>
|
||||
|
||||
<!-- Android 2.3 -->
|
||||
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="9" />
|
||||
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="9" />
|
||||
|
||||
<!-- OpenGL ES 1.1 -->
|
||||
<uses-feature android:glEsVersion="0x00010000" />
|
||||
|
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.3 KiB |
BIN
test/res/drawable-ldpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 7.2 KiB |
|
@ -65,7 +65,6 @@ import android.content.*;
|
|||
*/
|
||||
public class SDLActivity extends Activity {
|
||||
private static final String TAG = "SDL";
|
||||
private static final int PAK_VERSION = 5;
|
||||
|
||||
// Keep track of the paused state
|
||||
public static boolean mIsPaused, mIsSurfaceReady, mHasFocus, mUseVolume;
|
||||
|
@ -226,7 +225,7 @@ public class SDLActivity extends Activity {
|
|||
setenv("XASH3D_GAMELIBDIR", gamelibdir, true);
|
||||
setenv("XASH3D_GAMEDIR", gamedir, true);
|
||||
|
||||
extractPAK(this, false);
|
||||
in.celest.xash3d.InstallReceiver.extractPAK(this, false);
|
||||
setenv("XASH3D_EXTRAS_PAK1", getFilesDir().getPath() + "/extras.pak", true);
|
||||
String pakfile = intent.getStringExtra("pakfile");
|
||||
if( pakfile != null && pakfile != "" )
|
||||
|
@ -1033,34 +1032,7 @@ public class SDLActivity extends Activity {
|
|||
Log.e( TAG, "Failed to extract PAK:" + e.toString() );
|
||||
}
|
||||
}*/
|
||||
public static void extractPAK(Context context, Boolean force) {
|
||||
InputStream is = null;
|
||||
FileOutputStream os = null;
|
||||
try {
|
||||
if( mPref == null )
|
||||
mPref = context.getSharedPreferences("engine", 0);
|
||||
if( mPref.getInt( "pakversion", 0 ) == PAK_VERSION && !force )
|
||||
return;
|
||||
String path = context.getFilesDir().getPath()+"/extras.pak";
|
||||
|
||||
is = context.getAssets().open("extras.pak");
|
||||
os = new FileOutputStream(path);
|
||||
byte[] buffer = new byte[1024];
|
||||
int length;
|
||||
while ((length = is.read(buffer)) > 0) {
|
||||
os.write(buffer, 0, length);
|
||||
}
|
||||
os.close();
|
||||
is.close();
|
||||
SharedPreferences.Editor editor = mPref.edit();
|
||||
editor.putInt( "pakversion", PAK_VERSION );
|
||||
editor.commit();
|
||||
editor.apply();
|
||||
} catch( Exception e )
|
||||
{
|
||||
Log.e( TAG, "Failed to extract PAK:" + e.toString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
|
@ -1 +1 @@
|
|||
Subproject commit 58d6e0d91034a8b44491c017972b88d7eddaf91f
|
||||
Subproject commit 3e0b87b9e2c66ae8d80686f44d540e36f9753b35
|