Welcome to mirror list, hosted at ThFree Co, Russian Federation.

create-app-bundle.sh « macos « contrib - github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d30f48dcf5455fa5c5e84b95c6db51cbb88cf5c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash

# For redistributable bundle, run ./configure with following args:
# --enable-sdl-static
# --disable-opus-cdda
# --disable-screenshots
# --disable-network

set -x

version=$(git describe --abbrev=5)
#opt=/usr/local/opt
dst="dist/DOSBox Staging.app/Contents/"

# Generate icon
make -C contrib/icons/ dosbox-staging.icns

# Prepare content
install -d "$dst/MacOS/"
install -d "$dst/Resources/"
install -d "$dst/SharedSupport/"

install        "src/dosbox"                                "$dst/MacOS/"
# install        "$opt/libpng/lib/libpng16.16.dylib"         "$dst/MacOS/"
# install        "$opt/opusfile/lib/libopusfile.0.dylib"     "$dst/MacOS/"
# install        "$opt/sdl2/lib/libSDL2-2.0.0.dylib"         "$dst/MacOS/"
# install        "$opt/sdl2_image/lib/libSDL2_image-2.0.0.dylib" "$dst/MacOS/"
# install        "$opt/sdl2_net/lib/libSDL2_net-2.0.0.dylib" "$dst/MacOS/"
install -m 644 "contrib/macos/Info.plist.template"           "$dst/Info.plist"
install -m 644 "contrib/macos/PkgInfo"                     "$dst/PkgInfo"
install -m 644 "contrib/icons/dosbox-staging.icns"         "$dst/Resources/"
install -m 644 "docs/README.template"                      "$dst/SharedSupport/README"
install -m 644 "COPYING"                                   "$dst/SharedSupport/COPYING"
install -m 644 "README"                                    "$dst/SharedSupport/manual.txt"
install -m 644 "docs/README.video"                         "$dst/SharedSupport/video.txt"
# install -d     "$dst/Contents/_CodeSignature/" # ?

# Fill README template file
sed -i -e "s|%VERSION%|$version|"                     "$dst/Info.plist"
sed -i -e "s|%GIT_COMMIT%|$GITHUB_SHA|"               "$dst/SharedSupport/README"
sed -i -e "s|%GIT_BRANCH%|${GITHUB_REF#refs/heads/}|" "$dst/SharedSupport/README"
sed -i -e "s|%GITHUB_REPO%|$GITHUB_REPOSITORY|"       "$dst/SharedSupport/README"

ln -s /Applications dist/

hdiutil create \
    -volname "DOSBox Staging" \
    -srcfolder dist \
    -ov -format UDZO "dosbox-staging $version.dmg"