Ignore:
Timestamp:
May 15, 2014, 7:53:54 PM (12 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: update vendor to 0.8.7

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  
    1212echo 7zip command-line (http://7zip.org) is required by this script.
    1313echo.
    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 
     14echo 1 - NSIS                          10 - NSIS [32-bit/64-bit]
     15echo 2 - NSIS [64-bit]                 11 - Portable [32-bit/64-bit]
     16echo 3 - Portable
     17echo 4 - Portable [64-bit]
     18echo 5 - Without MPlayer
     19echo 6 - Without MPlayer [64-bit]
    1920echo.
    2021
     
    2324
    2425:: 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=
     26set ALL_PKG_VER=
    6527set VER_MAJOR=
    6628set VER_MINOR=
     
    6830set VER_REVISION=
    6931set 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
     32set MAKENSIS_EXE_PATH=
     33set USER_CHOICE=
     34
     35:: NSIS path
     36if 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
     42set SMPLAYER_DIR=%TOP_LEVEL_DIR%\smplayer-build
     43set SMPLAYER_DIR64=%TOP_LEVEL_DIR%\smplayer-build64
     44set MPLAYER_DIR=%TOP_LEVEL_DIR%\mplayer
     45set OUTPUT_DIR=%TOP_LEVEL_DIR%\output
     46set PORTABLE_EXE_DIR=%TOP_LEVEL_DIR%\portable
     47
     48:reask
     49set /P USER_CHOICE="Choose an action: "
     50echo.
     51
     52if "%USER_CHOICE%" == "1"  goto pkgver
     53if "%USER_CHOICE%" == "2"  goto pkgver
     54if "%USER_CHOICE%" == "3"  goto pkgver
     55if "%USER_CHOICE%" == "4"  goto pkgver
     56if "%USER_CHOICE%" == "5"  goto pkgver
     57if "%USER_CHOICE%" == "6"  goto pkgver
     58if "%USER_CHOICE%" == "10"  goto pkgver
     59if "%USER_CHOICE%" == "11"  goto pkgver
     60goto reask
     61
     62:pkgver
     63
     64echo Format: VER_MAJOR.VER_MINOR.VER_BUILD[.VER_REVISION]
     65echo VER_REVISION is optional (set to 0 if blank)
     66echo.
     67
     68:pkgver_again
     69Set /p ALL_PKG_VER="Version: "
     70echo.
     71
     72for /f "tokens=1 delims=." %%j in ("%ALL_PKG_VER%")  do set VER_MAJOR=%%j
     73for /f "tokens=2 delims=." %%k in ("%ALL_PKG_VER%")  do set VER_MINOR=%%k
     74for /f "tokens=3 delims=." %%l in ("%ALL_PKG_VER%")  do set VER_BUILD=%%l
     75for /f "tokens=4 delims=." %%m in ("%ALL_PKG_VER%")  do set VER_REVISION=%%m
    7876
    7977if [%VER_MAJOR%]==[] (
    8078  echo Major Version # must be specified [#.x.x]
    8179  echo.
    82   goto nsispkgver_again
     80  goto pkgver_again
    8381)
    8482
     
    8684  echo Minor Version # must be specified [x.#.x]
    8785  echo.
    88   goto nsispkgver_again
     86  goto pkgver_again
    8987)
    9088
     
    9290  echo Build Version # must be specified [x.x.#]
    9391  echo.
    94   goto nsispkgver_again
     92  goto pkgver_again
    9593)
    9694
     
    10199)
    102100
     101
     102
     103
     104
     105
     106
     107
     108
     109
     110
     111
     112
     113
     114
     115
     116
    103117if 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
     121if not "%USER_CHOICE%" == "10"  goto end
     122
     123:nsispkg64
     124echo --- SMPlayer NSIS Package [64-bit] ---
     125echo.
    106126
    107127if 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.nsi
     128  % /DVER_MAJOR=%VER_MAJOR% /DVER_MINOR=%VER_MINOR% /DVER_BUILD=%VER_BUILD%%VER_REV_CMD% /DWIN64 %TOP_LEVEL_DIR%\smplayer.nsi
    109129)
    110130
     
    112132
    113133:portable
    114 echo --- Creating SMPlayer Portable Package ---
    115 echo.
    116 
    117 set /P SMPLAYER_VER="SMPlayer Version: "
    118 if "%SMPLAYER_VER%"=="" goto end
    119 echo.
    120 
    121134:: Check for portable exes
     135
     136
     137
    122138if not exist %PORTABLE_EXE_DIR%\smplayer-portable.exe (
    123139  echo SMPlayer portable EXE not found!
    124         goto end
     140goto end
    125141)
    126142
    127143if not exist %PORTABLE_EXE_DIR%\smtube-portable.exe (
    128144  echo SMTube portable EXE not found!
    129         goto end
    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% (
     145goto end
     146)
     147
     148ren %SMPLAYER_DIR% smplayer-portable-%_VER%
     149set SMPLAYER_PORTABLE_DIR=%TOP_LEVEL_DIR%\smplayer-portable-%_VER%
     150
     151if not exist %TOP_LEVEL_DIR%\smplayer-portable-%_VER% (
    136152  echo Oops! Unable to find renamed directory, make sure no files are opened.
    137         goto end
    138 )
    139 
    140 echo.
     153goto end
     154)
     155
     156::
    141157echo Backing up files...
    142 echo.
    143158
    144159ren %SMPLAYER_PORTABLE_DIR%\smplayer.exe smplayer.bak
    145160ren %SMPLAYER_PORTABLE_DIR%\smtube.exe smtube.bak
    146 ren %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer\config config.bak
    147 
    148 echo.
     161
     162::
    149163echo Creating screenshots dir...
    150 echo.
    151164
    152165mkdir %SMPLAYER_PORTABLE_DIR%\screenshots
    153166
    154 echo.
     167::
    155168echo Creating smplayer.ini...
    156 echo.
    157169
    158170echo [%%General]> %SMPLAYER_PORTABLE_DIR%\smplayer.ini
     
    162174echo mplayer_additional_options=-nofontconfig>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini
    163175
    164 echo.
     176::
    165177echo Creating smplayer_orig.ini...
    166 echo.
    167178
    168179echo [%%General]> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini
     
    172183echo mplayer_additional_options=-nofontconfig>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini
    173184
    174 echo.
     185::
    175186echo 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
    181188echo ^<cachedir^>../fontconfig^</cachedir^>> %SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf
    182189
    183 echo.
     190::
    184191echo Copying portable .exe...
    185 echo.
    186192
    187193copy /y %PORTABLE_EXE_DIR%\smplayer-portable.exe %SMPLAYER_PORTABLE_DIR%\smplayer.exe
    188194copy /y %PORTABLE_EXE_DIR%\smtube-portable.exe %SMPLAYER_PORTABLE_DIR%\smtube.exe
    189195
    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::
     197echo Finalizing package...
     1987za 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
    194199
    195200echo.
     
    201206del %SMPLAYER_PORTABLE_DIR%\smplayer.exe
    202207del %SMPLAYER_PORTABLE_DIR%\smtube.exe
    203 del %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer\config
    204208del %SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf
    205209ren %SMPLAYER_PORTABLE_DIR%\smplayer.bak smplayer.exe
    206210ren %SMPLAYER_PORTABLE_DIR%\smtube.bak smtube.exe
    207 ren %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer\config.bak config
    208211ren %SMPLAYER_PORTABLE_DIR% smplayer-build
    209212
     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
    210299goto end
    211300
    212301: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
     302echo --- Creating SMPlayer w/o MPlayer Package [32-bit] ---
     303echo.
     304
     305ren %SMPLAYER_DIR% smplayer-%ALL_PKG_VER%
     306set SMPLAYER_NOMP_DIR=%TOP_LEVEL_DIR%\smplayer-%ALL_PKG_VER%
     307
     308::
     309echo Finalizing package...
     3107za a -t7z %OUTPUT_DIR%\smplayer-%ALL_PKG_VER%_without_mplayer.7z %SMPLAYER_NOMP_DIR% -xr!mplayer -mx9 >nul
     311
     312ren %SMPLAYER_NOMP_DIR% smplayer-build
    226313
    227314echo.
     
    230317goto end
    231318
    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
     320echo --- Creating SMPlayer w/o MPlayer Package [64-bit] ---
     321echo.
     322
     323ren %SMPLAYER_DIR64% smplayer-%ALL_PKG_VER%-x64
     324set SMPLAYER_NOMP_DIR=%TOP_LEVEL_DIR%\smplayer-%ALL_PKG_VER%-x64
     325
     326::
     327echo Finalizing package...
     3287za a -t7z %OUTPUT_DIR%\smplayer-%ALL_PKG_VER%-x64_without_mplayer.7z %SMPLAYER_NOMP_DIR% -xr!mplayer -mx9 >nul
     329
     330ren %SMPLAYER_NOMP_DIR% smplayer-build64
     331
     332echo.
     333echo Restoring source folder(s) back to its original state....
    249334
    250335goto end
Note: See TracChangeset for help on using the changeset viewer.