mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-20 14:23:08 +01:00
Create segment data for x64 builds
This commit is contained in:
@@ -14,14 +14,15 @@
|
||||
!if "${PLATFORM}" == "Win32"
|
||||
!define OPENRCT2_EXE "openrct2.exe"
|
||||
!define OPENRCT2_DLL "openrct2.dll"
|
||||
!define APPBITS 32
|
||||
!define APPARCH "win32"
|
||||
!define APPBITS 32
|
||||
!define APPARCH "win32"
|
||||
|
||||
InstallDir "$PROGRAMFILES32\OpenRCT2\"
|
||||
!else
|
||||
!define OPENRCT2_EXE "openrct2_x64.exe"
|
||||
!define APPBITS 64
|
||||
!define APPARCH "win64"
|
||||
!define OPENRCT2_EXE "openrct2_x64.exe"
|
||||
!define OPENRCT2_SEGMENT_INFO "openrct2_data"
|
||||
!define APPBITS 64
|
||||
!define APPARCH "win64"
|
||||
|
||||
InstallDir "$PROGRAMFILES64\OpenRCT2\"
|
||||
!endif
|
||||
@@ -159,6 +160,9 @@ Section "!OpenRCT2" Section1
|
||||
!ifdef OPENRCT2_DLL
|
||||
File /oname=${OPENRCT2_DLL} ${BINARY_DIR}\${OPENRCT2_DLL}
|
||||
!endif
|
||||
!ifdef OPENRCT2_SEGMENT_INFO
|
||||
File /oname=${OPENRCT2_SEGMENT_INFO} ${BINARY_DIR}\${OPENRCT2_SEGMENT_INFO}
|
||||
!endif
|
||||
|
||||
; Create the Registry Entries
|
||||
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenRCT2" "Comments" "Visit ${APPURLLINK}"
|
||||
@@ -228,6 +232,9 @@ Section "Uninstall"
|
||||
Delete "$INSTDIR\${OPENRCT2_EXE}"
|
||||
!ifdef OPENRCT2_DLL
|
||||
Delete "$INSTDIR\${OPENRCT2_DLL}"
|
||||
!endif
|
||||
!ifdef OPENRCT2_SEGMENT_INFO
|
||||
Delete "$INSTDIR\${OPENRCT2_SEGMENT_INFO}"
|
||||
!endif
|
||||
Delete "$INSTDIR\INSTALL.LOG"
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<OutputDll Condition="'$(Platform)'=='Win32'">$(TargetDir)openrct2.dll</OutputDll>
|
||||
<OutputExe Condition="'$(Platform)'=='Win32'">$(TargetDir)openrct2.exe</OutputExe>
|
||||
<OutputExe Condition="'$(Platform)'=='x64'">$(TargetPath)</OutputExe>
|
||||
<OutputSegmentInfo Condition="'$(Platform)'=='x64'">$(TargetDir)openrct2_data</OutputSegmentInfo>
|
||||
<g2Output>$(TargetDir)data\g2.dat</g2Output>
|
||||
|
||||
<SignCertificate Condition="'$(SignCertificate)'==''">$(DistDir)windows\code-sign-key-openrct2.org.pfx</SignCertificate>
|
||||
@@ -75,6 +76,7 @@
|
||||
<ItemGroup Label="Publish Items">
|
||||
<PublishItems Include="$(OutputExe)" />
|
||||
<PublishItems Include="$(OutputDll)" Condition="'$(Platform)'=='Win32'" />
|
||||
<PublishItems Include="$(OutputSegmentInfo)" Condition="'$(Platform)'=='x64'" />
|
||||
<PublishItems Include="$(TargetDir)data" />
|
||||
<PublishItems Include="$(RootDir)curl-ca-bundle.crt" />
|
||||
<PublishItems Include="$(DistDir)changelog.txt" />
|
||||
@@ -132,7 +134,8 @@
|
||||
</Target>
|
||||
|
||||
<Target Name="BeforeClean">
|
||||
<Delete Condition="'$(Platform)'=='Win32'" Files="$(TargetDir)openrct2.exe" />
|
||||
<Delete Condition="'$(Platform)'=='Win32'" Files="$(OutputExe)" />
|
||||
<Delete Condition="'$(Platform)'=='x64'" Files="$(OutputSegmentInfo)" />
|
||||
<Delete Files="$(TargetDir)curl-ca-bundle.crt" />
|
||||
<Delete Files="$(g2Output)" />
|
||||
<Delete Files="$(PublishZip)" />
|
||||
@@ -156,6 +159,23 @@
|
||||
<Copy SourceFiles="@(DataItems)" DestinationFolder="$(TargetDir)data\%(RecursiveDir)" SkipUnchangedFiles="true" />
|
||||
</Target>
|
||||
|
||||
<!-- Target to create the segment information x64 builds currently require -->
|
||||
<Target Name="CreateRCT2SegmentInfo"
|
||||
AfterTargets="Build"
|
||||
Inputs="$(RootDir)openrct2.exe"
|
||||
Outputs="$(OutputSegmentInfo)"
|
||||
Condition="'$(Platform)'=='x64'">
|
||||
<Exec Command="dd if=$(RootDir)openrct2.exe of=$(OutputSegmentInfo) bs=4096 skip=1188 count=318"
|
||||
StandardOutputImportance="normal"
|
||||
StandardErrorImportance="normal" />
|
||||
<Exec Command="dd if=/dev/zero of=$(OutputSegmentInfo) bs=4096 seek=318 count=2630 conv=notrunc"
|
||||
StandardOutputImportance="normal"
|
||||
StandardErrorImportance="normal" />
|
||||
<Exec Command="dd if=$(RootDir)openrct2.exe of=$(OutputSegmentInfo) bs=4096 skip=1506 seek=2948 count=1 conv=notrunc"
|
||||
StandardOutputImportance="normal"
|
||||
StandardErrorImportance="normal" />
|
||||
</Target>
|
||||
|
||||
<!-- Target to build g2.dat containing OpenRCT2 sprites -->
|
||||
<Target Name="g2" DependsOnTargets="Build" AfterTargets="Build" Inputs="@(g2Inputs)" Outputs="$(g2Output)">
|
||||
<Message Text="Building g2.dat..." />
|
||||
|
||||
Reference in New Issue
Block a user