aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorwsnipex <wsnipex@a1.net>2014-09-25 11:10:24 +0200
committerMemphiz <memphis@machzwo.de>2014-10-19 21:34:59 +0200
commit45a93df4ca1dc64ea46185e5d6828260d823e15f (patch)
tree2facea60bfe5e79c45b2069f570921ee9fddd5f0 /tools
parentf84a1347bbdef93d7ab7f6afcaae5cc214e78ce5 (diff)
[rebrand/android] use dynamic application name
Diffstat (limited to 'tools')
-rw-r--r--tools/android/packaging/Makefile.in (renamed from tools/android/packaging/Makefile)40
-rw-r--r--tools/android/packaging/xbmc/AndroidManifest.xml.in2
-rw-r--r--tools/android/packaging/xbmc/src/org/xbmc/xbmc/Splash.java.in (renamed from tools/android/packaging/xbmc/src/org/xbmc/xbmc/Splash.java)18
-rw-r--r--tools/buildsteps/android/package4
-rw-r--r--tools/buildsteps/androidx86/package4
-rw-r--r--tools/depends/target/dummy-libxbmc/Makefile12
-rw-r--r--tools/depends/target/xbmc/Makefile7
7 files changed, 46 insertions, 41 deletions
diff --git a/tools/android/packaging/Makefile b/tools/android/packaging/Makefile.in
index c54578a942..2c0efa4b90 100644
--- a/tools/android/packaging/Makefile
+++ b/tools/android/packaging/Makefile.in
@@ -43,32 +43,32 @@ endif
all: package
SRCLIBS = $(addprefix $(PREFIX)/lib/,$(OBJS)) $(addprefix $(PREFIX)/lib/$(SDK_PLATFORM)/,$(PLATFORM_OBJS))
-DSTLIBS = $(CPU)/lib/libxbmc.so $(addprefix $(CPU)/lib/,$(OBJS)) $(addprefix $(CPU)/lib/,$(PLATFORM_OBJS))
+DSTLIBS = $(CPU)/lib/lib@APP_NAME_LC@.so $(addprefix $(CPU)/lib/,$(OBJS)) $(addprefix $(CPU)/lib/,$(PLATFORM_OBJS))
libs= $(DSTLIBS)
multi: x86 arm
- @cp images/xbmcapp-debug-skeleton.apk images/xbmcapp-debug-multi-unaligned.apk
- @cd xbmc; zip -r -q ../images/xbmcapp-debug-multi-unaligned.apk lib/ assets
- @jarsigner -sigalg MD5withRSA -digestalg SHA1 -keystore ~/.android/debug.keystore -storepass android images/xbmcapp-debug-multi-unaligned.apk androiddebugkey
- @$(ZIPALIGN) -f 4 images/xbmcapp-debug-multi-unaligned.apk $(XBMCROOT)/xbmcapp-multi-debug.apk
- @rm images/xbmcapp-debug-multi-unaligned.apk
- @echo "$(XBMCROOT)/xbmcapp-multi-debug.apk created"
+ @cp images/@APP_NAME_LC@app-debug-skeleton.apk images/@APP_NAME_LC@app-debug-multi-unaligned.apk
+ @cd xbmc; zip -r -q ../images/@APP_NAME_LC@app-debug-multi-unaligned.apk lib/ assets
+ @jarsigner -sigalg MD5withRSA -digestalg SHA1 -keystore ~/.android/debug.keystore -storepass android images/@APP_NAME_LC@app-debug-multi-unaligned.apk androiddebugkey
+ @$(ZIPALIGN) -f 4 images/@APP_NAME_LC@app-debug-multi-unaligned.apk $(XBMCROOT)/@APP_NAME_LC@app-multi-debug.apk
+ @rm images/@APP_NAME_LC@app-debug-multi-unaligned.apk
+ @echo "$(XBMCROOT)/@APP_NAME_LC@app-multi-debug.apk created"
package: extras
- @cp images/xbmcapp-debug-skeleton.apk images/xbmcapp-debug-$(CPU)-unaligned.apk
+ @cp images/@APP_NAME_LC@app-debug-skeleton.apk images/@APP_NAME_LC@app-debug-$(CPU)-unaligned.apk
@javac -classpath $(SDKROOT)/platforms/$(SDK_PLATFORM)/android.jar:xbmc/obj -d xbmc/obj -sourcepath xbmc/src xbmc/src/*.java
@javac -classpath $(SDKROOT)/platforms/$(SDK_PLATFORM)/android.jar:xbmc/obj -d xbmc/obj -sourcepath xbmc/src xbmc/src/org/xbmc/xbmc/*.java
@$(DX) --dex --output=xbmc/classes.dex xbmc/obj
- @cd xbmc; zip -r -q ../images/xbmcapp-debug-$(CPU)-unaligned.apk lib/$(CPU) assets classes.dex
- @jarsigner -sigalg MD5withRSA -digestalg SHA1 -keystore ~/.android/debug.keystore -storepass android images/xbmcapp-debug-$(CPU)-unaligned.apk androiddebugkey
- @$(ZIPALIGN) -f 4 images/xbmcapp-debug-$(CPU)-unaligned.apk $(XBMCROOT)/xbmcapp-$(CPU)-debug.apk
- @rm images/xbmcapp-debug-$(CPU)-unaligned.apk
- @echo "$(XBMCROOT)/xbmcapp-$(CPU)-debug.apk created"
+ @cd xbmc; zip -r -q ../images/@APP_NAME_LC@app-debug-$(CPU)-unaligned.apk lib/$(CPU) assets classes.dex
+ @jarsigner -sigalg MD5withRSA -digestalg SHA1 -keystore ~/.android/debug.keystore -storepass android images/@APP_NAME_LC@app-debug-$(CPU)-unaligned.apk androiddebugkey
+ @$(ZIPALIGN) -f 4 images/@APP_NAME_LC@app-debug-$(CPU)-unaligned.apk $(XBMCROOT)/@APP_NAME_LC@app-$(CPU)-debug.apk
+ @rm images/@APP_NAME_LC@app-debug-$(CPU)-unaligned.apk
+ @echo "$(XBMCROOT)/@APP_NAME_LC@app-$(CPU)-debug.apk created"
extras: libs
rm -rf xbmc/assets
mkdir -p xbmc/assets xbmc/res xbmc/res/raw xbmc/assets/python2.6/lib/
- cp -rfp $(PREFIX)/share/xbmc/* ./xbmc/assets
+ cp -rfp $(PREFIX)/share/@APP_NAME_LC@/* ./xbmc/assets
find `pwd`/xbmc/assets/ -depth -name ".git" -exec rm -rf {} \;
find `pwd`/xbmc/assets/system/ -name "*.so" -exec rm {} \;
find `pwd`/xbmc/assets/addons/skin.*/media/* -depth -not -iname "Textures.xbt" -exec rm -rf {} \;
@@ -85,16 +85,16 @@ extras: libs
cp -fp media/drawable-xxhdpi/ic_launcher.png xbmc/res/drawable-xxhdpi/ic_launcher.png
cd xbmc/assets/python2.6/lib/python2.6/; rm -rf test config lib-dynload
mkdir -p tmp/res; $(AAPT) c -S xbmc/res -C tmp/res; cp -r -n xbmc/res tmp/ || true
- $(AAPT) p -f -I $(SDKROOT)/platforms/$(SDK_PLATFORM)/android.jar -S tmp/res/ -M xbmc/AndroidManifest.xml -F images/xbmcapp-debug-skeleton.apk -J xbmc/src
+ $(AAPT) p -f -I $(SDKROOT)/platforms/$(SDK_PLATFORM)/android.jar -S tmp/res/ -M xbmc/AndroidManifest.xml -F images/@APP_NAME_LC@app-debug-skeleton.apk -J xbmc/src
@rm -rf tmp/
-libs: $(PREFIX)/lib/xbmc/libxbmc.so
+libs: $(PREFIX)/lib/@APP_NAME_LC@/lib@APP_NAME_LC@.so
rm -rf xbmc/lib/$(CPU) xbmc/libs/$(CPU) xbmc/obj/local/$(CPU)
mkdir -p xbmc/lib/$(CPU) images xbmc/assets/python2.6/lib/ xbmc/libs/$(CPU) xbmc/obj/local/$(CPU)
cp -fp $(SRCLIBS) xbmc/obj/local/$(CPU)/
- cp -fp $(PREFIX)/lib/xbmc/libxbmc.so xbmc/obj/local/$(CPU)/
- find $(PREFIX)/lib/xbmc/addons -name "*.so" -exec cp -fp {} xbmc/obj/local/$(CPU)/ \;
- find $(PREFIX)/lib/xbmc/system -name "*.so" -exec cp -fp {} xbmc/obj/local/$(CPU)/ \;
+ cp -fp $(PREFIX)/lib/@APP_NAME_LC@/lib@APP_NAME_LC@.so xbmc/obj/local/$(CPU)/
+ find $(PREFIX)/lib/@APP_NAME_LC@/addons -name "*.so" -exec cp -fp {} xbmc/obj/local/$(CPU)/ \;
+ find $(PREFIX)/lib/@APP_NAME_LC@/system -name "*.so" -exec cp -fp {} xbmc/obj/local/$(CPU)/ \;
cd xbmc/obj/local/$(CPU)/; find . -name "*.so" -not -name "lib*.so" | sed "s/\.\///" | xargs -I@ mv @ lib@
cp -fp xbmc/obj/local/$(CPU)/*.so xbmc/lib/$(CPU)/
$(STRIP) --strip-unneeded xbmc/lib/$(CPU)/*.so
@@ -104,7 +104,7 @@ libs: $(PREFIX)/lib/xbmc/libxbmc.so
"$(NDKROOT)/sources/cxx-stl/gnu-libstdc++/$(GCC_VERSION)/include $(XBMCROOT) $(PREFIX)/include jni" >> ./xbmc/libs/$(CPU)/gdb.setup
cp -fp xbmc/libs/$(CPU)/* xbmc/lib/$(CPU)
-$(PREFIX)/lib/xbmc/libxbmc.so: $(SRCLIBS)
+$(PREFIX)/lib/xbmc/lib@APP_NAME_LC@.so: $(SRCLIBS)
$(MAKE) -C ../../depends/target/xbmc
$(SRCLIBS):
diff --git a/tools/android/packaging/xbmc/AndroidManifest.xml.in b/tools/android/packaging/xbmc/AndroidManifest.xml.in
index 0eaa2cdee3..37b5d9b21c 100644
--- a/tools/android/packaging/xbmc/AndroidManifest.xml.in
+++ b/tools/android/packaging/xbmc/AndroidManifest.xml.in
@@ -71,7 +71,7 @@
<!-- Tell NativeActivity the name of or .so -->
<meta-data
android:name="android.app.lib_name"
- android:value="xbmc" />
+ android:value="@APP_NAME_LC@" />
</activity>
</application>
diff --git a/tools/android/packaging/xbmc/src/org/xbmc/xbmc/Splash.java b/tools/android/packaging/xbmc/src/org/xbmc/xbmc/Splash.java.in
index b1e3189686..9578a6b925 100644
--- a/tools/android/packaging/xbmc/src/org/xbmc/xbmc/Splash.java
+++ b/tools/android/packaging/xbmc/src/org/xbmc/xbmc/Splash.java.in
@@ -57,7 +57,7 @@ public class Splash extends Activity {
private static final int StorageChecked = 8;
private static final int StartingXBMC = 99;
- private static final String TAG = "XBMC";
+ private static final String TAG = "@APP_NAME@";
private String mCpuinfo = "";
private ArrayList<String> mMounts = new ArrayList<String>();
@@ -132,7 +132,7 @@ public class Splash extends Activity {
break;
case StartingXBMC:
- mSplash.mTextView.setText("Starting XBMC...");
+ mSplash.mTextView.setText("Starting @APP_NAME@...");
mSplash.mProgress.setVisibility(View.INVISIBLE);
mSplash.startXBMC();
break;
@@ -466,11 +466,11 @@ public class Splash extends Activity {
}
protected void startXBMC() {
- // NB: We only preload libxbmc to be able to get info on missing symbols.
+ // NB: We only preload lib@APP_NAME_LC@ to be able to get info on missing symbols.
// This is not normally needed
- System.loadLibrary("xbmc");
+ System.loadLibrary("@APP_NAME_LC@");
- // Run XBMC
+ // Run @APP_NAME@
Intent intent = getIntent();
intent.setClass(this, org.xbmc.xbmc.Main.class);
intent.addFlags(Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP);
@@ -482,7 +482,7 @@ public class Splash extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- // Check if XBMC is not already running
+ // Check if @APP_NAME@ is not already running
ActivityManager activityManager = (ActivityManager) getBaseContext()
.getSystemService(Context.ACTIVITY_SERVICE);
List<RunningTaskInfo> tasks = activityManager
@@ -490,7 +490,7 @@ public class Splash extends Activity {
for (RunningTaskInfo task : tasks)
if (task.topActivity.toString().equalsIgnoreCase(
"ComponentInfo{org.xbmc.xbmc/org.xbmc.xbmc.Main}")) {
- // XBMC already running; just activate it
+ // @APP_NAME@ already running; just activate it
startXBMC();
return;
}
@@ -517,7 +517,7 @@ public class Splash extends Activity {
properties.load(xbmcprop);
if (!curArch.equalsIgnoreCase(properties.getProperty("native_arch"))) {
- mErrorMsg = "This XBMC package is not compatible with your device (" + curArch + " vs. " + properties.getProperty("native_arch") +").\nPlease check the <a href=\"http://wiki.xbmc.org/index.php?title=XBMC_for_Android_specific_FAQ\">XBMC Android wiki</a> for more information.";
+ mErrorMsg = "This @APP_NAME@ package is not compatible with your device (" + curArch + " vs. " + properties.getProperty("native_arch") +").\nPlease check the <a href=\"http://wiki.xbmc.org/index.php?title=XBMC_for_Android_specific_FAQ\">XBMC Android wiki</a> for more information.";
Log.e(TAG, mErrorMsg);
mState = InError;
}
@@ -543,7 +543,7 @@ public class Splash extends Activity {
} else {
ret = CheckCpuFeature("neon");
if (!ret) {
- mErrorMsg = "This XBMC package is not compatible with your device (NEON).\nPlease check the <a href=\"http://wiki.xbmc.org/index.php?title=XBMC_for_Android_specific_FAQ\">XBMC Android wiki</a> for more information.";
+ mErrorMsg = "This @APP_NAME@ package is not compatible with your device (NEON).\nPlease check the <a href=\"http://wiki.xbmc.org/index.php?title=XBMC_for_Android_specific_FAQ\">XBMC Android wiki</a> for more information.";
Log.e(TAG, mErrorMsg);
mState = InError;
}
diff --git a/tools/buildsteps/android/package b/tools/buildsteps/android/package
index 4708d969bb..282ea3237b 100644
--- a/tools/buildsteps/android/package
+++ b/tools/buildsteps/android/package
@@ -6,5 +6,5 @@ cd $WORKSPACE;make apk
#rename for upload
#e.x. xbmc-20130314-8c2fb31-Frodo-armeabi-v7a.apk
-UPLOAD_FILENAME="xbmc-$(getBuildRevDateStr)-armeabi-v7a.apk"
-mv xbmcapp-armeabi-*.apk $UPLOAD_FILENAME
+UPLOAD_FILENAME="kodi-$(getBuildRevDateStr)-armeabi-v7a.apk"
+mv kodiapp-armeabi-*.apk $UPLOAD_FILENAME
diff --git a/tools/buildsteps/androidx86/package b/tools/buildsteps/androidx86/package
index d95392bed3..3be57031da 100644
--- a/tools/buildsteps/androidx86/package
+++ b/tools/buildsteps/androidx86/package
@@ -6,5 +6,5 @@ cd $WORKSPACE;make apk
#rename for upload
#e.x. xbmc-20130314-8c2fb31-Frodo-x86.apk
-UPLOAD_FILENAME="xbmc-$(getBuildRevDateStr)-x86.apk"
-mv xbmcapp-x86-*.apk $UPLOAD_FILENAME
+UPLOAD_FILENAME="kodi-$(getBuildRevDateStr)-x86.apk"
+mv kodiapp-x86-*.apk $UPLOAD_FILENAME
diff --git a/tools/depends/target/dummy-libxbmc/Makefile b/tools/depends/target/dummy-libxbmc/Makefile
index 203dfa1477..d65537aad6 100644
--- a/tools/depends/target/dummy-libxbmc/Makefile
+++ b/tools/depends/target/dummy-libxbmc/Makefile
@@ -1,7 +1,9 @@
include ../../Makefile.include
-DEPS= ../../Makefile.include Makefile dummy-libxbmc.c
+VERSION.TXT := $(XBMCROOT)/version.txt
+DEPS= ../../Makefile.include Makefile dummy-libxbmc.c $(VERSION.TXT)
+APP_NAME=$(shell awk '/APP_NAME/ {print tolower($$2)}' $(VERSION.TXT))
-LIBDYLIB=libxbmc.so
+LIBDYLIB=lib$(APP_NAME).so
all: $(PLATFORM)/$(LIBDYLIB) .installed-$(PLATFORM)
@@ -9,11 +11,11 @@ $(PLATFORM):
mkdir -p $(PLATFORM)
$(PLATFORM)/$(LIBDYLIB): $(PLATFORM) $(DEPS)
- $(CC) -shared -o $(PLATFORM)/libxbmc.so dummy-libxbmc.c
+ $(CC) -shared -o $(PLATFORM)/lib$(APP_NAME).so dummy-libxbmc.c
.installed-$(PLATFORM): $(PLATFORM)/$(LIBDYLIB)
- mkdir -p $(PREFIX)/lib/dummy-libxbmc
- cp $(PLATFORM)/libxbmc.so $(PREFIX)/lib/dummy-libxbmc
+ mkdir -p $(PREFIX)/lib/dummy-lib$(APP_NAME)
+ cp $(PLATFORM)/lib$(APP_NAME).so $(PREFIX)/lib/dummy-lib$(APP_NAME)
touch $@
clean:
diff --git a/tools/depends/target/xbmc/Makefile b/tools/depends/target/xbmc/Makefile
index fb65398013..ad531a0980 100644
--- a/tools/depends/target/xbmc/Makefile
+++ b/tools/depends/target/xbmc/Makefile
@@ -1,5 +1,8 @@
-include ../../Makefile.include
+VERSION.TXT := $(XBMCROOT)/version.txt
+APP_NAME=$(shell awk '/APP_NAME/ {print tolower($$2)}' $(VERSION.TXT))
+
SOURCE=../../../../
export CXXFLAGS+=-O3
@@ -15,10 +18,10 @@ endif
CONFIGURE += $(CONFIG_EXTRA)
-all: $(SOURCE)/libxbmc.so
+all: $(SOURCE)/lib$(APP_NAME).so
-$(SOURCE)/libxbmc.so:
+$(SOURCE)/lib$(APP_NAME).so:
cd $(SOURCE); BOOTSTRAP_FROM_DEPENDS=yes ./bootstrap
cd $(SOURCE); $(CONFIGURE)