annotate scripts/osx/deploy_build.sh @ 327:b5d6c27c308f

anime: refactor Anime::SeriesSeason to Season class ToLocalString has also been altered to take in both season and year because lots of locales actually treat formatting seasons differently! most notably is Russian which adds a suffix at the end to notate seasons(??)
author Paper <paper@paper.us.eu.org>
date Thu, 13 Jun 2024 01:49:18 -0400
parents 22f9aacf6ac1
children 8d45d892be88
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
244
3a4aa9b4814c scripts: convert to use posix shell
Paper <paper@paper.us.eu.org>
parents: 241
diff changeset
1 #!/bin/sh
237
a7d0d543b334 *: make OS X builds succeed
Paper <paper@paper.us.eu.org>
parents:
diff changeset
2 #
a7d0d543b334 *: make OS X builds succeed
Paper <paper@paper.us.eu.org>
parents:
diff changeset
3 # deploy_build.sh:
a7d0d543b334 *: make OS X builds succeed
Paper <paper@paper.us.eu.org>
parents:
diff changeset
4 # run this in your build dir to get a usable app bundle
a7d0d543b334 *: make OS X builds succeed
Paper <paper@paper.us.eu.org>
parents:
diff changeset
5
a7d0d543b334 *: make OS X builds succeed
Paper <paper@paper.us.eu.org>
parents:
diff changeset
6 SCRIPT_DIR=$(dirname -- "$0")
273
f31305b9f60a *: various code safety changes
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
7 FRAMEWORK_MODE=false
f31305b9f60a *: various code safety changes
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
8 if test "x$1x" = "x--frameworksx"; then
f31305b9f60a *: various code safety changes
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
9 echo "framework mode enabled"
f31305b9f60a *: various code safety changes
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
10 FRAMEWORK_MODE=true
f31305b9f60a *: various code safety changes
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
11 fi
237
a7d0d543b334 *: make OS X builds succeed
Paper <paper@paper.us.eu.org>
parents:
diff changeset
12 BUNDLE_NAME="Minori"
a7d0d543b334 *: make OS X builds succeed
Paper <paper@paper.us.eu.org>
parents:
diff changeset
13
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 244
diff changeset
14 cp -r "$SCRIPT_DIR/../../rc/sys/osx/$BUNDLE_NAME.app" .
244
3a4aa9b4814c scripts: convert to use posix shell
Paper <paper@paper.us.eu.org>
parents: 241
diff changeset
15
237
a7d0d543b334 *: make OS X builds succeed
Paper <paper@paper.us.eu.org>
parents:
diff changeset
16 mkdir -p "$BUNDLE_NAME.app/Contents/MacOS"
a7d0d543b334 *: make OS X builds succeed
Paper <paper@paper.us.eu.org>
parents:
diff changeset
17 cp ".libs/minori" "$BUNDLE_NAME.app/Contents/MacOS/minori"
244
3a4aa9b4814c scripts: convert to use posix shell
Paper <paper@paper.us.eu.org>
parents: 241
diff changeset
18
237
a7d0d543b334 *: make OS X builds succeed
Paper <paper@paper.us.eu.org>
parents:
diff changeset
19 mkdir -p "$BUNDLE_NAME.app/Contents/Frameworks"
273
f31305b9f60a *: various code safety changes
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
20 for i in animone pugixml anitomy; do
237
a7d0d543b334 *: make OS X builds succeed
Paper <paper@paper.us.eu.org>
parents:
diff changeset
21 cp "dep/$i/.libs/lib$i.0.dylib" "$BUNDLE_NAME.app/Contents/Frameworks"
a7d0d543b334 *: make OS X builds succeed
Paper <paper@paper.us.eu.org>
parents:
diff changeset
22 install_name_tool -change "/usr/local/lib/lib$i.0.dylib" "@executable_path/../Frameworks/lib$i.0.dylib" "$BUNDLE_NAME.app/Contents/MacOS/minori"
a7d0d543b334 *: make OS X builds succeed
Paper <paper@paper.us.eu.org>
parents:
diff changeset
23 done
244
3a4aa9b4814c scripts: convert to use posix shell
Paper <paper@paper.us.eu.org>
parents: 241
diff changeset
24
275
22f9aacf6ac1 osx: don't dereference NULL pointers
Paper <paper@paper.us.eu.org>
parents: 273
diff changeset
25 macdeployqt "$BUNDLE_NAME.app" -no-strip
273
f31305b9f60a *: various code safety changes
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
26 if $FRAMEWORK_MODE; then
f31305b9f60a *: various code safety changes
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
27 for i in QtCore QtGui QtWidgets; do
f31305b9f60a *: various code safety changes
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
28 install_name_tool -id @executable_path/../Frameworks/$i.framework/Versions/5/$i $BUNDLE_NAME.app/Contents/Frameworks/$i.framework/Versions/5/$i
f31305b9f60a *: various code safety changes
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
29 install_name_tool -change @rpath/$i.framework/Versions/5/$i @executable_path/../Frameworks/$i.framework/Versions/5/$i $BUNDLE_NAME.app/Contents/MacOS/minori
f31305b9f60a *: various code safety changes
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
30 done
f31305b9f60a *: various code safety changes
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
31 fi