Skip to content

Commit

Permalink
fin - Finalized 0.0.20.18
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 6020da5 commit 46500a5
Show file tree
Hide file tree
Showing 9 changed files with 174 additions and 210 deletions.
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.20.18-beta/0.0.20.18-bin.zip"
$md5check = "4914d2da24711519531e0acd199d6a41"
$md5check = "f49a944b8c20f18c7262bdf0a14ac4df"

Write-Output "<*>: for assumptions, <+> for progress, <-> for error"
Write-Output "<*> Installation directory: $toolsDir"
Expand Down
1 change: 1 addition & 0 deletions Kernel Simulator/Kernel Simulator.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<!-- KS Nuget Information -->
<PackageId>KS</PackageId>
<Version>0.0.20.18</Version>
<FileVersion>2.0.20.18</FileVersion>
<Authors>EoflaOE</Authors>
<Title>Kernel Simulator</Title>
<PackageDescription>Simulates our future-planned kernel</PackageDescription>
Expand Down
97 changes: 0 additions & 97 deletions buildandpack.cmd

This file was deleted.

112 changes: 0 additions & 112 deletions buildandpack.sh

This file was deleted.

41 changes: 41 additions & 0 deletions tools/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@echo off

REM Kernel Simulator Copyright (C) 2018-2021 EoflaOE
REM
REM This file is part of Kernel Simulator
REM
REM Kernel Simulator is free software: you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation, either version 3 of the License, or
REM (at your option) any later version.
REM
REM Kernel Simulator is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License
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

:download
echo Downloading packages...
"%ProgramFiles%\dotnet\dotnet.exe" msbuild "..\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...
"%ProgramFiles%\dotnet\dotnet.exe" msbuild "..\Kernel Simulator.sln" -p:Configuration=%releaseconfig%
if %errorlevel% == 0 goto :success
echo There was an error trying to build (%errorlevel%).
goto :finished

:success
echo Build successful.
:finished
52 changes: 52 additions & 0 deletions tools/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/bin/bash

# Kernel Simulator Copyright (C) 2018-2021 EoflaOE
#
# This file is part of Kernel Simulator
#
# Kernel Simulator is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Kernel Simulator is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 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 dotnet installed.
ksversion=$(cat version)
ksreleaseconf=$1
if [ -z $ksreleaseconf ]; then
ksreleaseconf=Release
fi

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

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

# Build KS
echo Building KS...
"$dotnetpath" msbuild "../Kernel Simulator.sln" -p:Configuration=$ksreleaseconf
if [ ! $? == 0 ]; then
echo Build failed.
exit 1
fi

# Inform success
echo Build successful.
exit 0
35 changes: 35 additions & 0 deletions tools/pack.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@echo off

REM Kernel Simulator Copyright (C) 2018-2021 EoflaOE
REM
REM This file is part of Kernel Simulator
REM
REM Kernel Simulator is free software: you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation, either version 3 of the License, or
REM (at your option) any later version.
REM
REM Kernel Simulator is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License
REM along with this program. If not, see <https://www.gnu.org/licenses/>.

for /f "tokens=* USEBACKQ" %%f in (`type version`) do set ksversion=%%f

:packbin
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
if %errorlevel% == 0 goto :complete
echo There was an error trying to pack binary (%errorlevel%).
goto :finished

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

echo Pack successful.
:finished
Loading

0 comments on commit 46500a5

Please sign in to comment.