Skip to content

Commit

Permalink
Update build script.
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster620 committed Mar 12, 2023
1 parent 186814e commit b1076f7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
5 changes: 4 additions & 1 deletion BuildLinuxPackages.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ set APP_NAME=PixelViewer
set RID_LIST=linux-arm64 linux-x64
set CONFIG=Release
set FRAMEWORK=net6.0
set SELF_CONTAINED=true
set TRIM_ASSEMBLIES=true
set READY_TO_RUN=false
set ERRORLEVEL=0

echo ********** Start building %APP_NAME% **********
Expand Down Expand Up @@ -69,7 +72,7 @@ REM Build packages
)

REM Build project
dotnet publish %APP_NAME% -c %CONFIG% -r %%r --self-contained true -p:PublishTrimmed=true
dotnet publish %APP_NAME% -c %CONFIG% -r %%r --self-contained %SELF_CONTAINED% -p:PublishTrimmed=%TRIM_ASSEMBLIES% -p:PublishReadyToRun=%READY_TO_RUN%
if %ERRORLEVEL% neq 0 (
echo Failed to build project: %ERRORLEVEL%
del /Q Packages\Packaging.txt
Expand Down
4 changes: 3 additions & 1 deletion BuildLinuxPackages.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
APP_NAME="PixelViewer"
RID_LIST=("linux-x64" "linux-arm64")
CONFIG="Release"
TRIM_ASSEMBLIES="true"
READY_TO_RUN="false"

echo "********** Start building $APP_NAME **********"

Expand Down Expand Up @@ -45,7 +47,7 @@ for i in "${!RID_LIST[@]}"; do
fi

# build
dotnet publish $APP_NAME -c $CONFIG -r $RID --self-contained true -p:PublishTrimmed=true
dotnet publish $APP_NAME -c $CONFIG -r $RID --self-contained true -p:PublishTrimmed=$TRIM_ASSEMBLIES -p:PublishReadyToRun=$READY_TO_RUN
if [ "$?" != "0" ]; then
exit
fi
Expand Down
4 changes: 3 additions & 1 deletion BuildMacOSPackages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ APP_NAME="PixelViewer"
RID_LIST=("osx-x64" "osx.11.0-arm64")
PUB_PLATFORM_LIST=("osx-x64" "osx-arm64")
CONFIG="Release"
TRIM_ASSEMBLIES="true"
READY_TO_RUN="false"
CERT_NAME="" # Name of certification to sign the application

echo "********** Start building $APP_NAME **********"
Expand Down Expand Up @@ -41,7 +43,7 @@ for i in "${!RID_LIST[@]}"; do
fi

# build
dotnet msbuild $APP_NAME -t:BundleApp -property:Configuration=$CONFIG -p:SelfContained=true -p:PublishSingleFile=false -p:PublishTrimmed=true -p:RuntimeIdentifier=$RID
dotnet msbuild $APP_NAME -t:BundleApp -property:Configuration=$CONFIG -p:SelfContained=true -p:PublishSingleFile=false -p:PublishTrimmed=$TRIM_ASSEMBLIES -p:RuntimeIdentifier=$RID -p:PublishReadyToRun=$READY_TO_RUN
if [ "$?" != "0" ]; then
exit
fi
Expand Down
4 changes: 3 additions & 1 deletion NotarizeMacOSPackages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ APP_NAME="PixelViewer"
APP_BUNDLE_ID="com.carina-studio.ulogviewer"
RID_LIST=("osx-x64" "osx.11.0-arm64")
PUB_PLATFORM_LIST=("osx-x64" "osx-arm64")
KEY_ID="" # App Store Connect API Key ID
USERNAME="" # Apple Developer ID
PASSWORD="" # Application specific password
TEAM_ID=""

echo "********** Start notarizing $APP_NAME **********"

Expand All @@ -25,7 +27,7 @@ for i in "${!RID_LIST[@]}"; do
echo " "

# notarize
xcrun altool --notarize-app -f "./Packages/$VERSION/$APP_NAME-$VERSION-$PUB_PLATFORM.zip" --primary-bundle-id "$APP_BUNDLE_ID" -u "$USERNAME" -p "$PASSWORD"
xcrun notarytool submit "./Packages/$VERSION/$APP_NAME-$VERSION-$PUB_PLATFORM.zip" --key-id "$KEY_ID" --apple-id "$USERNAME" --password "$PASSWORD" --team-id "$TEAM_ID"
if [ "$?" != "0" ]; then
exit
fi
Expand Down

0 comments on commit b1076f7

Please sign in to comment.