Skip to content

Commit

Permalink
Setup: Revised the method for bundling files in the setup binary.
Browse files Browse the repository at this point in the history
Now with preserved file names, compression, and encryption.
  • Loading branch information
Amrsatrio committed Jul 23, 2024
1 parent 1fcd7d7 commit 30579b0
Show file tree
Hide file tree
Showing 12 changed files with 1,931 additions and 248 deletions.
25 changes: 5 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ jobs:
run: |
nuget restore ExplorerPatcher.sln
- name: Setup dependency projects
shell: cmd
run: |
GenerateDependencyProjects.bat
# - name: Download ep_taskbar
# uses: robinraju/release-downloader@v1
# with:
Expand Down Expand Up @@ -113,26 +118,6 @@ jobs:
# done
# fi

- name: Build funchook amd64
shell: powershell
run: |
cd libs/funchook
md build
cd build
cmake -G "Visual Studio 17 2022" -A x64 -DFUNCHOOK_CPU=x86 ..
(gc .\funchook-static.vcxproj) -replace '<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>', '<RuntimeLibrary>MultiThreaded</RuntimeLibrary>' | Out-File .\funchook-static.vcxproj
cmake --build . --config Release
- name: Build funchook arm64
shell: powershell
run: |
cd libs/funchook
md build-arm64
cd build-arm64
cmake -G "Visual Studio 17 2022" -A ARM64 -DFUNCHOOK_CPU=arm64 -DFUNCHOOK_DISASM=capstone -DFUNCHOOK_BUILD_TESTS=OFF ..
(gc .\funchook-static.vcxproj) -replace '<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>', '<RuntimeLibrary>MultiThreaded</RuntimeLibrary>' | Out-File .\funchook-static.vcxproj
cmake --build . --config Release
- name: Build EP IA-32
if: github.event.inputs.config == ''
working-directory: ${{env.GITHUB_WORKSPACE}}
Expand Down
11 changes: 8 additions & 3 deletions ExplorerPatcher/ExplorerPatcher.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)libs\funchook\build\Release\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<DelayLoadDLLs>Winmm.dll</DelayLoadDLLs>
</Link>
</ItemDefinitionGroup>
Expand Down Expand Up @@ -173,7 +172,7 @@
<CallingConvention>Cdecl</CallingConvention>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(SolutionDir)libs\funchook\build\Release\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(SolutionDir)libs\funchook\build-$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)'=='ARM64'">
Expand All @@ -182,7 +181,7 @@
<CallingConvention>Cdecl</CallingConvention>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(SolutionDir)libs\funchook\build-arm64\Release\;$(SolutionDir)libs\funchook\build-arm64\_deps\capstone-build\Release\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(SolutionDir)libs\funchook\build-$(Platform)\$(Configuration)\;$(SolutionDir)libs\funchook\build-arm64\_deps\capstone-build\Release\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)'=='ARM64EC'">
Expand Down Expand Up @@ -308,6 +307,9 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="..\GenerateDependencyProjects.bat" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\Microsoft.Windows.ImplementationLibrary.1.0.230824.2\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\packages\Microsoft.Windows.ImplementationLibrary.1.0.230824.2\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
Expand All @@ -318,4 +320,7 @@
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Windows.ImplementationLibrary.1.0.230824.2\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.ImplementationLibrary.1.0.230824.2\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
</Target>
<Target Name="BuildDependencies" BeforeTargets="PrepareForBuild">
<Exec Command="cmake --build . --config $(Configuration)" WorkingDirectory="$(SolutionDir)libs\funchook\build-$(Platform)" Condition="'$(WithMainPatcher)'=='true'" />
</Target>
</Project>
10 changes: 10 additions & 0 deletions GenerateDependencyProjects.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
rmdir /s /q libs\funchook\build
rmdir /s /q libs\funchook\build-x64
rmdir /s /q libs\funchook\build-arm64
rmdir /s /q libs\zlib\build-x64
rmdir /s /q libs\zlib\build-arm64

cmake libs/funchook -Blibs/funchook/build-x64 -G "Visual Studio 17 2022" -A x64 -D"CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DFUNCHOOK_CPU=x86 -DFUNCHOOK_BUILD_TESTS=OFF
cmake libs/funchook -Blibs/funchook/build-arm64 -G "Visual Studio 17 2022" -A ARM64 -D"CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DFUNCHOOK_CPU=arm64 -DFUNCHOOK_DISASM=capstone -DFUNCHOOK_BUILD_TESTS=OFF
cmake libs/zlib -Blibs/zlib/build-x64 -G "Visual Studio 17 2022" -A x64 -D"CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW
cmake libs/zlib -Blibs/zlib/build-arm64 -G "Visual Studio 17 2022" -A ARM64 -D"CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW
7 changes: 5 additions & 2 deletions ep_gui/ep_gui.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
<Link>
<AdditionalLibraryDirectories>$(SolutionDir)libs\funchook\build\Release\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(SolutionDir)libs\funchook\build-x64\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)'=='ARM64'">
<Link>
<AdditionalLibraryDirectories>$(SolutionDir)libs\funchook\build-arm64\Release\;$(SolutionDir)libs\funchook\build-arm64\_deps\capstone-build\Release\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(SolutionDir)libs\funchook\build-arm64\$(Configuration)\;$(SolutionDir)libs\funchook\build-arm64\_deps\capstone-build\Release\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down Expand Up @@ -168,4 +168,7 @@
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
</Target>
<Target Name="BuildDependencies" BeforeTargets="PrepareForBuild">
<Exec Command="cmake --build . --config $(Configuration)" WorkingDirectory="$(SolutionDir)libs\funchook\build-$(Platform)" />
</Target>
</Project>
Loading

0 comments on commit 30579b0

Please sign in to comment.