Skip to content

Commit

Permalink
README.md: Update the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreRH committed Oct 8, 2023
1 parent dc88424 commit 8372f1d
Showing 1 changed file with 57 additions and 36 deletions.
93 changes: 57 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ If you need those features, have a look at older releases before 0.8.x.
Emulator integrations:

- [QEMU](https://gitlab.com/qemu-project/qemu): Mostly done, though needs fixes for stability and CriticalSection
- [FEX](https://github.com/FEX-Emu/FEX): Mostly done, though needs fixes for exceptions
- [FEX](https://github.com/FEX-Emu/FEX): Available as Unix and PE
- [Box64](https://github.com/ptitSeb/box64/): Mostly done, but depends on the early 32-bit emulation of Box64
- [Blink](https://github.com/jart/blink): started, not part of this repository yet
- [Box32](https://news.itsfoss.com/box86-creator-ptitseb/): doesn't exist yet
Expand All @@ -35,8 +35,8 @@ It also will handle x86 faster than Box64 I assume.)
### 3) Preview
A paid [preview](https://www.patreon.com/posts/previews-82611984) is available with currently the following features coming soon:

- Wine 8.16
- FEX-2309
- Wine 8.18
- Updated FEX
- Updated Box64

### 4) Discord
Expand All @@ -48,9 +48,36 @@ First make sure you have the submodules set up:
```bash
$ git submodule update --init --recursive
```
And note while Box64 is integrated, you can build other emulators (currently QEMU and FEX), but you don't need to, one is enough depending on your use-case.
And note while Box64 is integrated, you can build other emulators (currently FEX and QEMU), but you don't need to, one is enough depending on your use-case.

#### 5.1) QEMU (optional)
#### 5.1) Wine (including Box64)
To build Hangover Wine you need:

- The dependencies to [build](https://wiki.winehq.org/Building_Wine#Satisfying_Build_Dependencies) a 64 bit Wine
- [llvm-mingw](https://github.com/mstorsjo/llvm-mingw) for PE cross-compilation (downlaod & unpack a release, but don't use the .zip files, they are for Windows)
- About 5GB of disk space

on x86-64 (from the Hangover repository):
```bash
$ mkdir -p wine/build
$ cd wine/build
$ export PATH=/path/to/llvm-mingw/bin:$PATH
$ ../configure --enable-win64 --disable-tests --with-mingw --enable-archs=i386,x86_64,arm
$ make -j$(nproc)
$ sudo make install
```

on ARM64 (from the Hangover repository):
```bash
$ mkdir -p wine/build
$ cd wine/build
$ export PATH=/path/to/llvm-mingw/bin:$PATH
$ ../configure --disable-tests --with-mingw --enable-archs=i386,aarch64,arm
$ make -j$(nproc)
$ sudo make install
```

#### 5.2) QEMU (optional)
To build QEMU as a library you need:

- The dependencies to build QEMU (in particular glib)
Expand All @@ -68,59 +95,49 @@ In case the compiler complains about something in linux-user/ioctls.h remove the

Place resulting libraries (build/libqemu-arm.so and/or build/libqemu-i386.so) in /opt (default) or set HOLIB to the full path of the resulting library.

#### 5.2) FEX (optional)
#### 5.3) FEX, Unix (optional)
To build FEXCore from FEX you need:

- The dependencies to [build](https://wiki.fex-emu.com/index.php/Development:Setting_up_FEX) FEX (in particular libepoxy and libsdl2)
- About 1.5GB of disk space
- The dependencies to [build](https://wiki.fex-emu.com/index.php/Development:Setting_up_FEX) FEX (in particular clang, libepoxy and libsdl2)
- About 1.4GB of disk space

Build it like (from the Hangover repository):
```bash
$ mkdir -p fex/build
$ cd fex/build
$ CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_LTO=True -DENABLE_LLD=True -DBUILD_TESTS=False -DENABLE_ASSERTIONS=False ..
$ mkdir -p fex/build_unix
$ cd fex/build_unix
$ CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_LTO=True -DBUILD_TESTS=False -DENABLE_ASSERTIONS=False ..
$ make -j$(nproc) FEXCore_shared
```

On x86-64 you might need to add "-DENABLE_X86_HOST_DEBUG=True" to the cmake call.

Place resulting library (build/External/FEXCore/Source/libFEXCore.so) in /opt (default) or set HOLIB to the full path of the resulting library.
Place resulting library (build_unix/FEXCore/Source/libFEXCore.so) in /opt (default) or set HOLIB to the full path of the resulting library.

#### 5.3) Wine
To build Hangover Wine you need:
#### 5.4) FEX, PE (optional)
To build wow64fex from FEX you need:

- The dependencies to [build](https://wiki.winehq.org/Building_Wine#Satisfying_Build_Dependencies) a 64 bit Wine
- [llvm-mingw](https://github.com/mstorsjo/llvm-mingw) for PE cross-compilation (downlaod & unpack a release, but don't use the .zip files, they are for Windows)
- About 5GB of disk space
- About 1.5GB of disk space

on x86-64 (from the Hangover repository):
Build it like (from the Hangover repository):
```bash
$ mkdir -p wine/build
$ cd wine/build
$ mkdir -p fex/build_pe
$ cd fex/build_pe
$ export PATH=/path/to/llvm-mingw/bin:$PATH
$ ../configure --enable-win64 --disable-tests --with-mingw --enable-archs=i386,x86_64,arm
$ make -j$(nproc)
$ sudo make install
```
$ cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain_mingw.cmake -DENABLE_JEMALLOC=0 -DENABLE_JEMALLOC_GLIBC_ALLOC=0 -DMINGW_TRIPLE=aarch64-w64-mingw32 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=False -DENABLE_ASSERTIONS=False ..

on ARM64 (from the Hangover repository):
```bash
$ mkdir -p wine/build
$ cd wine/build
$ export PATH=/path/to/llvm-mingw/bin:$PATH
$ ../configure --disable-tests --with-mingw --enable-archs=i386,aarch64,arm
$ make -j$(nproc)
$ sudo make install
$ make -j$(nproc) wow64fex
```

Place resulting library (build_pe/Bin/libwow64fex.dll) in your wine prefix under drive_c/windows/system32/.

### 6) Running
You can add the following environment variables:

* HODLL to select the emulator dll:
* wow64cpu.dll for "native" i386 mode on x86_64
* wowarmhw.dll for ARM emulation (Qemu)
* xtajit.dll for i386 emulation (Qemu)
* fexcore.dll for i386 emulation (FEX)
* fexcore.dll for i386 emulation (FEX, Unix)
* libwow64fex.dll for i386 emulation (FEX, PE)
* box64cpu.dll for i386 emulation (Box64)
* HOLIB to set full path of the library, e.g. HOLIB=/path/to/libqemu-i386.so
* QEMU_LOG to set QEMU log channels, find some options [here.](https://github.com/AndreRH/qemu/blob/v5.2.0/util/log.c#L297)
Expand All @@ -143,16 +160,20 @@ $ HODLL=xtajit.dll taskset -c 1 wine your_x86_application.exe
$ HODLL=wowarmhw.dll taskset -c 1 wine your_arm_application.exe
```

#### 6.3) FEX
#### 6.3) FEX, Unix
```bash
$ HODLL=fexcore.dll wine your_x86_application.exe
```

#### 6.4) FEX, PE
```bash
$ HODLL=libwow64fex.dll wine your_x86_application.exe
```

### 7) Todo

* Get more applications running
* QEMU: Investigate CriticalSection issues (just timing?)
* FEX: Fix exceptions (maybe as PE module)

### 8) Financial Contributors

Expand Down

0 comments on commit 8372f1d

Please sign in to comment.