Ignore:
Timestamp:
May 3, 2016, 5:25:45 PM (9 years ago)
Author:
Silvan Scherrer
Message:

smplayer: update trunk to version 16.4

Location:
smplayer/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/setup/scripts/install_smplayer.cmd

    r170 r176  
    66echo.
    77
    8 set /P QTVER="Qt Version (Default: 4.8.4): "
    9 if "%QTVER%"=="" set QTVER=4.8.4
     8set /P QTVER="Qt Version (Default: 4.8.6): "
     9if "%QTVER%"=="" set QTVER=4.8.6
    1010
    1111set OUTPUT_DIR=smplayer-build
    1212
    1313set SMPLAYER_DIR=svn\smplayer
    14 set SMTUBE_DIR=svn\smtube
    1514set SMPLAYER_THEMES_DIR=svn\smplayer-themes
    1615set SMPLAYER_SKINS_DIR=svn\smplayer-skins
    1716set MPLAYER_DIR=mplayer
     17set MPV_DIR=mpv
    1818rem set QT_DIR=C:\QtSDK\Desktop\Qt\%QTVER%\mingw
    1919set QT_DIR=C:\Qt\%QTVER%
     
    3434copy %QT_DIR%\bin\QtXml4.dll %OUTPUT_DIR%
    3535copy %QT_DIR%\bin\QtScript4.dll %OUTPUT_DIR%
     36copy %QT_DIR%\bin\QtDBus4.dll %OUTPUT_DIR%
    3637copy %QT_DIR%\bin\mingwm10.dll %OUTPUT_DIR%
    3738if %QTVER% geq 4.6.0 (
    3839copy %QT_DIR%\bin\libgcc_s_dw2-1.dll %OUTPUT_DIR%
    3940)
     41if %QTVER% geq 4.8.0 (
     42copy %QT_DIR%\bin\libwinpthread-1.dll %OUTPUT_DIR%
     43copy "%QT_DIR%\bin\libstdc++-6.dll" %OUTPUT_DIR%
     44)
    4045copy openssl\*.dll %OUTPUT_DIR%
    4146
    4247mkdir %OUTPUT_DIR%\imageformats
    4348copy %QT_DIR%\plugins\imageformats\qjpeg4.dll %OUTPUT_DIR%\imageformats\
     49
     50echo.
     51echo ######            Fonts            #######
     52echo.
     53
     54rem mkdir %OUTPUT_DIR%\open-fonts
     55rem copy open-fonts\*.* %OUTPUT_DIR%\open-fonts\
    4456
    4557echo.
     
    7486mkdir %OUTPUT_DIR%\themes\
    7587
     88mkdir %OUTPUT_DIR%\themes\Breeze
     89copy %SMPLAYER_THEMES_DIR%\themes\Breeze\Breeze.rcc %OUTPUT_DIR%\themes\Breeze\
     90copy %SMPLAYER_THEMES_DIR%\themes\Breeze\README.txt %OUTPUT_DIR%\themes\Breeze\
     91
     92mkdir %OUTPUT_DIR%\themes\Breeze-dark
     93copy %SMPLAYER_THEMES_DIR%\themes\Breeze-dark\Breeze-dark.rcc %OUTPUT_DIR%\themes\Breeze-dark\
     94copy %SMPLAYER_THEMES_DIR%\themes\Breeze-dark\README.txt %OUTPUT_DIR%\themes\Breeze-dark\
     95
     96mkdir %OUTPUT_DIR%\themes\Faenza
     97copy %SMPLAYER_THEMES_DIR%\themes\Faenza\Faenza.rcc %OUTPUT_DIR%\themes\Faenza\
     98copy %SMPLAYER_THEMES_DIR%\themes\Faenza\README.txt %OUTPUT_DIR%\themes\Faenza\
     99
     100mkdir %OUTPUT_DIR%\themes\Faenza-Darkest
     101copy %SMPLAYER_THEMES_DIR%\themes\Faenza-Darkest\Faenza-Darkest.rcc %OUTPUT_DIR%\themes\Faenza-Darkest\
     102copy %SMPLAYER_THEMES_DIR%\themes\Faenza-Darkest\README.txt %OUTPUT_DIR%\themes\Faenza-Darkest\
     103
     104mkdir %OUTPUT_DIR%\themes\Faenza-Silver
     105copy %SMPLAYER_THEMES_DIR%\themes\Faenza-Silver\Faenza-Silver.rcc %OUTPUT_DIR%\themes\Faenza-Silver\
     106copy %SMPLAYER_THEMES_DIR%\themes\Faenza-Silver\README.txt %OUTPUT_DIR%\themes\Faenza-Silver\
     107
    76108mkdir %OUTPUT_DIR%\themes\Gartoon
    77109copy %SMPLAYER_THEMES_DIR%\themes\Gartoon\Gartoon.rcc %OUTPUT_DIR%\themes\Gartoon\
     
    82114copy %SMPLAYER_THEMES_DIR%\themes\Gnome\README.txt %OUTPUT_DIR%\themes\Gnome\
    83115
     116mkdir %OUTPUT_DIR%\themes\H2O
     117copy %SMPLAYER_THEMES_DIR%\themes\H2O\H2O.rcc %OUTPUT_DIR%\themes\H2O\
     118copy %SMPLAYER_THEMES_DIR%\themes\H2O\README.txt %OUTPUT_DIR%\themes\H2O\
     119copy %SMPLAYER_THEMES_DIR%\themes\H2O\style.qss %OUTPUT_DIR%\themes\H2O\
     120
    84121mkdir %OUTPUT_DIR%\themes\Monochrome
    85122copy %SMPLAYER_THEMES_DIR%\themes\Monochrome\Monochrome.rcc %OUTPUT_DIR%\themes\Monochrome\
     
    110147copy %SMPLAYER_THEMES_DIR%\themes\Oxygen-Air\README.txt %OUTPUT_DIR%\themes\Oxygen-Air\
    111148
     149mkdir %OUTPUT_DIR%\themes\Oxygen-KDE
     150copy %SMPLAYER_THEMES_DIR%\themes\Oxygen-KDE\Oxygen-KDE.rcc %OUTPUT_DIR%\themes\Oxygen-KDE\
     151copy %SMPLAYER_THEMES_DIR%\themes\Oxygen-KDE\README.txt %OUTPUT_DIR%\themes\Oxygen-KDE\
     152
    112153mkdir %OUTPUT_DIR%\themes\Oxygen-Refit
    113154copy %SMPLAYER_THEMES_DIR%\themes\Oxygen-Refit\Oxygen-Refit.rcc %OUTPUT_DIR%\themes\Oxygen-Refit\
     
    166207
    167208echo.
    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.
     209echo ######           MPV               #######
     210echo.
     211xcopy %MPV_DIR% %OUTPUT_DIR%\mpv\ /E
     212
     213echo.
  • smplayer/trunk/setup/scripts/make_pkgs.cmd

    r170 r176  
    11@echo off
     2if exist "turnon_echo" (
     3  @echo on
     4)
     5
     6:: Reset working dir especially when using 'Run as administrator'
     7@cd /d "%~dp0"
     8
    29echo This batch file can help you to create a packages for SMPlayer and MPlayer.
    310echo.
    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.
     11echo This script will temporarily rename the smplayer-build and mplayer directories.
     12echo Make sure these files ^& directories are not opened when running the script.
    1313echo.
    1414echo 1 - NSIS                          10 - NSIS [32-bit/64-bit]
    1515echo 2 - NSIS [64-bit]                 11 - Portable [32-bit/64-bit]
    16 echo 3 - Portable
     16echo 3 - Portable                      20 - Portable SFX [32-bit/64-bit]
    1717echo 4 - Portable [64-bit]
    1818echo 5 - Without MPlayer
     
    3131set VER_REV_CMD=
    3232set MAKENSIS_EXE_PATH=
    33 set USER_CHOICE=
    3433
    3534:: 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"
     35if exist "nsis_path" (
     36  for /f "tokens=*" %%y in ('type nsis_path') do if exist %%y set MAKENSIS_EXE_PATH="%%y"
     37)
     38
     39if 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
     43if 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+
     50where /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  )
    4055)
    4156
     
    4661set PORTABLE_EXE_DIR=%TOP_LEVEL_DIR%\portable
    4762
     63:cmdline_parsing
     64if "%1" == ""               goto reask
     65for %%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
     72echo Unknown option: "%1"
     73echo.
     74goto superend
     75
    4876:reask
     77set USER_CHOICE=
    4978set /P USER_CHOICE="Choose an action: "
    5079echo.
    5180
    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
     81for %%z in (1 2 3 4 5 6 10 11 20) do if "%USER_CHOICE%" == "%%z" goto pkgver
     82if "%USER_CHOICE%" == ""  goto superend
    6083goto reask
    6184
     
    6891echo Format: VER_MAJOR.VER_MINOR.VER_BUILD[.VER_REVISION]
    6992echo VER_REVISION is optional (set to 0 if blank)
    70 echo.
    7193:pkgver_manual
     94echo.
     95set ALL_PKG_VER=
     96set VER_MAJOR=
     97set VER_MINOR=
     98set VER_BUILD=
     99set VER_REVISION=
     100set VER_REV_CMD=
     101set DEF_QT5=
    72102set /p ALL_PKG_VER="Version: "
    73103echo.
     
    79109for /f "tokens=4 delims=." %%m in ("%ALL_PKG_VER%")  do set VER_REVISION=%%m
    80110
    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%]==[] (
     111echo %VER_MAJOR%|findstr /r /c:"^[0-9][0-9]*$" >nul
     112if 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
     117echo %VER_MINOR%|findstr /r /c:"^[0-9][0-9]*$" >nul
     118if 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)
     122echo %VER_BUILD%|findstr /r /c:"^[0-9][0-9]*$" >nul
     123if 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
     128if 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 (
    100137  set VER_REV_CMD=
    101 ) else (
    102   set VER_REV_CMD= /DVER_REVISION=%VER_REVISION%
     138)
     139
     140if not defined VER_REVISION (
     141  set PORTABLE_PKG_VER=%ALL_PKG_VER%.0
     142) else (
     143  set PORTABLE_PKG_VER=%ALL_PKG_VER%
    103144)
    104145
     
    111152if "%USER_CHOICE%" == "10"  goto nsispkg
    112153if "%USER_CHOICE%" == "11"  goto portable
     154if "%USER_CHOICE%" == "20"  goto portablesfx
    113155:: Should not happen
    114156goto end
     
    119161echo.
    120162
     163if exist %TOP_LEVEL_DIR%\smplayer-build\Qt5Core.dll (
     164  set DEF_QT5=/DQT5
     165) else (
     166  set DEF_QT5=
     167)
     168
    121169if 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.nsi
     170  %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
    123171)
    124172
     
    129177echo.
    130178
     179if exist %TOP_LEVEL_DIR%\smplayer-build64\Qt5Core.dll (
     180  set DEF_QT5="/DQT5"
     181) else (
     182  set DEF_QT5=
     183)
     184
    131185if 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.nsi
     186  %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
    133187)
    134188
     
    136190
    137191:portable
    138 :: Check for portable exes
    139192echo --- SMPlayer Portable Package [32-bit] ---
    140193echo.
    141194
    142 if not exist %PORTABLE_EXE_DIR%\smplayer-portable.exe (
     195if not exist %SMPLAYER_DIR% (
     196  echo SMPlayer sources missing.
     197  goto end
     198)
     199
     200REM Check for portable exes
     201if not exist "%PORTABLE_EXE_DIR%\smplayer-portable.exe" (
    143202  echo SMPlayer portable EXE not found!
    144203  goto end
    145204)
    146205
    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% (
     206REM if not exist "%PORTABLE_EXE_DIR%\smtube-portable.exe" (
     207REM  echo Warning: SMTube portable EXE not found!
     208REM )
     209
     210if 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
     218ren "%SMPLAYER_DIR%" "smplayer-portable-%PORTABLE_PKG_VER%%QT5_SUFFIX%"
     219set SMPLAYER_PORTABLE_DIR="%TOP_LEVEL_DIR%\smplayer-portable-%PORTABLE_PKG_VER%%QT5_SUFFIX%"
     220
     221if not exist "%TOP_LEVEL_DIR%\smplayer-portable-%PORTABLE_PKG_VER%%QT5_SUFFIX%" (
    156222  echo Oops! Unable to find renamed directory, make sure no files are opened.
    157223  goto end
    158224)
    159225
    160 ::
    161226echo Backing up files...
    162227
    163 ren %SMPLAYER_PORTABLE_DIR%\smplayer.exe smplayer.bak
    164 ren %SMPLAYER_PORTABLE_DIR%\smtube.exe smtube.bak
    165 
    166 ::
     228ren "%SMPLAYER_PORTABLE_DIR%\smplayer.exe" smplayer.bak
     229REM ren "%SMPLAYER_PORTABLE_DIR%\smtube.exe" smtube.bak
     230
    167231echo Creating screenshots dir...
    168232
    169 mkdir %SMPLAYER_PORTABLE_DIR%\screenshots
    170 
    171 ::
     233mkdir "%SMPLAYER_PORTABLE_DIR%\screenshots"
     234
    172235echo Creating smplayer.ini...
    173236
    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 ::
     237echo [%%General]> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini"
     238echo screenshot_directory=.\\screenshots>> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini"
     239echo.>> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini"
     240echo [smplayer]>> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini"
     241echo check_if_upgraded=false>> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini"
     242
    181243echo Creating smplayer_orig.ini...
    182244
    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 ::
     245echo [%%General]> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini"
     246echo screenshot_directory=.\\screenshots>> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini"
     247echo.>> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini"
     248echo [smplayer]>> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini"
     249echo check_if_upgraded=false>> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini"
     250
     251REM echo Creating mplayer config...
     252
     253REM echo ^<cachedir^>../fontconfig^</cachedir^>> "%SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf"
     254
    195255echo Copying portable .exe...
    196256
    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 ::
     257copy /y "%PORTABLE_EXE_DIR%\smplayer-portable.exe" "%SMPLAYER_PORTABLE_DIR%\smplayer.exe"
     258REM copy /y "%PORTABLE_EXE_DIR%\smtube-portable.exe" "%SMPLAYER_PORTABLE_DIR%\smtube.exe"
     259
    201260echo 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 >nul
     2617za 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
    203262
    204263echo.
    205264echo Restoring source folder(s) back to its original state...
    206265echo.
    207 rmdir %SMPLAYER_PORTABLE_DIR%\screenshots
    208 del %SMPLAYER_PORTABLE_DIR%\smplayer.ini
    209 del %SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini
    210 del %SMPLAYER_PORTABLE_DIR%\smplayer.exe
    211 del %SMPLAYER_PORTABLE_DIR%\smtube.exe
    212 del %SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf
    213 ren %SMPLAYER_PORTABLE_DIR%\smplayer.bak smplayer.exe
    214 ren %SMPLAYER_PORTABLE_DIR%\smtube.bak smtube.exe
    215 ren %SMPLAYER_PORTABLE_DIR% smplayer-build
     266rmdir "%SMPLAYER_PORTABLE_DIR%\screenshots"
     267del "%SMPLAYER_PORTABLE_DIR%\smplayer.ini"
     268del "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini"
     269del "%SMPLAYER_PORTABLE_DIR%\smplayer.exe"
     270REM del "%SMPLAYER_PORTABLE_DIR%\smtube.exe"
     271REM del "%SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf"
     272ren "%SMPLAYER_PORTABLE_DIR%\smplayer.bak" smplayer.exe
     273REM ren "%SMPLAYER_PORTABLE_DIR%\smtube.bak" smtube.exe
     274ren "%SMPLAYER_PORTABLE_DIR%" smplayer-build
    216275
    217276if not "%USER_CHOICE%" == "11"  goto end
     
    221280echo.
    222281
    223 :: Check for portable exes
    224 if not exist %PORTABLE_EXE_DIR%\smplayer-portable64.exe (
     282if not exist %SMPLAYER_DIR64% (
     283  echo SMPlayer sources missing.
     284  goto end
     285)
     286
     287REM Check for portable exes
     288if not exist "%PORTABLE_EXE_DIR%\smplayer-portable64.exe" (
    225289  echo SMPlayer portable EXE not found!
    226290  goto end
    227291)
    228292
    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 (
     293REM if not exist "%PORTABLE_EXE_DIR%\smtube-portable64.exe" (
     294REM  echo Warning: SMTube portable EXE not found!
     295REM )
     296
     297if 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
     305ren "%SMPLAYER_DIR64%" "smplayer-portable-%PORTABLE_PKG_VER%-x64%QT5_SUFFIX%"
     306set SMPLAYER_PORTABLE_DIR="%TOP_LEVEL_DIR%\smplayer-portable-%PORTABLE_PKG_VER%-x64%QT5_SUFFIX%"
     307
     308if not exist "%TOP_LEVEL_DIR%\smplayer-portable-%PORTABLE_PKG_VER%-x64%QT5_SUFFIX%" (
    238309  echo Oops! Unable to find renamed directory, make sure no files are opened.
    239310  goto end
    240311)
    241312
    242 ::
    243313echo Backing up files...
    244314
    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 ::
     315ren "%SMPLAYER_PORTABLE_DIR%\smplayer.exe" smplayer.bak
     316REM ren "%SMPLAYER_PORTABLE_DIR%\smtube.exe" smtube.bak
     317ren "%SMPLAYER_PORTABLE_DIR%\mplayer\mplayer.exe" mplayer.exe.bak32
     318ren "%SMPLAYER_PORTABLE_DIR%\mplayer\mplayer64.exe" mplayer.exe
     319
     320if exist "%SMPLAYER_PORTABLE_DIR%\mpv\fonts" (
     321  ren "%SMPLAYER_PORTABLE_DIR%\mpv\fonts" fonts.bak32
     322)
     323if exist "%SMPLAYER_PORTABLE_DIR%\mpv\mpv" (
     324  ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv" mpv.bak32
     325)
     326
     327ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv.exe" mpv.exe.bak32
     328ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv.com" mpv.com.bak32
     329ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv64.exe" mpv.exe
     330ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv64.com" mpv.com
     331
    251332echo Creating screenshots dir...
    252333
    253 mkdir %SMPLAYER_PORTABLE_DIR%\screenshots
    254 
    255 ::
     334mkdir "%SMPLAYER_PORTABLE_DIR%\screenshots"
     335
    256336echo Creating smplayer.ini...
    257337
    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 ::
     338echo [%%General]> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini"
     339echo screenshot_directory=.\\screenshots>> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini"
     340echo.>> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini"
     341echo [smplayer]>> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini"
     342echo check_if_upgraded=false>> "%SMPLAYER_PORTABLE_DIR%\smplayer.ini"
     343
    265344echo Creating smplayer_orig.ini...
    266345
    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 ::
     346echo [%%General]> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini"
     347echo screenshot_directory=.\\screenshots>> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini"
     348echo.>> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini"
     349echo [smplayer]>> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini"
     350echo check_if_upgraded=false>> "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini"
     351
     352REM echo Creating mplayer config...
     353
     354REM echo ^<cachedir^>../fontconfig^</cachedir^>> "%SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf"
     355
    279356echo Copying portable .exe...
    280357
    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 ::
     358copy /y "%PORTABLE_EXE_DIR%\smplayer-portable64.exe" "%SMPLAYER_PORTABLE_DIR%\smplayer.exe"
     359REM copy /y "%PORTABLE_EXE_DIR%\smtube-portable64.exe" "%SMPLAYER_PORTABLE_DIR%\smtube.exe"
     360
    285361echo 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 >nul
     3627za 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
    287363
    288364echo.
    289365echo Restoring source folder(s) back to its original state...
    290366echo.
    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
     367rmdir "%SMPLAYER_PORTABLE_DIR%\screenshots"
     368del "%SMPLAYER_PORTABLE_DIR%\smplayer.ini"
     369del "%SMPLAYER_PORTABLE_DIR%\smplayer_orig.ini"
     370del "%SMPLAYER_PORTABLE_DIR%\smplayer.exe"
     371REM del "%SMPLAYER_PORTABLE_DIR%\smtube.exe"
     372ren "%SMPLAYER_PORTABLE_DIR%\mplayer\mplayer.exe" mplayer64.exe
     373ren "%SMPLAYER_PORTABLE_DIR%\mplayer\mplayer.exe.bak32" mplayer.exe
     374REM del "%SMPLAYER_PORTABLE_DIR%\mplayer\fonts\local.conf"
     375ren "%SMPLAYER_PORTABLE_DIR%\smplayer.bak" smplayer.exe
     376REM ren "%SMPLAYER_PORTABLE_DIR%\smtube.bak" smtube.exe
     377
     378ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv.exe" mpv64.exe
     379ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv.com" mpv64.com
     380ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv.exe.bak32" mpv.exe
     381ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv.com.bak32" mpv.com
     382
     383if exist "%SMPLAYER_PORTABLE_DIR%\mpv\fonts.bak32" (
     384  ren "%SMPLAYER_PORTABLE_DIR%\mpv\fonts.bak32" fonts
     385)
     386if exist "%SMPLAYER_PORTABLE_DIR%\mpv\mpv.bak32" (
     387  ren "%SMPLAYER_PORTABLE_DIR%\mpv\mpv.bak32" mpv
     388)
     389
     390ren "%SMPLAYER_PORTABLE_DIR%" smplayer-build64
     391
     392goto end
     393
     394:portablesfx
     395
     396if exist %TOP_LEVEL_DIR%\smplayer-build\Qt5Core.dll (
     397  set DEF_QT5=/DQT5
     398) else (
     399  set DEF_QT5=
     400)
     401
     402if 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
     408if exist %TOP_LEVEL_DIR%\smplayer-build64\Qt5Core.dll (
     409  set DEF_QT5=/DQT5
     410) else (
     411  set DEF_QT5=
     412)
     413
     414if 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)
    302419
    303420goto end
     
    342459
    343460pause
     461
     462:superend
     463set ALL_PKG_VER=
     464set VER_MAJOR=
     465set VER_MINOR=
     466set VER_BUILD=
     467set VER_REVISION=
Note: See TracChangeset for help on using the changeset viewer.