diff options
author | Memphiz <memphis@machzwo.de> | 2014-10-12 16:01:41 +0200 |
---|---|---|
committer | Memphiz <memphis@machzwo.de> | 2014-10-19 21:35:01 +0200 |
commit | 43fed63a6edf312ef31be8e9d472f7935707cd03 (patch) | |
tree | 814c2754f9ed5680b778adfd2f69109141f5230d | |
parent | 8e7686c8f74dec910af253055f9e3e5f99437d9c (diff) |
[rebrand] - show migration info IF the configuration data was moved during installation and link the user to the wiki. Show this dialog only once.
-rwxr-xr-x | language/English/strings.po | 14 | ||||
-rw-r--r-- | project/Win32BuildSetup/genNsisInstaller.nsi | 6 | ||||
-rw-r--r-- | tools/darwin/packaging/migrate_to_kodi_ios.sh.in | 1 | ||||
-rw-r--r-- | xbmc/Application.cpp | 23 | ||||
-rw-r--r-- | xbmc/Application.h | 1 |
5 files changed, 43 insertions, 2 deletions
diff --git a/language/English/strings.po b/language/English/strings.po index 1836b29812..4fe550abbe 100755 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -12537,7 +12537,19 @@ msgctxt "#24127" msgid "Automatically download first subtitle from the search result list" msgstr "" -#empty strings from id 24128 to 24999 +#. Info dialog after migrating userdata from xbmc to kodi +#: xbmc/Application.cpp +msgctxt "#24128" +msgid "Configuration has been moved" +msgstr "" + +#. Info dialog after migrating userdata from xbmc to kodi +#: xbmc/Application.cpp +msgctxt "#24129" +msgid "The configuration of XBMC has been moved to the new location for Kodi. Please refer to http://kodi.wiki/view/Migration_from_XBMC_to_Kodi - this message will not be shown again!" +msgstr "" + +#empty strings from id 24130 to 24999 msgctxt "#25000" msgid "Notifications" diff --git a/project/Win32BuildSetup/genNsisInstaller.nsi b/project/Win32BuildSetup/genNsisInstaller.nsi index 56a72a8ba0..a3d3c03181 100644 --- a/project/Win32BuildSetup/genNsisInstaller.nsi +++ b/project/Win32BuildSetup/genNsisInstaller.nsi @@ -109,6 +109,10 @@ Function HandleUserdataMigration ${AndIfNot} ${FileExists} "$APPDATA\${APP_NAME}\*.*" Rename "$APPDATA\XBMC\" "$APPDATA\${APP_NAME}\" MessageBox MB_OK|MB_ICONEXCLAMATION|MB_TOPMOST|MB_SETFOREGROUND "Your current XBMC userdata folder was moved to the new ${APP_NAME} userdata location.$\nThis to make the transition as smooth as possible without any user interactions needed." + ;mark that it was migrated in the filesystem - kodi will show another info message during first Kodi startup + ;for really making sure that the user has read that message. + FileOpen $0 "$APPDATA\${APP_NAME}\.kodi_data_was_migrated" w + FileClose $0 ${EndIf} ${Else} ; old installation was found but not uninstalled - inform the user @@ -438,4 +442,4 @@ Function .onInit IntOp $0 ${SF_SELECTED} | ${SF_RO} SectionSetFlags ${SEC_DIRECTX} $0 StrCpy $CleanDestDir "-1" -FunctionEnd
\ No newline at end of file +FunctionEnd diff --git a/tools/darwin/packaging/migrate_to_kodi_ios.sh.in b/tools/darwin/packaging/migrate_to_kodi_ios.sh.in index e40f735cf0..be9155fa8c 100644 --- a/tools/darwin/packaging/migrate_to_kodi_ios.sh.in +++ b/tools/darwin/packaging/migrate_to_kodi_ios.sh.in @@ -18,6 +18,7 @@ function migrate_to_kodi () { mv $XBMC_HOME $APP_HOME chown -R mobile.mobile $APP_HOME echo "Migration complete" + touch $APP_HOME/.kodi_data_was_migrated } needs_kodi_migration diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index 215a2af7a2..bfec28e67e 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -1523,6 +1523,9 @@ bool CApplication::Initialize() CPeripheralImon::GetCountOfImonsConflictWithDInput() == 0 ); #endif + // show info dialog about moved configuration files if needed + ShowAppMigrationMessage(); + return true; } @@ -5003,6 +5006,26 @@ bool CApplication::ExecuteXBMCAction(std::string actionStr) return true; } +// inform the user that the configuration data has moved from old XBMC location +// to new Kodi location - if applicable +void CApplication::ShowAppMigrationMessage() +{ + // .kodi_migration_complete will be created from the installer/packaging + // once an old XBMC configuration was moved to the new Kodi location + // if this is the case show the migration info to the user once which + // tells him to have a look into the wiki where the move of configuration + // is further explained. + if (CFile::Exists("special://home/.kodi_data_was_migrated") && + !CFile::Exists("special://home/.kodi_migration_info_shown")) + { + CGUIDialogOK::ShowAndGetInput(24128, 0, 24129, 0); + CFile tmpFile; + // create the file which will prevent this dialog from appearing in the future + tmpFile.OpenForWrite("special://home/.kodi_migration_info_shown"); + tmpFile.Close(); + } +} + void CApplication::Process() { MEASURE_FUNCTION; diff --git a/xbmc/Application.h b/xbmc/Application.h index 41578918b7..23fd4cfe17 100644 --- a/xbmc/Application.h +++ b/xbmc/Application.h @@ -198,6 +198,7 @@ public: void ActivateScreenSaver(bool forceType = false); void CloseNetworkShares(); + void ShowAppMigrationMessage(); virtual void Process(); void ProcessSlow(); void ResetScreenSaver(); |