Skip to content

Extracting MPQs from the GoG installer

Eric Robinson edited this page Aug 25, 2024 · 1 revision

Download GoG's Diablo offline installer

Install binary if available

Get the latest Windows release from Innoextract Github
Ubuntu 20.04 and up you can install with sudo apt install innoextract
For macOS you can use homebrew: brew install innoextract
For Android and iOS follow the directions at the bottom of the page

Install required dependencies for innoextract compilation

innoextract requirements

From the innoextract official install instructions the stated dependencies are (taken verbatim and then edited):

  1. a C++ compiler
  2. CMake >= 2.8 or newer
  3. Boost >= 1.37 (including development headers)
  4. liblzma (from xz-utils, including development headers)
  5. iconv (optional, via glibc, uClibc, or a separate libiconv)

Ubuntu

These dependencies can be installed on an Ubuntu system with the following command (as detailed on the innoextract official install instructions page):

sudo apt install build-essential cmake libboost-all-dev liblzma-dev

Other Operating Systems

Please consult your operating system's documentation and related texts for information on how to install the required dependencies.

Install the latest git snapshot of innoextract

On Linux systems, and other similar systems, issue the following commands in your terminal:

git clone https://github.com/dscharrer/innoextract.git
cd innoextract/cmake/
cmake ..
make
sudo make install

Please note that this requires that git be installed on your system.

Check innoextract version

The innoextract version must be >= 1.8 for it to be able to extract the MPQ from the GOG Diablo installer.

innoextract --version

Should return something similar to the following:

innoextract 1.8-dev + 08b1ee8
Extracts installers created by Inno Setup 1.2.10 to 6.0.2

Get information about the GOG Diablo installer

In a terminal, run the following command: innoextract --info 'setup_diablo_1.09_hellfire_v2_(30038).exe' (adjust file name as appropriate)

This should return:

Inspecting "Diablo + Hellfire" - setup data version 5.6.2 (unicode)

Languages:
 - en-US

GOG.com game ID is 1412601690

Setup is not passworded!

Extract DIABDAT.MPQ and the four Hellfire .MPQs from the installer

Linux: innoextract -I DIABDAT.MPQ -I hellfire.mpq -I hfmonk.mpq -I hfmusic.mpq -I hfvoice.mpq 'setup_diablo_1.09_hellfire_v2_(30038).exe' && mv hellfire/h*.mpq ./ && rmdir hellfire

Windows: innoextract -I DIABDAT.MPQ -I hellfire.mpq -I hfmonk.mpq -I hfmusic.mpq -I hfvoice.mpq setup_diablo_1.09_hellfire_v2_(30038).exe && move hellfire\h*.mpq .\ && rmdir hellfire

Extracting "Diablo + Hellfire" - setup data version 5.6.2 (unicode)  
 - "DIABDAT.MPQ" [en-US]  
 - "hellfire/hellfire.mpq" [en-US]  
 - "hellfire/hfvoice.mpq" [en-US]  
 - "hellfire/hfmusic.mpq" [en-US]  
 - "hellfire/hfmonk.mpq" [en-US]  
Done.  

Copy the extracted MPQs to the required location

Linux: cp /some/path/*.mpq /some/new/path/
macOS: cp *.[mM][pP][qQ] ~/Library/Application\ Support/diasurgical/devilution
Windows: copy c:\some\path\*.mpq c:\some\new\path\

Android

Login to GOG.com and download the offline installer: setup_diablo_1.09_hellfire_v2_(30038).exe
Download and install Inno Setup Extractor

Run Inno Setup Extractor and follow the on-screen instructions
During step 1, select the offline installer you downloaded from GOG.com
During step 2, it is highly recommended to create a new folder to extract the files into so they can be easily cleaned up afterward

Locate the app icon for DevilutionX and long press to access additional options
Select the Import Data option from the list
Screenshot_20221029-104244

In the file browser that appears, navigate to the directory from step 2 of the Inno Setup Extractor and select DIABDAT.MPQ
This may take a few seconds, the file browser will close automatically when the import is complete
If you would like to play the Hellfire expansion, repeat this import process for the hellfire.mpq, hfmonk.mpq, hfmusic.mpq, and hfvoice.mpq files in the hellfire subdirectory
image image

Open DevilutionX to start playing

Note: The import process copies the MPQ files into external storage for the DevilutionX app. Once you have verified that the app is working, feel free to delete the DevilutionX directory to free up space.

iOS

Open DevilutionX then close it

Login to GOG.com and download the Diablo_Setup.exe

Download and Open iSH
Install innoextract
apk add innoextract

Open the iOS Files app
Go to your Downloads folder Copy or Move setup_diablo_1.09_hellfire_v2_(30038).exe to iSH > root

Go back to iSH
Extract the MPQs
innoextract -I DIABDAT.MPQ -I hellfire.mpq -I hfmonk.mpq -I hfmusic.mpq -I hfvoice.mpq 'setup_diablo_1.09_hellfire_v2_(30038).exe' && mv hellfire/h*.mpq ./ && rmdir hellfire

Go back to Files
Copy or Move all MPQs to On My iPhone > DevilutionX

Open DevilutionX