mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Add CI steps to build and bundle wix dll
This commit is contained in:
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@@ -44,11 +44,11 @@ jobs:
|
||||
target\i686-win7-windows-msvc\release\*.exe
|
||||
target\i686-win7-windows-msvc\release\*.pdb
|
||||
- name: Build Rust (x86)
|
||||
run: cargo +nightly build --target i686-win7-windows-msvc -Z build-std="core,alloc,std,panic_abort" --release -p velopack_nodeffi -p velopack_libc
|
||||
run: cargo +nightly build --target i686-win7-windows-msvc -Z build-std="core,alloc,std,panic_abort" --release -p velopack_nodeffi -p velopack_libc -p velopack_wix
|
||||
- name: Build Rust (x64)
|
||||
run: cargo +nightly build --target x86_64-win7-windows-msvc -Z build-std="core,alloc,std,panic_abort" --release -p velopack_nodeffi -p velopack_libc
|
||||
run: cargo +nightly build --target x86_64-win7-windows-msvc -Z build-std="core,alloc,std,panic_abort" --release -p velopack_nodeffi -p velopack_libc -p velopack_wix
|
||||
- name: Build Rust (arm64)
|
||||
run: cargo +nightly build --target aarch64-pc-windows-msvc --release -p velopack_nodeffi -p velopack_libc
|
||||
run: cargo +nightly build --target aarch64-pc-windows-msvc --release -p velopack_nodeffi -p velopack_libc -p velopack_wix
|
||||
- name: Collect Artifacts
|
||||
run: |
|
||||
move target\i686-win7-windows-msvc\release\velopack_nodeffi.dll target\velopack_nodeffi_win_x86_msvc.node
|
||||
@@ -66,6 +66,10 @@ jobs:
|
||||
move target\i686-win7-windows-msvc\release\velopack_libc.lib target\velopack_libc_win_x86_msvc.lib
|
||||
move target\x86_64-win7-windows-msvc\release\velopack_libc.lib target\velopack_libc_win_x64_msvc.lib
|
||||
move target\aarch64-pc-windows-msvc\release\velopack_libc.lib target\velopack_libc_win_arm64_msvc.lib
|
||||
|
||||
move target\i686-win7-windows-msvc\release\velopack_wix.dll target\velopack_wix_x86.dll
|
||||
move target\x86_64-win7-windows-msvc\release\velopack_wix.dll target\velopack_wix_x64.dll
|
||||
move target\aarch64-pc-windows-msvc\release\velopack_wix.dll target\velopack_wix_arm64.dll
|
||||
- name: Upload Rust Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
<None Include="$(MSBuildThisFileDirectory)..\target\release\UpdateMac" Pack="true" PackagePath="vendor" />
|
||||
<None Include="$(MSBuildThisFileDirectory)..\target\release\UpdateNix_x64" Pack="true" PackagePath="vendor" />
|
||||
<None Include="$(MSBuildThisFileDirectory)..\target\release\UpdateNix_arm64" Pack="true" PackagePath="vendor" />
|
||||
<None Include="$(MSBuildThisFileDirectory)..\target\release\velopack_wix_x86.dll" Pack="true" PackagePath="vendor" />
|
||||
<None Include="$(MSBuildThisFileDirectory)..\target\release\velopack_wix_x64.dll" Pack="true" PackagePath="vendor" />
|
||||
<None Include="$(MSBuildThisFileDirectory)..\target\release\velopack_wix_arm64.dll" Pack="true" PackagePath="vendor" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
|
||||
@@ -85,13 +85,6 @@
|
||||
|
||||
<Files Include="{{SourceDirectoryPath}}\**"/>
|
||||
|
||||
<!-- <CustomAction Id="RemoveAppDirectory" Directory="INSTALLFOLDER" Impersonate="no"-->
|
||||
<!-- ExeCommand="cmd.exe /C rmdir /S /Q "[INSTALLFOLDER]"" Execute="deferred" Return="ignore"/>-->
|
||||
<!-- <CustomAction Id="RemoveTempDirectory" Directory="TempFolder" Impersonate="yes"-->
|
||||
<!-- ExeCommand="cmd.exe /C rmdir /S /Q "%TEMP%\velopack_{{AppId}}"" Execute="deferred" Return="ignore"/>-->
|
||||
<!-- <CustomAction Id="LaunchApplication" Directory="INSTALLFOLDER" Impersonate="yes"-->
|
||||
<!-- ExeCommand=""[INSTALLFOLDER]{{StubFileName}}"" Execute="immediate" Return="ignore"/>-->
|
||||
|
||||
<!-- Add our custom Rust module for custom actions -->
|
||||
<Binary Id="RustDll" SourceFile="{{RustNativeModulePath}}"/>
|
||||
<Property Id="RustAppId" Value="{{AppTitle}}"/>
|
||||
|
||||
@@ -36,6 +36,21 @@ public static class HelperFile
|
||||
throw new PlatformNotSupportedException($"Update binary is not available for this platform ({target}).");
|
||||
}
|
||||
|
||||
public static string GetWixNativeModulePath(RID target)
|
||||
{
|
||||
#if DEBUG
|
||||
return FindHelperFile("velopack_wix.dll");
|
||||
#else
|
||||
return target.Architecture switch {
|
||||
RuntimeCpu.x86 => FindHelperFile("velopack_wix_x86.dll"),
|
||||
RuntimeCpu.x64 => FindHelperFile("velopack_wix_x64.dll"),
|
||||
RuntimeCpu.arm64 => FindHelperFile("velopack_wix_arm64.dll"),
|
||||
_ => throw new PlatformNotSupportedException($"Wix binary is not available for this platform ({target}).")
|
||||
};
|
||||
#endif
|
||||
// return @"C:\Source\velopack\target\debug\velopack_wix.dll";
|
||||
}
|
||||
|
||||
public static string GetUpdatePath(RID target, ILogger log) => FindHelperFile(GetUpdateExeName(target, log));
|
||||
|
||||
public static string GetZstdPath()
|
||||
@@ -76,10 +91,8 @@ public static class HelperFile
|
||||
[SupportedOSPlatform("windows")]
|
||||
public const string WixVersion = "5.0.2";
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static string WixAssetsTopBanner => FindHelperFile("wix\\assets\\top-banner.bmp");
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static string WixAssetsDialogBackground => FindHelperFile("wix\\assets\\dialog-background.bmp");
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
|
||||
Reference in New Issue
Block a user