Skip to content

Commit

Permalink
fin - Finalized 0.0.24.14
Browse files Browse the repository at this point in the history
---

For your convenience, we've updated build scripts to merge the dotnet version to avoid dependency of vswhere.

---

Type: fin
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Dec 14, 2023
1 parent 5a3653e commit 484e78b
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 205 deletions.
2 changes: 1 addition & 1 deletion ChocolateyPack-DotNet/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ $ErrorActionPreference = 'Stop';
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$pkgName = "KS"
$url = "https://github.com/Aptivi/NitrocidKS/releases/download/v0.0.24.14-beta/0.0.24.14-bin-dotnet.zip"
$md5check = "4aaddcf574ff53648a2064325b9c9e4a"
$md5check = "44f55beac65f9bfc0d7c5e0e0e2c6a45"

Write-Output "<*>: for assumptions, <+> for progress, <-> for error"
Write-Output "<*> Installation directory: $toolsDir"
Expand Down
2 changes: 1 addition & 1 deletion ChocolateyPack/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ $ErrorActionPreference = 'Stop';
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$pkgName = "KS"
$url = "https://github.com/Aptivi/NitrocidKS/releases/download/v0.0.24.14-beta/0.0.24.14-bin.zip"
$md5check = "8bf7ffb0c5b093878f09aed8e3011686"
$md5check = "6ad535ec2c761f7fcd7e1e20b6bf41ae"

Write-Output "<*>: for assumptions, <+> for progress, <-> for error"
Write-Output "<*> Installation directory: $toolsDir"
Expand Down
2 changes: 1 addition & 1 deletion Kernel Simulator/Kernel Simulator.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Version>0.0.24.14</Version>
<PackageVersion>0.0.24.14</PackageVersion>
<FileVersion>2.1.24.6</FileVersion>
<FileVersion>2.1.24.14</FileVersion>
</PropertyGroup>
<!-- KS General Information End -->

Expand Down
41 changes: 0 additions & 41 deletions tools/build-dotnet.cmd

This file was deleted.

52 changes: 0 additions & 52 deletions tools/build-dotnet.sh

This file was deleted.

21 changes: 4 additions & 17 deletions tools/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,13 @@ REM along with this program. If not, see <https://www.gnu.org/licenses/>.

REM This script builds KS and packs the artifacts. Use when you have VS installed.
for /f "tokens=* USEBACKQ" %%f in (`type version`) do set ksversion=%%f
set releaseconfig=%1
if "%releaseconfig%" == "" set releaseconfig=Release

echo Finding MSBuild...
for /f "delims=" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe') do set msbuildpath=%%i
if %errorlevel% == 0 goto :download
echo There was an error trying to find MSBuild (%errorlevel%).
goto :finished

:download
echo MSBuild found in %msbuildpath%
echo Downloading packages...
"%msbuildpath%" "..\Kernel Simulator.sln" -t:restore -p:Configuration=%releaseconfig%
if %errorlevel% == 0 goto :build
echo There was an error trying to download packages (%errorlevel%).
goto :finished

:build
echo Building Kernel Simulator...
"%msbuildpath%" "..\Kernel Simulator.sln" -p:Configuration=%releaseconfig%
"%ProgramFiles%\dotnet\dotnet.exe" msbuild "..\Kernel Simulator.sln" -t:restore -p:Configuration=Release-dotnet
"%ProgramFiles%\dotnet\dotnet.exe" msbuild "..\Kernel Simulator.sln" -p:Configuration=Release-dotnet
"%ProgramFiles%\dotnet\dotnet.exe" msbuild "..\Kernel Simulator.sln" -t:restore -p:Configuration=Release
"%ProgramFiles%\dotnet\dotnet.exe" msbuild "..\Kernel Simulator.sln" -p:Configuration=Release
if %errorlevel% == 0 goto :success
echo There was an error trying to build (%errorlevel%).
goto :finished
Expand Down
23 changes: 7 additions & 16 deletions tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,22 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

