aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Blake <oak99sky@yahoo.co.uk>2020-11-08 15:34:05 +0000
committerGitHub <noreply@github.com>2020-11-08 15:34:05 +0000
commit0c9d98851e9e3a0f7eba0ebda19c649fe8a8b1bc (patch)
treea6e59bb0de4d0eb391bd64fac1018947fbe72e0f
parentcce99b44d13314611f20bbfe80221c8463d5dc09 (diff)
parent16427e9c69f8c54035b129f4bdecee30a947b635 (diff)
Merge pull request #18659 from sy6sy2/remove-xbmc-migration
Remove XBMC migration steps
-rw-r--r--.gitignore1
-rw-r--r--cmake/scripts/darwin_embedded/Install.cmake5
-rw-r--r--tools/Linux/kodi.sh.in14
-rw-r--r--tools/android/packaging/xbmc/src/Splash.java.in51
-rw-r--r--tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh.in30
-rw-r--r--tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in3
-rwxr-xr-xtools/darwin/runtime/preflight36
7 files changed, 0 insertions, 140 deletions
diff --git a/.gitignore b/.gitignore
index 19c200efe5..4fb64a22fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -288,7 +288,6 @@ cmake_install.cmake
/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh
/tools/darwin/packaging/osx/mkdmg-osx.sh
/tools/darwin/packaging/osx/VolumeIcon.icns
-/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh
/tools/darwin/packaging/seatbeltunlock/mkdeb-seatbeltunlock.sh
/tools/darwin/runtime/XBMCHelper
diff --git a/cmake/scripts/darwin_embedded/Install.cmake b/cmake/scripts/darwin_embedded/Install.cmake
index af18277a5e..02464eef9f 100644
--- a/cmake/scripts/darwin_embedded/Install.cmake
+++ b/cmake/scripts/darwin_embedded/Install.cmake
@@ -122,11 +122,6 @@ endif()
set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..)
configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in
${CMAKE_BINARY_DIR}/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh @ONLY)
-
-if(CORE_PLATFORM_NAME_LC STREQUAL ios)
- configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh.in
- ${CMAKE_BINARY_DIR}/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh @ONLY)
-endif()
add_custom_target(deb
COMMAND sh ./mkdeb-darwin_embedded.sh ${CORE_BUILD_CONFIG}
diff --git a/tools/Linux/kodi.sh.in b/tools/Linux/kodi.sh.in
index 6899a47c1e..aaf2f4ff7f 100644
--- a/tools/Linux/kodi.sh.in
+++ b/tools/Linux/kodi.sh.in
@@ -59,18 +59,6 @@ fi
APPORT_CORE="/var/crash/$(echo -n ${KODI_BINARY}|tr / _).$(id -u).crash"
-migrate_home()
-{
- [ "$(basename $0)" = "xbmc" ] && echo "WARNING: Running ${bin_name} as "xbmc" is deprecated and will be removed in later versions, please switch to using the ${bin_name} binary"
-
- #check if data migration is needed
- if [ -d "${HOME}/.xbmc" ] && [ ! -d "${KODI_DATA}" ]; then
- echo "INFO: migrating userdata folder. Renaming ${HOME}/.xbmc to $KODI_DATA"
- mv ${HOME}/.xbmc $KODI_DATA
- touch ${KODI_DATA}/.kodi_data_was_migrated
- fi
-}
-
command_exists()
{
command -pv $1 >/dev/null 2>&1
@@ -172,8 +160,6 @@ propagate_sigterm() {
trap propagate_sigterm TERM
-migrate_home
-
if command_exists gdb; then
# Output warning in case ulimit is unsupported by shell
eval ulimit -c unlimited
diff --git a/tools/android/packaging/xbmc/src/Splash.java.in b/tools/android/packaging/xbmc/src/Splash.java.in
index 4cbe9ca6a7..66dca26f24 100644
--- a/tools/android/packaging/xbmc/src/Splash.java.in
+++ b/tools/android/packaging/xbmc/src/Splash.java.in
@@ -196,7 +196,6 @@ public class Splash extends Activity
else
{
SetupEnvironment();
- MigrateUserData();
if (mState == InError)
{
@@ -626,55 +625,6 @@ public class Splash extends Activity
}
}
- private void MigrateUserData()
- {
- String sOldUserDir;
- File fOldUserDir;
- try
- {
- sOldUserDir = getExternalFilesDir(null).getParentFile().getParentFile() + "/org.xbmc.xbmc/files/.xbmc";
- fOldUserDir = new File(sOldUserDir);
- if (!fOldUserDir.exists())
- return;
- }
- catch (Exception e)
- {
- return;
- }
-
- File fNewUserDir = new File(getExternalFilesDir(null), ".@APP_NAME_LC@");
- String s@APP_NAME@Migrated = fNewUserDir.getAbsolutePath() + "/.@APP_NAME_LC@_data_was_migrated";
- File f@APP_NAME@Migrated = new File(s@APP_NAME@Migrated);
-
- Log.d(TAG, "External_dir = " + fOldUserDir);
- if (fOldUserDir.exists() && !fNewUserDir.exists())
- {
- Log.d(TAG, "XBMC user data detected at " + fOldUserDir.getAbsolutePath() + ", migrating to " + fNewUserDir.getAbsolutePath());
- if (!fNewUserDir.getParentFile().exists() && !fNewUserDir.getParentFile().mkdirs())
- {
- Log.d(TAG, "Error creating " + fNewUserDir.getParentFile().getAbsolutePath());
- return;
- }
- if (fOldUserDir.renameTo(fNewUserDir))
- {
- try
- {
- new FileOutputStream(f@APP_NAME@Migrated).close();
- }
- catch (IOException e1)
- {
- e1.printStackTrace();
- }
- Log.d(TAG, "XBMC user data migrated to @APP_NAME@ successfully");
- }
- else
- {
- Log.d(TAG, "Error migrating XBMC user data");
- }
- }
- }
-
-
private boolean ParseCpuFeature()
{
ProcessBuilder cmd;
@@ -951,7 +901,6 @@ public class Splash extends Activity
mState = ChecksDone;
SetupEnvironment();
- MigrateUserData();
if ((mState != DownloadingObb && mState != InError) && fXbmcHome.exists() && fXbmcHome.lastModified() >= fPackagePath.lastModified() && !mInstallLibs)
{
diff --git a/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh.in b/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh.in
deleted file mode 100644
index be9155fa8c..0000000000
--- a/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh.in
+++ /dev/null
@@ -1,30 +0,0 @@
-APP_NAME=@APP_NAME@
-XBMC_HOME="/var/mobile/Library/Preferences/XBMC"
-APP_HOME="/var/mobile/Library/Preferences/@APP_NAME@"
-
-
-function needs_kodi_migration () {
- #check if there is an old XBMC folder to migrate
- if test -d "$XBMC_HOME" && test ! -d "$APP_HOME"
- then
- return "1";
- else
- return "0";
- fi
-}
-
-function migrate_to_kodi () {
- echo "moving settings from $XBMC_HOME to $APP_HOME"
- mv $XBMC_HOME $APP_HOME
- chown -R mobile.mobile $APP_HOME
- echo "Migration complete"
- touch $APP_HOME/.kodi_data_was_migrated
-}
-
-needs_kodi_migration
-NEEDS_MIGRATION=$?
-if [ "$NEEDS_MIGRATION" == "1" ]
-then
- echo "This is the first time you install @APP_NAME@ and we detected that you have an old XBMC configuration. Your XBMC configuration will now be migrated to @APP_NAME@ by moving the settings folder. If you ever want to go back to XBMC please backup /var/mobile/Library/Preferences/@APP_NAME@ after this installation has finished and rename it to XBMC in case you downgrade to XBMC."
- migrate_to_kodi
-fi
diff --git a/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in b/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in
index 78cb87aada..0d318be595 100644
--- a/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in
+++ b/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in
@@ -96,9 +96,6 @@ chmod +x $DIRNAME/$PACKAGE/DEBIAN/prerm
# postinst: nothing for now.
echo "#!/bin/sh" > $DIRNAME/$PACKAGE/DEBIAN/postinst
echo "chown -R mobile:mobile /Applications/@APP_NAME@.app" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-if [ "@PLATFORM@" != "appletvos" ]; then
- cat $DIRNAME/migrate_to_kodi.sh >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-fi
echo "/usr/bin/uicache" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
echo "echo 'finish:respringing ...'" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
chmod +x $DIRNAME/$PACKAGE/DEBIAN/postinst
diff --git a/tools/darwin/runtime/preflight b/tools/darwin/runtime/preflight
index e30336630a..d9311f5d1e 100755
--- a/tools/darwin/runtime/preflight
+++ b/tools/darwin/runtime/preflight
@@ -16,19 +16,6 @@ sub get_extras {
return;
}
-sub get_xbmc_home {
- my $os = get_os();
- my $home = get_home();
- return if !defined $home;
- if ( $os eq "osx" ) {
- return $home."/Library/Application Support/XBMC";
- }
- elsif ( $os eq "linux" ) {
- return $home."/.xbmc";
- }
- return;
-}
-
sub get_app_home {
my $os = get_os();
my $home = get_home();
@@ -161,16 +148,6 @@ sub first_app_version_run() {
return;
}
-sub needs_kodi_migration() {
- my $xbmchome = get_xbmc_home();
- my $apphome = get_app_home();
- #check if there is an old XBMC folder to migrate
- if ( -d "$xbmchome" && ! -d "$apphome" ) {
- return 1;
- }
- return;
-}
-
sub setup_default_app() {
my $extras = get_extras();
my $apphome = get_app_home();
@@ -196,19 +173,6 @@ sub setup_version_app() {
#TODO
}
-#migration from XBMC to Kodi
-sub migrate_to_kodi() {
- my $xbmchome = get_xbmc_home();
- my $apphome = get_app_home();
- print "mv $xbmchome $apphome";
- `mv "$xbmchome" "$apphome"`;
- `touch -f "$apphome/.kodi_data_was_migrated"`;
-}
-
-if (needs_kodi_migration()) {
- migrate_to_kodi();
-}
-
if (first_app_run()) {
setup_default_app();
}