Jelajahi Sumber

Add a build group to the .groupproj to define which targets sould be build per project. This keeps compile-msbuild.bat simple. Switch to 64-bit build for ISHelpGen at same time.

Hopefully it will also work in the GitHub runner 🤞
Martijn Laan 1 Minggu lalu
induk
melakukan
8381221a67
4 mengubah file dengan 68 tambahan dan 18 penghapusan
  1. 4 4
      ISHelp/ISHelpGen/compile.bat
  2. 56 0
      Projects/Projects.groupproj
  3. 2 2
      build-ce.bat
  4. 6 12
      compile-msbuild.bat

+ 4 - 4
ISHelp/ISHelpGen/compile.bat

@@ -22,7 +22,7 @@ set DELPHIXEROOT=
 call .\compilesettings.bat
 if "%DELPHIXEROOT%"=="" goto compilesettingserror
 
-set DELPHIXELIB_WIN32=%DELPHIXEROOT%\lib\win32\release
+set DELPHIXELIB_WIN64=%DELPHIXEROOT%\lib\win64\release
 
 rem -------------------------------------------------------------------------
 
@@ -31,11 +31,11 @@ set DELPHIXEDISABLEDWARNINGS=-W-SYMBOL_DEPRECATED -W-SYMBOL_PLATFORM -W-UNSAFE_C
 set FLAGS=--no-config -Q -B -$L- -$C- -H -W -$T+ %DELPHIXEDISABLEDWARNINGS% %1
 set FLAGSCONSOLE=%FLAGS% -CC
 set NAMESPACES=System;System.Win;Winapi
-set DCUDIR_WIN32=Dcu\Win32\Release
+set DCUDIR_WIN64=Dcu\x64\Release
 
 echo Compiling ISHelpGen.exe:
-mkdir %DCUDIR_WIN32%\ISHelpGen.dpr 2>nul
-"%DELPHIXEROOT%\bin\dcc32.exe" %FLAGSCONSOLE% -NS%NAMESPACES% -U"%DELPHIXELIB_WIN32%" -NU%DCUDIR_WIN32%\ISHelpGen.dpr ISHelpGen.dpr
+mkdir %DCUDIR_WIN64%\ISHelpGen.dpr 2>nul
+"%DELPHIXEROOT%\bin\dcc64.exe" %FLAGSCONSOLE% -NS%NAMESPACES% -U"%DELPHIXELIB_WIN64%" -NU%DCUDIR_WIN64%\ISHelpGen.dpr ISHelpGen.dpr
 if errorlevel 1 goto failed
 
 echo Success!

+ 56 - 0
Projects/Projects.groupproj

@@ -129,4 +129,60 @@
         <CallTarget Targets="Compil32:Make;ISCC:Make;ISCmplr:Make;ISPP:Make;Setup:Make;SetupCustomStyle:Make;SetupLdr:Make;ISSigTool:Make;ISHelpGen:Make"/>
     </Target>
     <Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
