diff --git a/BuildLinuxPackages.bat b/BuildLinuxPackages.bat index 38a8bfa8..f40f68c7 100644 --- a/BuildLinuxPackages.bat +++ b/BuildLinuxPackages.bat @@ -7,6 +7,7 @@ set FRAMEWORK=net9.0 set SELF_CONTAINED=true set TRIM_ASSEMBLIES=true set TESTING_MODE_BUILD=false +set PACKAGING_TOOL_PATH=PackagingTool\bin\Release\%FRAMEWORK%\CarinaStudio.ULogViewer.Packaging.dll set ERRORLEVEL=0 echo ********** Start building %APP_NAME% ********** @@ -20,8 +21,14 @@ IF not exist Packages ( ) ) +REM Build packaging tool +dotnet build --project PackagingTool -c Release -f %FRAMEWORK% +if %ERRORLEVEL% neq 0 ( + exit +) + REM Get current version -dotnet run --project PackagingTool get-current-version %APP_NAME%\%APP_NAME%.csproj > Packages\Packaging.txt +dotnet %PACKAGING_TOOL_PATH% get-current-version %APP_NAME%\%APP_NAME%.csproj > Packages\Packaging.txt if %ERRORLEVEL% neq 0 ( del /Q Packages\Packaging.txt exit @@ -30,7 +37,7 @@ set /p CURRENT_VERSION= Packages\Packaging.txt +dotnet %PACKAGING_TOOL_PATH% get-previous-version %APP_NAME%\%APP_NAME%.csproj > Packages\Packaging.txt if %ERRORLEVEL% neq 0 ( del /Q Packages\Packaging.txt exit @@ -90,11 +97,11 @@ REM Build packages REM Generate diff packages if [%PREVIOUS_VERSION%] neq [] ( - dotnet run --project PackagingTool create-diff-packages linux %PREVIOUS_VERSION% %CURRENT_VERSION% + dotnet %PACKAGING_TOOL_PATH% create-diff-packages linux %PREVIOUS_VERSION% %CURRENT_VERSION% ) REM Generate package manifest -REM dotnet run --project PackagingTool create-package-manifest linux %APP_NAME% %CURRENT_VERSION% +REM dotnet %PACKAGING_TOOL_PATH% create-package-manifest linux %APP_NAME% %CURRENT_VERSION% REM Complete del /Q Packages\Packaging.txt \ No newline at end of file diff --git a/BuildLinuxPackages.sh b/BuildLinuxPackages.sh index 25ec44b7..cde56222 100755 --- a/BuildLinuxPackages.sh +++ b/BuildLinuxPackages.sh @@ -4,16 +4,23 @@ RID_LIST=("linux-x64" "linux-arm64") CONFIG="Release" TRIM_ASSEMBLIES="true" TESTING_MODE_BUILD="false" +PACKAGING_TOOL_PATH="PackagingTool/bin/Release/$FRAMEWORK/CarinaStudio.ULogViewer.Packaging.dll" echo "********** Start building $APP_NAME **********" +# Build packaging tool +dotnet build --project PackagingTool -c Release -f $FRAMEWORK +if [ "$?" != "0" ]; then + exit +fi + # Get application version -VERSION=$(dotnet run --project PackagingTool get-current-version $APP_NAME/$APP_NAME.csproj) +VERSION=$(dotnet $PACKAGING_TOOL_PATH get-current-version $APP_NAME/$APP_NAME.csproj) if [ "$?" != "0" ]; then echo "Unable to get version of $APP_NAME" exit fi echo "Version: $VERSION" -PREV_VERSION=$(dotnet run --project PackagingTool get-previous-version $APP_NAME/$APP_NAME.csproj $VERSION) +PREV_VERSION=$(dotnet $PACKAGING_TOOL_PATH get-previous-version $APP_NAME/$APP_NAME.csproj $VERSION) if [ ! -z "$PREV_VERSION" ]; then echo "Previous version: $PREV_VERSION" fi @@ -62,8 +69,8 @@ done # Generate diff packages if [ ! -z "$PREV_VERSION" ]; then - dotnet run --project PackagingTool create-diff-packages linux $PREV_VERSION $VERSION + dotnet $PACKAGING_TOOL_PATH create-diff-packages linux $PREV_VERSION $VERSION fi # Generate package manifest -# dotnet run --project PackagingTool create-package-manifest linux $APP_NAME $VERSION \ No newline at end of file +# dotnet $PACKAGING_TOOL_PATH create-package-manifest linux $APP_NAME $VERSION \ No newline at end of file diff --git a/BuildMacOSPackages.sh b/BuildMacOSPackages.sh index a10cfc85..9228697d 100755 --- a/BuildMacOSPackages.sh +++ b/BuildMacOSPackages.sh @@ -5,13 +5,20 @@ PUB_PLATFORM_LIST=("osx-arm64" "osx-x64") CONFIG="Release" TRIM_ASSEMBLIES="true" TESTING_MODE_BUILD="false" +PACKAGING_TOOL_PATH="PackagingTool/bin/Release/$FRAMEWORK/CarinaStudio.ULogViewer.Packaging.dll" ICON_VERSION="3" CERT_NAME="" # Name of certification to sign the application echo "********** Start building $APP_NAME **********" +# Build packaging tool +dotnet build --project PackagingTool -c Release -f $FRAMEWORK +if [ "$?" != "0" ]; then + exit +fi + # Get application version -VERSION=$(dotnet run --project PackagingTool get-current-version $APP_NAME/$APP_NAME.csproj) +VERSION=$(dotnet $PACKAGING_TOOL_PATH get-current-version $APP_NAME/$APP_NAME.csproj) if [ "$?" != "0" ]; then echo "Unable to get version of $APP_NAME" exit @@ -99,4 +106,4 @@ for i in "${!RID_LIST[@]}"; do done # Generate package manifest -# dotnet run --project PackagingTool create-package-manifest osx $APP_NAME $VERSION \ No newline at end of file +# dotnet $PACKAGING_TOOL_PATH create-package-manifest osx $APP_NAME $VERSION \ No newline at end of file diff --git a/BuildWindowsPackages.bat b/BuildWindowsPackages.bat index bcfcfdb0..5d85750c 100644 --- a/BuildWindowsPackages.bat +++ b/BuildWindowsPackages.bat @@ -7,6 +7,7 @@ set FRAMEWORK=net9.0 set SELF_CONTAINED=true set TRIM_ASSEMBLIES=true set TESTING_MODE_BUILD=false +set PACKAGING_TOOL_PATH=PackagingTool\bin\Release\%FRAMEWORK%\CarinaStudio.ULogViewer.Packaging.dll set ERRORLEVEL=0 echo ********** Start building %APP_NAME% ********** @@ -20,8 +21,14 @@ IF not exist Packages ( ) ) +REM Build packaging tool +dotnet build --project PackagingTool -c Release -f %FRAMEWORK% +if %ERRORLEVEL% neq 0 ( + exit +) + REM Get current version -dotnet run --project PackagingTool get-current-version %APP_NAME%\%APP_NAME%.csproj > Packages\Packaging.txt +dotnet %PACKAGING_TOOL_PATH% get-current-version %APP_NAME%\%APP_NAME%.csproj > Packages\Packaging.txt if %ERRORLEVEL% neq 0 ( del /Q Packages\Packaging.txt exit @@ -30,7 +37,7 @@ set /p CURRENT_VERSION= Packages\Packaging.txt +dotnet %PACKAGING_TOOL_PATH% get-previous-version %APP_NAME%\%APP_NAME%.csproj > Packages\Packaging.txt if %ERRORLEVEL% neq 0 ( del /Q Packages\Packaging.txt exit @@ -81,11 +88,11 @@ REM Build packages REM Generate diff packages if [%PREVIOUS_VERSION%] neq [] ( - dotnet run --project PackagingTool create-diff-packages win %PREVIOUS_VERSION% %CURRENT_VERSION% + dotnet %PACKAGING_TOOL_PATH% create-diff-packages win %PREVIOUS_VERSION% %CURRENT_VERSION% ) REM Generate package manifest -REM dotnet run --project PackagingTool create-package-manifest win %APP_NAME% %CURRENT_VERSION% +REM dotnet %PACKAGING_TOOL_PATH% create-package-manifest win %APP_NAME% %CURRENT_VERSION% REM Complete del /Q Packages\Packaging.txt \ No newline at end of file