openssl: Use hardlinks instead of symlinks (#6757)

* openssl: Use hardlinks instead of symlinks

* openssl: Fix 32bit dirs

Co-authored-by: HUMORCE <humorce@outlook.com>

---------

Co-authored-by: HUMORCE <humorce@outlook.com>
This commit is contained in:
Brian 2025-04-23 01:53:25 -04:00 committed by GitHub
parent b0a8b27d8c
commit 64e15c962f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,16 +20,10 @@
"pre_install": [ "pre_install": [
"$arch = switch ($architecture) {", "$arch = switch ($architecture) {",
" '64bit' { 'x64'; break }", " '64bit' { 'x64'; break }",
" '32bit' { 'x32'; break }", " '32bit' { 'x86'; break }",
" 'arm64' { $architecture; break }", " 'arm64' { $architecture; break }",
"}", "}",
"if ([System.Environment]::OSVersion.Version -lt [Version]10.0.14972.0) {", "$null = Get-ChildItem \"$dir/lib/VC/$arch/MT\" | ForEach-Object { New-Item -ItemType HardLink -Target $_.FullName -Path \"$dir/lib/$($_.Name)\" }"
" return $null = Get-ChildItem \"$dir/lib/VC/$arch/MT\" | ForEach-Object { Copy-Item $_.FullName \"$dir/lib/$($_.Name)\" }",
"}",
"Receive-Job -Wait (Start-Job {",
" $kernel32 = Add-Type -MemberDefinition '[DllImport(\"kernel32.dll\")] public static extern bool CreateSymbolicLink(string lpSymlinkFileName, string lpTargetFileName, byte dwFlags);' -Name '_' -PassThru",
" $null = Get-ChildItem \"$Using:dir/lib/VC/$Using:arch/MT\" | ForEach-Object { $kernel32::CreateSymbolicLink(\"$Using:dir/lib/$($_.Name)\", $_.FullName, 2) }",
"})"
], ],
"innosetup": true, "innosetup": true,
"env_add_path": "bin", "env_add_path": "bin",