[com.blizzard.BattleNet.BaseApp] Add json editor 'jq'#101
Conversation
|
While |
|
I changed the module around a bit on my side - name: jq
config-opts:
- --prefix=/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
- /shareSo that the If you run and check or Then it gets deleted... |
jq and oniguruma run ldconfig -n /app/lib in their install scripts, which removes symbolic links in /app/lib. The fix is to move the setup-compat32 module to the bottom. Also other clean-ups to the modules.
|
It's this command in the build script The final I guess ldconfig deletes symbolic links ... Changes here: Do you want to amend your pr or should I merge the branch above? You'll be credited for both. Entire file: id: com.blizzard.BattleNet.BaseApp
branch: stable
runtime: org.winepak.Platform
runtime-version: 3.0
sdk: org.winepak.Sdk
add-extensions:
org.winepak.Platform.Compat32:
directory: lib/32bit
version: 3.0
add-ld-path: lib
no-autodownload: false
org.winepak.Platform.Extension.corefonts:
directory: lib/extension/corefonts
version: 3.0
no-autodownload: false
org.winepak.Platform.Extension.vcrun2015:
directory: lib/extension/vcrun2015
version: 3.0
no-autodownload: false
tags:
- proprietary
finish-args:
- --socket=x11
- --socket=pulseaudio
- --share=ipc
- --share=network
- --device=dri
- --allow=multiarch
modules:
- 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
buildsystem: simple
build-commands:
- install -d /app/bin
- install battlenet-installer /app/bin
sources:
- type: script
dest-filename: battlenet-installer
commands:
- if [ -z "$WINEPREFIX" ] ; then
- ' echo "No wine prefix set or is empty, abort."'
- ' exit 1'
- fi
-
- if [ -e "${WINEPREFIX}/dosdevices/c:/Program Files (x86)/Battle.net" ] ; then
- ' echo "This prefix already has an exisiting ''Battle.Net'' install at ${WINEPREFIX}"'
- ' echo "In order to install ''Battle.Net'' you must move or delete the current prefix."'
- ' exit 1'
- fi
-
- echo "Downloading installer..."
- mkdir -p "${XDG_CACHE_HOME}/winepak"
- curl -L --progress-bar --output "${XDG_CACHE_HOME}/winepak/battlenet-installer.exe" "https://www.battle.net/download/getInstallerForGame?os=win&version=LIVE&gameProgram=BATTLENET_APP"
-
- echo "Setting-up wine prefix..."
- wineboot
-
- echo "Installing Extension(s)..."
- source /app/lib/extension/corefonts/bin/corefonts-install64
- source /app/lib/extension/vcrun2015/bin/vcrun2015-install64
- source /app/lib/extension/vcrun2015/bin/vcrun2015-install64-wow64
-
- echo "Performing tweak(s)..."
- echo "Disable winemenubuilder.exe..."
- wine64 reg add "HKEY_CURRENT_USER\Software\Wine\DllOverrides" /v "winemenubuilder.exe" /d "" /f
-
- echo "Set Windows Version for Steam and Steamwebhelper..."
- wine64 reg add "HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe" /v "Version" /t "REG_SZ" /d "win10" /f
- wine64 reg add "HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe" /v "Version" /t "REG_SZ" /d "win10" /f
-
- echo "Disable crash dialog..."
- 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"
- jq --null-input '.Client.HardwareAcceleration = "false" | .Client.Sound.Enabled = "false" | .Client.Version.FirstRun = "false" | .Client.Version.Release.FirstRun = "false" | .Client.GameSearch.PerformedSearch = "true"' "$battlenet_config" > "$battlenet_config_temp"
- mv -f "$battlenet_config_temp" "$battlenet_config"
-
- echo "Installing application..."
- wine64 "${XDG_CACHE_HOME}/winepak/battlenet-installer.exe" "$@"
-
- echo "Delete SystemSurvey.exe..."
- if [ -f "${WINEPREFIX}/dosdevices/c:/Program Files (x86)/Battle.net/Battle.net*/SystemSurvey.exe" ] ; then
- ' mv "${WINEPREFIX}/dosdevices/c:/Program Files (x86)/Battle.net/Battle.net*/SystemSurvey.exe" "${WINEPREFIX}/dosdevices/c:/Program Files (x86)/Battle.net/Battle.net*/SystemSurvey.exe.bak"'
- fi
-
- echo "Delete Battle.net Helper.exe..."
- if [ -f "${WINEPREFIX}/dosdevices/c:/Program Files (x86)/Battle.net/Battle.net*/Battle.net Helper.exe" ] ; then
- ' mv "${WINEPREFIX}/dosdevices/c:/Program Files (x86)/Battle.net/Battle.net*/Battle.net Helper.exe" "${WINEPREFIX}/dosdevices/c:/Program Files (x86)/Battle.net/Battle.net*/Battle.net Helper.exe.bak"'
- fi
-
- 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 |
|
Also above & in the branch includes the Interesting enough the Battle.net client doesn't even respect it's own configs, This might also be worth adding: |
|
@julianrichen I just pulled from your branch for history's sake. Interesting that ldconfig would be deleting symbolic links. |
Use '-c <filter>' to pass en extra filters
|
Added a Example usage might be: Which would output: |
A json editor is needed to modified Battlenet configuration easily. This has been discussed as something that could be helpful in #73 and #88.
Right now it is difficult to edit battle net configuration, without destroying the existing file. Using the json editor would make it much easier to make small configuration edits.