diff --git a/temp/updater.bat b/temp/updater.bat index aaba533..606774f 100644 --- a/temp/updater.bat +++ b/temp/updater.bat @@ -1,6 +1,6 @@ ::get info and return to caller UNLESS temp\currentversion.txt is detected, not currentversionInfo.txt @echo off -set newversion=7.0.3 +set newversion=8.0.0 set changelogURL=https://modmii.github.io/changelog.html ::Enable new hidden "set debug=on" setting when testing offline updater.bat changes, careful that this file does not accidentally get deleted during development\testing, save a copy of updater.bat the same folder as ModMii.exe and rename it Updatetemp.bat to test @@ -8,18 +8,68 @@ set changelogURL=https://modmii.github.io/changelog.html if /i "%debug%" EQU "on" copy "Updatetemp.bat" "Updatetemp_backup.bat">nul ::do not change the below from 6.6.3 for the foreseable future, effective 6.6.4 variable will get updated - if "%currentversion%"=="" set currentversion=6.6.3 if exist temp\currentversionInfo.txt set /p currentversion= nul findstr "^" "%CurrentcIOS%.zip" || del "%CurrentcIOS%.zip" + +if not exist "%CurrentcIOS%.zip" goto:badkey +if not exist "support\More-cIOSs\%CurrentcIOS%" mkdir "support\More-cIOSs\%CurrentcIOS%" +support\7za e -aoa "%CurrentcIOS%.zip" -o"support\More-cIOSs\%CurrentcIOS%" *.* -r +del "%CurrentcIOS%.zip">nul +if not exist "support\More-cIOSs\%CurrentcIOS%\d2x-beta.bat" (rd /s /q "support\More-cIOSs\%CurrentcIOS%") & (goto:badkey) + +if exist support\d2x-beta rd /s /q support\d2x-beta +mkdir support\d2x-beta +copy /y "support\More-cIOSs\%CurrentcIOS%\*" "support\d2x-beta">nul +if exist support\d2x-beta\d2x-beta.bat call support\d2x-beta\d2x-beta.bat +echo. +if /i "%d2x-beta-rev%" EQU "%CurrentcIOS:~5%" (echo %CurrentcIOS% cIOS successfully enabled!) else (goto:badkey) +echo. +goto:skip + +:badkey +echo. +echo Something went wrong, %CurrentcIOS% cIOS not enabled... +echo. +:skip + + + + if %currentversion% NEQ 7.0.3 goto:skip if /i "%DBversion%" EQU "24.12.04" goto:skip echo. echo Updating File Download Database (DB.bat) with minor changes to fix broken links... +call support\wget --no-check-certificate -t 3 "https://github.com/modmii/modmii.github.io/blob/5a4b38942341d312eeee58b92915d1b1bcba85d8/Support/subscripts/DB.bat" -O Support/subscripts/DB.bat echo. -start /min /wait support\wget --no-check-certificate -t 3 "https://raw.githubusercontent.com/modmii/modmii.github.io/master/Support/subscripts/DB.bat" -O Support/subscripts/DB.bat call Support/subscripts/DB.bat :skip @@ -31,7 +81,6 @@ support\sfk filter "Support\Guide\str2hax.001" -rep _"18.188.135.9"_"3.143.163.2 if %currentversion% GEQ 6.6.4 goto:skiparcme - ::force redownload of old cached ARCME.zip if not exist "temp\ARCME.zip" goto:skiparcme ::hash is for old zip, if hashes match, then rename it @@ -42,6 +91,12 @@ if not errorlevel 1 move /y "temp\ARCME.zip" "temp\ARCME_1.0.5.zip"> nul if not exist temp\currentversion.txt goto:ReturnToCaller + + +setlocal +chcp 437>nul + + set /p currentversion= nul +ver>temp\temp.txt +findStr /I /C:" 8.1" "temp\temp.txt" >nul +IF NOT ERRORLEVEL 1 (set winver=9) & (goto:continue) +support\sfk filter -quiet "temp\temp.txt" -rep _*" "__ -rep _"."*__ -write -yes +support\sfk filter -quiet "temp\temp.txt" -no-empty-lines -no-blank-lines -write -yes +set /p winver= nul +Start ModMii.exe +exit +:tinyskip + +echo Press any key to update ModMii to v7.0.3 which is the last update +echo that does not require 64-bit Windows 8.1 or higher +echo. +pause +set newversion=7.0.3 +goto:continue + + +:skinWarning + +::make cmd window transparent and hidden +if /i "%ModMiiverbose%" NEQ "on" support\nircmd.exe win trans ititle "ModMiiUpdater" 0 +if /i "%ModMiiverbose%" NEQ "on" support\nircmd.exe win hide ititle "ModMiiUpdater" + + +if exist "Support\Skins\Default\UPDATECHECK.bmp" (set "wabmp=Support\Skins\Default\UPDATECHECK.bmp") else (set wabmp=support\bmp\UPDATECHECK.bmp) +if exist "Support\Skins\%skin%\UPDATECHECK.bmp" set "wabmp=Support\Skins\%skin%\UPDATECHECK.bmp" + +set watext=Unfortunately this PC does not meet ModMii's minimum system requirements.~~ModMii v8.0.0 and above requires 64-bit Windows 8.1 or higher.~~You can manually install the latest ModMii but many features will not work. + +if %currentversion% GEQ 7.0.3 set "watext=%watext%~~Click any button to return to ModMiiSkin v%currentversion%" + +if %currentversion% LSS 7.0.3 set "watext=%watext%~~Click Cancel to return to ModMiiSkin v%currentversion%, or click Next to update to v7.0.3 which is the last update that does not require 64-bit Windows 8.1 or higher." + +start /w support\wizapp NOBACK TB +if errorlevel 2 (Start ModMiiSkin.exe) & (exit) + +if %currentversion% GEQ 7.0.3 (Start ModMiiSkin.exe) & (exit) + +set newversion=7.0.3 +::goto:continue + + +:continue copy /y support\7za.exe support\7za2.exe>nul - if /i "%updatermode%" EQU "skin" goto:skin -setlocal -chcp 437>nul -::mode con cols=85 -color 1f - cls echo ModMii v%currentversion% echo by XFlak @@ -80,7 +205,7 @@ echo Please Wait... echo. if exist "%UPDATENAME%.zip" del "%UPDATENAME%.zip">nul -start /min /wait support\wget --no-check-certificate -t 3 https://github.com/modmii/modmii.github.io/releases/download/%newversion%/%UPDATENAME%.zip +call support\wget --no-check-certificate -t 3 https://github.com/modmii/modmii.github.io/releases/download/%newversion%/%UPDATENAME%.zip if not exist "%UPDATENAME%.zip" goto:updatefail ::if exist "support\ModMii.bat" ren "support\ModMii.bat" "ModMii-v%currentversion%.bat" @@ -98,6 +223,20 @@ goto:updatefail if exist %UPDATENAME%.zip del %UPDATENAME%.zip>nul del support\7za2.exe>nul + +if %currentversion% GEQ 7.0.4 goto:skip +::check for legacy d2x-beta.bat's, if "magicword2" found no need for further checks +if not exist support\d2x-beta goto:skip +findStr "magicword2" "support\d2x-beta\d2x-beta.bat" >nul +IF ERRORLEVEL 1 goto:skip +rd /s /q support\d2x-beta +echo. +echo d2x cIOS version restored to default but you can change it again in Options +echo. +@ping 127.0.0.1 -n 2 -w 1000> nul +:skip + + if /i "%AudioOption%" EQU "on" start support\nircmd.exe mediaplay 3000 "%Success.mp3%" Start ModMii.exe exit @@ -123,9 +262,6 @@ if /i "%ModMiiverbose%" NEQ "on" support\nircmd.exe win hide ititle "ModMiiUpdat copy /y support\wizapp.exe support\wizapp2.exe>nul -setlocal -chcp 437>nul - if exist "Support\Skins\Default\UPDATING.bmp" (set "wabmp=Support\Skins\Default\UPDATING.bmp") else (set wabmp=support\bmp\UPDATING.bmp) if exist "Support\Skins\%skin%\UPDATING.bmp" set "wabmp=Support\Skins\%skin%\UPDATING.bmp" @@ -142,7 +278,7 @@ taskkill /im ModMiiSkin.exe /f >nul if exist "%UPDATENAME%.zip" del "%UPDATENAME%.zip">nul -start /min /wait support\wget --no-check-certificate -t 3 https://github.com/modmii/modmii.github.io/releases/download/%newversion%/%UPDATENAME%.zip +call support\wget --no-check-certificate -t 3 https://github.com/modmii/modmii.github.io/releases/download/%newversion%/%UPDATENAME%.zip if not exist "%UPDATENAME%.zip" goto:updatefailskin @@ -168,6 +304,21 @@ start support\wizapp2.exe PB CLOSE del support\7za2.exe>nul del support\wizapp2.exe>nul if exist %UPDATENAME%.zip del %UPDATENAME%.zip>nul + +if %currentversion% GEQ 7.0.4 goto:skip +::check for legacy d2x-beta.bat's, if "magicword2" found no need for further checks +if not exist support\d2x-beta goto:skip +findStr "magicword2" "support\d2x-beta\d2x-beta.bat" >nul +IF ERRORLEVEL 1 goto:skip +rd /s /q support\d2x-beta +::echo. +echo d2x cIOS version restored to default but you can change it again in Options +::echo. +::@ping 127.0.0.1 -n 2 -w 1000> nul +:skip + + + if /i "%AudioOption%" EQU "on" start support\nircmd.exe mediaplay 3000 "%Success.mp3%" Start ModMiiSkin.exe exit