-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
220 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
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,15 @@ | ||
OUTPUTS = VisualCard.*/bin VisualCard.*/obj VisualCard/bin VisualCard/obj | ||
|
||
.PHONY: all | ||
|
||
# General use | ||
|
||
all: all-online | ||
|
||
all-online: | ||
$(MAKE) -C tools invoke-build | ||
|
||
clean: | ||
rm -rf $(OUTPUTS) | ||
|
||
# This makefile is just a wrapper for tools scripts. |
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,9 @@ | ||
# Below is a workaround for .NET SDK 7.0 trying to allocate large amounts of memory for GC work: | ||
# https://github.com/dotnet/runtime/issues/85556#issuecomment-1529177092 | ||
DOTNET_PAGE_SIZE = $(shell getconf PAGESIZE) | ||
DOTNET_AVPHYS_PAGES = $(shell getconf _AVPHYS_PAGES) | ||
DOTNET_HEAP_LIMIT = $(shell printf '%X\n' $$(($(DOTNET_AVPHYS_PAGES) * $(DOTNET_PAGE_SIZE)))) | ||
|
||
invoke-build: | ||
chmod +x ./build.sh | ||
./build.sh || (echo Retrying with heap limit 0x$(DOTNET_HEAP_LIMIT)... && DOTNET_GCHeapHardLimit=$(DOTNET_HEAP_LIMIT) ./build.sh) |
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,23 @@ | ||
@echo off | ||
|
||
REM This script builds and packs the artifacts. Use when you have VS installed. | ||
set releaseconfig=%1 | ||
if "%releaseconfig%" == "" set releaseconfig=Release | ||
|
||
:download | ||
echo Downloading packages... | ||
"%ProgramFiles%\dotnet\dotnet.exe" msbuild "..\VisualCard.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 Nitrocid KS... | ||
"%ProgramFiles%\dotnet\dotnet.exe" msbuild "..\VisualCard.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 |
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,34 @@ | ||
#!/bin/bash | ||
|
||
# This script builds. Use when you have dotnet installed. | ||
releaseconf=$1 | ||
if [ -z $releaseconf ]; then | ||
releaseconf=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 "../VisualCard.sln" -t:restore -p:Configuration=$releaseconf | ||
if [ ! $? == 0 ]; then | ||
echo Download failed. | ||
exit 1 | ||
fi | ||
|
||
# Build KS | ||
echo Building KS... | ||
"$dotnetpath" msbuild "../VisualCard.sln" -p:Configuration=$releaseconf | ||
if [ ! $? == 0 ]; then | ||
echo Build failed. | ||
exit 1 | ||
fi | ||
|
||
# Inform success | ||
echo Build successful. | ||
exit 0 |
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,22 @@ | ||
@echo off | ||
|
||
REM This script builds KS documentation and packs the artifacts. Use when you have VS installed. | ||
for /f "tokens=* USEBACKQ" %%f in (`type version`) do set version=%%f | ||
|
||
:pack | ||
echo Packing documentation... | ||
"%ProgramFiles%\WinRAR\rar.exe" a -ep1 -r -m5 %temp%/%version%-doc.rar "..\docs\" | ||
if %errorlevel% == 0 goto :finalize | ||
echo There was an error trying to pack documentation (%errorlevel%). | ||
goto :finished | ||
|
||
:finalize | ||
rmdir /S /Q "..\DocGen\api\" | ||
rmdir /S /Q "..\DocGen\obj\" | ||
rmdir /S /Q "..\docs\" | ||
move %temp%\%version%-doc.rar | ||
echo Build and pack successful. | ||
goto :finished | ||
|
||
:finished | ||
pause |
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,27 @@ | ||
#!/bin/bash | ||
|
||
# This script builds and packs the artifacts. Use when you have MSBuild installed. | ||
version=$(cat version) | ||
|
||
# Check for dependencies | ||
rarpath=`which rar` | ||
if [ ! $? == 0 ]; then | ||
echo rar is not found. | ||
exit 1 | ||
fi | ||
|
||
# Pack documentation | ||
echo Packing documentation... | ||
"$rarpath" a -ep1 -r -m5 /tmp/$version-doc.rar "../docs/" | ||
if [ ! $? == 0 ]; then | ||
echo Packing using rar failed. | ||
exit 1 | ||
fi | ||
|
||
# Inform success | ||
rm -rf "../DocGen/api" | ||
rm -rf "../DocGen/obj" | ||
rm -rf "../docs" | ||
mv /tmp/$version-doc.rar . | ||
echo Pack successful. | ||
exit 0 |
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,19 @@ | ||
@echo off | ||
|
||
REM This script builds documentation and packs the artifacts. | ||
|
||
echo Finding DocFX... | ||
if exist %ProgramData%\chocolatey\bin\docfx.exe goto :build | ||
echo You don't have DocFX installed. Download and install Chocolatey and DocFX. | ||
goto :finished | ||
|
||
:build | ||
echo Building Documentation... | ||
%ProgramData%\chocolatey\bin\docfx.exe "..\DocGen\docfx.json" | ||
if %errorlevel% == 0 goto :success | ||
echo There was an error trying to build documentation (%errorlevel%). | ||
goto :finished | ||
|
||
:success | ||
echo Build and pack successful. | ||
:finished |
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,20 @@ | ||
#!/bin/bash | ||
|
||
# Check for dependencies | ||
msbuildpath=`which docfx` | ||
if [ ! $? == 0 ]; then | ||
echo DocFX is not found. | ||
exit 1 | ||
fi | ||
|
||
# Build KS | ||
echo Building documentation... | ||
docfx DocGen/docfx.json | ||
if [ ! $? == 0 ]; then | ||
echo Build failed. | ||
exit 1 | ||
fi | ||
|
||
# Inform success | ||
echo Build successful. | ||
exit 0 |
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,20 @@ | ||
@echo off | ||
|
||
for /f "tokens=* USEBACKQ" %%f in (`type version`) do set version=%%f | ||
set releaseconfig=%1 | ||
if "%releaseconfig%" == "" set releaseconfig=Release | ||
|
||
:packbin | ||
echo Packing binary... | ||
"%ProgramFiles%\WinRAR\rar.exe" a -ep1 -r -m5 %temp%/%version%-bin.rar "..\VisualCard\bin\%releaseconfig%\netstandard2.0\" | ||
"%ProgramFiles%\WinRAR\rar.exe" a -ep1 -r -m5 %temp%/%version%-demo.rar "..\VisualCard.ShowContacts\bin\%releaseconfig%\net6.0\" | ||
if %errorlevel% == 0 goto :complete | ||
echo There was an error trying to pack binary (%errorlevel%). | ||
goto :finished | ||
|
||
:complete | ||
move %temp%\%version%-bin.rar | ||
move %temp%\%version%-demo.rar | ||
|
||
echo Pack successful. | ||
:finished |
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,30 @@ | ||
#!/bin/bash | ||
|
||
# This script builds and packs the artifacts. Use when you have MSBuild installed. | ||
version=$(cat version) | ||
releaseconf=$1 | ||
if [ -z $releaseconf ]; then | ||
releaseconf=Release | ||
fi | ||
|
||
# Check for dependencies | ||
rarpath=`which rar` | ||
if [ ! $? == 0 ]; then | ||
echo rar is not found. | ||
exit 1 | ||
fi | ||
|
||
# Pack binary | ||
echo Packing binary... | ||
"$rarpath" a -ep1 -r -m5 /tmp/$version-bin.rar "../VisualCard/bin/$releaseconf/netstandard2.0/" | ||
"$rarpath" a -ep1 -r -m5 /tmp/$version-demo.rar "../VisualCard.ShowContacts/bin/$releaseconf/net6.0/" | ||
if [ ! $? == 0 ]; then | ||
echo Packing using rar failed. | ||
exit 1 | ||
fi | ||
|
||
# Inform success | ||
mv ~/tmp/$version-bin.rar . | ||
mv ~/tmp/$version-demo.rar . | ||
echo Build and pack successful. | ||
exit 0 |
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 @@ | ||
0.1.0.4 |