Ignore:
Timestamp:
May 15, 2014, 7:53:54 PM (11 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
     101if "%USER_CHOICE%" == "1"  goto nsispkg
     102if "%USER_CHOICE%" == "2"  goto nsispkg64
     103if "%USER_CHOICE%" == "3"  goto portable
     104if "%USER_CHOICE%" == "4"  goto portable64
     105if "%USER_CHOICE%" == "5"  goto nomplayer
     106if "%USER_CHOICE%" == "6"  goto nomplayer64
     107if "%USER_CHOICE%" == "10"  goto nsispkg
     108if "%USER_CHOICE%" == "11"  goto portable
     109:: Should not happen
     110goto end
     111
     112:nsispkg
     113
     114echo --- SMPlayer NSIS Package [32-bit] ---
     115echo.
     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  %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
    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
     135echo --- SMPlayer Portable Package [32-bit] ---
     136echo.
     137
    122138if not exist %PORTABLE_EXE_DIR%\smplayer-portable.exe (
    123139  echo SMPlayer portable EXE not found!
    124         goto end
     140  goto 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% (
     145  goto end
     146)
     147
     148ren %SMPLAYER_DIR% smplayer-portable-%ALL_PKG_VER%
     149set SMPLAYER_PORTABLE_DIR=%TOP_LEVEL_DIR%\smplayer-portable-%ALL_PKG_VER%
     150
     151if not exist %TOP_LEVEL_DIR%\smplayer-portable-%ALL_PKG_VER% (
    136152  echo Oops! Unable to find renamed directory, make sure no files are opened.
    137         goto end
    138 )
    139 
    140 echo.
     153  goto 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
     213if not "%USER_CHOICE%" == "11"  goto end
     214
     215:portable64
     216echo --- SMPlayer Portable Package [64-bit] ---
     217echo.
     218
     219:: Check for portable exes
     220if not exist %PORTABLE_EXE_DIR%\smplayer-portable64.exe (
     221  echo SMPlayer portable EXE not found!
     222  goto end
     223)
     224
     225if not exist %PORTABLE_EXE_DIR%\smtube-portable64.exe (
     226  echo SMTube portable EXE not found!
     227  goto end
     228)
     229
     230ren %SMPLAYER_DIR64% smplayer-portable-%ALL_PKG_VER%-x64
     231set SMPLAYER_PORTABLE_DIR=%TOP_LEVEL_DIR%\smplayer-portable-%ALL_PKG_VER%-x64
     232
     233if 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::
     239echo Backing up files...
     240
     241ren %SMPLAYER_PORTABLE_DIR%\smplayer.exe smplayer.bak
     242ren %SMPLAYER_PORTABLE_DIR%\smtube.exe smtube.bak
     243ren %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer.exe mplayer.exe.bak32
     244ren %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer64.exe mplayer.exe
     245
     246::
     247echo Creating screenshots dir...
     248
     249mkdir %SMPLAYER_PORTABLE_DIR%\screenshots
     250
     251::
     252echo Creating smplayer.ini...
     253
     254echo [%%General]> %SMPLAYER_PORTABLE_DIR%\smplayer.ini
     255echo screenshot_directory=.\\screenshots>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini
     256echo.>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini
     257echo [advanced]>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini
     258echo mplayer_additional_options=-nofontconfig>> %SMPLAYER_PORTABLE_DIR%\smplayer.ini
     259
     260::
     261echo Creating smplayer_orig.ini...
     262
     263echo [%%General]> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini
     264echo screenshot_directory=.\\screenshots>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini
     265echo.>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini
     266echo [advanced]>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini
     267echo mplayer_additional_options=-nofontconfig>> %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini
     268
     269::
     270echo Creating mplayer config...
     271
     272echo ^<cachedir^>../fontconfig^</cachedir^>> %SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf
     273
     274::
     275echo Copying portable .exe...
     276
     277copy /y %PORTABLE_EXE_DIR%\smplayer-portable64.exe %SMPLAYER_PORTABLE_DIR%\smplayer.exe
     278copy /y %PORTABLE_EXE_DIR%\smtube-portable64.exe %SMPLAYER_PORTABLE_DIR%\smtube.exe
     279
     280::
     281echo Finalizing package...
     2827za 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
     284echo.
     285echo Restoring source folder(s) back to its original state...
     286echo.
     287rmdir %SMPLAYER_PORTABLE_DIR%\screenshots
     288del %SMPLAYER_PORTABLE_DIR%\smplayer.ini
     289del %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini
     290del %SMPLAYER_PORTABLE_DIR%\smplayer.exe
     291del %SMPLAYER_PORTABLE_DIR%\smtube.exe
     292ren %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer.exe mplayer64.exe
     293ren %SMPLAYER_PORTABLE_DIR%\mplayer\mplayer.exe.bak32 mplayer.exe
     294del %SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf
     295ren %SMPLAYER_PORTABLE_DIR%\smplayer.bak smplayer.exe
     296ren %SMPLAYER_PORTABLE_DIR%\smtube.bak smtube.exe
     297ren %SMPLAYER_PORTABLE_DIR% smplayer-build64
     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.