Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/filters/transform/VSFilter/installer/build_installer.bat')
-rwxr-xr-xsrc/filters/transform/VSFilter/installer/build_installer.bat45
1 files changed, 7 insertions, 38 deletions
diff --git a/src/filters/transform/VSFilter/installer/build_installer.bat b/src/filters/transform/VSFilter/installer/build_installer.bat
index 13314751a..c397f3ec8 100755
--- a/src/filters/transform/VSFilter/installer/build_installer.bat
+++ b/src/filters/transform/VSFilter/installer/build_installer.bat
@@ -1,5 +1,5 @@
@ECHO OFF
-REM (C) 2012-2013 see Authors.txt
+REM (C) 2012-2013, 2015 see Authors.txt
REM
REM This file is part of MPC-HC.
REM
@@ -18,17 +18,14 @@ REM along with this program. If not, see <http://www.gnu.org/licenses/>.
SETLOCAL
-PUSHD %~dp0
-
-REM You can set here the Inno Setup path if for example you have Inno Setup Unicode
-REM installed and you want to use the ANSI Inno Setup which is in another location
-IF NOT DEFINED InnoSetupPath SET "InnoSetupPath=H:\progs\thirdparty\isetup"
+SET "FILE_DIR=%~dp0"
+PUSHD "%FILE_DIR%"
SET ROOT_DIR=..\..\..\..\..
SET "BIN_DIR=%ROOT_DIR%\bin"
-CALL :SubDetectInnoSetup
-IF EXIST "%~dp0%ROOT_DIR%\signinfo.txt" (
+CALL "%FILE_DIR%%ROOT_DIR%\common.bat" :SubDetectInnoSetup
+IF EXIST "%FILE_DIR%%ROOT_DIR%\signinfo.txt" (
CALL :SubSign VSFilter.dll x86
CALL :SubSign VSFilter.dll x64
)
@@ -48,7 +45,7 @@ REM %1 is name of the file to sign
REM %2 is the platform
PUSHD "%BIN_DIR%\Filters_%~2\"
-CALL "%~dp0%ROOT_DIR%\contrib\sign.bat" "%1" || (ECHO Problem signing %1 & GOTO Break)
+CALL "%FILE_DIR%%ROOT_DIR%\contrib\sign.bat" "%1" || (ECHO Problem signing %1 & GOTO Break)
ECHO %1 signed successfully.
:Break
@@ -60,7 +57,7 @@ EXIT /B
IF %ERRORLEVEL% NEQ 0 GOTO EndWithError
ECHO.
TITLE Building VSFilter installer...
-"%InnoSetupPath%\ISCC.exe" /SMySignTool="cmd /c "%~dp0%ROOT_DIR%\contrib\sign.bat" $f" /Q^
+"%InnoSetupPath%\ISCC.exe" /SMySignTool="cmd /c "%FILE_DIR%%ROOT_DIR%\contrib\sign.bat" $f" /Q^
"vsfilter_setup.iss" /D%~1
IF %ERRORLEVEL% NEQ 0 GOTO EndWithError
IF /I "%~1%" == "x64Build" (
@@ -71,34 +68,6 @@ IF /I "%~1%" == "x64Build" (
EXIT /B
-:SubDetectInnoSetup
-REM Detect if we are running on 64bit Windows and use Wow6432Node since Inno Setup is
-REM a 32-bit application, and set the registry key of Inno Setup accordingly
-IF DEFINED PROGRAMFILES(x86) (
- SET "U_=HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
-) ELSE (
- SET "U_=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
-)
-
-IF DEFINED InnoSetupPath IF NOT EXIST "%InnoSetupPath%" (
- ECHO "%InnoSetupPath%" wasn't found on this machine! I will try to detect Inno Setup's path from the registry...
-)
-
-IF NOT EXIST "%InnoSetupPath%" (
- FOR /F "delims=" %%a IN (
- 'REG QUERY "%U_%\Inno Setup 5_is1" /v "Inno Setup: App Path"2^>Nul^|FIND "REG_SZ"') DO (
- SET "InnoSetupPath=%%a" & CALL :SubInnoSetupPath %%InnoSetupPath:*Z=%%)
-)
-
-IF NOT EXIST "%InnoSetupPath%" ECHO Inno Setup wasn't found! & GOTO EndWithError
-EXIT /B
-
-
-:SubInnoSetupPath
-SET "InnoSetupPath=%*"
-EXIT /B
-
-
:EndWithError
Title Building VSFilter installer [ERROR]
COLOR 0C