Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 69 additions & 7 deletions com.blizzard.BattleNet.BaseApp/com.blizzard.BattleNet.BaseApp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,42 @@ finish-args:
- --allow=multiarch

modules:
- name: setup-compat32
buildsystem: simple
build-commands:
- mkdir -p /app/lib/32bit
- ln -s /app/lib/32bit/lib/ld-linux.so.2 /app/lib/ld-linux.so.2

- name: setup
buildsystem: simple
build-commands:
- mkdir -p /app/lib/extension/corefonts
- mkdir -p /app/lib/extension/vcrun2015

- name: jq
config-opts:
- --prefix=/app
- --with-oniguruma=/app
- --disable-maintainer-mode
- --disable-docs
sources:
- type: archive
url: https://github.com/stedolan/jq/releases/download/jq-1.5/jq-1.5.tar.gz
sha256: c4d2bfec6436341113419debf479d833692cc5cdab7eb0326b5a4d4fbe9f493c
modules:
- name: oniguruma
config-opts:
- --prefix=/app
sources:
- type: archive
url: https://github.com/kkos/oniguruma/releases/download/v6.8.2/onig-6.8.2.tar.gz
sha256: adeada5f6b54c2a6f58ff021831a01b18a62b55ea9935e972e36ebb19e7c4903
cleanup:
- /lib/debug
- /lib/*.a
- /lib/pkgconfig
- /include
- /share
cleanup:
- /lib/debug
- /lib/*.a
- /include
- /share

- name: battlenet
only-arches:
- x86_64
Expand All @@ -57,6 +81,24 @@ modules:
- type: script
dest-filename: battlenet-installer
commands:
- while getopts ":c:" opt; do
- case $opt in '
- c) '
- battlenet_append_config_filter=${OPTARG} '
- ;; '
- \?) '
- echo "Invalid option: -$OPTARG" >&2 '
- exit 1 '
- ;; '
- :) '
- echo "Option -$OPTARG requires an argument." >&2'
- exit 1 '
- ;; '
- esac '
- done
-
- shift $(expr $OPTIND - 1 )
-
- if [ -z "$WINEPREFIX" ] ; then
- ' echo "No wine prefix set or is empty, abort."'
- ' exit 1'
Expand Down Expand Up @@ -92,8 +134,22 @@ modules:
- wine64 reg add "HKEY_CURRENT_USER\Software\Wine\WineDbg" /v "ShowCrashDialog" /t "REG_DWORD" /d "00000000" /f
-
- echo "Create Battle.net config"
- battlenet_config="${WINEPREFIX}/dosdevices/c:/users/${USER}/Application Data/Battle.net/Battle.net.config"
- battlenet_config_temp=$(mktemp)
-
- mkdir -p "${WINEPREFIX}/dosdevices/c:/users/${USER}/Application Data/Battle.net"
- 'echo "{ \"Client\": { \"HardwareAcceleration\": false, \"Sound\": { \"Enabled\": false } } }" > "${WINEPREFIX}/dosdevices/c:/users/${USER}/Application Data/Battle.net/Battle.net.config"'
-
- if ! [ -e ${battlenet_config} ]; then
- ' echo "{}" > ${battlenet_config}'
- fi
-
- battlenet_config_filter='.Client.HardwareAcceleration = "false" | .Client.Sound.Enabled = "false" | .Client.Version.FirstRun = "false" | .Client.Version.Release.FirstRun = "false" | .Client.GameSearch.PerformedSearch = "true"'
- if ! [ -z "${battlenet_append_config_filter}" ]; then
- ' battlenet_config_filter="${battlenet_config_filter} | ${battlenet_append_config_filter}"'
- fi
-
- jq --null-input "${battlenet_config_filter}" "${battlenet_config}" > "${battlenet_config_temp}"
- mv -f "${battlenet_config_temp}" "${battlenet_config}"
-
- echo "Installing application..."
- wine64 "${XDG_CACHE_HOME}/winepak/battlenet-installer.exe" "$@"
Expand All @@ -110,3 +166,9 @@ modules:
-
- echo "Installer finished"

- name: setup-compat32
buildsystem: simple
build-commands:
- mkdir -p /app/lib/32bit
- ln -s /app/lib/32bit/lib/ld-linux.so.2 /app/lib/ld-linux.so.2