Started refactoring the build process, Moved assets around, Separated some build scripts, Added other assets
Update .gitignore, NibblePoker.Application.ListComPort.csproj, and 39 more files...
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
@echo off
|
||||
|
||||
:: Setting some naming constants
|
||||
set NP_LSCOM_VERSION=3.0.0
|
||||
|
||||
:: Defining the %NP_ESC% variable for later use.
|
||||
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
|
||||
set NP_ESC=%%b
|
||||
)
|
||||
@@ -0,0 +1,43 @@
|
||||
@echo off
|
||||
|
||||
:: Keeping the starting CWD in memory and going into the script's directory.
|
||||
pushd %~dp0
|
||||
cd /D "%~dp0"
|
||||
|
||||
:: Calling the common script
|
||||
call .\commons.bat
|
||||
|
||||
:: Moving to the project's root
|
||||
cd .\..\..
|
||||
|
||||
:: Cleaning
|
||||
echo Removing any old binaries and any intermediate files...
|
||||
rmdir /Q /S NibblePoker.Application.ListComPort\bin 2>nul
|
||||
rmdir /Q /S NibblePoker.Application.ListComPort\obj 2>nul
|
||||
rmdir /Q /S NibblePoker.Library.ComPortHelpers\bin 2>nul
|
||||
rmdir /Q /S NibblePoker.Library.ComPortHelpers\obj 2>nul
|
||||
rmdir /Q /S Builds 2>nul
|
||||
mkdir Builds
|
||||
echo.
|
||||
|
||||
:: Compiling
|
||||
echo Building "Any" target...
|
||||
dotnet publish "./NibblePoker.Application.ListComPort/NibblePoker.Application.ListComPort.csproj" --nologo -o "./Builds/any/"
|
||||
echo.
|
||||
|
||||
echo Building "Single" targets...
|
||||
dotnet publish "./NibblePoker.Application.ListComPort/NibblePoker.Application.ListComPort.csproj" --nologo -r win-x86 -c Release -o "./Builds/x86_single" --no-self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
|
||||
dotnet publish "./NibblePoker.Application.ListComPort/NibblePoker.Application.ListComPort.csproj" --nologo -r win-x64 -c Release -o "./Builds/x64_single" --no-self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
|
||||
dotnet publish "./NibblePoker.Application.ListComPort/NibblePoker.Application.ListComPort.csproj" --nologo -r win-arm -c Release -o "./Builds/arm_single" --no-self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
|
||||
dotnet publish "./NibblePoker.Application.ListComPort/NibblePoker.Application.ListComPort.csproj" --nologo -r win-arm64 -c Release -o "./Builds/arm64_single" --no-self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
|
||||
echo.
|
||||
|
||||
echo Building "Optimized Single" targets...
|
||||
dotnet publish "./NibblePoker.Application.ListComPort/NibblePoker.Application.ListComPort.csproj" --nologo -r win-x86 -c Release -o "./Builds/x86_single_sc_trim_comp" --self-contained true -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true
|
||||
dotnet publish "./NibblePoker.Application.ListComPort/NibblePoker.Application.ListComPort.csproj" --nologo -r win-x64 -c Release -o "./Builds/x64_single_sc_trim_comp" --self-contained true -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true
|
||||
dotnet publish "./NibblePoker.Application.ListComPort/NibblePoker.Application.ListComPort.csproj" --nologo -r win-arm -c Release -o "./Builds/arm_single_sc_trim_comp" --self-contained true -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true
|
||||
dotnet publish "./NibblePoker.Application.ListComPort/NibblePoker.Application.ListComPort.csproj" --nologo -r win-arm64 -c Release -o "./Builds/arm64_single_sc_trim_comp" --self-contained true -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true
|
||||
echo.
|
||||
|
||||
:: Going back to the original directory
|
||||
popd
|
||||
@@ -0,0 +1,56 @@
|
||||
@echo off
|
||||
|
||||
:: Keeping the starting CWD in memory and going into the script's directory.
|
||||
pushd %~dp0
|
||||
cd /D "%~dp0"
|
||||
|
||||
:: Calling the common script
|
||||
call .\commons.bat
|
||||
|
||||
:: Moving to the "NibblePoker.Packaging.ListComPort\Wix" folder.
|
||||
cd .\..\Wix
|
||||
|
||||
:: Cleaning
|
||||
echo Removing old MSI-related files...
|
||||
del *.msi >nul 2>&1
|
||||
del *.wixobj >nul 2>&1
|
||||
del *.wixpdb >nul 2>&1
|
||||
echo.
|
||||
|
||||
:: Packaging into MSI
|
||||
echo Creating x64 MSI package...
|
||||
set WixTargetPlatform=x64
|
||||
candle -nologo ListComPort.wxs -out ListComPort_x64.wixobj -ext WixUIExtension
|
||||
if ERRORLEVEL 1 (
|
||||
echo.
|
||||
echo %NP_ESC%[31mFATAL ERROR:%NP_ESC%[0m Failed to preprocess and compile the .wix file !
|
||||
echo.
|
||||
goto end-msi-error
|
||||
)
|
||||
light ListComPort_x64.wixobj -loc en-us.wxl -out ListComPort_x64.msi -ext WixUIExtension -cultures:en-us
|
||||
if ERRORLEVEL 1 (
|
||||
echo.
|
||||
echo %NP_ESC%[31mFATAL ERROR:%NP_ESC%[0m Failed to link and create the final MSI package !
|
||||
echo.
|
||||
goto end-msi-error
|
||||
)
|
||||
|
||||
echo Creating x86 MSI package...
|
||||
set WixTargetPlatform=x86
|
||||
candle -nologo ListComPort.wxs -out ListComPort_x86.wixobj -ext WixUIExtension
|
||||
if ERRORLEVEL 1 (
|
||||
echo.
|
||||
echo %NP_ESC%[31mFATAL ERROR:%NP_ESC%[0m Failed to preprocess and compile the .wix file !
|
||||
echo.
|
||||
goto end-msi-error
|
||||
)
|
||||
light ListComPort_x86.wixobj -loc en-us.wxl -out ListComPort_x86.msi -ext WixUIExtension -cultures:en-us
|
||||
if ERRORLEVEL 1 (
|
||||
echo.
|
||||
echo %NP_ESC%[31mFATAL ERROR:%NP_ESC%[0m Failed to link and create the final MSI package !
|
||||
echo.
|
||||
goto end-msi-error
|
||||
)
|
||||
|
||||
:: Going back to the original directory
|
||||
popd
|
||||
Reference in New Issue
Block a user