Changeset 163 for smplayer/vendor/current/setup/scripts
- Timestamp:
- May 15, 2014, 7:53:54 PM (12 years ago)
- Location:
- smplayer/vendor/current/setup/scripts
- Files:
-
- 1 deleted
- 1 edited
-
make_pkgs.cmd (modified) (11 diffs)
-
make_pkgs64.cmd (deleted)
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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 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 % /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 136 137 122 138 if not exist %PORTABLE_EXE_DIR%\smplayer-portable.exe ( 123 139 echo SMPlayer portable EXE not found! 124 goto end140 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 goto end130 ) 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-%_VER% 149 set SMPLAYER_PORTABLE_DIR=%TOP_LEVEL_DIR%\smplayer-portable-%_VER% 150 151 if not exist %TOP_LEVEL_DIR%\smplayer-portable-%_VER% ( 136 152 echo Oops! Unable to find renamed directory, make sure no files are opened. 137 goto end138 ) 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 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 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.
