From 8ccb66de348ee3869cfeed92a301d0016b8bd814 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sat, 21 Jun 2014 19:25:19 +0300 Subject: [PATCH] Revert "Add x64 support." This partially reverts commit cc9ef7a5eb2c39a533988bfd401ac5537d436841 and commit 254b1cb58d91951e3497421a9c96355d739ee300. --- build.bat | 47 +++++++-------- installer/Subtitle_Edit_installer.iss | 58 ++----------------- src/SubtitleEdit.csproj | 42 +++----------- src/SubtitleEdit.sln | 42 +++++--------- src/Test/Test.csproj | 22 +------ .../UpdateAssemblyInfo.csproj | 43 ++++---------- update_rev.bat | 6 +- 7 files changed, 65 insertions(+), 195 deletions(-) diff --git a/build.bat b/build.bat index e92bb19ae..f802edf29 100644 --- a/build.bat +++ b/build.bat @@ -42,17 +42,10 @@ IF "%~1" == "" ( :START PUSHD "src" -CALL "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x86 -TITLE %BUILDTYPE%ing SubtitleEdit - Release^|x86... +CALL "%VS120COMNTOOLS%vsvars32.bat" x86 +TITLE %BUILDTYPE%ing SubtitleEdit - Release^|Any CPU... -"MSBuild.exe" SubtitleEdit.sln /t:%BUILDTYPE% /p:Configuration=Release /p:Platform="x86"^ - /maxcpucount /consoleloggerparameters:DisableMPLogging;Summary;Verbosity=minimal -IF %ERRORLEVEL% NEQ 0 GOTO EndWithError - -CALL "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x86_amd64 -TITLE %BUILDTYPE%ing SubtitleEdit - Release^|x64... - -"MSBuild.exe" SubtitleEdit.sln /t:%BUILDTYPE% /p:Configuration=Release /p:Platform="x64"^ +"MSBuild.exe" SubtitleEdit.sln /t:%BUILDTYPE% /p:Configuration=Release /p:Platform="Any CPU"^ /maxcpucount /consoleloggerparameters:DisableMPLogging;Summary;Verbosity=minimal IF %ERRORLEVEL% NEQ 0 GOTO EndWithError @@ -63,8 +56,7 @@ IF /I "%BUILDTYPE%" == "Clean" GOTO END CALL :SubDetectSevenzipPath IF DEFINED SEVENZIP_PATH IF EXIST "%SEVENZIP_PATH%" ( - CALL :SubZipFile x86 - CALL :SubZipFile x64 + CALL :SubZipFile ) CALL :SubDetectInnoSetup @@ -89,8 +81,8 @@ EXIT /B :SubZipFile -TITLE Creating the %~1 ZIP file... -PUSHD "src\bin\Release\%~1" +TITLE Creating the ZIP file... +PUSHD "src\bin\Release" IF EXIST "temp_zip" RD /S /Q "temp_zip" IF NOT EXIST "temp_zip" MD "temp_zip" IF NOT EXIST "temp_zip\Languages" MD "temp_zip\Languages" @@ -98,24 +90,25 @@ IF NOT EXIST "temp_zip\Tesseract" MD "temp_zip\Tesseract" IF NOT EXIST "temp_zip\Tesseract\tessdata" MD "temp_zip\Tesseract\tessdata" IF NOT EXIST "temp_zip\Tesseract\tessdata\configs" MD "temp_zip\Tesseract\tessdata\configs" -COPY /Y /V "..\..\..\..\gpl.txt" "temp_zip\" -COPY /Y /V "..\..\..\Changelog.txt" "temp_zip\" -COPY /Y /V "Interop.QuartzTypeLib.dll" "temp_zip\" -COPY /Y /V "Hunspell%~1.dll" "temp_zip\" -COPY /Y /V "SubtitleEdit.exe" "temp_zip\" -COPY /Y /V "Languages\*.xml" "temp_zip\Languages\" -COPY /Y /V "..\..\..\..\Tesseract\msvcp90.dll" "temp_zip\Tesseract\" -COPY /Y /V "..\..\..\..\Tesseract\msvcr90.dll" "temp_zip\Tesseract\" -COPY /Y /V "..\..\..\..\Tesseract\tesseract.exe" "temp_zip\Tesseract\" -COPY /Y /V "..\..\..\..\Tesseract\tessdata\configs\hocr" "temp_zip\Tesseract\tessdata\configs\" -COPY /Y /V "..\..\..\..\Tesseract\tessdata\eng.traineddata" "temp_zip\Tesseract\tessdata\" +COPY /Y /V "..\..\..\gpl.txt" "temp_zip\" +COPY /Y /V "..\..\Changelog.txt" "temp_zip\" +COPY /Y /V "Interop.QuartzTypeLib.dll" "temp_zip\" +COPY /Y /V "Hunspellx86.dll" "temp_zip\" +COPY /Y /V "Hunspellx64.dll" "temp_zip\" +COPY /Y /V "SubtitleEdit.exe" "temp_zip\" +COPY /Y /V "Languages\*.xml" "temp_zip\Languages\" +COPY /Y /V "..\..\..\Tesseract\msvcp90.dll" "temp_zip\Tesseract\" +COPY /Y /V "..\..\..\Tesseract\msvcr90.dll" "temp_zip\Tesseract\" +COPY /Y /V "..\..\..\Tesseract\tesseract.exe" "temp_zip\Tesseract\" +COPY /Y /V "..\..\..\Tesseract\tessdata\configs\hocr" "temp_zip\Tesseract\tessdata\configs\" +COPY /Y /V "..\..\..\Tesseract\tessdata\eng.traineddata" "temp_zip\Tesseract\tessdata\" PUSHD "temp_zip" -START "" /B /WAIT "%SEVENZIP_PATH%" a -tzip -mx=9 "SE%VERSION%.%~1.zip" * >NUL +START "" /B /WAIT "%SEVENZIP_PATH%" a -tzip -mx=9 "SE%VERSION%.zip" * >NUL IF %ERRORLEVEL% NEQ 0 GOTO EndWithError -MOVE /Y "SE%VERSION%.%~1.zip" "..\..\..\..\.." >NUL +MOVE /Y "SE%VERSION%.zip" "..\..\..\.." >NUL POPD IF EXIST "temp_zip" RD /S /Q "temp_zip" POPD diff --git a/installer/Subtitle_Edit_installer.iss b/installer/Subtitle_Edit_installer.iss index 7bf3891a8..d9d276857 100644 --- a/installer/Subtitle_Edit_installer.iss +++ b/installer/Subtitle_Edit_installer.iss @@ -48,8 +48,7 @@ #define VerBuild #define VerRevision -#define bindir "..\src\bin\Release\x86" -#define bindir_x64 "..\src\bin\Release\x64" +#define bindir "..\src\bin\Release" #ifnexist bindir + "\SubtitleEdit.exe" #error Compile Subtitle Edit first @@ -107,8 +106,6 @@ ShowLanguageDialog=yes DisableDirPage=auto DisableProgramGroupPage=auto CloseApplications=true -ArchitecturesAllowed=x86 x64 -ArchitecturesInstallIn64BitMode=x64 [Languages] @@ -199,8 +196,7 @@ Source: ..\Dictionaries\ru_RU_names_etc.xml; DestDir: {userappdata}\Subtit Source: ..\Dictionaries\ru_RU_user.xml; DestDir: {userappdata}\Subtitle Edit\Dictionaries; Flags: ignoreversion onlyifdoesntexist uninsneveruninstall; Components: main Source: ..\Dictionaries\rus_OCRFixReplaceList.xml; DestDir: {userappdata}\Subtitle Edit\Dictionaries; Flags: ignoreversion onlyifdoesntexist uninsneveruninstall; Components: main Source: ..\Dictionaries\swe_OCRFixReplaceList.xml; DestDir: {userappdata}\Subtitle Edit\Dictionaries; Flags: ignoreversion onlyifdoesntexist uninsneveruninstall; Components: main -Source: {#bindir_x64}\Hunspellx64.dll; DestDir: {app}; Flags: ignoreversion; Components: main; Check: Is64BitInstallMode() -Source: {#bindir}\Hunspellx86.dll; DestDir: {app}; Flags: ignoreversion; Components: main; Check: not Is64BitInstallMode() +Source: {#bindir}\Hunspellx86.dll; DestDir: {app}; Flags: ignoreversion; Components: main Source: {#bindir}\Icons\Find.png; DestDir: {app}\Icons; Flags: ignoreversion; Components: main Source: {#bindir}\Icons\Help.png; DestDir: {app}\Icons; Flags: ignoreversion; Components: main Source: {#bindir}\Icons\New.png; DestDir: {app}\Icons; Flags: ignoreversion; Components: main @@ -249,8 +245,7 @@ Source: {#bindir}\Languages\zh-CHS.xml; DestDir: {app}\Languages; Source: {#bindir}\Languages\zh-tw.xml; DestDir: {app}\Languages; Flags: ignoreversion; Components: translations #endif -Source: {#bindir_x64}\SubtitleEdit.exe; DestDir: {app}; Flags: ignoreversion; Components: main; Check: Is64BitInstallMode() -Source: {#bindir}\SubtitleEdit.exe; DestDir: {app}; Flags: ignoreversion; Components: main; Check: not Is64BitInstallMode() +Source: {#bindir}\SubtitleEdit.exe; DestDir: {app}; Flags: ignoreversion; Components: main Source: ..\src\Changelog.txt; DestDir: {app}; Flags: ignoreversion; Components: main Source: ..\gpl.txt; DestDir: {app}; Flags: ignoreversion; Components: main Source: ..\Tesseract\msvcp90.dll; DestDir: {app}\Tesseract; Flags: ignoreversion; Components: main @@ -348,15 +343,13 @@ Type: dirifempty; Name: {app}\Languages; Check: not IsComponentSe [Run] -Filename: {win}\Microsoft.NET\Framework\v4.0.30319\ngen.exe; Parameters: "install ""{app}\SubtitleEdit.exe"""; StatusMsg: {cm:msg_OptimizingPerformance}; Flags: runhidden runascurrentuser skipifdoesntexist; Check: not Is64BitInstallMode() -Filename: {win}\Microsoft.NET\Framework64\v4.0.30319\ngen.exe; Parameters: "install ""{app}\SubtitleEdit.exe"""; StatusMsg: {cm:msg_OptimizingPerformance}; Flags: runhidden runascurrentuser skipifdoesntexist; Check: Is64BitInstallMode() +Filename: {win}\Microsoft.NET\Framework\v4.0.30319\ngen.exe; Parameters: "install ""{app}\SubtitleEdit.exe"""; StatusMsg: {cm:msg_OptimizingPerformance}; Flags: runhidden runascurrentuser skipifdoesntexist Filename: {app}\SubtitleEdit.exe; Description: {cm:LaunchProgram,Subtitle Edit}; WorkingDir: {app}; Flags: nowait postinstall skipifsilent unchecked Filename: http://www.nikse.dk/SubtitleEdit/; Description: {cm:run_VisitWebsite}; Flags: nowait postinstall skipifsilent unchecked shellexec [UninstallRun] -Filename: {win}\Microsoft.NET\Framework\v4.0.30319\ngen.exe; Parameters: "uninstall ""{app}\SubtitleEdit.exe"""; Flags: runhidden runascurrentuser skipifdoesntexist; Check: not Is64BitInstallMode() -Filename: {win}\Microsoft.NET\Framework64\v4.0.30319\ngen.exe; Parameters: "uninstall ""{app}\SubtitleEdit.exe"""; Flags: runhidden runascurrentuser skipifdoesntexist; Check: Is64BitInstallMode() +Filename: {win}\Microsoft.NET\Framework\v4.0.30319\ngen.exe; Parameters: "uninstall ""{app}\SubtitleEdit.exe"""; Flags: runhidden runascurrentuser skipifdoesntexist [Code] @@ -426,40 +419,6 @@ begin end; -// Function to retrieve old version's uninstall string and uninstall it -// Note that we only care for the 32-bit version on 64-bit Windows -function UninstallOldVer(): Integer; -var - sUnInstallString: String; - iResultCode: Integer; -begin - // Return Values: - // 0 - no idea - // 1 - can't find the registry key (probably no previous version installed) - // 2 - uninstall string is empty - // 3 - error executing the UnInstallString - // 4 - successfully executed the UnInstallString - - // default return value - Result := 0; - - sUnInstallString := ''; - - // get the uninstall string of the old app - if RegQueryStringValue(HKLM32, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SubtitleEdit_is1', 'UninstallString', sUnInstallString) then begin - if sUnInstallString <> '' then begin - sUnInstallString := RemoveQuotes(sUnInstallString); - if Exec(sUnInstallString, '/SILENT /VERYSILENT /NORESTART /SUPPRESSMSGBOXES', '', SW_HIDE, ewWaitUntilTerminated, iResultCode) then - Result := 4 - else - Result := 3; - end else - Result := 2; - end else - Result := 1; -end; - - function ShouldSkipPage(PageID: Integer): Boolean; begin // Hide the license page @@ -528,13 +487,6 @@ begin end else begin Result := True; - - if IsWin64 then begin - // We need to uninstall the old version before we create the installer's mutex - // otherwise UninstallOldVer's `Exec` will fail for obvious reasons... - UninstallOldVer(); - end; - CreateMutex(installer_mutex); diff --git a/src/SubtitleEdit.csproj b/src/SubtitleEdit.csproj index 777c025c6..7b403cc57 100644 --- a/src/SubtitleEdit.csproj +++ b/src/SubtitleEdit.csproj @@ -2,7 +2,7 @@ Debug - x86 + AnyCPU 9.0.21022 2.0 {511A5B59-1C35-4719-8536-23B19AF9B21A} @@ -41,11 +41,11 @@ true Client - + true full false - bin\Debug\x86\ + bin\Debug\ TRACE;DEBUG prompt 4 @@ -53,10 +53,10 @@ x86 Off - + pdbonly true - bin\Release\x86\ + bin\Release\ TRACE prompt 4 @@ -65,32 +65,6 @@ true Off - - true - bin\Debug\x64\ - TRACE;DEBUG - true - full - x64 - bin\Debug\SubtitleEdit.exe.CodeAnalysisLog.xml - true - GlobalSuppressions.cs - Off - prompt - - - bin\Release\x64\ - TRACE - true - true - pdbonly - x64 - bin\Release\SubtitleEdit.exe.CodeAnalysisLog.xml - true - GlobalSuppressions.cs - Off - prompt - False @@ -1905,8 +1879,10 @@ "$(ProjectDir)..\update_rev.bat" - COPY /Y /V "$(ProjectDir)Dlls\Hunspell$(PlatformName).dll" "$(TargetDir)" -COPY /Y /V "$(ProjectDir)Dlls\Interop.QuartzTypeLib.dll" "$(TargetDir)" + COPY /Y /V "$(ProjectDir)Dlls\Hunspellx86.dll" "$(TargetDir)" +COPY /Y /V "$(ProjectDir)Dlls\Hunspellx64.dll" "$(TargetDir)" +COPY /Y /V "$(ProjectDir)Dlls\Interop.QuartzTypeLib.dll" "$(TargetDir)" +