-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] [com.blizzard.Diablo3] Initial Diablo III flatpak #73
Open
johnramsden
wants to merge
3
commits into
winepak:master
Choose a base branch
from
johnramsden:com.blizzard.Diablo3
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
app-id: com.blizzard.Diablo3 | ||
branch: stable | ||
|
||
runtime: org.winepak.Platform | ||
runtime-version: 3.0 | ||
sdk: org.winepak.Sdk | ||
|
||
base: com.blizzard.BattleNet.BaseApp | ||
base-version: stable | ||
|
||
command: diablo3 | ||
|
||
inherit-extensions: | ||
- org.winepak.Platform.Compat32 | ||
- org.winepak.Platform.Extension.corefonts | ||
|
||
add-extensions: | ||
org.winepak.Platform.Wine: | ||
directory: lib/wine | ||
version: 3.10-staging | ||
add-ld-path: lib | ||
no-autodownload: false | ||
|
||
org.winepak.Platform.Wine.Compat32: | ||
directory: lib/wine-32bit | ||
version: 3.10-staging | ||
add-ld-path: lib | ||
no-autodownload: false | ||
|
||
org.winepak.Platform.Extension.vcrun2015: | ||
directory: lib/extension/vcrun2015 | ||
version: 3.0 | ||
add-ld-path: lib | ||
no-autodownload: false | ||
|
||
tags: | ||
- proprietary | ||
|
||
finish-args: | ||
- --socket=x11 | ||
- --socket=pulseaudio | ||
- --share=ipc | ||
- --share=network | ||
- --device=dri | ||
- --allow=multiarch | ||
# --allow=devel is required to launch Diablo III | ||
# | ||
# Without it the game will partily launch then crash. | ||
# | ||
# Ideally flatpak applications shouldn't have --allow=devel, so this needs to | ||
# be investigated. | ||
- --allow=devel | ||
|
||
modules: | ||
- name: setup-wine | ||
buildsystem: simple | ||
build-commands: | ||
- mkdir -p /app/lib/wine | ||
|
||
- name: setup-wine-compat32 | ||
buildsystem: simple | ||
build-commands: | ||
- mkdir -p /app/lib/wine-32bit | ||
|
||
- name: setup-vcrun2015 | ||
buildsystem: simple | ||
build-commands: | ||
- mkdir -p /app/lib/extension/vcrun2015 | ||
|
||
- name: diablo-3 | ||
only-arches: | ||
- x86_64 | ||
buildsystem: simple | ||
build-commands: | ||
- install -d /app/bin | ||
- install d3-installer /app/bin | ||
- install diablo3 /app/bin | ||
# - install -Dm644 com.blizzard.Diablo3.appdata.xml /app/share/appdata/com.blizzard.Diablo3.appdata.xml | ||
# - install -Dm644 com.blizzard.Diablo3.desktop /app/share/applications/com.blizzard.Diablo3.desktop | ||
sources: | ||
- type: script | ||
dest-filename: d3-installer | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nitpick but I would prefer if it was |
||
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 ''Diablo III'' install at ${WINEPREFIX}"' | ||
- ' echo "In order to install ''Diablo III'' you must move or delete the current prefix."' | ||
- ' exit 1' | ||
- fi | ||
- | ||
- echo "Downloading installer..." | ||
- curl -L --progress-bar --output "${XDG_CACHE_HOME}/d3-installer.exe" "https://www.battle.net/download/getInstallerForGame?os=win&version=LIVE&gameProgram=DIABLO_3" | ||
- | ||
- echo "Setting-up wine prefix..." | ||
- wineboot | ||
- | ||
- echo "Installing Extension(s)..." | ||
- echo "Installing corefonts..." | ||
- source /app/lib/extension/corefonts/bin/corefonts-install64 | ||
- | ||
- echo "Installing vcrun2015..." | ||
- source /app/lib/extension/vcrun2015/bin/vcrun2015-install64 | ||
- | ||
- echo "Performing tweak(s)..." | ||
- echo "Disable winemenubuilder.exe..." | ||
- wine64 reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe /d '' /f | ||
- | ||
- echo "Clear Windows Version" | ||
- wine64 reg delete 'HKLM\Software\Microsoft\Windows\CurrentVersion' /v SubVersionNumber /f | ||
- wine64 reg delete 'HKLM\Software\Microsoft\Windows\CurrentVersion' /v VersionNumber /f | ||
- wine64 reg delete 'HKLM\Software\Microsoft\Windows NT\CurrentVersion' /v CSDVersion /f | ||
- wine64 reg delete 'HKLM\Software\Microsoft\Windows NT\CurrentVersion' /v CurrentBuildNumber /f | ||
- wine64 reg delete 'HKLM\Software\Microsoft\Windows NT\CurrentVersion' /v CurrentVersion /f | ||
- wine64 reg delete 'HKLM\System\CurrentControlSet\Control\ProductOptions' /v ProductType /f | ||
- wine64 reg delete 'HKLM\System\CurrentControlSet\Control\ServiceCurrent' /v OS /f | ||
- wine64 reg delete 'HKLM\System\CurrentControlSet\Control\Windows' /v CSDVersion /f | ||
- wine64 reg delete 'HKCU\Software\Wine' /v Version /f | ||
- wine64 reg delete 'HKLM\System\CurrentControlSet\Control\ProductOptions' /v ProductType /f | ||
- | ||
- echo "Set Windows Version to 10" | ||
- wine64 reg add 'HKLM\System\CurrentControlSet\Control\ProductOptions' /v ProductType /d 'WinNT' /f | ||
- wine64 reg add 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' /v CSDVersion /d '' /f | ||
- wine64 reg add 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' /v CurrentBuildNumber /d '10240' /f | ||
- wine64 reg add 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' /v CurrentVersion /d '10.0' /f | ||
- wine64 reg add 'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Windows' /v CSDVersion /t REG_DWORD /d 00000000 /f | ||
- | ||
- echo "Create Battle.net config" | ||
- 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"' | ||
- | ||
- echo "Installing application..." | ||
- wine64 "${XDG_CACHE_HOME}/d3-installer.exe" | ||
- | ||
- echo "Installer finished" | ||
- type: script | ||
dest-filename: diablo3 | ||
commands: | ||
- export WINEARCH=win64 | ||
- | ||
- if ! [ -e "${WINEPREFIX}/dosdevices/c:/Program Files (x86)/Battle.net" ] ; then | ||
- ' if ! /app/bin/d3-installer; then' | ||
- ' echo "Installation failed, abort."' | ||
- ' exit 1' | ||
- ' fi' | ||
- fi | ||
- | ||
- wine64 "C:/Program Files (x86)/Battle.net/Battle.net Launcher.exe" | ||
# - type: file | ||
# path: com.blizzard.Diablo3.appdata.xml | ||
# - type: file | ||
# path: com.blizzard.Diablo3.desktop | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're basing off the base app but not using the battlenet-installer, can you please update the manifest to mirror the style of the StarCraft2 module: https://github.com/winepak/applications/blob/master/com.blizzard.StarCraft2/com.blizzard.StarCraft2.yml#L53
The battlenet:// shortcut is
battlenet://D3
Source: b1f2837