diff --git a/com.blizzard.Diablo3/README.md b/com.blizzard.Diablo3/README.md new file mode 100644 index 0000000..b121141 --- /dev/null +++ b/com.blizzard.Diablo3/README.md @@ -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 + diff --git a/com.blizzard.Diablo3/com.blizzard.Diablo3.appdata.xml b/com.blizzard.Diablo3/com.blizzard.Diablo3.appdata.xml new file mode 100644 index 0000000..b0b60e6 --- /dev/null +++ b/com.blizzard.Diablo3/com.blizzard.Diablo3.appdata.xml @@ -0,0 +1,37 @@ + + + com.blizzard.Diablo3.desktop + CC0-1.0 + LicenseRef-proprietary + Diablo III + Action role-playing game + +

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.

+
+ + winepak + Blizzard Entertainment + + https://diablo3.com + https://us.battle.net/support/en/games/diablo3 + https://us.battle.net/forums/en/d3/3354739/ + + + Game + ActionRolePlaying + + + + 1024 + + + + + +
    +
  • Initial release of Diablo III via winepak.
  • +
+
+
+
+
diff --git a/com.blizzard.Diablo3/com.blizzard.Diablo3.desktop b/com.blizzard.Diablo3/com.blizzard.Diablo3.desktop new file mode 100644 index 0000000..075849e --- /dev/null +++ b/com.blizzard.Diablo3/com.blizzard.Diablo3.desktop @@ -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; diff --git a/com.blizzard.Diablo3/com.blizzard.Diablo3.svg b/com.blizzard.Diablo3/com.blizzard.Diablo3.svg new file mode 100644 index 0000000..c1a7398 --- /dev/null +++ b/com.blizzard.Diablo3/com.blizzard.Diablo3.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/com.blizzard.Diablo3/com.blizzard.Diablo3.yml b/com.blizzard.Diablo3/com.blizzard.Diablo3.yml new file mode 100644 index 0000000..b78bb51 --- /dev/null +++ b/com.blizzard.Diablo3/com.blizzard.Diablo3.yml @@ -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 +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 < "${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 + +