From f096b967414effae1afa72f44ccf898d4383688d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20B=C3=BCchel?= Date: Tue, 27 Aug 2024 17:46:25 +0200 Subject: [PATCH] SEBWIN-925: Reintegrated Themida. --- Setup/Setup.wixproj | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Setup/Setup.wixproj b/Setup/Setup.wixproj index b2df75cf..9b7cf3f3 100644 --- a/Setup/Setup.wixproj +++ b/Setup/Setup.wixproj @@ -140,6 +140,32 @@ git -C $(SolutionDir) checkout -- Setup/Components/Service.wxs setlocal enabledelayedexpansion +set executable="$(SolutionDir)SafeExamBrowser.Runtime\bin\$(PlatformName)\$(ConfigurationName)\SafeExamBrowser.exe" +set parameters=/protect "C:\SEB\SafeExamBrowser.tmd" /inputfile %25executable%25 /outputfile %25executable%25 + +if not defined APPVEYOR ( + set parameters=/shareconsole %25parameters%25 +) + +if exist "C:\SEB\Themida" ( + if $(PlatformName) == x86 ( + C:\SEB\Themida\Themida.exe %25parameters%25 + ) else ( + C:\SEB\Themida\Themida64.exe %25parameters%25 + ) + + if defined APPVEYOR ( + if %25ERRORLEVEL%25 equ 0 ( + echo Themida successfully executed. + ) else ( + echo ERROR: Themida failed with error code %25ERRORLEVEL%25! + ) + ) + + DEL %25executable%25.bak +) else ( + echo WARNING: Themida not executed! +) set binaries= FOR /F %25%25G IN (%27dir "$(SolutionDir)SafeExamBrowser.Runtime\bin\$(PlatformName)\$(ConfigurationName)\%2a.exe" "$(SolutionDir)SafeExamBrowser.Runtime\bin\$(PlatformName)\$(ConfigurationName)\%2a.dll" /s /b%27) DO set binaries=!binaries! %25%25G