-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working on the build workflow - 09/13/2023 04:24:17 UTC
- Loading branch information
1 parent
b1c0475
commit e4da4a6
Showing
2 changed files
with
51 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,9 +25,11 @@ jobs: | |
- uses: microsoft/[email protected] | ||
- id: make_hosts_compress | ||
run: | | ||
$cl = (Get-ChildItem -Path "$Env:ProgramW6432\Microsoft Visual Studio\" -Recurse -Filter "cl.exe").FullName | Select-String ".*x64\\x64.*" | ||
$dev = (Get-ChildItem -Path "$Env:ProgramW6432\Microsoft Visual Studio\" -Recurse -Filter "vsdevcmd.bat").FullName | ||
cd hostscompress || exit 255 | ||
& $dev | ||
& $cl[-1] /c /Ycpch.h /std:c++20 /W4 /EHsc pch.cpp | ||
if (-Not (Test-Path -Path pch.pch)) { Exit 253 } | ||
cd scripts | ||
./build.ps1 | ||
# $cl = (Get-ChildItem -Path "$Env:ProgramW6432\Microsoft Visual Studio\" -Recurse -Filter "cl.exe").FullName | Select-String ".*x64\\x64.*" | ||
# $dev = (Get-ChildItem -Path "$Env:ProgramW6432\Microsoft Visual Studio\" -Recurse -Filter "vsdevcmd.bat").FullName | ||
# cd hostscompress || exit 255 | ||
# & $dev | ||
# & $cl[-1] /c /Ycpch.h /std:c++20 /W4 /EHsc pch.cpp | ||
# if (-Not (Test-Path -Path pch.pch)) { Exit 253 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
$SCRIPTDIR = $PSScriptRoot | ||
$PARENTDIR = (Get-Item $SCRIPTDIR ).parent.FullName | ||
$WINDOWSDIR = "${PARENTDIR}\hostscompress" | ||
$BUILDDIR = "$($PARENTDIR)\build\windows" | ||
$BUILDDIR86 = "$($BUILDDIR)\x86" | ||
$BUILDDIR64 = "$($BUILDDIR)\x64" | ||
if (-Not (Test-Path "$($BUILDDIR)" -PathType Container)) | ||
{ | ||
New-Item "$($BUILDDIR)" -ItemType Directory | ||
if (-Not (Test-Path "$($BUILDDIR)" -PathType Container)) | ||
{ | ||
Exit 255 | ||
} | ||
} | ||
if (-Not (Test-Path "$($BUILDDIR86)" -PathType Container)) | ||
{ | ||
New-Item "$($BUILDDIR86)" -ItemType Directory | ||
if (-Not (Test-Path "$($BUILDDIR86)" -PathType Container)) | ||
{ | ||
Exit 254 | ||
} | ||
} | ||
if (-Not (Test-Path "$($BUILDDIR64)" -PathType Container)) | ||
{ | ||
New-Item "$($BUILDDIR64)" -ItemType Directory | ||
if (-Not (Test-Path "$($BUILDDIR64)" -PathType Container)) | ||
{ | ||
Exit 253 | ||
} | ||
} | ||
Set-Location "$($WINDOWSDIR)" | ||
MSBuild /p:Configuration=Release /p:Platform=x86 | ||
if (-Not (Test-Path "$($WINDOWSDIR)\Release\hostscompress.exe" -PathType Leaf)) | ||
{ | ||
Exit 252 | ||
} | ||
Move-Item -Path "$($WINDOWSDIR)\Release\hostscompress.exe" "$($BUILDDIR86)\hostscompress-x86.exe" | ||
MSBuild /p:Configuration=Release /p:Platform=x64 | ||
if (-Not (Test-Path "$($WINDOWSDIR)\x64\Release\hostscompress.exe" -PathType Leaf)) | ||
{ | ||
Exit 251 | ||
} | ||
Move-Item -Path "$($WINDOWSDIR)\x64\Release\hostscompress.exe" "$($BUILDDIR64)\hostscompress-x64.exe" |