Changeset 163 for smplayer/vendor/current/setup/scripts
- Timestamp:
- May 15, 2014, 7:53:54 PM (11 years ago)
- Location:
- smplayer/vendor/current/setup/scripts
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/vendor/current/setup/scripts/make_pkgs.cmd
r154 r163 12 12 echo 7zip command-line (http://7zip.org) is required by this script. 13 13 echo. 14 echo 1 - NSIS SMPlayer Packages 15 echo 2 - Portable SMPlayer Package 16 echo 3 - SMPlayer Package w/o MPlayer 17 echo 4 - MPlayer Package 18 14 echo 1 - NSIS 10 - NSIS [32-bit/64-bit] 15 echo 2 - NSIS [64-bit] 11 - Portable [32-bit/64-bit] 16 echo 3 - Portable 17 echo 4 - Portable [64-bit] 18 echo 5 - Without MPlayer 19 echo 6 - Without MPlayer [64-bit] 19 20 echo. 20 21 … … 23 24 24 25 :: Reset in case ran again in same command prompt instance 25 set SMPLAYER_VER= 26 27 :: NSIS path 28 set NSIS_PATH="C:\Program Files (x86)\NSIS\Unicode" 29 30 set SMPLAYER_DIR=%TOP_LEVEL_DIR%\smplayer-build 31 set MPLAYER_DIR=%TOP_LEVEL_DIR%\mplayer 32 set OUTPUT_DIR=%TOP_LEVEL_DIR%\output 33 set PORTABLE_EXE_DIR=%TOP_LEVEL_DIR%\portable 34 35 :reask 36 set /P USER_CHOICE="Choose an action: " 37 echo. 38 39 if "%USER_CHOICE%" == "1" ( 40 goto nsispkg 41 42 ) else if "%USER_CHOICE%" == "2" ( 43 goto portable 44 45 ) else if "%USER_CHOICE%" == "3" ( 46 goto nomplayer 47 48 ) else if "%USER_CHOICE%" == "4" ( 49 goto mplayer 50 51 ) else ( 52 goto reask 53 ) 54 55 :nsispkg 56 57 echo --- Creating SMPlayer NSIS Packages --- 58 echo. 59 echo Format: VER_MAJOR.VER_MINOR.VER_BUILD[.VER_REVISION] 60 echo VER_REVISION is optional (set to 0 if blank) 61 echo. 62 63 :: Reset in case ran again in same command prompt instance 64 set NSIS_PKG_VER= 26 set ALL_PKG_VER= 65 27 set VER_MAJOR= 66 28 set VER_MINOR= … … 68 30 set VER_REVISION= 69 31 set VER_REV_CMD= 70 71 :nsispkgver_again 72 Set /p NSIS_PKG_VER="Version: " 73 74 for /f "tokens=1 delims=." %%j in ("%NSIS_PKG_VER%") do set VER_MAJOR=%%j 75 for /f "tokens=2 delims=." %%k in ("%NSIS_PKG_VER%") do set VER_MINOR=%%k 76 for /f "tokens=3 delims=." %%l in ("%NSIS_PKG_VER%") do set VER_BUILD=%%l 77 for /f "tokens=4 delims=." %%m in ("%NSIS_PKG_VER%") do set VER_REVISION=%%m 32 set MAKENSIS_EXE_PATH= 33 set USER_CHOICE= 34 35 :: 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" 40 ) 41 42 set SMPLAYER_DIR=%TOP_LEVEL_DIR%\smplayer-build 43 set SMPLAYER_DIR64=%TOP_LEVEL_DIR%\smplayer-build64 44 set MPLAYER_DIR=%TOP_LEVEL_DIR%\mplayer 45 set OUTPUT_DIR=%TOP_LEVEL_DIR%\output 46 set PORTABLE_EXE_DIR=%TOP_LEVEL_DIR%\portable 47 48 :reask 49 set /P USER_CHOICE="Choose an action: " 50 echo. 51 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 60 goto reask 61 62 :pkgver 63 64 echo Format: VER_MAJOR.VER_MINOR.VER_BUILD[.VER_REVISION] 65 echo VER_REVISION is optional (set to 0 if blank) 66 echo. 67 68 :pkgver_again 69 Set /p ALL_PKG_VER="Version: " 70 echo. 71 72 for /f "tokens=1 delims=." %%j in ("%ALL_PKG_VER%") do set VER_MAJOR=%%j 73 for /f "tokens=2 delims=." %%k in ("%ALL_PKG_VER%") do set VER_MINOR=%%k 74 for /f "tokens=3 delims=." %%l in ("%ALL_PKG_VER%") do set VER_BUILD=%%l 75 for /f "tokens=4 delims=." %%m in ("%ALL_PKG_VER%") do set VER_REVISION=%%m 78 76 79 77 if [%VER_MAJOR%]==[] ( 80 78 echo Major Version # must be specified [#.x.x] 81 79 echo. 82 goto nsispkgver_again80 goto pkgver_again 83 81 ) 84 82 … … 86 84 echo Minor Version # must be specified [x.#.x] 87 85 echo. 88 goto nsispkgver_again86 goto pkgver_again 89 87 ) 90 88 … … 92 90 echo Build Version # must be specified [x.x.#] 93 91 echo. 94 goto nsispkgver_again92 goto pkgver_again 95 93 ) 96 94 … … 101 99 ) 102 100 101 if "%USER_CHOICE%" == "1" goto nsispkg 102 if "%USER_CHOICE%" == "2" goto nsispkg64 103 if "%USER_CHOICE%" == "3" goto portable 104 if "%USER_CHOICE%" == "4" goto portable64 105 if "%USER_CHOICE%" == "5" goto nomplayer 106 if "%USER_CHOICE%" == "6" goto nomplayer64 107 if "%USER_CHOICE%" == "10" goto nsispkg 108 if "%USER_CHOICE%" == "11" goto portable 109 :: Should not happen 110 goto end 111 112 :nsispkg 113 114 echo --- SMPlayer NSIS Package [32-bit] --- 115 echo. 116 103 117 if exist %TOP_LEVEL_DIR%\smplayer-build ( 104 %NSIS_PATH%\makensis.exe /DVER_MAJOR=%VER_MAJOR% /DVER_MINOR=%VER_MINOR% /DVER_BUILD=%VER_BUILD%%VER_REV_CMD% %TOP_LEVEL_DIR%\smplayer.nsi 105 ) 118 %MAKENSIS_EXE_PATH% /V3 /DVER_MAJOR=%VER_MAJOR% /DVER_MINOR=%VER_MINOR% /DVER_BUILD=%VER_BUILD%%VER_REV_CMD% %TOP_LEVEL_DIR%\smplayer.nsi 119 ) 120 121 if not "%USER_CHOICE%" == "10" goto end 122 123 :nsispkg64 124 echo --- SMPlayer NSIS Package [64-bit] --- 125 echo. 106 126 107 127 if exist %TOP_LEVEL_DIR%\smplayer-build64 ( 108 % NSIS_PATH%\makensis.exe/DVER_MAJOR=%VER_MAJOR% /DVER_MINOR=%VER_MINOR% /DVER_BUILD=%VER_BUILD%%VER_REV_CMD% /DWIN64 %TOP_LEVEL_DIR%\smplayer.nsi128 %MAKENSIS_EXE_PATH% /V3 /DVER_MAJOR=%VER_MAJOR% /DVER_MINOR=%VER_MINOR% /DVER_BUILD=%VER_BUILD%%VER_REV_CMD% /DWIN64 %TOP_LEVEL_DIR%\smplayer.nsi 109 129 ) 110 130 … … 112 132 113 133 :portable 114 echo --- Creating SMPlayer Portable Package ---115 echo.116 117 set /P SMPLAYER_VER="SMPlayer Version: "118 if "%SMPLAYER_VER%"=="" goto end119 echo.120 121 134 :: Check for portable exes 135 echo --- SMPlayer Portable Package [32-bit] --- 136 echo. 137 122 138 if not exist %PORTABLE_EXE_DIR%\smplayer-portable.exe ( 123 139 echo SMPlayer portable EXE not found! 124 140 goto end 125 141 ) 126 142 127 143 if not exist %PORTABLE_EXE_DIR%\smtube-portable.exe ( 128 144 echo SMTube portable EXE not found! 129 130 ) 131 132 ren %SMPLAYER_DIR% smplayer-portable-% SMPLAYER_VER%133 set SMPLAYER_PORTABLE_DIR=%TOP_LEVEL_DIR%\smplayer-portable-% SMPLAYER_VER%134 135 if not exist %TOP_LEVEL_DIR%\smplayer-portable-% SMPLAYER_VER% (145 goto end 146 ) 147 148 ren %SMPLAYER_DIR% smplayer-portable-%ALL_PKG_VER% 149 set SMPLAYER_PORTABLE_DIR=%TOP_LEVEL_DIR%\smplayer-portable-%ALL_PKG_VER% 150 151 if not exist %TOP_LEVEL_DIR%\smplayer-portable-%ALL_PKG_VER% ( 136 152 echo Oops! Unable to find renamed directory, make sure no files are opened. 137 138 ) 139 140 echo. 153 goto end 154 ) 155 156 :: 141 157 echo Backing up files... 142 echo.143 158 144 159 ren %SMPLAYER_PORTABLE_DIR%\smplayer.exe smplayer.bak 145 160 ren %SMPLAYER_PORTABLE_DIR%\smtube.exe smtube.bak 146 ren %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer\config config.bak 147 148 echo. 161 162 :: 149 163 echo Creating screenshots dir... 150 echo.151 164 152 165 mkdir %SMPLAYER_PORTABLE_DIR%\screenshots 153 166 154 echo. 167 :: 155 168 echo Creating smplayer.ini... 156 echo.157 169 158 170 echo [%%General]> %SMPLAYER_PORTABLE_DIR%\smplayer.ini … … 162 174 echo mplayer_additional_options=-nofontconfig>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini 163 175 164 echo. 176 :: 165 177 echo Creating smplayer_orig.ini... 166 echo.167 178 168 179 echo [%%General]> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini … … 172 183 echo mplayer_additional_options=-nofontconfig>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 173 184 174 echo. 185 :: 175 186 echo Creating mplayer config... 176 echo. 177 178 echo ## MPlayer Windows configuration> %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer\config 179 echo.>> %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer\config 180 echo subfont=c:\windows\fonts\arial.ttf>> %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer\config 187 181 188 echo ^<cachedir^>../fontconfig^</cachedir^>> %SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf 182 189 183 echo. 190 :: 184 191 echo Copying portable .exe... 185 echo.186 192 187 193 copy /y %PORTABLE_EXE_DIR%\smplayer-portable.exe %SMPLAYER_PORTABLE_DIR%\smplayer.exe 188 194 copy /y %PORTABLE_EXE_DIR%\smtube-portable.exe %SMPLAYER_PORTABLE_DIR%\smtube.exe 189 195 190 echo. 191 echo Finalizing portable package... 192 echo. 193 7za a -t7z %OUTPUT_DIR%\smplayer-portable-%SMPLAYER_VER%.7z %SMPLAYER_PORTABLE_DIR% -xr!*.bak -xr!qxtcore.dll -xr!mplayer64.exe -mx9 196 :: 197 echo Finalizing package... 198 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 -mx9 >nul 194 199 195 200 echo. … … 201 206 del %SMPLAYER_PORTABLE_DIR%\smplayer.exe 202 207 del %SMPLAYER_PORTABLE_DIR%\smtube.exe 203 del %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer\config204 208 del %SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf 205 209 ren %SMPLAYER_PORTABLE_DIR%\smplayer.bak smplayer.exe 206 210 ren %SMPLAYER_PORTABLE_DIR%\smtube.bak smtube.exe 207 ren %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer\config.bak config208 211 ren %SMPLAYER_PORTABLE_DIR% smplayer-build 209 212 213 if not "%USER_CHOICE%" == "11" goto end 214 215 :portable64 216 echo --- SMPlayer Portable Package [64-bit] --- 217 echo. 218 219 :: Check for portable exes 220 if not exist %PORTABLE_EXE_DIR%\smplayer-portable64.exe ( 221 echo SMPlayer portable EXE not found! 222 goto end 223 ) 224 225 if not exist %PORTABLE_EXE_DIR%\smtube-portable64.exe ( 226 echo SMTube portable EXE not found! 227 goto end 228 ) 229 230 ren %SMPLAYER_DIR64% smplayer-portable-%ALL_PKG_VER%-x64 231 set SMPLAYER_PORTABLE_DIR=%TOP_LEVEL_DIR%\smplayer-portable-%ALL_PKG_VER%-x64 232 233 if not exist %TOP_LEVEL_DIR%\smplayer-portable-%ALL_PKG_VER%-x64 ( 234 echo Oops! Unable to find renamed directory, make sure no files are opened. 235 goto end 236 ) 237 238 :: 239 echo Backing up files... 240 241 ren %SMPLAYER_PORTABLE_DIR%\smplayer.exe smplayer.bak 242 ren %SMPLAYER_PORTABLE_DIR%\smtube.exe smtube.bak 243 ren %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer.exe mplayer.exe.bak32 244 ren %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer64.exe mplayer.exe 245 246 :: 247 echo Creating screenshots dir... 248 249 mkdir %SMPLAYER_PORTABLE_DIR%\screenshots 250 251 :: 252 echo Creating smplayer.ini... 253 254 echo [%%General]> %SMPLAYER_PORTABLE_DIR%\smplayer.ini 255 echo screenshot_directory=.\\screenshots>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini 256 echo.>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini 257 echo [advanced]>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini 258 echo mplayer_additional_options=-nofontconfig>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini 259 260 :: 261 echo Creating smplayer_orig.ini... 262 263 echo [%%General]> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 264 echo screenshot_directory=.\\screenshots>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 265 echo.>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 266 echo [advanced]>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 267 echo mplayer_additional_options=-nofontconfig>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 268 269 :: 270 echo Creating mplayer config... 271 272 echo ^<cachedir^>../fontconfig^</cachedir^>> %SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf 273 274 :: 275 echo Copying portable .exe... 276 277 copy /y %PORTABLE_EXE_DIR%\smplayer-portable64.exe %SMPLAYER_PORTABLE_DIR%\smplayer.exe 278 copy /y %PORTABLE_EXE_DIR%\smtube-portable64.exe %SMPLAYER_PORTABLE_DIR%\smtube.exe 279 280 :: 281 echo Finalizing package... 282 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!codecs -mx9 >nul 283 284 echo. 285 echo Restoring source folder(s) back to its original state... 286 echo. 287 rmdir %SMPLAYER_PORTABLE_DIR%\screenshots 288 del %SMPLAYER_PORTABLE_DIR%\smplayer.ini 289 del %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini 290 del %SMPLAYER_PORTABLE_DIR%\smplayer.exe 291 del %SMPLAYER_PORTABLE_DIR%\smtube.exe 292 ren %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer.exe mplayer64.exe 293 ren %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer.exe.bak32 mplayer.exe 294 del %SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf 295 ren %SMPLAYER_PORTABLE_DIR%\smplayer.bak smplayer.exe 296 ren %SMPLAYER_PORTABLE_DIR%\smtube.bak smtube.exe 297 ren %SMPLAYER_PORTABLE_DIR% smplayer-build64 298 210 299 goto end 211 300 212 301 :nomplayer 213 echo --- Creating SMPlayer w/o MPlayer Package --- 214 echo. 215 216 set /P SMPLAYER_VER="SMPlayer Version: " 217 if "%SMPLAYER_VER%"=="" goto end 218 echo. 219 220 ren %SMPLAYER_DIR% smplayer-%SMPLAYER_VER% 221 set SMPLAYER_DIR=%TOP_LEVEL_DIR%\smplayer-%SMPLAYER_VER% 222 223 7za a -t7z %OUTPUT_DIR%\smplayer-%SMPLAYER_VER%_without_mplayer.7z %SMPLAYER_DIR% -xr!mplayer -mx9 224 225 ren %SMPLAYER_DIR% smplayer-build 302 echo --- Creating SMPlayer w/o MPlayer Package [32-bit] --- 303 echo. 304 305 ren %SMPLAYER_DIR% smplayer-%ALL_PKG_VER% 306 set SMPLAYER_NOMP_DIR=%TOP_LEVEL_DIR%\smplayer-%ALL_PKG_VER% 307 308 :: 309 echo Finalizing package... 310 7za a -t7z %OUTPUT_DIR%\smplayer-%ALL_PKG_VER%_without_mplayer.7z %SMPLAYER_NOMP_DIR% -xr!mplayer -mx9 >nul 311 312 ren %SMPLAYER_NOMP_DIR% smplayer-build 226 313 227 314 echo. … … 230 317 goto end 231 318 232 :mplayer 233 echo. 234 echo --- Creating MPlayer Package --- 235 echo. 236 237 set /P MP_REV="MPlayer Revision: " 238 239 ren %MPLAYER_DIR% mplayer-svn-%MP_REV% 240 set MPLAYER_DIR=%TOP_LEVEL_DIR%\mplayer-svn-%MP_REV% 241 242 7za a -t7z %OUTPUT_DIR%\mplayer-svn-%MP_REV%.7z %MPLAYER_DIR% -xr!mencoder.exe -mx9 243 244 ren %MPLAYER_DIR% mplayer 245 set MPLAYER_DIR=%TOP_LEVEL_DIR%\mplayer 246 247 echo. 248 echo Restoring source folder(s) back to its original state... 319 :nomplayer64 320 echo --- Creating SMPlayer w/o MPlayer Package [64-bit] --- 321 echo. 322 323 ren %SMPLAYER_DIR64% smplayer-%ALL_PKG_VER%-x64 324 set SMPLAYER_NOMP_DIR=%TOP_LEVEL_DIR%\smplayer-%ALL_PKG_VER%-x64 325 326 :: 327 echo Finalizing package... 328 7za a -t7z %OUTPUT_DIR%\smplayer-%ALL_PKG_VER%-x64_without_mplayer.7z %SMPLAYER_NOMP_DIR% -xr!mplayer -mx9 >nul 329 330 ren %SMPLAYER_NOMP_DIR% smplayer-build64 331 332 echo. 333 echo Restoring source folder(s) back to its original state.... 249 334 250 335 goto end
Note:
See TracChangeset
for help on using the changeset viewer.