Skip to content
Open
Show file tree
Hide file tree
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
36 changes: 36 additions & 0 deletions com.blizzard.Diablo3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Diablo III

Massively-multiplayer online role-playing game

## Status

| Arch | Installs | Runs | Notes |
| ----- | -------- | ---- | ----- |
| 32bit | N/A | N/A | |
| 64bit | Yes | Yes | Installs & runs. |

## Build & Install
### Repo
#### 32bit

flatpak-builder --arch=i386 --force-clean builds --repo=winepak com.blizzard.Diablo3.yml
flatpak --user install winepak com.blizzard.Diablo3

#### 64bit

flatpak-builder --arch=x86_64 --force-clean builds --repo=winepak com.blizzard.Diablo3.yml
flatpak --user install winepak com.blizzard.Diablo3

### Direct
#### 32bit

flatpak-builder --user --arch=i386 --force-clean --install builds com.blizzard.Diablo3.yml

#### 64bit

flatpak-builder --user --arch=x86_64 --force-clean --install builds com.blizzard.Diablo3.yml

## Run

flatpak run com.blizzard.Diablo3

37 changes: 37 additions & 0 deletions com.blizzard.Diablo3/com.blizzard.Diablo3.appdata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>com.blizzard.Diablo3.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>LicenseRef-proprietary</project_license>
<name>Diablo III</name>
<summary>Action role-playing game</summary>
<description>
<p>The demonically-besieged world of Sanctuary needs heroes. Will you heed the call? Diablo III is an action role-playing game from Blizzard Entertainment for the PC and Mac.</p>
</description>

<project_group>winepak</project_group>
<developer_name>Blizzard Entertainment</developer_name>

<url type="homepage">https://diablo3.com</url>
<url type="help">https://us.battle.net/support/en/games/diablo3</url>
<url type="bugtracker">https://us.battle.net/forums/en/d3/3354739/</url>

<categories>
<category>Game</category>
<category>ActionRolePlaying</category>
</categories>

<recommends>
<memory>1024</memory>
</recommends>

<releases>
<release date="2018-07-14" version="0.1.0">
<description>
<ul>
<li>Initial release of Diablo III via winepak.</li>
</ul>
</description>
</release>
</releases>
</component>
11 changes: 11 additions & 0 deletions com.blizzard.Diablo3/com.blizzard.Diablo3.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Desktop Entry]
Name=Diablo III
Comment=Action role-playing game
Icon=com.blizzard.Diablo3.svg
Exec=diablo3 %U
StartupNotify=true
Terminal=false
Type=Application
MimeType=application/x-ms-dos-executable;application/x-msi;application/x-ms-shortcut;
Categories=Game;RolePlaying;
Keywords=DiabloIII;Blizzard;ARPG;
48 changes: 48 additions & 0 deletions com.blizzard.Diablo3/com.blizzard.Diablo3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
188 changes: 188 additions & 0 deletions com.blizzard.Diablo3/com.blizzard.Diablo3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
app-id: com.blizzard.Diablo3
branch: stable

runtime: org.winepak.Platform
runtime-version: 3.0
sdk: org.winepak.Sdk

base: com.blizzard.BattleNet.BaseApp
Copy link
Contributor

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

base-version: stable

command: diablo3

inherit-extensions:
- org.winepak.Platform.Compat32
- org.winepak.Platform.Extension.corefonts
- org.winepak.Platform.Extension.vcrun2015

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

tags:
- proprietary

finish-args:
- --socket=x11
- --socket=pulseaudio
- --share=ipc
- --share=network
- --device=dri
- --filesystem=xdg-documents
- --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
- --env=MESA_GLTHREAD=true
- --env=__GL_THREADED_OPTIMIZATIONS=1

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: diablo3
only-arches:
- x86_64
buildsystem: simple
build-commands:
- install -d /app/bin
- install diablo3-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
- install -Dm664 com.blizzard.Diablo3.svg /app/share/icons/hicolor/scalable/apps/com.blizzard.Diablo3.svg
sources:
- type: script
dest-filename: diablo3-installer
commands:
- if [ -z "$WINEPREFIX" ] ; then
- ' echo "No wine prefix set or is empty, abort."'
- ' exit 1'
- fi
-
- source /app/bin/battlenet-installer "battlenet://D3"
-
- if [[ $? != 0 ]] ; then
- ' echo "Battle.net installer failed, abort."'
- ' exit 1'
- fi
-
- echo "Performing tweak(s)..."
- echo "Disable winemenubuilder.exe..."
- wine64 reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe /d '' /f
-
- echo "Set DirectDrawRenderer to opengl..."
- wine64 reg add "HKEY_CURRENT_USER\Software\Wine\Direct3D" /v "DirectDrawRenderer" /d "opengl" /f
-
- echo "Disable Multisampling..."
- wine64 reg add "HKEY_CURRENT_USER\Software\Wine\Direct3D" /v "Multisampling" /d "disabled" /f
-
- echo "Set OffScreenRenderingMode to pbuffer..."
- wine64 reg add "HKEY_CURRENT_USER\Software\Wine\Direct3D" /v "OffScreenRenderingMode" /d "pbuffer" /f
-
- echo "Enable GLSL..."
- wine64 reg add "HKEY_CURRENT_USER\Software\Wine\Direct3D" /v "UseGLSL" /d "enabled" /f
-
- echo "Set VertexShaderMode to hardware..."
- wine64 reg add "HKEY_CURRENT_USER\Software\Wine\Direct3D" /v "VertexShaderMode" /d "hardware" /f
-
- echo "Enable DXVA2..."
- wine64 reg add "HKEY_CURRENT_USER\Software\Wine\DXVA2" /v "backend" /d "va" /f
-
- echo "Disable UseXVidMode"
- wine64 reg add 'HKEY_CURRENT_USER\Software\Wine\X11 Driver' /v UseXVidMode /d N /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
-
# This doesn't seem to persist
# - echo "Setting battlenet launcher to 32bit mode"
# - mkdir -p "${WINEPREFIX}/dosdevices/c:/users/${USER}/Application Data/Battle.net"
# - 'cat <<EOF > "${WINEPREFIX}/dosdevices/c:/users/${USER}/Application Data/Battle.net/Battle.net.config"'
# - '{ '
# - ' "Client": { '
# - ' "HardwareAcceleration": false,'
# - ' "Sound": { '
# - ' "Enabled": false '
# - ' } '
# - ' }, '
# - ' "Games": { '
# - ' "diablo3": { '
# - ' "Run64Bit": false, '
# - ' "Run64BitSet": true '
# - ' } '
# - ' } '
# - '} '
# - 'EOF'
-
- echo "Installer finished"
- type: script
dest-filename: diablo3
commands:
- export WINEARCH=win64
- export __GL_SHADER_DISK_CACHE=1
- export __GL_SHADER_DISK_CACHE_PATH=${WINEPREFIX}
-
- if ! [ -e "${WINEPREFIX}/dosdevices/c:/Program Files (x86)/Battle.net" ] ; then
- ' source /app/bin/diablo3-installer'
- ' if [[ $? != 0 ]] ; then'
- ' echo "Installation failed, abort."'
- ' exit 1'
- ' fi'
- fi
-
- echo "Verify \"Battle.net Helper.exe\" doesn't launch..."
- 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
-
- wine64 "${WINEPREFIX}/dosdevices/c:/Program Files (x86)/Battle.net/Battle.net Launcher.exe" "battlenet://D3"
- type: file
path: com.blizzard.Diablo3.appdata.xml
- type: file
path: com.blizzard.Diablo3.desktop
- type: file
path: com.blizzard.Diablo3.svg