+    <ItemGroup Condition="'$(BuildGroup)'=='Release'">
+        <BuildGroupProject Include="Compil32.dproj">
+            <ProjectGuid>{AA47247E-6E7B-4A22-8740-FB9041C2F93B}</ProjectGuid>
+            <Configurations>Release</Configurations>
+            <Platforms>Win32</Platforms>
+            <Enabled>True</Enabled>
+        </BuildGroupProject>
+        <BuildGroupProject Include="ISCmplr.dproj">
+            <ProjectGuid>{25CA0A66-07DC-4224-9252-EBFFA7D81558}</ProjectGuid>
+            <Configurations>Release</Configurations>
+            <Platforms>Win32</Platforms>
+            <Enabled>True</Enabled>
+        </BuildGroupProject>
+        <BuildGroupProject Include="SetupLdr.dproj">
+            <ProjectGuid>{4259E59E-2263-4FE8-8E6C-BFCBC7A6C66D}</ProjectGuid>
+            <Configurations>Release</Configurations>
+            <Platforms>Win32;Win64</Platforms>
+            <Enabled>True</Enabled>
+        </BuildGroupProject>
+        <BuildGroupProject Include="Setup.dproj">
+            <ProjectGuid>{BB7C6F6A-AC62-46BB-A790-0CF4A74B649E}</ProjectGuid>
+            <Configurations>Release</Configurations>
+            <Platforms>Win32</Platforms>
+            <Enabled>True</Enabled>
+        </BuildGroupProject>
+        <BuildGroupProject Include="ISSigTool.dproj">
+            <ProjectGuid>{484EE7D9-65D0-44DA-B807-9FC874733A64}</ProjectGuid>
+            <Configurations>Release</Configurations>
+            <Platforms>Win32</Platforms>
+            <Enabled>True</Enabled>
+        </BuildGroupProject>
+        <BuildGroupProject Include="ISPP.dproj">
+            <ProjectGuid>{7BEFDB9E-3F9B-4206-BAC1-B332E573D3F8}</ProjectGuid>
+            <Configurations>Release</Configurations>
+            <Platforms>Win32</Platforms>
+            <Enabled>True</Enabled>
+        </BuildGroupProject>
+        <BuildGroupProject Include="SetupCustomStyle.dproj">
+            <ProjectGuid>{F15ECAFB-E2DE-42BA-A3E6-7F9C0F24F560}</ProjectGuid>
+            <Configurations>Release</Configurations>
+            <Platforms>Win32</Platforms>
+            <Enabled>True</Enabled>
+        </BuildGroupProject>
+        <BuildGroupProject Include="ISCC.dproj">
+            <ProjectGuid>{CB865E8F-FE9C-46FD-90B0-AB3BDBD1C906}</ProjectGuid>
+            <Configurations>Release</Configurations>
+            <Platforms>Win32</Platforms>
+            <Enabled>True</Enabled>
+        </BuildGroupProject>
+        <BuildGroupProject Include="..\ISHelp\ISHelpGen\ISHelpGen.dproj">
+            <ProjectGuid>{058C4E22-A1B3-4C10-9062-05B58D9E9747}</ProjectGuid>
+            <Configurations>Release</Configurations>
+            <Platforms>Win64</Platforms>
+            <Enabled>True</Enabled>
+        </BuildGroupProject>
+    </ItemGroup>
 </Project>

+ 2 - 2
build-ce.bat

@@ -67,8 +67,8 @@ call :deletefile files\issigtool.exe
 call :deletefile ishelp\ishelpgen\ishelpgen.exe
 
 echo Clearing compilation output done
-echo Now open Projects\Projects.groupproj and build all projects and their Win32 targets in Release mode
-echo After that also build the SetupLdr project and its Win64 target in Release mode
+echo Now open Projects\Projects.groupproj and build the Release build group
+echo You can open the Build Groups pane from the Projects tool window
 
 echo - Waiting for files...
 call :waitforfile files\compil32.exe

+ 6 - 12
compile-msbuild.bat

@@ -33,22 +33,16 @@ cd Projects
 if errorlevel 1 goto failed
 
 if "%1"=="issigtool" (
-  set PROJ=ISSigTool.dproj
+  echo - ISSigTool.exe
+  msbuild.exe ISSigTool.dproj /t:Build /p:Config=Release;Platform=Win32;EnvOptionsWarn=false /nologo
 ) else (
-  if not "%1"=="" goto failed
-  set PROJ=Projects.groupproj
+  echo - Projects.groupproj
+  rem This emits warning MSB4056, but that's ok since the build doesn't use COM
+  rem Modern MSBuild supports /noWarn:MSB4056, but the version targeted by Delphi 12.3's rsvars.bat does not
+  msbuild.exe Projects.groupproj /t:Build /p:BuildGroup=Release;EnvOptionsWarn=false /nologo
 )
-
-echo - %PROJ%
-msbuild.exe %PROJ% /t:Build /p:Config=Release;Platform=Win32;EnvOptionsWarn=false /nologo
 if errorlevel 1 goto failed
 
-if not "%1"=="issigtool" (
-  echo - SetupLdr.e64
-  msbuild.exe SetupLdr.dproj /t:Build /p:Config=Release;Platform=Win64;EnvOptionsWarn=false /nologo
-  if errorlevel 1 goto failed
-)
-
 cd ..
 if errorlevel 1 goto failed