diff options
28 files changed, 407 insertions, 176 deletions
diff --git a/Makefile.in b/Makefile.in index 134a0deecf..bd28e52ff2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -332,7 +332,7 @@ CLEAN_FILES += $(CHECK_PROGRAMS) $(CHECK_EXTENSIONS) all : $(FINAL_TARGETS) @echo '-----------------------' - @echo 'XBMC built successfully' + @echo '@APP_NAME@ built successfully' @echo '-----------------------' include Makefile.include @@ -554,11 +554,11 @@ ifeq ($(findstring osx,@ARCH@), osx) else install: install-binaries install-arch install-datas -apk: apk-clean install - make -C tools/android/packaging +apk obb apk-unsigned apk-obb apk-obb-unsigned apk-noobb: install + make -C tools/android/packaging $@ -apk-clean: - make -C tools/android/packaging clean +apk-clean apk-sign: + make -C tools/android/packaging $@ install-binaries: install-scripts @echo "Copying @APP_NAME_LC@ binary to $(DESTDIR)$(libdir)/@APP_NAME_LC@/" @@ -665,7 +665,7 @@ endif @cd $(DESTDIR)$(includedir); [ -L xbmc ] || [ -d xbmc ] || ln -s @APP_NAME_LC@ xbmc uninstall: - @echo "Removing Kodi..." + @echo "Removing @APP_NAME@..." @rm -rf $(DESTDIR)$(libdir)/@APP_NAME_LC@ @rm -rf $(DESTDIR)$(datarootdir)/@APP_NAME_LC@ $(DESTDIR)$(bindir)/@APP_NAME_LC@ @rm -rf $(DESTDIR)$(bindir)/@APP_NAME_LC@-standalone diff --git a/docs/README.ios b/docs/README.ios index 8cd263c65d..0d57a2bc0c 100644 --- a/docs/README.ios +++ b/docs/README.ios @@ -17,7 +17,7 @@ TOC ----------------------------------------------------------------------------- This is a platform port of Kodi for the Apple iOS operating system. -The current build system supports Xcode 3.2.6 or Xcode 4.3.x with iOS SDK 4.2/4.3/5.1 +The current build system supports Xcode 3.2.6, 4.3.x, 5.x.x, 6.0.1, 6.1.0 with iOS SDK 4.3/5.1/6/7/8/8.1 There are two ways to build Kodi for Mac. 1) command-line or @@ -48,7 +48,7 @@ character itself should NOT be typed as part of the command. ----------------------------------------------------------------------------- See point 3.0a below for an updated list of supported Xcode/osx constellations!!! -Install latest Xcode (5.1.1 as of the writing). You can download it from +Install latest Xcode (6.1.0 as of the writing). You can download it from 1. The MacOSX AppStore (Xcode). @@ -60,10 +60,11 @@ automatically once they are invoked from the cmdline. Xcode 3.2.6 only runs on 10.6.x (Snow Leopard). Xcode 4.3.x only runs on 10.7.x (Lion). Xcode 5.x.x only runs on 10.8.x and later. - +Xcode 6.0.1 only runs on 10.9.4 and later. +Xcpde 6.1.0 only runs on 10.9.5 and later. The preferred iOS SDK Version is 4.3 (when using Xcode 3.2.6) or 5.1 (when using -Xcode 4.3.x) or 7.x (when using Xcode 5.x.x) +Xcode 4.3.x) or 7.x (when using Xcode 5.x.x) or 8.x (when using Xcode 6.x.x) ----------------------------------------------------------------------------- 3.0a Supported Xcode and OSX constellations @@ -77,6 +78,8 @@ constellations of Xcode and osx versions (to be updated once we know more): 3.a Building against iOS SDK 6.0 will only allow to run on targets with iOS 5.1 and below. There is no support for devices running iOS 6.0 for now! 4. Xcode 5.1.1 against iOS SDK 7.0 and 7.1 on 10.9.x (Mavericks) +5. Xcode 6.0.1 against iOS SDK 8.0 on 10.9.x (Mavericks) +6. Xcode 6.1.0 against iOS SDK 8.1 on 10.10.x (Yosemite) ----------------------------------------------------------------------------- 3.1 Install Cross libs and runtime environment @@ -137,14 +140,14 @@ of the ATV2 project manually to "default/clang". $ cd $HOME/Kodi $ xcodebuild -project Kodi.xcodeproj -target Kodi-iOS -configuration Release build \ - ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.2 \ - SDKROOT=iphoneos4.2 + ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.3 \ + SDKROOT=iphoneos4.3 or $ xcodebuild -project Kodi.xcodeproj -target Kodi-ATV2 -configuration Release build \ - ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.2 \ - SDKROOT=iphoneos4.2 + ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.3 \ + SDKROOT=iphoneos4.3 Make sure to set SDKROOT to the iOS SDK you want to use. This should be the same you used on point 3.1! diff --git a/docs/README.osx b/docs/README.osx index e98b9a9baf..c659ef5023 100644 --- a/docs/README.osx +++ b/docs/README.osx @@ -14,7 +14,7 @@ TOC ----------------------------------------------------------------------------- This is a platform port of Kodi for the Apple OSX operating system. 10.6, 10.7 -10.8 and 10.9 Intel development platforms are supported. Xcode 3.2.6 and 4.3 and newer +10.8, 10.9 and 10.10 Intel development platforms are supported. Xcode 3.2.6 and 4.3 and newer are the recommended versions. There are 3 ways to build Kodi for Mac, from command-line with make, from command-line using xcodebuild or from Xcode. @@ -29,13 +29,14 @@ On Snow Leopard (OSX 10.6.x) we recommend using Xcode 3.2.6. On Lion (OSX 10.7.x) we recommend using Xcode 4.3.x. On Mountain Lion (OSX 10.8.1) we recommend using Xcode 4.4. On Mavericks (OSX 10.9.3) we recommend using Xcode 5.1.1 or 6.0.1. +On Yosemite (OSX 10.10) we recommend using Xcode 6.1. NOTE TO NEW OS X USERS: All lines that are prefixed with the '$' character are commands that need to be typed into a Terminal window. Note that the '$' character itself should NOT be typed as part of the command. -ATTENTION: When using Mountain Lion (OSX 10.8.x) or Mavericks (10.9.x) you need to download and install -XQuartz from https://xquartz.macosforge.org/landing/ since its not part of OSX +ATTENTION: When using Mountain Lion (OSX 10.8.x), Mavericks (10.9.x) or Yosemite (10.10.x) you +need to download and install XQuartz from https://xquartz.macosforge.org/landing/ since its not part of OSX anymore. ----------------------------------------------------------------------------- @@ -50,7 +51,7 @@ anymore. ----------------------------------------------------------------------------- See point 3.0a below for an updated list of supported/tested Xcode/osx constellations!!! -Install latest Xcode (6.0.1 or 3.2.6 as of the writing). You can download it from +Install latest Xcode (6.1.0 or 3.2.6 as of the writing). You can download it from 1. Apple's site after registration at http://developer.apple.com/tools/download (Xcode 3.2.6) 2. In the MacOSX AppStore (Xcode 4.3.x and later). @@ -65,6 +66,7 @@ Xcode 4.3.x only runs on 10.7.x (Lion). Xcode 4.4 only runs on 10.8.x (Mountain Lion). Xcode 5.1.1 runs on 10.8.x and 10.9.x (Mavericks). Xcode 6.0.1 runs on 10.9.4 and later (Mavericks). +Xcode 6.1 runs on 10.9.5 and later (Mavericks). ----------------------------------------------------------------------------- 3.0a Supported Xcode and OSX constellations @@ -77,6 +79,7 @@ constellations of Xcode and osx versions (to be updated once we know more): 3. XCode 4.6 against OSX SDK 10.6, 10.7 and 10.8 on 10.7.x (Lion) and 10.8.x (ML) 4. XCode 5.1.1 against OSX SDK 10.8 (ML) and 10.9 (M) 5. XCode 6.0.1 against OSX SDK 10.9 (M) +6. XCode 6.1.0 against OSX SDK 10.10 (Y) ----------------------------------------------------------------------------- 3.1 Install Kodi build depends diff --git a/lib/libRTV/GuideParser.cpp b/lib/libRTV/GuideParser.cpp index c92c40225a..b70c45e1e6 100644 --- a/lib/libRTV/GuideParser.cpp +++ b/lib/libRTV/GuideParser.cpp @@ -855,7 +855,7 @@ int CalculateMinutes( int seconds ) //------------------------------------------------------------------------- //------------------------------------------------------------------------- -#if _WIN32_WINNT < 0x0602 +#if _WIN32_WINNT < 0x0602 && !defined(ntohll) DWORD64 ntohll(DWORD64 llValue) { DWORD64 retval = 0; diff --git a/tools/android/packaging/Makefile.in b/tools/android/packaging/Makefile.in index c2b11244b1..e4dcc1bc65 100644 --- a/tools/android/packaging/Makefile.in +++ b/tools/android/packaging/Makefile.in @@ -13,6 +13,16 @@ EXCLUDED_ADDONS = screensaver.rsxs.euphoria visualization.dxspectrum visualizati XBMCROOT = $(shell cd $(CURDIR)/../../..; pwd) COPYDIRS = system addons language media GCC_VERSION=$(shell $(CC) -dumpversion) +ZIP=zip + +SIGN_STORE=~/.android/debug.keystore +SIGN_STOREPASS=android +SIGN_KEY=androiddebugkey +SIGN_KEYPASS= + +ifneq ($(strip $(SIGN_KEYPASS)),) +SIGN_KEYPASS_OPT=-keypass $(SIGN_KEYPASS) +endif X86OVERRIDES=XBMC_OVERRIDE_HOST=i686-android-linux XBMC_OVERRIDE_TOOLCHAIN=$(XBMC_X86_TOOLCHAIN) ARMOVERRIDES=XBMC_OVERRIDE_HOST=arm-linux-androideabi XBMC_OVERRIDE_TOOLCHAIN=$(XBMC_ARM_TOOLCHAIN) @@ -26,6 +36,7 @@ CPU=x86 endif ifeq ($(findstring arm,$(CPU)),arm) ARCH=arm +CPU=armeabi-v7a endif #older ndk x86 @@ -41,57 +52,66 @@ ifneq ($(shell test -f $(GDBPATH) && echo 1),1) GDBPATH=$(NDKROOT)/prebuilt/android-$(ARCH)/gdbserver/gdbserver endif -all: package SRCLIBS = $(addprefix $(PREFIX)/lib/,$(OBJS)) $(addprefix $(PREFIX)/lib/$(SDK_PLATFORM)/,$(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/@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" +all: apk -package: extras - @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/kodi/*.java - @$(DX) --dex --output=xbmc/classes.dex xbmc/obj - @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" +apk: apk-clean sharedapk package apk-sign -extras: libs - rm -rf xbmc/assets - mkdir -p xbmc/assets xbmc/res xbmc/res/raw xbmc/assets/python2.6/lib/ - 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 {} \; - find `pwd`/xbmc/assets/system/keymaps/ -depth -name "joystick*.xml" -exec rm {} \; - mv -f `pwd`/xbmc/assets/system/keymaps/joystick.xml.sample `pwd`/xbmc/assets/system/keymaps/joystick.xml - @echo "native_arch=$(ARCH)" > xbmc/res/raw/xbmc.properties - cd xbmc/assets/addons; rm -rf $(EXCLUDED_ADDONS) +obb: apk-clean sharedobb + +apk-unsigned: apk-clean sharedapk package + +apk-obb: apk-clean sharedobb package apk-sign + +apk-obb-unsigned: apk-clean sharedobb package + +apk-noobb: apk-clean package apk-sign + +xbmc/assets: + mkdir -p xbmc/assets + +shared: + mkdir -p assets + cp -rfp $(PREFIX)/share/@APP_NAME_LC@/* ./assets + find `pwd`/assets/ -depth -name ".git" -exec rm -rf {} \; + find `pwd`/assets/system/ -name "*.so" -exec rm {} \; + find `pwd`/assets/addons/skin.*/media/* -depth -not -iname "Textures.xbt" -exec rm -rf {} \; + find `pwd`/assets/system/keymaps/ -depth -name "joystick*.xml" ! -name "joystick.xml" -exec rm {} \; + cd assets; rm -rf $(EXCLUDED_ADDONS) + +sharedapk: shared | xbmc/assets + cp -rfp assets/* ./xbmc/assets + +sharedobb: shared + rm -f $(XBMCROOT)/main.@APP_NAME_LC@.obb + $(ZIP) -9 -q -r $(XBMCROOT)/main.@APP_NAME_LC@.obb assets + @echo "$(XBMCROOT)/main.@APP_NAME_LC@.obb created" + +python: | xbmc/assets + mkdir -p xbmc/assets/python2.6/lib/ cp -rfp $(PREFIX)/lib/python2.6 xbmc/assets/python2.6/lib/ + cd xbmc/assets/python2.6/lib/python2.6/; rm -rf test config lib-dynload + +res: + mkdir -p xbmc/res xbmc/res/raw xbmc/res/values images + @echo "native_arch=$(ARCH)" > xbmc/res/raw/xbmc.properties cp -fp $(XBMCROOT)/media/Splash.png xbmc/res/drawable/splash.png cp -fp media/drawable-hdpi/ic_launcher.png xbmc/res/drawable-hdpi/ic_launcher.png cp -fp media/drawable-ldpi/ic_launcher.png xbmc/res/drawable-ldpi/ic_launcher.png cp -fp media/drawable-mdpi/ic_launcher.png xbmc/res/drawable-mdpi/ic_launcher.png cp -fp media/drawable-xhdpi/ic_launcher.png xbmc/res/drawable-xhdpi/ic_launcher.png 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 xbmc/res/values && mv xbmc/strings.xml xbmc/res/values/ + cp xbmc/strings.xml xbmc/res/values/ 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/@APP_NAME_LC@app-debug-skeleton.apk -J xbmc/src @rm -rf tmp/ 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) + mkdir -p xbmc/lib/$(CPU) xbmc/assets/python2.6/lib/ xbmc/libs/$(CPU) xbmc/obj/local/$(CPU) cp -fp $(SRCLIBS) 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)/ \; @@ -105,20 +125,30 @@ libs: $(PREFIX)/lib/@APP_NAME_LC@/lib@APP_NAME_LC@.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/lib@APP_NAME_LC@.so: $(SRCLIBS) - $(MAKE) -C ../../depends/target/xbmc +xbmc/classes.dex: res + mkdir -p xbmc/obj + @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/@APP_NAME_LC@/*.java + @$(DX) --dex --output=xbmc/classes.dex xbmc/obj -$(SRCLIBS): +package: libs python xbmc/classes.dex + @echo "Creating package..." + @cp images/@APP_NAME_LC@app-debug-skeleton.apk images/@APP_NAME_LC@app-debug-$(CPU)-unaligned.apk + @cd xbmc; $(ZIP) -r -q ../images/@APP_NAME_LC@app-debug-$(CPU)-unaligned.apk lib/$(CPU) assets classes.dex -arm: armeabi-v7a +apk-sign: + @echo "Signing..." + @jarsigner -sigalg MD5withRSA -digestalg SHA1 -keystore $(SIGN_STORE) -storepass $(SIGN_STOREPASS) $(SIGN_KEYPASS_OPT) images/@APP_NAME_LC@app-debug-$(CPU)-unaligned.apk $(SIGN_KEY) + @$(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" -armeabi-v7a: $(XBMC_ARM_TOOLCHAIN) force - XBMC_OVERRIDE_PLATFORM=$@ $(ARMOVERRIDES) $(MAKE) package +$(PREFIX)/lib/xbmc/libxbmc.so: $(SRCLIBS) + $(MAKE) -C ../../depends/target/xbmc -x86: $(XBMC_X86_TOOLCHAIN) force - XBMC_OVERRIDE_PLATFORM=$@ $(X86OVERRIDES) $(MAKE) package +$(SRCLIBS): -clean: +apk-clean: rm -rf images rm -rf xbmc/lib rm -rf xbmc/libs @@ -130,5 +160,7 @@ clean: rm -f xbmc/res/drawable/splash.png rm -f xbmc/src/R.java rm -f xbmc/classes.dex + rm -rf assets + +.PHONY: force libs assets python sharedapk sharedobb res package -.PHONY: arm armeabi-v7a x86 force extras libs diff --git a/tools/android/packaging/apksign b/tools/android/packaging/apksign new file mode 100755 index 0000000000..0a2289b6c7 --- /dev/null +++ b/tools/android/packaging/apksign @@ -0,0 +1,10 @@ +#!/bin/bash +usage(){ + echo "Usage: $0 <keystore_filename> <keystore_password> <key_name> [<key_password>]" + exit 1 +} + +[[ $# -lt 3 ]] && usage + +make apk-sign SIGN_STORE=$1 SIGN_STOREPASS=$2 SIGN_KEY=$3 SIGN_KEYPASS=$4 + diff --git a/tools/android/packaging/xbmc/AndroidManifest.xml.in b/tools/android/packaging/xbmc/AndroidManifest.xml.in index 7624a0b49b..f3da501237 100644 --- a/tools/android/packaging/xbmc/AndroidManifest.xml.in +++ b/tools/android/packaging/xbmc/AndroidManifest.xml.in @@ -15,7 +15,7 @@ <uses-feature android:name="android.hardware.touchscreen" android:required="false" /> - <application android:icon="@drawable/ic_launcher" android:debuggable="true" android:label="@string/app_name" android:hasCode="true"> + <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:hasCode="true"> <activity android:name=".Splash" android:configChanges="orientation|keyboard|keyboardHidden|navigation|touchscreen" diff --git a/tools/android/packaging/xbmc/src/org/xbmc/kodi/Splash.java.in b/tools/android/packaging/xbmc/src/org/xbmc/kodi/Splash.java.in index 0cad1b81c3..b5f46fcdda 100644 --- a/tools/android/packaging/xbmc/src/org/xbmc/kodi/Splash.java.in +++ b/tools/android/packaging/xbmc/src/org/xbmc/kodi/Splash.java.in @@ -14,6 +14,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; +import java.util.Arrays; +import java.util.Comparator; import java.util.Properties; import java.util.Enumeration; import java.util.ArrayList; @@ -357,9 +359,55 @@ public class Splash extends Activity { sXbmcHome = fCacheDir.getAbsolutePath() + "/apk"; } - sPackagePath = getPackageResourcePath(); - fPackagePath = new File(sPackagePath); fXbmcHome = new File(sXbmcHome); + + try + { + sPackagePath = Environment.getExternalStorageDirectory() + + "/Android/obb/" + getPackageName() + "/main." + + getPackageManager().getPackageInfo(getPackageName(), 0).versionCode + + "." + getPackageName() + ".obb"; + } catch (Exception e) + { + } + + fPackagePath = new File(sPackagePath); + if (!fPackagePath.exists()) + { + // Check for latest obb + String obbdir = Environment.getExternalStorageDirectory() + + "/Android/obb/" + getPackageName(); + File[] obbfiles = new File(obbdir).listFiles(); + if (obbfiles != null && obbfiles.length > 0) + { + Arrays.sort(obbfiles, new Comparator<File>() + { + public int compare(File f1, File f2) + { + // Sort by lastmodified descending + return Long.valueOf(f2.lastModified()).compareTo(f1.lastModified()); + } + }); + fPackagePath = obbfiles[0]; + } + } + + if (fPackagePath.exists()) + { + sPackagePath = fPackagePath.getAbsolutePath(); + Log.i(TAG, "Using OBB: " + sPackagePath); + } else + { + sPackagePath = getPackageResourcePath(); + fPackagePath = new File(sPackagePath); + if (fPackagePath.length() < 50 * 1024 * 1024) + { + // No OBB and apk < 50Mb? Nah... + mErrorMsg = "OBB not yet present. Please retry later..."; + Log.e(TAG, mErrorMsg); + mState = InError; + } + } } private void MigrateUserData() { diff --git a/tools/depends/configure.in b/tools/depends/configure.in index a6a5a031ad..9c4ef7ac97 100644 --- a/tools/depends/configure.in +++ b/tools/depends/configure.in @@ -209,6 +209,7 @@ case $host in 10.7);; 10.8);; 10.9);; + 10.10);; *) AC_MSG_ERROR(error in configure of --with-sdk=$use_sdk) esac @@ -245,11 +246,11 @@ case $host in use_sdk="${use_sdk:-$found_sdk_version}" sdk_name=iphoneos$use_sdk case $use_xcode in - 5.* | 5.*.* ) - use_toolchain="${use_xcodepath}/Toolchains/XcodeDefault.xctoolchain" + 3.*.* | 4.* | 4.*.*) + use_toolchain="${use_toolchain:-`$use_xcodebuild -version -sdk $sdk_name PlatformPath`/Developer}" ;; *) - use_toolchain="${use_toolchain:-`$use_xcodebuild -version -sdk $sdk_name PlatformPath`/Developer}" + use_toolchain="${use_xcodepath}/Toolchains/XcodeDefault.xctoolchain" ;; esac @@ -258,6 +259,7 @@ case $host in 5.*);; 6.*);; 7.*);; + 8.*);; *) AC_MSG_ERROR(error in configure of --with-sdk=$use_sdk) ;; diff --git a/tools/depends/native/fakeroot-native/01-darwin14-openat.patch b/tools/depends/native/fakeroot-native/01-darwin14-openat.patch new file mode 100644 index 0000000000..599f1b42d0 --- /dev/null +++ b/tools/depends/native/fakeroot-native/01-darwin14-openat.patch @@ -0,0 +1,26 @@ +diff --git a/configure b/configure +index 0766dbb..5d3ecb2 100755 +--- a/configure ++++ b/configure +@@ -12523,7 +12523,7 @@ $as_echo "no" >&6; } + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +-for ac_func in fchmodat fchownat fstatat mkdirat mknodat openat renameat unlinkat lchmod fgetattrlist ++for ac_func in fchmodat fchownat fstatat mkdirat mknodat renameat unlinkat lchmod fgetattrlist + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +diff --git a/configure.ac b/configure.ac +index 43a0984..1b10130 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -286,7 +286,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + ],[ AC_MSG_RESULT([no]) + ]) + +-AC_CHECK_FUNCS(fchmodat fchownat fstatat mkdirat mknodat openat renameat unlinkat lchmod fgetattrlist) ++AC_CHECK_FUNCS(fchmodat fchownat fstatat mkdirat mknodat renameat unlinkat lchmod fgetattrlist) + + dnl find out how stat() etc are called. On linux systems, we really + dnl need to wrap (IIRC): diff --git a/tools/depends/native/fakeroot-native/Makefile b/tools/depends/native/fakeroot-native/Makefile index 43ac4055fe..ed3e813be4 100644 --- a/tools/depends/native/fakeroot-native/Makefile +++ b/tools/depends/native/fakeroot-native/Makefile @@ -24,6 +24,7 @@ $(TARBALLS_LOCATION)/$(ARCHIVE): $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) + cd $(PLATFORM); patch -p1 < ../01-darwin14-openat.patch cd $(PLATFORM); $(CONFIGURE) $(APP): $(PLATFORM) diff --git a/tools/depends/native/gas-preprocessor-native/gas-preprocessor.pl b/tools/depends/native/gas-preprocessor-native/gas-preprocessor.pl index 9cc3610509..fbf08539fb 100755 --- a/tools/depends/native/gas-preprocessor-native/gas-preprocessor.pl +++ b/tools/depends/native/gas-preprocessor-native/gas-preprocessor.pl @@ -86,7 +86,7 @@ if (grep /\.c$/, @gcc_cmd) { } elsif (grep /\.[sS]$/, @gcc_cmd) { # asm file, just do C preprocessor @preprocess_c_cmd = (@gcc_cmd, "-E"); -} elsif (grep /-(v|-version|dumpversion)/, @gcc_cmd) { +} elsif (grep /-(v|h|-version|dumpversion)/, @gcc_cmd) { # pass -v/--version along, used during probing. Matching '-v' might have # uninteded results but it doesn't matter much if gas-preprocessor or # the compiler fails. @@ -97,6 +97,8 @@ if (grep /\.c$/, @gcc_cmd) { if ($as_type eq "armasm") { $preprocess_c_cmd[0] = "cpp"; + push(@preprocess_c_cmd, "-U__ELF__"); + push(@preprocess_c_cmd, "-U__MACH__"); @preprocess_c_cmd = grep ! /^-nologo$/, @preprocess_c_cmd; # Remove -ignore XX parameter pairs from preprocess_c_cmd @@ -264,15 +266,22 @@ if ($force_thumb) { # note that the handling of arguments is probably overly permissive vs. gas # but it should be the same for valid cases while (<INPUT>) { + # remove lines starting with '#', preprocessing is done, '#' at start of + # the line indicates a comment for all supported archs (aarch64, arm, ppc + # and x86). Also strips line number comments but since they are off anyway + # it is no loss. + s/^#.*$//; # remove all comments (to avoid interfering with evaluating directives) s/(?<!\\)$inputcomm.*//x; # Strip out windows linefeeds s/\r$//; - # Strip out line number comments - armasm can handle them in a separate - # syntax, but since the line numbers are off they are only misleading. - s/^#\s+(\d+).*// if $as_type =~ /armasm/; - parse_line($_); + foreach my $subline (split(";", $_)) { + # Add newlines at the end of lines that don't already have one + chomp $subline; + $subline .= "\n"; + parse_line($subline); + } } sub eval_expr { @@ -393,7 +402,7 @@ sub parse_line { } elsif ($macro_level == 0) { expand_macros($line); } else { - if ($line =~ /\.macro\s+([\d\w\.]+)\s*(.*)/) { + if ($line =~ /\.macro\s+([\d\w\.]+)\s*,?\s*(.*)/) { $current_macro = $1; # commas in the argument list are optional, so only use whitespace as the separator @@ -824,7 +833,7 @@ sub handle_serialized_line { $labels_seen{$1} = 1; } - if ($line =~ s/^(\d+)://) { + if ($line =~ s/^\s*(\d+)://) { # Convert local labels into unique labels. armasm (at least in # RVCT) has something similar, but still different enough. # By converting to unique labels we avoid any possible @@ -985,7 +994,7 @@ sub handle_serialized_line { $line =~ s/fmxr/vmsr/; $line =~ s/fmrx/vmrs/; - $line =~ s/fadds/vadd/; + $line =~ s/fadds/vadd.f32/; } # catch unknown section names that aren't mach-o style (with a comma) diff --git a/tools/depends/target/config.site.in b/tools/depends/target/config.site.in index bc5d2787b0..252a4dcd04 100644 --- a/tools/depends/target/config.site.in +++ b/tools/depends/target/config.site.in @@ -139,14 +139,14 @@ if test "@platform_os@" = "ios"; then # tweaks for libffi (ios must use llvm-gcc-4.2) if test "${PACKAGE_NAME}" = "libffi" ; then case "@use_xcode@" in - 5.* | 5.*.* ) - export CC="@use_toolchain@/usr/bin/clang" - export CPP="@use_toolchain@/usr/bin/clang -E" - ;; - *) + 3.*.* | 4.* | 4.*.*) export CC="@use_toolchain@/usr/bin/llvm-gcc-4.2" export CPP="@use_toolchain@/usr/bin/llvm-gcc-4.2 -E" ;; + *) + export CC="@use_toolchain@/usr/bin/clang" + export CPP="@use_toolchain@/usr/bin/clang -E" + ;; esac unset AS unset CCAS diff --git a/tools/depends/target/libmpeg2/06-dont-asm-motion-comp.patch b/tools/depends/target/libmpeg2/06-dont-asm-motion-comp.patch deleted file mode 100644 index 80a76443f7..0000000000 --- a/tools/depends/target/libmpeg2/06-dont-asm-motion-comp.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff --git a/libmpeg2/Makefile.am b/libmpeg2/Makefile.am -index a4dd944..c113bf9 100644 ---- a/libmpeg2/Makefile.am -+++ b/libmpeg2/Makefile.am -@@ -14,7 +14,7 @@ - motion_comp_vis.c motion_comp_arm.c \ - cpu_accel.c cpu_state.c - if ARCH_ARM --libmpeg2arch_la_SOURCES += motion_comp_arm_s.S motion_comp_neon.c -+libmpeg2arch_la_SOURCES += motion_comp_neon.c - endif - libmpeg2arch_la_CFLAGS = $(OPT_CFLAGS) $(ARCH_OPT_CFLAGS) $(LIBMPEG2_CFLAGS) - ---- a/libmpeg2/motion_comp_arm.c -+++ b/libmpeg2/motion_comp_arm.c -@@ -93,14 +93,21 @@ MC_FUNC (put,y) - MC_FUNC (avg,y) - MC_FUNC (put,xy) - MC_FUNC (avg,xy) -+MC_FUNC (put,o) -+MC_FUNC (put,x) - - --extern void MC_put_o_16_arm (uint8_t * dest, const uint8_t * ref, -- int stride, int height); -- --extern void MC_put_x_16_arm (uint8_t * dest, const uint8_t * ref, -- int stride, int height); -+static void MC_put_o_16_arm (uint8_t * dest, const uint8_t * ref, -+ int stride, int height) -+{ -+ MC_put_o_16_c(dest, ref, stride, height); -+} - -+static void MC_put_x_16_arm (uint8_t * dest, const uint8_t * ref, -+ int stride, int height) -+{ -+ MC_put_x_16_c(dest, ref, stride, height); -+} - - static void MC_put_y_16_arm (uint8_t * dest, const uint8_t * ref, - int stride, int height) -@@ -114,11 +121,17 @@ static void MC_put_xy_16_arm (uint8_t * dest, const uint8_t * ref, - MC_put_xy_16_c(dest, ref, stride, height); - } - --extern void MC_put_o_8_arm (uint8_t * dest, const uint8_t * ref, -- int stride, int height); -+static void MC_put_o_8_arm (uint8_t * dest, const uint8_t * ref, -+ int stride, int height) -+{ -+ MC_put_o_8_c(dest, ref, stride, height); -+} - --extern void MC_put_x_8_arm (uint8_t * dest, const uint8_t * ref, -- int stride, int height); -+static void MC_put_x_8_arm (uint8_t * dest, const uint8_t * ref, -+ int stride, int height) -+{ -+ MC_put_x_8_c(dest, ref, stride, height); -+} - - static void MC_put_y_8_arm (uint8_t * dest, const uint8_t * ref, - int stride, int height) diff --git a/tools/depends/target/libmpeg2/06-motion_comp_arm_s.S-even_more_pic.patch b/tools/depends/target/libmpeg2/06-motion_comp_arm_s.S-even_more_pic.patch new file mode 100644 index 0000000000..5b71828942 --- /dev/null +++ b/tools/depends/target/libmpeg2/06-motion_comp_arm_s.S-even_more_pic.patch @@ -0,0 +1,98 @@ +--- libmpeg2/motion_comp_arm_s.S 2014-09-24 23:27:41.000000000 +0200 ++++ libmpeg2/motion_comp_arm_s.S 2014-09-24 23:01:06.000000000 +0200 +@@ -22,7 +22,7 @@ + .text + + @ ---------------------------------------------------------------- +- .align ++ .align 2 + #if defined(__APPLE__) && defined(__arm__) + .global _MC_put_o_16_arm + _MC_put_o_16_arm: +@@ -36,10 +36,10 @@ + and r4, r1, #3 + ldrb r4, [pc, r4] + add pc, pc, r4, lsl #2 +- .byte (MC_put_o_16_arm_align0 - 0f)>>2 +- .byte (MC_put_o_16_arm_align1 - 0f)>>2 +- .byte (MC_put_o_16_arm_align2 - 0f)>>2 +- .byte (MC_put_o_16_arm_align3 - 0f)>>2 ++ .byte (MC_put_o_16_arm_align0 - MC_put_o_16_arm_align0)>>2 ++ .byte (MC_put_o_16_arm_align1 - MC_put_o_16_arm_align1)>>2 ++ .byte (MC_put_o_16_arm_align2 - MC_put_o_16_arm_align2)>>2 ++ .byte (MC_put_o_16_arm_align3 - MC_put_o_16_arm_align3)>>2 + 0: + + MC_put_o_16_arm_align0: +@@ -86,7 +86,7 @@ + ldmfd sp!, {r4-r11, pc} @@ update PC with LR content. + + @ ---------------------------------------------------------------- +- .align ++ .align 2 + #if defined(__APPLE__) && defined(__arm__) + .global _MC_put_o_8_arm + _MC_put_o_8_arm: +@@ -100,10 +100,10 @@ + and r4, r1, #3 + ldrb r4, [pc, r4] + add pc, pc, r4, lsl #2 +- .byte (MC_put_o_8_arm_align0 - 0f)>>2 +- .byte (MC_put_o_8_arm_align1 - 0f)>>2 +- .byte (MC_put_o_8_arm_align2 - 0f)>>2 +- .byte (MC_put_o_8_arm_align3 - 0f)>>2 ++ .byte (MC_put_o_8_arm_align0 - MC_put_o_8_arm_align0)>>2 ++ .byte (MC_put_o_8_arm_align1 - MC_put_o_8_arm_align1)>>2 ++ .byte (MC_put_o_8_arm_align2 - MC_put_o_8_arm_align2)>>2 ++ .byte (MC_put_o_8_arm_align3 - MC_put_o_8_arm_align3)>>2 + 0: + + MC_put_o_8_arm_align0: +@@ -159,7 +159,7 @@ + add \rW2, \rW2, r10 + .endm + +- .align ++ .align 2 + #if defined(__APPLE__) && defined(__arm__) + .global _MC_put_x_16_arm + _MC_put_x_16_arm: +@@ -175,10 +175,10 @@ + mvn r12, r11 + ldrb r4, [pc, r4] + add pc, pc, r4, lsl #2 +- .byte (MC_put_x_16_arm_align0 - 0f)>>2 +- .byte (MC_put_x_16_arm_align1 - 0f)>>2 +- .byte (MC_put_x_16_arm_align2 - 0f)>>2 +- .byte (MC_put_x_16_arm_align3 - 0f)>>2 ++ .byte (MC_put_x_16_arm_align0 - MC_put_x_16_arm_align0)>>2 ++ .byte (MC_put_x_16_arm_align1 - MC_put_x_16_arm_align1)>>2 ++ .byte (MC_put_x_16_arm_align2 - MC_put_x_16_arm_align2)>>2 ++ .byte (MC_put_x_16_arm_align3 - MC_put_x_16_arm_align3)>>2 + 0: + .word 0x01010101 + +@@ -255,7 +255,7 @@ + ldmfd sp!, {r4-r11,pc} @@ update PC with LR content. + + @ ---------------------------------------------------------------- +- .align ++ .align 2 + #if defined(__APPLE__) && defined(__arm__) + .global _MC_put_x_8_arm + _MC_put_x_8_arm: +@@ -271,10 +271,10 @@ + mvn r12, r11 + ldrb r4, [pc, r4] + add pc, pc, r4, lsl #2 +- .byte (MC_put_x_8_arm_align0 - 0f)>>2 +- .byte (MC_put_x_8_arm_align1 - 0f)>>2 +- .byte (MC_put_x_8_arm_align2 - 0f)>>2 +- .byte (MC_put_x_8_arm_align3 - 0f)>>2 ++ .byte (MC_put_x_8_arm_align0 - MC_put_x_8_arm_align0)>>2 ++ .byte (MC_put_x_8_arm_align1 - MC_put_x_8_arm_align1)>>2 ++ .byte (MC_put_x_8_arm_align2 - MC_put_x_8_arm_align2)>>2 ++ .byte (MC_put_x_8_arm_align3 - MC_put_x_8_arm_align3)>>2 + 0: + .word 0x01010101 + diff --git a/tools/depends/target/libmpeg2/Makefile b/tools/depends/target/libmpeg2/Makefile index 8916495d98..0f4fe5b018 100644 --- a/tools/depends/target/libmpeg2/Makefile +++ b/tools/depends/target/libmpeg2/Makefile @@ -32,8 +32,10 @@ endif cd $(PLATFORM); patch -p0 < ../05-upstream-motion_comp_arm_s.S-is-not-PIC-enough.patch ifeq ($(OS),ios) case $(XCODE_VERSION) in \ - 5.* | 5.*.*) \ - cd $(PLATFORM); patch -p1 < ../06-dont-asm-motion-comp.patch \ + 4.* | 4.*.*) \ + ;;\ + *) \ + cd $(PLATFORM); patch -p0 < ../06-motion_comp_arm_s.S-even_more_pic.patch \ ;;\ esac endif diff --git a/tools/depends/target/libssh/Makefile b/tools/depends/target/libssh/Makefile index 930fe6a667..ae9d3f0f7e 100644 --- a/tools/depends/target/libssh/Makefile +++ b/tools/depends/target/libssh/Makefile @@ -21,6 +21,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) cd $(PLATFORM); patch -p0 < ../removelegacy.patch cd $(PLATFORM); patch -p0 < ../android.patch cd $(PLATFORM); patch -p0 < ../md5.patch + cd $(PLATFORM); patch -p1 < ../darwin.patch sed -ie "s|-fstack-protector|-fnostack-protector|" "$(PLATFORM)/cmake/Modules/DefineCompilerFlags.cmake" sed -ie "s|add_subdirectory(examples)||" "$(PLATFORM)/CMakeLists.txt" cd $(PLATFORM)/build; $(CMAKE) -DWITH_STATIC_LIB=1 -DTHREADS_PTHREAD_ARG=0 VERBOSE=1 .. diff --git a/tools/depends/target/libssh/darwin.patch b/tools/depends/target/libssh/darwin.patch new file mode 100644 index 0000000000..3288d295f7 --- /dev/null +++ b/tools/depends/target/libssh/darwin.patch @@ -0,0 +1,37 @@ +diff --git a/include/libssh/misc.h b/include/libssh/misc.h +index 9897c4e..fe4f602 100644 +--- a/include/libssh/misc.h ++++ b/include/libssh/misc.h +@@ -35,8 +35,12 @@ int ssh_is_ipaddr_v4(const char *str); + int ssh_is_ipaddr(const char *str); + + /* macro for byte ordering */ ++#if !defined(ntohll) + uint64_t ntohll(uint64_t); ++#endif ++#if !defined(htonll) + #define htonll(x) ntohll(x) ++#endif + + /* list processing */ + +diff --git a/src/misc.c b/src/misc.c +index 008be1b..3c2d8bb 100644 +--- a/src/misc.c ++++ b/src/misc.c +@@ -286,6 +286,7 @@ int ssh_is_ipaddr(const char *str) { + + #endif /* _WIN32 */ + ++#if !defined(ntohll) + uint64_t ntohll(uint64_t a) { + #ifdef WORDS_BIGENDIAN + return a; +@@ -298,6 +299,7 @@ uint64_t ntohll(uint64_t a) { + return ((((uint64_t) low) << 32) | ( high)); + #endif + } ++#endif + + char *ssh_lowercase(const char* str) { + char *new, *p; diff --git a/tools/depends/target/pythonmodule-pil/Imaging-1.1.7-bz2-link.patch b/tools/depends/target/pythonmodule-pil/Imaging-1.1.7-bz2-link.patch new file mode 100644 index 0000000000..de284045a5 --- /dev/null +++ b/tools/depends/target/pythonmodule-pil/Imaging-1.1.7-bz2-link.patch @@ -0,0 +1,13 @@ +diff --git a/setup.py b/setup.py +index 5872f72..372eeaa 100644 +--- a/setup.py ++++ b/setup.py +@@ -293,7 +293,7 @@ class pil_build_ext(build_ext): + if feature.freetype_version == 20: + defs.append(("USE_FREETYPE_2_0", None)) + exts.append(Extension( +- "_imagingft", ["_imagingft.c"], libraries=["freetype"], ++ "_imagingft", ["_imagingft.c"], libraries=["freetype", "bz2", "z"], + define_macros=defs + )) + diff --git a/tools/depends/target/pythonmodule-pil/Makefile b/tools/depends/target/pythonmodule-pil/Makefile index 18fbc24087..c242df92fc 100644 --- a/tools/depends/target/pythonmodule-pil/Makefile +++ b/tools/depends/target/pythonmodule-pil/Makefile @@ -25,6 +25,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) cd $(PLATFORM); patch -p1 < ../Imaging-1.1.7-access.patch cd $(PLATFORM); patch -p0 < ../Imaging-1.1.7-zip-include.patch cd $(PLATFORM); patch -p0 < ../Imaging-1.1.7-remove-zlib-check.patch + cd $(PLATFORM); patch -p1 < ../Imaging-1.1.7-bz2-link.patch cd $(PLATFORM); sed -ie "s|"darwin"|"darwinNot"|g" "setup.py" $(LIBDYLIB): $(PLATFORM) diff --git a/xbmc/PlayListPlayer.cpp b/xbmc/PlayListPlayer.cpp index dd635351ef..5f5955eeac 100644 --- a/xbmc/PlayListPlayer.cpp +++ b/xbmc/PlayListPlayer.cpp @@ -36,6 +36,7 @@ #include "guilib/LocalizeStrings.h" #include "interfaces/AnnouncementManager.h" #include "guilib/Key.h" +#include "URL.h" using namespace PLAYLIST; @@ -287,7 +288,7 @@ bool CPlayListPlayer::Play(int iSong, bool bAutoPlay /* = false */, bool bPlayPr return false; if (ret == PLAYBACK_FAIL) { - CLog::Log(LOGERROR,"Playlist Player: skipping unplayable item: %i, path [%s]", m_iCurrentSong, item->GetPath().c_str()); + CLog::Log(LOGERROR,"Playlist Player: skipping unplayable item: %i, path [%s]", m_iCurrentSong, CURL::GetRedacted(item->GetPath()).c_str()); playlist.SetUnPlayable(m_iCurrentSong); // abort on 100 failed CONSECTUTIVE songs diff --git a/xbmc/Util.cpp b/xbmc/Util.cpp index 65c436f7fe..c35b4c1623 100644 --- a/xbmc/Util.cpp +++ b/xbmc/Util.cpp @@ -2023,7 +2023,7 @@ void CUtil::ScanForExternalSubtitles(const std::string& strMovie, std::vector<st if (URIUtils::HasExtension(strItem, sub_exts[i])) { vecSubtitles.push_back( items[j]->GetPath() ); - CLog::Log(LOGINFO, "%s: found subtitle file %s\n", __FUNCTION__, items[j]->GetPath().c_str() ); + CLog::Log(LOGINFO, "%s: found subtitle file %s\n", __FUNCTION__, CURL::GetRedacted(items[j]->GetPath()).c_str() ); } } } @@ -2059,7 +2059,7 @@ void CUtil::ScanForExternalSubtitles(const std::string& strMovie, std::vector<st strDest = StringUtils::Format("special://temp/subtitle.%s.%d.smi", TagConv.m_Langclass[k].Name.c_str(), i); if (CFile::Copy(vecSubtitles[i], strDest)) { - CLog::Log(LOGINFO, " cached subtitle %s->%s\n", vecSubtitles[i].c_str(), strDest.c_str()); + CLog::Log(LOGINFO, " cached subtitle %s->%s\n", CURL::GetRedacted(vecSubtitles[i]).c_str(), strDest.c_str()); vecSubtitles.push_back(strDest); } } @@ -2158,7 +2158,7 @@ void CUtil::GetExternalStreamDetailsFromFilename(const CStdString& strVideo, con else if (URIUtils::GetExtension(strStream) == ".sub" && URIUtils::IsInArchive(strStream)) { // exclude parsing of vobsub file names that embedded in an archive - CLog::Log(LOGDEBUG, "%s - skipping archived vobsub filename parsing: %s", __FUNCTION__, strStream.c_str()); + CLog::Log(LOGDEBUG, "%s - skipping archived vobsub filename parsing: %s", __FUNCTION__, CURL::GetRedacted(strStream).c_str()); toParse.clear(); } @@ -2216,7 +2216,8 @@ void CUtil::GetExternalStreamDetailsFromFilename(const CStdString& strVideo, con if (info.flag == 0) info.flag = CDemuxStream::FLAG_NONE; - CLog::Log(LOGDEBUG, "%s - Language = '%s' / Name = '%s' / Flag = '%u' from %s", __FUNCTION__, info.language.c_str(), info.name.c_str(), info.flag, strStream.c_str()); + CLog::Log(LOGDEBUG, "%s - Language = '%s' / Name = '%s' / Flag = '%u' from %s", + __FUNCTION__, info.language.c_str(), info.name.c_str(), info.flag, CURL::GetRedacted(strStream).c_str()); } /*! \brief in a vector of subtitles finds the corresponding .sub file for a given .idx file diff --git a/xbmc/addons/Scraper.cpp b/xbmc/addons/Scraper.cpp index 76d52487ad..4d22ce7a3c 100644 --- a/xbmc/addons/Scraper.cpp +++ b/xbmc/addons/Scraper.cpp @@ -388,7 +388,7 @@ bool CScraper::Load() } if (!result) - CLog::Log(LOGWARNING, "failed to load scraper XML"); + CLog::Log(LOGWARNING, "failed to load scraper XML from %s", LibPath().c_str()); return m_fLoaded = result; } diff --git a/xbmc/epg/GUIEPGGridContainer.cpp b/xbmc/epg/GUIEPGGridContainer.cpp index 8a9faed520..bb11a5ea1d 100644 --- a/xbmc/epg/GUIEPGGridContainer.cpp +++ b/xbmc/epg/GUIEPGGridContainer.cpp @@ -748,26 +748,25 @@ bool CGUIEPGGridContainer::OnMessage(CGUIMessage& message) } /* Create Channel items */ - int iLastChannelNumber = -1; + int iLastChannelID = -1; ItemsPtr itemsPointer; itemsPointer.start = 0; for (unsigned int i = 0; i < m_programmeItems.size(); ++i) { const CEpgInfoTag* tag = ((CFileItem*)m_programmeItems[i].get())->GetEPGInfoTag(); - int iCurrentChannelNumber = tag->PVRChannelNumber(); - if (iCurrentChannelNumber != iLastChannelNumber) + CPVRChannelPtr channel = tag->ChannelTag(); + if (!channel) + continue; + int iCurrentChannelID = channel->ChannelID(); + if (iCurrentChannelID != iLastChannelID) { - CPVRChannelPtr channel = tag->ChannelTag(); - if (!channel) - continue; - if (i > 0) { itemsPointer.stop = i-1; m_epgItemsPtr.push_back(itemsPointer); itemsPointer.start = i; } - iLastChannelNumber = iCurrentChannelNumber; + iLastChannelID = iCurrentChannelID; CGUIListItemPtr item(new CFileItem(*channel)); m_channelItems.push_back(item); } diff --git a/xbmc/interfaces/Builtins.cpp b/xbmc/interfaces/Builtins.cpp index e02e035f5d..a88e145e1c 100644 --- a/xbmc/interfaces/Builtins.cpp +++ b/xbmc/interfaces/Builtins.cpp @@ -467,7 +467,9 @@ int CBuiltins::Execute(const std::string& execString) { AddonPtr script; std::string scriptpath(params[0]); - if (CAddonMgr::Get().GetAddon(params[0], script)) + if (CAddonMgr::Get().GetAddon(params[0], script, ADDON_SCRIPT) || + CAddonMgr::Get().GetAddon(params[0], script, ADDON_SCRIPT_WEATHER) || + CAddonMgr::Get().GetAddon(params[0], script, ADDON_SCRIPT_LYRICS)) scriptpath = script->LibPath(); // split the path up to find the filename diff --git a/xbmc/linux/DBusMessage.cpp b/xbmc/linux/DBusMessage.cpp index 7176dc77f9..67d4339f4d 100644 --- a/xbmc/linux/DBusMessage.cpp +++ b/xbmc/linux/DBusMessage.cpp @@ -28,7 +28,8 @@ CDBusMessage::CDBusMessage(const char *destination, const char *object, const ch m_message = dbus_message_new_method_call (destination, object, interface, method); m_haveArgs = false; - CLog::Log(LOGDEBUG|LOGDBUS, "DBus: Creating message to %s on %s with interface %s and method %s\n", destination, object, interface, method); + if (g_advancedSettings.CanLogComponent(LOGDBUS)) + CLog::Log(LOGDEBUG, "DBus: Creating message to %s on %s with interface %s and method %s\n", destination, object, interface, method); } CDBusMessage::~CDBusMessage() diff --git a/xbmc/storage/linux/UDisksProvider.cpp b/xbmc/storage/linux/UDisksProvider.cpp index 02ff5fc17b..57e8b7b896 100644 --- a/xbmc/storage/linux/UDisksProvider.cpp +++ b/xbmc/storage/linux/UDisksProvider.cpp @@ -304,7 +304,8 @@ bool CUDisksProvider::HasUDisks() void CUDisksProvider::DeviceAdded(const char *object, IStorageEventsCallback *callback) { - CLog::Log(LOGDEBUG|LOGDBUS, "UDisks: DeviceAdded (%s)", object); + if (g_advancedSettings.CanLogComponent(LOGDBUS)) + CLog::Log(LOGDEBUG, "UDisks: DeviceAdded (%s)", object); if (m_AvailableDevices[object]) { @@ -319,7 +320,8 @@ void CUDisksProvider::DeviceAdded(const char *object, IStorageEventsCallback *ca if (g_advancedSettings.m_handleMounting) device->Mount(); - CLog::Log(LOGDEBUG|LOGDBUS, "UDisks: DeviceAdded - %s", device->toString().c_str()); + if (g_advancedSettings.CanLogComponent(LOGDBUS)) + CLog::Log(LOGDEBUG, "UDisks: DeviceAdded - %s", device->toString().c_str()); if (device->m_isMounted && device->IsApproved()) { @@ -331,7 +333,8 @@ void CUDisksProvider::DeviceAdded(const char *object, IStorageEventsCallback *ca void CUDisksProvider::DeviceRemoved(const char *object, IStorageEventsCallback *callback) { - CLog::Log(LOGDEBUG|LOGDBUS, "UDisks: DeviceRemoved (%s)", object); + if (g_advancedSettings.CanLogComponent(LOGDBUS)) + CLog::Log(LOGDEBUG, "UDisks: DeviceRemoved (%s)", object); CUDiskDevice *device = m_AvailableDevices[object]; if (device) @@ -346,7 +349,8 @@ void CUDisksProvider::DeviceRemoved(const char *object, IStorageEventsCallback * void CUDisksProvider::DeviceChanged(const char *object, IStorageEventsCallback *callback) { - CLog::Log(LOGDEBUG|LOGDBUS, "UDisks: DeviceChanged (%s)", object); + if (g_advancedSettings.CanLogComponent(LOGDBUS)) + CLog::Log(LOGDEBUG, "UDisks: DeviceChanged (%s)", object); CUDiskDevice *device = m_AvailableDevices[object]; if (device == NULL) @@ -368,7 +372,8 @@ void CUDisksProvider::DeviceChanged(const char *object, IStorageEventsCallback * else if (mounted && !device->m_isMounted && callback) callback->OnStorageSafelyRemoved(device->m_Label); - CLog::Log(LOGDEBUG|LOGDBUS, "UDisks: DeviceChanged - %s", device->toString().c_str()); + if (g_advancedSettings.CanLogComponent(LOGDBUS)) + CLog::Log(LOGDEBUG, "UDisks: DeviceChanged - %s", device->toString().c_str()); } } diff --git a/xbmc/video/VideoInfoScanner.cpp b/xbmc/video/VideoInfoScanner.cpp index 9bf4349a6b..22f94ae5da 100644 --- a/xbmc/video/VideoInfoScanner.cpp +++ b/xbmc/video/VideoInfoScanner.cpp @@ -123,7 +123,7 @@ namespace VIDEO * doesn't exist rather than a NAS being switched off. A manual clean from settings * will still pick up and remove it though. */ - CLog::Log(LOGWARNING, "%s directory '%s' does not exist - skipping scan%s.", __FUNCTION__, directory.c_str(), m_bClean ? " and clean" : ""); + CLog::Log(LOGWARNING, "%s directory '%s' does not exist - skipping scan%s.", __FUNCTION__, CURL::GetRedacted(directory).c_str(), m_bClean ? " and clean" : ""); m_pathsToScan.erase(m_pathsToScan.begin()); } else if (!DoScan(directory)) @@ -259,7 +259,7 @@ namespace VIDEO if (IsExcluded(strDirectory)) { - CLog::Log(LOGWARNING, "Skipping item '%s' with '.nomedia' file in parent directory, it won't be added to the library.", strDirectory.c_str()); + CLog::Log(LOGWARNING, "Skipping item '%s' with '.nomedia' file in parent directory, it won't be added to the library.", CURL::GetRedacted(strDirectory).c_str()); return true; } @@ -838,7 +838,7 @@ namespace VIDEO episode.isFolder = false; episodeList.push_back(episode); CLog::Log(LOGDEBUG, "%s - found match for: %s. Season %d, Episode %d", __FUNCTION__, - episode.strPath.c_str(), episode.iSeason, episode.iEpisode); + CURL::GetRedacted(episode.strPath).c_str(), episode.iSeason, episode.iEpisode); return true; } @@ -863,7 +863,7 @@ namespace VIDEO episode.cDate = item->GetVideoInfoTag()->m_firstAired; episodeList.push_back(episode); CLog::Log(LOGDEBUG, "%s - found match for: '%s', firstAired: '%s' = '%s', title: '%s'", - __FUNCTION__, episode.strPath.c_str(), tag->m_firstAired.GetAsDBDateTime().c_str(), + __FUNCTION__, CURL::GetRedacted(episode.strPath).c_str(), tag->m_firstAired.GetAsDBDateTime().c_str(), episode.cDate.GetAsLocalizedDate().c_str(), episode.strTitle.c_str()); return true; } @@ -885,7 +885,7 @@ namespace VIDEO episode.iEpisode = -1; episodeList.push_back(episode); CLog::Log(LOGDEBUG,"%s - found match for: '%s', title: '%s'", __FUNCTION__, - episode.strPath.c_str(), episode.strTitle.c_str()); + CURL::GetRedacted(episode.strPath).c_str(), episode.strTitle.c_str()); return true; } @@ -897,7 +897,7 @@ namespace VIDEO if (tag->m_iSeason == 0 && tag->m_iEpisode == 0) { CLog::Log(LOGDEBUG,"%s - found exclusion match for: %s. Both Season and Episode are 0. Item will be ignored for scanning.", - __FUNCTION__, item->GetPath().c_str()); + __FUNCTION__, CURL::GetRedacted(item->GetPath()).c_str()); return true; } @@ -938,7 +938,7 @@ namespace VIDEO if (!GetAirDateFromRegExp(reg, episode)) continue; - CLog::Log(LOGDEBUG, "VideoInfoScanner: Found date based match %s (%s) [%s]", strLabel.c_str(), + CLog::Log(LOGDEBUG, "VideoInfoScanner: Found date based match %s (%s) [%s]", CURL::GetRedacted(strLabel).c_str(), episode.cDate.GetAsLocalizedDate().c_str(), expression[i].regexp.c_str()); } else @@ -946,7 +946,7 @@ namespace VIDEO if (!GetEpisodeAndSeasonFromRegExp(reg, episode, defaultSeason)) continue; - CLog::Log(LOGDEBUG, "VideoInfoScanner: Found episode match %s (s%ie%i) [%s]", strLabel.c_str(), + CLog::Log(LOGDEBUG, "VideoInfoScanner: Found episode match %s (s%ie%i) [%s]", CURL::GetRedacted(strLabel).c_str(), episode.iSeason, episode.iEpisode, expression[i].regexp.c_str()); } @@ -1449,7 +1449,7 @@ namespace VIDEO { CLog::Log(LOGERROR, "VideoInfoScanner: Asked to lookup episode %s" " online, but we have no episode guide. Check your tvshow.nfo and make" - " sure the <episodeguide> tag is in place.", file->strPath.c_str()); + " sure the <episodeguide> tag is in place.", CURL::GetRedacted(file->strPath).c_str()); continue; } |