66. DESCRIPTION
77 Without -PublishDir the app is published first (Release, self-contained, -p:FileeRelease=true) into
88 publish/win-x64, together with the Windows 11 Explorer menu extension (build-explorer-menu.ps1), the bundled
9- small engines rhwp and 7-Zip and the Microsoft C++ runtime DLLs next to rhwp.exe and Filee.exe
10- (fetch-engines.ps1); the large engines are downloaded by the app (engines.json).
9+ small engines rhwp and 7-Zip and the Microsoft C++ runtime DLLs next to rhwp.exe (fetch-engines.ps1); the large
10+ engines are downloaded by the app (engines.json).
1111
1212 Setup itself (src/Filee.Setup) is published as one self-contained, trimmed program (no .NET needed on the PC);
1313 build/tools/make-setup.cs appends the publish folder to it as an LZMA payload with a SHA-256 manifest, and the
1616
1717. PARAMETER Runtime
1818 win-x64 (default) or win-arm64. The ARM64 build (Filee-<version>-win-arm64-Setup.exe and -Portable.zip) has an ARM64
19- Setup, Explorer menu DLL, rhwp, 7-Zip and Unhwp library (fetch-engines.ps1 -Runtime win-arm64, which fails while
20- the ARM64 rhwp and Unhwp builds are not pinned yet). They link the C runtime statically: no Microsoft C++ runtime
21- DLLs are copied.
19+ Setup, Explorer menu DLL, rhwp and 7-Zip (fetch-engines.ps1 -Runtime win-arm64, which fails while the ARM64 rhwp
20+ build is not pinned yet). It links the C runtime statically: no Microsoft C++ runtime DLLs are copied.
2221
2322. PARAMETER CertificateThumbprint
2423 Signs the release (build/sign-windows.ps1): the programs in the publish folder that come unsigned, the Setup
@@ -79,22 +78,15 @@ if ($CheckOnly) {
7978elseif (-not $PublishDir ) {
8079 $PublishDir = Join-Path $root " publish\$Runtime "
8180 Remove-Item $PublishDir - Recurse - Force - ErrorAction SilentlyContinue
82- # Unhwp's package has no win-arm64 library: the pinned ARM64 build goes next to Filee.exe through the build.
83- $native = @ ()
84- if ($Runtime -eq ' win-arm64' ) {
85- $natives = Join-Path $cache ' win-arm64-native'
86- & (Join-Path $PSScriptRoot ' fetch-engines.ps1' ) - Runtime $Runtime - Only unhwp - Destination $natives
87- $native = @ (" -p:UnhwpNativeLibrary=$ ( Join-Path $natives ' unhwp\unhwp.dll' ) " )
88- }
8981 Invoke-Checked ' dotnet publish' {
9082 dotnet publish (Join-Path $root ' src\Filee.App\Filee.App.csproj' ) - c Release - r $Runtime -- self- contained `
91- " -p:Version=$Version " - p:PublishReadyToRun= true - p:FileeRelease= true @native - o $PublishDir
83+ " -p:Version=$Version " - p:PublishReadyToRun= true - p:FileeRelease= true - o $PublishDir
9284 }
9385 # The command line, in the same folder so it shares the runtime and the engines (filee-cli.exe). Its name can't
9486 # be filee.exe next to Filee.exe, so the "filee" command is cli\filee.cmd, which Setup can put on PATH.
9587 Invoke-Checked ' dotnet publish (cli)' {
9688 dotnet publish (Join-Path $root ' src\Filee.Cli\Filee.Cli.csproj' ) - c Release - r $Runtime -- self- contained `
97- " -p:Version=$Version " - p:PublishReadyToRun= true - p:FileeRelease= true @native - o $PublishDir
89+ " -p:Version=$Version " - p:PublishReadyToRun= true - p:FileeRelease= true - o $PublishDir
9890 }
9991 # Native debug symbols from NuGet packages (libSkiaSharp.pdb, libHarfBuzzSharp.pdb: ~105 MB) are useless to users.
10092 # Filee.App's publish removes them, but publishing the command line into the same folder brings them back.
@@ -105,18 +97,16 @@ elseif (-not $PublishDir) {
10597 $architecture = $Runtime.Substring (4 )
10698 & (Join-Path $PSScriptRoot ' build-explorer-menu.ps1' ) - Destination $PublishDir - Version $Version - Architecture $architecture
10799 # Only the small rhwp and 7-Zip are bundled; the app downloads the others when the user picks them. The Microsoft
108- # C++ runtime goes next to rhwp.exe and next to Filee.exe (unhwp.dll imports VCRUNTIME140.dll), so neither needs
109- # the Visual C++ Redistributable (#248). The ARM64 builds need none.
110- $runtimeTo = @ {}
111- if ($Runtime -eq ' win-x64' ) { $runtimeTo = @ { RuntimeTo = $PublishDir } }
112- & (Join-Path $PSScriptRoot ' fetch-engines.ps1' ) - Runtime $Runtime - Only rhwp, 7zip - Destination (Join-Path $PublishDir ' engines' ) @runtimeTo
100+ # C++ runtime goes next to rhwp.exe, so it doesn't need the Visual C++ Redistributable (#248). Nothing loaded into
101+ # Filee.exe imports it. The ARM64 builds need none.
102+ & (Join-Path $PSScriptRoot ' fetch-engines.ps1' ) - Runtime $Runtime - Only rhwp, 7zip - Destination (Join-Path $PublishDir ' engines' )
113103}
114104$PublishDir = (Resolve-Path $PublishDir ).Path
115105if (-not (Test-Path (Join-Path $PublishDir ' Filee.exe' ))) { throw " Filee.exe is missing in $PublishDir " }
116106if (-not $CheckOnly ) {
117- # Without them rhwp and unhwp fail on PCs without the Visual C++ Redistributable (#248). They go into the payload
118- # and the portable zip; Setup checks again after unpacking (RuntimeCheck) on the user's PC.
119- $required = if ($Runtime -eq ' win-x64' ) { ' vcruntime140.dll ' , ' engines\rhwp\msvcp140.dll' , ' engines\rhwp\vcruntime140.dll' } else { @ (' unhwp.dll ' ) }
107+ # Without them rhwp fails on PCs without the Visual C++ Redistributable (#248). They go into the payload and the
108+ # portable zip; Setup checks again after unpacking (RuntimeCheck) on the user's PC.
109+ $required = if ($Runtime -eq ' win-x64' ) { ' engines\rhwp\msvcp140.dll' , ' engines\rhwp\vcruntime140.dll' } else { @ () }
120110 foreach ($dll in $required ) {
121111 if (-not (Test-Path (Join-Path $PublishDir $dll ))) { throw " $dll is missing in $PublishDir (see fetch-engines.ps1)" }
122112 }
0 commit comments