mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
work-in-progress on scripts to generate a second app from the same source tree.
This commit is contained in:
parent
bf5b6ada77
commit
f2b86b2a71
6 changed files with 318 additions and 0 deletions
2
xwords4/android/XWords4-dbg/.gitignore
vendored
Normal file
2
xwords4/android/XWords4-dbg/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
proguard.cfg
|
||||
local.properties
|
151
xwords4/android/XWords4-dbg/AndroidManifest.xml
Normal file
151
xwords4/android/XWords4-dbg/AndroidManifest.xml
Normal file
|
@ -0,0 +1,151 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- -*- compile-command: "ant install"; -*- -->
|
||||
<!-- Copyright (C) 2007 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!-- Declare the contents of this Android application. The namespace
|
||||
attribute brings in the Android platform namespace, and the package
|
||||
supplies a unique name for the application. When writing your
|
||||
own application, the package name must be changed from "com.example.*"
|
||||
to come from a domain that you own or have control over. -->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.eehouse.android.xw4"
|
||||
android:versionCode="34"
|
||||
android:versionName="@string/app_version"
|
||||
>
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<!-- <uses-permission android:name="android.permission.RECEIVE_SMS" /> -->
|
||||
<!-- <uses-permission android:name="android.permission.SEND_SMS" /> -->
|
||||
|
||||
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" />
|
||||
|
||||
<application android:icon="@drawable/icon48x48"
|
||||
android:label="@string/app_name"
|
||||
android:name=".XWApp"
|
||||
>
|
||||
|
||||
<activity android:name="GamesList"
|
||||
android:label="@string/title_games_list"
|
||||
android:launchMode="standard"
|
||||
android:configChanges="keyboardHidden|orientation"
|
||||
>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name="DictsActivity"
|
||||
android:label="@string/title_dicts_list"
|
||||
android:configChanges="keyboardHidden|orientation"
|
||||
/>
|
||||
|
||||
<activity android:name="NewGameActivity"
|
||||
android:theme="@android:style/Theme.NoTitleBar"
|
||||
/>
|
||||
|
||||
<activity android:name="GameConfig"
|
||||
android:screenOrientation="sensor"
|
||||
android:configChanges="keyboardHidden|orientation"
|
||||
>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.EDIT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name="PrefsActivity"
|
||||
android:label="@string/title_prefs"
|
||||
android:screenOrientation="sensor"
|
||||
>
|
||||
</activity>
|
||||
|
||||
<activity android:name="BoardActivity"
|
||||
android:theme="@android:style/Theme.Light"
|
||||
android:screenOrientation="portrait"
|
||||
android:configChanges="keyboardHidden"
|
||||
>
|
||||
</activity>
|
||||
|
||||
<receiver android:name="RelayReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<activity android:name="DispatchNotify"
|
||||
>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<action android:name="android.intent.action.EDIT" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="newxwgame"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<!-- downloading dicts -->
|
||||
<activity android:name=".DictImportActivity"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@android:style/Theme.Dialog">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW"></action>
|
||||
<category android:name="android.intent.category.DEFAULT"></category>
|
||||
<category android:name="android.intent.category.BROWSABLE"></category>
|
||||
<data android:scheme="file" android:host="*"
|
||||
android:pathPattern=".*\\.xwd" />
|
||||
<data android:scheme="http"
|
||||
android:mimeType="application/x-xwordsdict"
|
||||
android:host="*"
|
||||
android:pathPattern=".*\\.xwd" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name="RelayGameActivity"/>
|
||||
<activity android:name="DictBrowseActivity"
|
||||
android:configChanges="keyboardHidden|orientation"
|
||||
/>
|
||||
<activity android:name="ChatActivity"
|
||||
android:configChanges="keyboardHidden|orientation"
|
||||
/>
|
||||
|
||||
<service android:name="RelayService"/>
|
||||
|
||||
<receiver android:name=".MountEventReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MEDIA_MOUNTED" />
|
||||
<data android:scheme="file" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MEDIA_EJECT" />
|
||||
<data android:scheme="file" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
|
||||
<!-- <receiver android:name="NBSReceiver"> -->
|
||||
<!-- <intent-filter android:priority="10"> -->
|
||||
<!-- <action android:name="android.intent.action.DATA_SMS_RECEIVED" /> -->
|
||||
<!-- <data android:scheme="sms" /> -->
|
||||
<!-- <data android:port="50009" /> -->
|
||||
<!-- </intent-filter> -->
|
||||
<!-- </receiver> -->
|
||||
|
||||
</application>
|
||||
</manifest>
|
95
xwords4/android/XWords4-dbg/build.xml
Normal file
95
xwords4/android/XWords4-dbg/build.xml
Normal file
|
@ -0,0 +1,95 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="XWords4" default="release">
|
||||
|
||||
<!-- The local.properties file is created and updated by the 'android' tool.
|
||||
It contains the path to the SDK. It should *NOT* be checked into
|
||||
Version Control Systems. -->
|
||||
<loadproperties srcFile="local.properties" />
|
||||
|
||||
<!-- The ant.properties file can be created by you. It is only edited by the
|
||||
'android' tool to add properties to it.
|
||||
This is the place to change some Ant specific build properties.
|
||||
Here are some properties you may want to change/update:
|
||||
|
||||
source.dir
|
||||
The name of the source directory. Default is 'src'.
|
||||
out.dir
|
||||
The name of the output directory. Default is 'bin'.
|
||||
|
||||
For other overridable properties, look at the beginning of the rules
|
||||
files in the SDK, at tools/ant/build.xml
|
||||
|
||||
Properties related to the SDK location or the project target should
|
||||
be updated using the 'android' tool with the 'update' action.
|
||||
|
||||
This file is an integral part of the build system for your
|
||||
application and should be checked into Version Control Systems.
|
||||
|
||||
-->
|
||||
<property file="ant.properties" />
|
||||
|
||||
<!-- The project.properties file is created and updated by the 'android'
|
||||
tool, as well as ADT.
|
||||
|
||||
This contains project specific properties such as project target, and library
|
||||
dependencies. Lower level build properties are stored in ant.properties
|
||||
(or in .classpath for Eclipse projects).
|
||||
|
||||
This file is an integral part of the build system for your
|
||||
application and should be checked into Version Control Systems. -->
|
||||
<loadproperties srcFile="project.properties" />
|
||||
|
||||
<!-- quick check on sdk.dir -->
|
||||
<fail
|
||||
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
|
||||
unless="sdk.dir"
|
||||
/>
|
||||
|
||||
|
||||
<!-- extension targets. Uncomment the ones where you want to do custom work
|
||||
in between standard targets -->
|
||||
|
||||
<target name="-pre-build">
|
||||
<exec dir=".." executable="./scripts/mkvariant.sh">
|
||||
<arg value="--variant-name"/>
|
||||
<arg value="xw4_dbg"/>
|
||||
<arg value="--dest-dir"/>
|
||||
<arg value="./XWords4-dbg/src"/>
|
||||
<arg value="--dest-dir"/>
|
||||
<arg value="./XWords4-dbg/res"/>
|
||||
</exec>
|
||||
<exec dir=".." executable="./scripts/genvers.sh" output="ant_out.txt" />
|
||||
</target>
|
||||
<!--
|
||||
<target name="-pre-compile">
|
||||
</target>
|
||||
|
||||
/* This is typically used for code obfuscation.
|
||||
Compiled code location: ${out.classes.absolute.dir}
|
||||
If this is not done in place, override ${out.dex.input.absolute.dir} */
|
||||
<target name="-post-compile">
|
||||
</target>
|
||||
-->
|
||||
|
||||
<!-- Import the actual build file.
|
||||
|
||||
To customize existing targets, there are two options:
|
||||
- Customize only one target:
|
||||
- copy/paste the target into this file, *before* the
|
||||
<import> task.
|
||||
- customize it to your needs.
|
||||
- Customize the whole content of build.xml
|
||||
- copy/paste the content of the rules files (minus the top node)
|
||||
into this file, replacing the <import> task.
|
||||
- customize to your needs.
|
||||
|
||||
***********************
|
||||
****** IMPORTANT ******
|
||||
***********************
|
||||
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
|
||||
in order to avoid having your file be overridden by tools such as "android update project"
|
||||
-->
|
||||
<!-- version-tag: 1 -->
|
||||
<import file="${sdk.dir}/tools/ant/build.xml" />
|
||||
|
||||
</project>
|
11
xwords4/android/XWords4-dbg/project.properties
Normal file
11
xwords4/android/XWords4-dbg/project.properties
Normal file
|
@ -0,0 +1,11 @@
|
|||
# This file is automatically generated by Android Tools.
|
||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||
#
|
||||
# This file must be checked in Version Control Systems.
|
||||
#
|
||||
# To customize properties used by the Ant build system use,
|
||||
# "ant.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
|
||||
# Project target.
|
||||
target=android-7
|
1
xwords4/android/scripts/Variant.mk
Normal file
1
xwords4/android/scripts/Variant.mk
Normal file
|
@ -0,0 +1 @@
|
|||
# -*- mode: Makefile; -*-
|
58
xwords4/android/scripts/mkvariant.sh
Executable file
58
xwords4/android/scripts/mkvariant.sh
Executable file
|
@ -0,0 +1,58 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -u -e
|
||||
|
||||
MAKEFILE=./Variant.mk
|
||||
DIRS=""
|
||||
VARIANT=""
|
||||
|
||||
usage() {
|
||||
[ $# -ge 1 ] && echo "ERROR: $1"
|
||||
echo "usage: $0 [--dest-dir <dir>]* --variant-name <dir>"
|
||||
exit 1
|
||||
}
|
||||
|
||||
do_dir() {
|
||||
local SRC_PATH=$1
|
||||
local DEST_PATH=$2
|
||||
local DIR=$3
|
||||
|
||||
SRC_PATH=$SRC_PATH/$DIR
|
||||
|
||||
[ -d $SRC_PATH ] || usage "$SRC_PATH not found"
|
||||
DEST_PATH=$DEST_PATH/$DIR
|
||||
mkdir -p $DEST_PATH
|
||||
|
||||
for FILE in $SRC_PATH; do
|
||||
if [ -d $FILE ]; then
|
||||
do_dir $SRC_PATH $DEST_PATH $FILE
|
||||
else
|
||||
make -f $MAKEFILE SRC_PATH=$SRC_PATH $DEST_PATH=$DEST_PATH make_file
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
pwd
|
||||
echo "$0 $*"
|
||||
|
||||
while [ $# -ge 1 ]; do
|
||||
echo "\"$1\""
|
||||
case $1 in
|
||||
--variant-name)
|
||||
shift
|
||||
VARIANT=$1
|
||||
;;
|
||||
--dest-dir)
|
||||
shift
|
||||
DIRS="$DIRS $1"
|
||||
;;
|
||||
*)
|
||||
usage "unexpected param $1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
echo "$0 DIRS: $DIRS"
|
||||
|
||||
[ -n "$VARIANT" ] || usage "--variant-name not supplied"
|
Loading…
Reference in a new issue