# This script builds KS. Use when you have MSBuild installed.
# This script builds KS. Use when you have dotnet installed.
ksversion=$(cat version)
ksreleaseconf=$1
if [ -z $ksreleaseconf ]; then
ksreleaseconf=Release
fi

# Check for dependencies
msbuildpath=`which msbuild`
if [ ! $? == 0 ]; then
echo MSBuild is not found.
exit 1
fi

# Download packages
echo Downloading packages...
"$msbuildpath" "../Kernel Simulator.sln" -t:restore -p:Configuration=$ksreleaseconf
dotnetpath=`which dotnet`
if [ ! $? == 0 ]; then
echo Download failed.
echo dotnet is not found.
exit 1
fi

# Build KS
echo Building KS...
"$msbuildpath" "../Kernel Simulator.sln" -p:Configuration=$ksreleaseconf
"$dotnetpath" msbuild "../Kernel Simulator.sln" -t:restore -p:Configuration=Release-dotnet
"$dotnetpath" msbuild "../Kernel Simulator.sln" -p:Configuration=Release-dotnet
"$dotnetpath" msbuild "../Kernel Simulator.sln" -t:restore -p:Configuration=Release
"$dotnetpath" msbuild "../Kernel Simulator.sln" -p:Configuration=Release
if [ ! $? == 0 ]; then
echo Build failed.
exit 1
Expand Down
34 changes: 0 additions & 34 deletions tools/pack-dotnet.cmd

This file was deleted.

42 changes: 0 additions & 42 deletions tools/pack-dotnet.sh

This file was deleted.

3 changes: 3 additions & 0 deletions tools/pack.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@ for /f "tokens=* USEBACKQ" %%f in (`type version`) do set ksversion=%%f
echo Packing binary...
del "Kernel Simulator\KSBuild\*.nupkg" >> %temp%/buildandpack.log 2>&1
"%ProgramFiles%\7-Zip\7z.exe" a -tzip %temp%/%ksversion%-bin.zip "..\Kernel Simulator\KSBuild\net48\*" >> %temp%/buildandpack.log 2>&1
"%ProgramFiles%\7-Zip\7z.exe" a -tzip %temp%/%ksversion%-bin-dotnet.zip "..\Kernel Simulator\KSBuild\net6.0\*" >> %temp%/buildandpack.log 2>&1
if %errorlevel% == 0 goto :complete
echo There was an error trying to pack binary (%errorlevel%).
goto :finished

:complete
move %temp%\%ksversion%-bin.zip
move %temp%\%ksversion%-bin-dotnet.zip
copy "..\Kernel Simulator\KSBuild\net48\Kernel Simulator.pdb" .\%ksversion%.pdb
copy "..\Kernel Simulator\KSBuild\net6.0\Kernel Simulator.pdb" .\%ksversion%-dotnet.pdb

echo Pack successful.
:finished
3 changes: 3 additions & 0 deletions tools/pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@ fi
echo Packing binary...
find . -type f -iname \*.nupkg -delete >> ~/tmp/buildandpack.log
(cd "../Kernel Simulator/KSBuild/net48/" && "$zippath" -r /tmp/$ksversion-bin.zip . && cd -) >> ~/tmp/buildandpack.log
(cd "../Kernel Simulator/KSBuild/net6.0/" && "$zippath" -r /tmp/$ksversion-bin-dotnet.zip . && cd -) >> ~/tmp/buildandpack.log
if [ ! $? == 0 ]; then
echo Packing using zip failed.
exit 1
fi

# Inform success
mv ~/tmp/$ksversion-bin.zip .
mv ~/tmp/$ksversion-bin-dotnet.zip .
cp "../Kernel Simulator/KSBuild/net48/Kernel Simulator.pdb" ./$ksversion.pdb
cp "../Kernel Simulator/KSBuild/net6.0/Kernel Simulator.pdb" ./$ksversion-dotnet.pdb
echo Build and pack successful.
exit 0

0 comments on commit 484e78b

Please sign in to comment.