Changeset 176 for smplayer/trunk/setup/scripts
- Timestamp:
- May 3, 2016, 5:25:45 PM (9 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 175
- Property svn:mergeinfo changed
-
smplayer/trunk/setup/scripts/install_smplayer.cmd
r170 r176 6 6 echo. 7 7 8 set /P QTVER="Qt Version (Default: 4.8. 4): "9 if "%QTVER%"=="" set QTVER=4.8. 48 set /P QTVER="Qt Version (Default: 4.8.6): " 9 if "%QTVER%"=="" set QTVER=4.8.6 10 10 11 11 set OUTPUT_DIR=smplayer-build 12 12 13 13 set SMPLAYER_DIR=svn\smplayer 14 set SMTUBE_DIR=svn\smtube15 14 set SMPLAYER_THEMES_DIR=svn\smplayer-themes 16 15 set SMPLAYER_SKINS_DIR=svn\smplayer-skins 17 16 set MPLAYER_DIR=mplayer 17 set MPV_DIR=mpv 18 18 rem set QT_DIR=C:\QtSDK\Desktop\Qt\%QTVER%\mingw 19 19 set QT_DIR=C:\Qt\%QTVER% … … 34 34 copy %QT_DIR%\bin\QtXml4.dll %OUTPUT_DIR% 35 35 copy %QT_DIR%\bin\QtScript4.dll %OUTPUT_DIR% 36 copy %QT_DIR%\bin\QtDBus4.dll %OUTPUT_DIR% 36 37 copy %QT_DIR%\bin\mingwm10.dll %OUTPUT_DIR% 37 38 if %QTVER% geq 4.6.0 ( 38 39 copy %QT_DIR%\bin\libgcc_s_dw2-1.dll %OUTPUT_DIR% 39 40 ) 41 if %QTVER% geq 4.8.0 ( 42 copy %QT_DIR%\bin\libwinpthread-1.dll %OUTPUT_DIR% 43 copy "%QT_DIR%\bin\libstdc++-6.dll" %OUTPUT_DIR% 44 ) 40 45 copy openssl\*.dll %OUTPUT_DIR% 41 46 42 47 mkdir %OUTPUT_DIR%\imageformats 43 48 copy %QT_DIR%\plugins\imageformats\qjpeg4.dll %OUTPUT_DIR%\imageformats\ 49 50 echo. 51 echo ###### Fonts ####### 52 echo. 53 54 rem mkdir %OUTPUT_DIR%\open-fonts 55 rem copy open-fonts\*.* %OUTPUT_DIR%\open-fonts\ 44 56 45 57 echo. … … 74 86 mkdir %OUTPUT_DIR%\themes\ 75 87 88 mkdir %OUTPUT_DIR%\themes\Breeze 89 copy %SMPLAYER_THEMES_DIR%\themes\Breeze\Breeze.rcc %OUTPUT_DIR%\themes\Breeze\ 90 copy %SMPLAYER_THEMES_DIR%\themes\Breeze\README.txt %OUTPUT_DIR%\themes\Breeze\ 91 92 mkdir %OUTPUT_DIR%\themes\Breeze-dark 93 copy %SMPLAYER_THEMES_DIR%\themes\Breeze-dark\Breeze-dark.rcc %OUTPUT_DIR%\themes\Breeze-dark\ 94 copy %SMPLAYER_THEMES_DIR%\themes\Breeze-dark\README.txt %OUTPUT_DIR%\themes\Breeze-dark\ 95 96 mkdir %OUTPUT_DIR%\themes\Faenza 97 copy %SMPLAYER_THEMES_DIR%\themes\Faenza\Faenza.rcc %OUTPUT_DIR%\themes\Faenza\ 98 copy %SMPLAYER_THEMES_DIR%\themes\Faenza\README.txt %OUTPUT_DIR%\themes\Faenza\ 99 100 mkdir %OUTPUT_DIR%\themes\Faenza-Darkest 101 copy %SMPLAYER_THEMES_DIR%\themes\Faenza-Darkest\Faenza-Darkest.rcc %OUTPUT_DIR%\themes\Faenza-Darkest\ 102 copy %SMPLAYER_THEMES_DIR%\themes\Faenza-Darkest\README.txt %OUTPUT_DIR%\themes\Faenza-Darkest\ 103 104 mkdir %OUTPUT_DIR%\themes\Faenza-Silver 105 copy %SMPLAYER_THEMES_DIR%\themes\Faenza-Silver\Faenza-Silver.rcc %OUTPUT_DIR%\themes\Faenza-Silver\ 106 copy %SMPLAYER_THEMES_DIR%\themes\Faenza-Silver\README.txt %OUTPUT_DIR%\themes\Faenza-Silver\ 107 76 108 mkdir %OUTPUT_DIR%\themes\Gartoon 77 109 copy %SMPLAYER_THEMES_DIR%\themes\Gartoon\Gartoon.rcc %OUTPUT_DIR%\themes\Gartoon\ … … 82 114 copy %SMPLAYER_THEMES_DIR%\themes\Gnome\README.txt %OUTPUT_DIR%\themes\Gnome\ 83 115 116 mkdir %OUTPUT_DIR%\themes\H2O 117 copy %SMPLAYER_THEMES_DIR%\themes\H2O\H2O.rcc %OUTPUT_DIR%\themes\H2O\ 118 copy %SMPLAYER_THEMES_DIR%\themes\H2O\README.txt %OUTPUT_DIR%\themes\H2O\ 119 copy %SMPLAYER_THEMES_DIR%\themes\H2O\style.qss %OUTPUT_DIR%\themes\H2O\ 120 84 121 mkdir %OUTPUT_DIR%\themes\Monochrome 85 122 copy %SMPLAYER_THEMES_DIR%\themes\Monochrome\Monochrome.rcc %OUTPUT_DIR%\themes\Monochrome\ … … 110 147 copy %SMPLAYER_THEMES_DIR%\themes\Oxygen-Air\README.txt %OUTPUT_DIR%\themes\Oxygen-Air\ 111 148 149 mkdir %OUTPUT_DIR%\themes\Oxygen-KDE 150 copy %SMPLAYER_THEMES_DIR%\themes\Oxygen-KDE\Oxygen-KDE.rcc %OUTPUT_DIR%\themes\Oxygen-KDE\ 151 copy %SMPLAYER_THEMES_DIR%\themes\Oxygen-KDE\README.txt %OUTPUT_DIR%\themes\Oxygen-KDE\ 152 112 153 mkdir %OUTPUT_DIR%\themes\Oxygen-Refit 113 154 copy %SMPLAYER_THEMES_DIR%\themes\Oxygen-Refit\Oxygen-Refit.rcc %OUTPUT_DIR%\themes\Oxygen-Refit\ … … 166 207 167 208 echo. 168 echo ###### SMTUBE ####### 169 echo. 170 copy %SMTUBE_DIR%\src\release\smtube.exe %OUTPUT_DIR% 171 copy %SMTUBE_DIR%\src\translations\*.qm %OUTPUT_DIR%\translations 172 mkdir %OUTPUT_DIR%\docs\smtube 173 copy %SMTUBE_DIR%\*.txt %OUTPUT_DIR%\docs\smtube 174 175 echo. 209 echo ###### MPV ####### 210 echo. 211 xcopy %MPV_DIR% %OUTPUT_DIR%\mpv\ /E 212 213 echo. -
smplayer/trunk/setup/scripts/make_pkgs.cmd
r170 r176 1 1 @echo off 2 if exist "turnon_echo" ( 3 @echo on 4 ) 5 6 :: Reset working dir especially when using 'Run as administrator' 7 @cd /d "%~dp0" 8 2 9 echo This batch file can help you to create a packages for SMPlayer and MPlayer. 3 10 echo. 4 echo Note: It will temporarily rename the smplayer-build or mplayer directory. 5 echo Be sure to have a compiled portable smplayer.exe, renamed as 6 echo `smplayer-portable.exe` in the same directory as this script or an 7 echo alternate location you specify in this script when creating the portable 8 echo packages. 9 echo. 10 echo Configure your build environment at the beginning of this script. 11 echo. 12 echo 7zip command-line (http://7zip.org) is required by this script. 11 echo This script will temporarily rename the smplayer-build and mplayer directories. 12 echo Make sure these files ^& directories are not opened when running the script. 13 13 echo. 14 14 echo 1 - NSIS 10 - NSIS [32-bit/64-bit] 15 15 echo 2 - NSIS [64-bit] 11 - Portable [32-bit/64-bit] 16 echo 3 - Portable 16 echo 3 - Portable 20 - Portable SFX [32-bit/64-bit] 17 17 echo 4 - Portable [64-bit] 18 18 echo 5 - Without MPlayer … … 31 31 set VER_REV_CMD= 32 32 set MAKENSIS_EXE_PATH= 33 set USER_CHOICE=34 33 35 34 :: NSIS path 36 if exist "%PROGRAMFILES(X86)%\NSIS\Unicode\makensis.exe" ( 37 set MAKENSIS_EXE_PATH="%PROGRAMFILES(X86)%\NSIS\Unicode\makensis.exe" 38 ) else if exist "%PROGRAMFILES%\NSIS\Unicode\makensis.exe" ( 39 set MAKENSIS_EXE_PATH="%PROGRAMFILES%\NSIS\Unicode\makensis.exe" 35 if exist "nsis_path" ( 36 for /f "tokens=*" %%y in ('type nsis_path') do if exist %%y set MAKENSIS_EXE_PATH="%%y" 37 ) 38 39 if not defined MAKENSIS_EXE_PATH ( 40 for %%x in ("%PROGRAMFILES(X86)%\NSIS\Unicode\makensis.exe" "%PROGRAMFILES%\NSIS\Unicode\makensis.exe") do if exist %%x set MAKENSIS_EXE_PATH=%%x 41 ) 42 43 if not defined MAKENSIS_EXE_PATH ( 44 echo Warning: Unable to locate NSIS in the default path, create the file ^'nsis_path^' with the full correct path 45 echo to makensis.exe or the existing ^'nsis_path^' may be incorrect. 46 echo. 47 ) 48 49 :: Works only in Vista+ 50 where /q where.exe 2>NUL && ( 51 where /q 7za.exe 2>NUL || ( 52 echo Warning: 7za.exe not found in path or current directory! 53 echo. 54 ) 40 55 ) 41 56 … … 46 61 set PORTABLE_EXE_DIR=%TOP_LEVEL_DIR%\portable 47 62 63 :cmdline_parsing 64 if "%1" == "" goto reask 65 for %%w in (1 2 3 4 5 6 10 11 20) do ( 66 if "%1" == "%%w" ( 67 set USER_CHOICE=%%w 68 goto pkgver 69 ) 70 ) 71 72 echo Unknown option: "%1" 73 echo. 74 goto superend 75 48 76 :reask 77 set USER_CHOICE= 49 78 set /P USER_CHOICE="Choose an action: " 50 79 echo. 51 80 52 if "%USER_CHOICE%" == "1" goto pkgver 53 if "%USER_CHOICE%" == "2" goto pkgver 54 if "%USER_CHOICE%" == "3" goto pkgver 55 if "%USER_CHOICE%" == "4" goto pkgver 56 if "%USER_CHOICE%" == "5" goto pkgver 57 if "%USER_CHOICE%" == "6" goto pkgver 58 if "%USER_CHOICE%" == "10" goto pkgver 59 if "%USER_CHOICE%" == "11" goto pkgver 81 for %%z in (1 2 3 4 5 6 10 11 20) do if "%USER_CHOICE%" == "%%z" goto pkgver 82 if "%USER_CHOICE%" == "" goto superend 60 83 goto reask 61 84 … … 68 91 echo Format: VER_MAJOR.VER_MINOR.VER_BUILD[.VER_REVISION] 69 92 echo VER_REVISION is optional (set to 0 if blank) 70 echo.71 93 :pkgver_manual 94 echo. 95 set ALL_PKG_VER= 96 set VER_MAJOR= 97 set VER_MINOR= 98 set VER_BUILD= 99 set VER_REVISION= 100 set VER_REV_CMD= 101 set DEF_QT5= 72 102 set /p ALL_PKG_VER="Version: " 73 103 echo. … … 79 109 for /f "tokens=4 delims=." %%m in ("%ALL_PKG_VER%") do set VER_REVISION=%%m 80 110 81 if [%VER_MAJOR%]==[] ( 82 echo Major Version # must be specified [#.x.x] 83 echo. 84 goto pkgver_manual 85 ) 86 87 if [%VER_MINOR%]==[] ( 88 echo Minor Version # must be specified [x.#.x] 89 echo. 90 goto pkgver_manual 91 ) 92 93 if [%VER_BUILD%]==[] ( 94 echo Build Version # must be specified [x.x.#] 95 echo. 96 goto pkgver_manual 97 ) 98 99 if [%VER_REVISION%]==[] ( 111 echo %VER_MAJOR%|findstr /r /c:"^[0-9][0-9]*$" >nul 112 if errorlevel 1 ( 113 echo Invalid version string. VER_MAJOR is not defined or is not a number [#.x.x] 114 goto pkgver_manual & ver>nul 115 ) 116 117 echo %VER_MINOR%|findstr /r /c:"^[0-9][0-9]*$" >nul 118 if errorlevel 1 ( 119 echo Invalid version string. VER_MINOR is not defined or is not a number [x.#.x] 120 goto pkgver_manual & ver>nul 121 ) 122 echo %VER_BUILD%|findstr /r /c:"^[0-9][0-9]*$" >nul 123 if errorlevel 1 ( 124 echo Invalid version string. VER_BUILD is not defined or is not a number [x.x.#] 125 goto pkgver_manual & ver>nul 126 ) 127 128 if defined VER_REVISION ( 129 echo %VER_REVISION%|findstr /r /c:"^[0-9][0-9]*$" >nul 130 if errorlevel 1 ( 131 echo Invalid version string. VER_REVISION is not a number [x.x.x.#] 132 goto pkgver_manual & ver>nul 133 ) else ( 134 set VER_REV_CMD=/DVER_REVISION=%VER_REVISION% & ver>nul 135 ) 136 ) else ( 100 137 set VER_REV_CMD= 101 ) else ( 102 set VER_REV_CMD= /DVER_REVISION=%VER_REVISION% 138 ) 139 140 if not defined VER_REVISION ( 141 set PORTABLE_PKG_VER=%ALL_PKG_VER%.0 142 ) else ( 143 set PORTABLE_PKG_VER=%ALL_PKG_VER% 103 144 ) 104 145 … … 111 152 if "%USER_CHOICE%" == "10" goto nsispkg 112 153 if "%USER_CHOICE%" == "11" goto portable 154 if "%USER_CHOICE%" == "20" goto portablesfx 113 155 :: Should not happen 114 156 goto end … … 119 161 echo. 120 162 163 if exist %TOP_LEVEL_DIR%\smplayer-build\Qt5Core.dll ( 164 set DEF_QT5=/DQT5 165 ) else ( 166 set DEF_QT5= 167 ) 168 121 169 if exist %TOP_LEVEL_DIR%\smplayer-build ( 122 %MAKENSIS_EXE_PATH% /V3 /DVER_MAJOR=%VER_MAJOR% /DVER_MINOR=%VER_MINOR% /DVER_BUILD=%VER_BUILD% %VER_REV_CMD% %TOP_LEVEL_DIR%\smplayer.nsi170 %MAKENSIS_EXE_PATH% /V3 /DVER_MAJOR=%VER_MAJOR% /DVER_MINOR=%VER_MINOR% /DVER_BUILD=%VER_BUILD% %VER_REV_CMD% %DEF_QT5% %TOP_LEVEL_DIR%\smplayer.nsi 123 171 ) 124 172 … … 129 177 echo. 130 178 179 if exist %TOP_LEVEL_DIR%\smplayer-build64\Qt5Core.dll ( 180 set DEF_QT5="/DQT5" 181 ) else ( 182 set DEF_QT5= 183 ) 184 131 185 if exist %TOP_LEVEL_DIR%\smplayer-build64 ( 132 %MAKENSIS_EXE_PATH% /V3 /DVER_MAJOR=%VER_MAJOR% /DVER_MINOR=%VER_MINOR% /DVER_BUILD=%VER_BUILD% %VER_REV_CMD% /DWIN64%TOP_LEVEL_DIR%\smplayer.nsi186 %MAKENSIS_EXE_PATH% /V3 /DVER_MAJOR=%VER_MAJOR% /DVER_MINOR=%VER_MINOR% /DVER_BUILD=%VER_BUILD% %VER_REV_CMD% /DWIN64 %DEF_QT5% %TOP_LEVEL_DIR%\smplayer.nsi 133 187 ) 134 188 … … 136 190 137 191 :portable 138 :: Check for portable exes139 192 echo --- SMPlayer Portable Package [32-bit] --- 140 193 echo. 141 194 142 if not exist %PORTABLE_EXE_DIR%\smplayer-portable.exe ( 195 if not exist %SMPLAYER_DIR% ( 196 echo SMPlayer sources missing. 197 goto end 198 ) 199 200 REM Check for portable exes 201 if not exist "%PORTABLE_EXE_DIR%\smplayer-portable.exe" ( 143 202 echo SMPlayer portable EXE not found! 144 203 goto end 145 204 ) 146 205 147 if not exist %PORTABLE_EXE_DIR%\smtube-portable.exe ( 148 echo SMTube portable EXE not found! 149 goto end 150 ) 151 152 ren %SMPLAYER_DIR% smplayer-portable-%ALL_PKG_VER% 153 set SMPLAYER_PORTABLE_DIR=%TOP_LEVEL_DIR%\smplayer-portable-%ALL_PKG_VER% 154 155 if not exist %TOP_LEVEL_DIR%\smplayer-portable-%ALL_PKG_VER% ( 206 REM if not exist "%PORTABLE_EXE_DIR%\smtube-portable.exe" ( 207 REM echo Warning: SMTube portable EXE not found! 208 REM ) 209 210 if exist %TOP_LEVEL_DIR%\smplayer-build\Qt5Core.dll ( 211 set QT5_SUFFIX="-qt5" 212 set QT5_OUTPUT_DIR="\Qt5" 213 ) else ( 214 set QT5_SUFFIX="" 215 set QT5_OUTPUT_DIR="" 216 ) 217 218 ren "%SMPLAYER_DIR%" "smplayer-portable-%PORTABLE_PKG_VER%%QT5_SUFFIX%" 219 set SMPLAYER_PORTABLE_DIR="%TOP_LEVEL_DIR%\smplayer-portable-%PORTABLE_PKG_VER%%QT5_SUFFIX%" 220 221 if not exist "%TOP_LEVEL_DIR%\smplayer-portable-%PORTABLE_PKG_VER%%QT5_SUFFIX%" ( 156 222 echo Oops! Unable to find renamed directory, make sure no files are opened. 157 223 goto end 158 224 ) 159 225 160 ::161 226 echo Backing up files... 162 227 163 ren %SMPLAYER_PORTABLE_DIR%\smplayer.exe smplayer.bak 164 ren %SMPLAYER_PORTABLE_DIR%\smtube.exe smtube.bak 165 166 :: 228 ren "%SMPLAYER_PORTABLE_DIR%\smplayer.exe" smplayer.bak 229 REM ren "%SMPLAYER_PORTABLE_DIR%\smtube.exe" smtube.bak 230 167 231 echo Creating screenshots dir... 168 232 169 mkdir %SMPLAYER_PORTABLE_DIR%\screenshots 170 171 :: 233 mkdir "%SMPLAYER_PORTABLE_DIR%\screenshots" 234 172 235 echo Creating smplayer.ini... 173 236 174 echo [%%General]> %SMPLAYER_PORTABLE_DIR%\smplayer.ini 175 echo screenshot_directory=.\\screenshots>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini 176 echo.>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini 177 echo [advanced]>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini 178 echo mplayer_additional_options=-nofontconfig>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini 179 180 :: 237 echo [%%General]> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini" 238 echo screenshot_directory=.\\screenshots>> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini" 239 echo.>> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini" 240 echo [smplayer]>> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini" 241 echo check_if_upgraded=false>> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini" 242 181 243 echo Creating smplayer_orig.ini... 182 244 183 echo [%%General]> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 184 echo screenshot_directory=.\\screenshots>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 185 echo.>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 186 echo [advanced]>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 187 echo mplayer_additional_options=-nofontconfig>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 188 189 :: 190 echo Creating mplayer config... 191 192 echo ^<cachedir^>../fontconfig^</cachedir^>> %SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf 193 194 :: 245 echo [%%General]> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini" 246 echo screenshot_directory=.\\screenshots>> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini" 247 echo.>> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini" 248 echo [smplayer]>> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini" 249 echo check_if_upgraded=false>> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini" 250 251 REM echo Creating mplayer config... 252 253 REM echo ^<cachedir^>../fontconfig^</cachedir^>> "%SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf" 254 195 255 echo Copying portable .exe... 196 256 197 copy /y %PORTABLE_EXE_DIR%\smplayer-portable.exe %SMPLAYER_PORTABLE_DIR%\smplayer.exe 198 copy /y %PORTABLE_EXE_DIR%\smtube-portable.exe %SMPLAYER_PORTABLE_DIR%\smtube.exe 199 200 :: 257 copy /y "%PORTABLE_EXE_DIR%\smplayer-portable.exe" "%SMPLAYER_PORTABLE_DIR%\smplayer.exe" 258 REM copy /y "%PORTABLE_EXE_DIR%\smtube-portable.exe" "%SMPLAYER_PORTABLE_DIR%\smtube.exe" 259 201 260 echo Finalizing package... 202 7za a -t7z %OUTPUT_DIR%\smplayer-portable-%ALL_PKG_VER%.7z %SMPLAYER_PORTABLE_DIR% -xr!*.bak* -xr!qxtcore.dll -xr!mplayer64.exe -xr!mencoder.exe -xr!mencoder64.exe -xr!mplayer64.exe.debug -xr!mencoder64.exe.debug -xr!mplayer.exe.debug -xr!mencoder.exe.debug -xr!buildinfo -xr!buildinfo64-mx9 >nul261 7za a -t7z "%OUTPUT_DIR%%QT5_OUTPUT_DIR%\smplayer-portable-%PORTABLE_PKG_VER%%QT5_SUFFIX%.7z" "%SMPLAYER_PORTABLE_DIR%" -xr!*.bak* -xr!qxtcore.dll -xr!mplayer64.exe -xr!mencoder.exe -xr!mencoder64.exe -xr!mplayer64.exe.debug -xr!mencoder64.exe.debug -xr!mplayer.exe.debug -xr!mencoder.exe.debug -xr!gdb.exe -xr!gdb64.exe -xr!vfw2menc.exe -xr!buildinfo -xr!buildinfo64 -xr!buildinfo-mencoder-32 -xr!buildinfo-mencoder-debug-32 -xr!buildinfo-mplayer-32 -xr!buildinfo-mplayer-debug-32 -xr!buildinfo-mencoder-64 -xr!buildinfo-mencoder-debug-64 -xr!buildinfo-mplayer-64 -xr!buildinfo-mplayer-debug-64 -xr!mpv64.exe -xr!mpv64.com -mx9 >nul 203 262 204 263 echo. 205 264 echo Restoring source folder(s) back to its original state... 206 265 echo. 207 rmdir %SMPLAYER_PORTABLE_DIR%\screenshots208 del %SMPLAYER_PORTABLE_DIR%\smplayer.ini209 del %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini210 del %SMPLAYER_PORTABLE_DIR%\smplayer.exe211 del %SMPLAYER_PORTABLE_DIR%\smtube.exe 212 del %SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf 213 ren %SMPLAYER_PORTABLE_DIR%\smplayer.baksmplayer.exe214 ren %SMPLAYER_PORTABLE_DIR%\smtube.baksmtube.exe215 ren %SMPLAYER_PORTABLE_DIR%smplayer-build266 rmdir "%SMPLAYER_PORTABLE_DIR%\screenshots" 267 del "%SMPLAYER_PORTABLE_DIR%\smplayer.ini" 268 del "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini" 269 del "%SMPLAYER_PORTABLE_DIR%\smplayer.exe" 270 REM del "%SMPLAYER_PORTABLE_DIR%\smtube.exe" 271 REM del "%SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf" 272 ren "%SMPLAYER_PORTABLE_DIR%\smplayer.bak" smplayer.exe 273 REM ren "%SMPLAYER_PORTABLE_DIR%\smtube.bak" smtube.exe 274 ren "%SMPLAYER_PORTABLE_DIR%" smplayer-build 216 275 217 276 if not "%USER_CHOICE%" == "11" goto end … … 221 280 echo. 222 281 223 :: Check for portable exes 224 if not exist %PORTABLE_EXE_DIR%\smplayer-portable64.exe ( 282 if not exist %SMPLAYER_DIR64% ( 283 echo SMPlayer sources missing. 284 goto end 285 ) 286 287 REM Check for portable exes 288 if not exist "%PORTABLE_EXE_DIR%\smplayer-portable64.exe" ( 225 289 echo SMPlayer portable EXE not found! 226 290 goto end 227 291 ) 228 292 229 if not exist %PORTABLE_EXE_DIR%\smtube-portable64.exe ( 230 echo SMTube portable EXE not found! 231 goto end 232 ) 233 234 ren %SMPLAYER_DIR64% smplayer-portable-%ALL_PKG_VER%-x64 235 set SMPLAYER_PORTABLE_DIR=%TOP_LEVEL_DIR%\smplayer-portable-%ALL_PKG_VER%-x64 236 237 if not exist %TOP_LEVEL_DIR%\smplayer-portable-%ALL_PKG_VER%-x64 ( 293 REM if not exist "%PORTABLE_EXE_DIR%\smtube-portable64.exe" ( 294 REM echo Warning: SMTube portable EXE not found! 295 REM ) 296 297 if exist %TOP_LEVEL_DIR%\smplayer-build64\Qt5Core.dll ( 298 set QT5_SUFFIX="-qt5" 299 set QT5_OUTPUT_DIR="\Qt5" 300 ) else ( 301 set QT5_SUFFIX="" 302 set QT5_OUTPUT_DIR="" 303 ) 304 305 ren "%SMPLAYER_DIR64%" "smplayer-portable-%PORTABLE_PKG_VER%-x64%QT5_SUFFIX%" 306 set SMPLAYER_PORTABLE_DIR="%TOP_LEVEL_DIR%\smplayer-portable-%PORTABLE_PKG_VER%-x64%QT5_SUFFIX%" 307 308 if not exist "%TOP_LEVEL_DIR%\smplayer-portable-%PORTABLE_PKG_VER%-x64%QT5_SUFFIX%" ( 238 309 echo Oops! Unable to find renamed directory, make sure no files are opened. 239 310 goto end 240 311 ) 241 312 242 ::243 313 echo Backing up files... 244 314 245 ren %SMPLAYER_PORTABLE_DIR%\smplayer.exe smplayer.bak 246 ren %SMPLAYER_PORTABLE_DIR%\smtube.exe smtube.bak 247 ren %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer.exe mplayer.exe.bak32 248 ren %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer64.exe mplayer.exe 249 250 :: 315 ren "%SMPLAYER_PORTABLE_DIR%\smplayer.exe" smplayer.bak 316 REM ren "%SMPLAYER_PORTABLE_DIR%\smtube.exe" smtube.bak 317 ren "%SMPLAYER_PORTABLE_DIR%\mplayer\mplayer.exe" mplayer.exe.bak32 318 ren "%SMPLAYER_PORTABLE_DIR%\mplayer\mplayer64.exe" mplayer.exe 319 320 if exist "%SMPLAYER_PORTABLE_DIR%\mpv\fonts" ( 321 ren "%SMPLAYER_PORTABLE_DIR%\mpv\fonts" fonts.bak32 322 ) 323 if exist "%SMPLAYER_PORTABLE_DIR%\mpv\mpv" ( 324 ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv" mpv.bak32 325 ) 326 327 ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv.exe" mpv.exe.bak32 328 ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv.com" mpv.com.bak32 329 ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv64.exe" mpv.exe 330 ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv64.com" mpv.com 331 251 332 echo Creating screenshots dir... 252 333 253 mkdir %SMPLAYER_PORTABLE_DIR%\screenshots 254 255 :: 334 mkdir "%SMPLAYER_PORTABLE_DIR%\screenshots" 335 256 336 echo Creating smplayer.ini... 257 337 258 echo [%%General]> %SMPLAYER_PORTABLE_DIR%\smplayer.ini 259 echo screenshot_directory=.\\screenshots>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini 260 echo.>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini 261 echo [advanced]>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini 262 echo mplayer_additional_options=-nofontconfig>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini 263 264 :: 338 echo [%%General]> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini" 339 echo screenshot_directory=.\\screenshots>> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini" 340 echo.>> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini" 341 echo [smplayer]>> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini" 342 echo check_if_upgraded=false>> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini" 343 265 344 echo Creating smplayer_orig.ini... 266 345 267 echo [%%General]> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 268 echo screenshot_directory=.\\screenshots>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 269 echo.>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 270 echo [advanced]>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 271 echo mplayer_additional_options=-nofontconfig>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 272 273 :: 274 echo Creating mplayer config... 275 276 echo ^<cachedir^>../fontconfig^</cachedir^>> %SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf 277 278 :: 346 echo [%%General]> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini" 347 echo screenshot_directory=.\\screenshots>> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini" 348 echo.>> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini" 349 echo [smplayer]>> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini" 350 echo check_if_upgraded=false>> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini" 351 352 REM echo Creating mplayer config... 353 354 REM echo ^<cachedir^>../fontconfig^</cachedir^>> "%SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf" 355 279 356 echo Copying portable .exe... 280 357 281 copy /y %PORTABLE_EXE_DIR%\smplayer-portable64.exe %SMPLAYER_PORTABLE_DIR%\smplayer.exe 282 copy /y %PORTABLE_EXE_DIR%\smtube-portable64.exe %SMPLAYER_PORTABLE_DIR%\smtube.exe 283 284 :: 358 copy /y "%PORTABLE_EXE_DIR%\smplayer-portable64.exe" "%SMPLAYER_PORTABLE_DIR%\smplayer.exe" 359 REM copy /y "%PORTABLE_EXE_DIR%\smtube-portable64.exe" "%SMPLAYER_PORTABLE_DIR%\smtube.exe" 360 285 361 echo Finalizing package... 286 7za a -t7z %OUTPUT_DIR%\smplayer-portable-%ALL_PKG_VER%-x64.7z %SMPLAYER_PORTABLE_DIR% -xr!*.bak* -xr!qxtcore.dll -xr!mencoder.exe -xr!mencoder64.exe -xr!mplayer64.exe.debug -xr!mencoder64.exe.debug -xr!mplayer.exe.debug -xr!mencoder.exe.debug -xr!codecs -xr!buildinfo -xr!buildinfo64 -mx9 >nul362 7za a -t7z "%OUTPUT_DIR%%QT5_OUTPUT_DIR%\smplayer-portable-%PORTABLE_PKG_VER%-x64%QT5_SUFFIX%.7z" "%SMPLAYER_PORTABLE_DIR%" -xr!*.bak* -xr!qxtcore.dll -xr!mencoder.exe -xr!mencoder64.exe -xr!mplayer64.exe.debug -xr!mencoder64.exe.debug -xr!mplayer.exe.debug -xr!mencoder.exe.debug -xr!gdb.exe -xr!gdb64.exe -xr!vfw2menc.exe -xr!codecs -xr!buildinfo -xr!buildinfo64 -xr!buildinfo-mencoder-32 -xr!buildinfo-mencoder-debug-32 -xr!buildinfo-mplayer-32 -xr!buildinfo-mplayer-debug-32 -xr!buildinfo-mencoder-64 -xr!buildinfo-mencoder-debug-64 -xr!buildinfo-mplayer-64 -xr!buildinfo-mplayer-debug-64 -mx9 >nul 287 363 288 364 echo. 289 365 echo Restoring source folder(s) back to its original state... 290 366 echo. 291 rmdir %SMPLAYER_PORTABLE_DIR%\screenshots 292 del %SMPLAYER_PORTABLE_DIR%\smplayer.ini 293 del %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 294 del %SMPLAYER_PORTABLE_DIR%\smplayer.exe 295 del %SMPLAYER_PORTABLE_DIR%\smtube.exe 296 ren %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer.exe mplayer64.exe 297 ren %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer.exe.bak32 mplayer.exe 298 del %SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf 299 ren %SMPLAYER_PORTABLE_DIR%\smplayer.bak smplayer.exe 300 ren %SMPLAYER_PORTABLE_DIR%\smtube.bak smtube.exe 301 ren %SMPLAYER_PORTABLE_DIR% smplayer-build64 367 rmdir "%SMPLAYER_PORTABLE_DIR%\screenshots" 368 del "%SMPLAYER_PORTABLE_DIR%\smplayer.ini" 369 del "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini" 370 del "%SMPLAYER_PORTABLE_DIR%\smplayer.exe" 371 REM del "%SMPLAYER_PORTABLE_DIR%\smtube.exe" 372 ren "%SMPLAYER_PORTABLE_DIR%\mplayer\mplayer.exe" mplayer64.exe 373 ren "%SMPLAYER_PORTABLE_DIR%\mplayer\mplayer.exe.bak32" mplayer.exe 374 REM del "%SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf" 375 ren "%SMPLAYER_PORTABLE_DIR%\smplayer.bak" smplayer.exe 376 REM ren "%SMPLAYER_PORTABLE_DIR%\smtube.bak" smtube.exe 377 378 ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv.exe" mpv64.exe 379 ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv.com" mpv64.com 380 ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv.exe.bak32" mpv.exe 381 ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv.com.bak32" mpv.com 382 383 if exist "%SMPLAYER_PORTABLE_DIR%\mpv\fonts.bak32" ( 384 ren "%SMPLAYER_PORTABLE_DIR%\mpv\fonts.bak32" fonts 385 ) 386 if exist "%SMPLAYER_PORTABLE_DIR%\mpv\mpv.bak32" ( 387 ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv.bak32" mpv 388 ) 389 390 ren "%SMPLAYER_PORTABLE_DIR%" smplayer-build64 391 392 goto end 393 394 :portablesfx 395 396 if exist %TOP_LEVEL_DIR%\smplayer-build\Qt5Core.dll ( 397 set DEF_QT5=/DQT5 398 ) else ( 399 set DEF_QT5= 400 ) 401 402 if exist %PORTABLE_EXE_DIR%\smplayer-portable.exe ( 403 if exist %TOP_LEVEL_DIR%\smplayer-build ( 404 %MAKENSIS_EXE_PATH% /V3 /DVER_MAJOR=%VER_MAJOR% /DVER_MINOR=%VER_MINOR% /DVER_BUILD=%VER_BUILD% %VER_REV_CMD% %DEF_QT5% %TOP_LEVEL_DIR%\smportable.nsi 405 ) 406 ) 407 408 if exist %TOP_LEVEL_DIR%\smplayer-build64\Qt5Core.dll ( 409 set DEF_QT5=/DQT5 410 ) else ( 411 set DEF_QT5= 412 ) 413 414 if exist %PORTABLE_EXE_DIR%\smplayer-portable64.exe ( 415 if exist %TOP_LEVEL_DIR%\smplayer-build64 ( 416 %MAKENSIS_EXE_PATH% /V3 /DVER_MAJOR=%VER_MAJOR% /DVER_MINOR=%VER_MINOR% /DVER_BUILD=%VER_BUILD% %VER_REV_CMD% /DWIN64 %DEF_QT5% %TOP_LEVEL_DIR%\smportable.nsi 417 ) 418 ) 302 419 303 420 goto end … … 342 459 343 460 pause 461 462 :superend 463 set ALL_PKG_VER= 464 set VER_MAJOR= 465 set VER_MINOR= 466 set VER_BUILD= 467 set VER_REVISION=
Note:
See TracChangeset
for help on using the changeset viewer.