Use vendored libslirp
This commit is contained in:
parent
22afac315b
commit
e7cddd4c3a
|
@ -21,7 +21,7 @@ jobs:
|
||||||
sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list
|
sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install --allow-downgrades cmake ninja-build extra-cmake-modules libpcap0.8-dev libsdl2-dev \
|
sudo apt install --allow-downgrades cmake ninja-build extra-cmake-modules libpcap0.8-dev libsdl2-dev \
|
||||||
qt6-{base,base-private,multimedia}-dev libslirp0 libslirp-dev libarchive-dev libzstd-dev libfuse2
|
qt6-{base,base-private,multimedia}-dev libarchive-dev libzstd-dev libfuse2
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: cmake -B build -G Ninja -DUSE_QT6=ON -DCMAKE_INSTALL_PREFIX=/usr
|
run: cmake -B build -G Ninja -DUSE_QT6=ON -DCMAKE_INSTALL_PREFIX=/usr
|
||||||
- name: Build
|
- name: Build
|
||||||
|
@ -63,7 +63,7 @@ jobs:
|
||||||
apt update
|
apt update
|
||||||
apt -y full-upgrade
|
apt -y full-upgrade
|
||||||
apt -y install git {gcc-12,g++-12}-aarch64-linux-gnu cmake ninja-build extra-cmake-modules \
|
apt -y install git {gcc-12,g++-12}-aarch64-linux-gnu cmake ninja-build extra-cmake-modules \
|
||||||
{libsdl2,qt6-{base,base-private,multimedia},libslirp,libarchive,libzstd}-dev:arm64 \
|
{libsdl2,qt6-{base,base-private,multimedia},libarchive,libzstd}-dev:arm64 \
|
||||||
pkg-config dpkg-dev
|
pkg-config dpkg-dev
|
||||||
- name: Check out source
|
- name: Check out source
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
|
@ -27,7 +27,7 @@ jobs:
|
||||||
update: true
|
update: true
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pacman -Sq --noconfirm git pkgconf mingw-w64-x86_64-{cmake,SDL2,qt5-static,libslirp,libarchive,toolchain}
|
run: pacman -Sq --noconfirm git pkgconf mingw-w64-x86_64-{cmake,SDL2,qt5-static,libarchive,toolchain}
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
working-directory: ${{runner.workspace}}
|
working-directory: ${{runner.workspace}}
|
||||||
|
|
12
README.md
12
README.md
|
@ -34,9 +34,9 @@ As for the rest, the interface should be pretty straightforward. If you have a q
|
||||||
|
|
||||||
### Linux
|
### Linux
|
||||||
1. Install dependencies:
|
1. Install dependencies:
|
||||||
* Ubuntu 22.04: `sudo apt install cmake extra-cmake-modules libcurl4-gnutls-dev libpcap0.8-dev libsdl2-dev qtbase5-dev qtbase5-private-dev qtmultimedia5-dev libslirp-dev libarchive-dev libzstd-dev`
|
* Ubuntu 22.04: `sudo apt install cmake extra-cmake-modules libcurl4-gnutls-dev libpcap0.8-dev libsdl2-dev qtbase5-dev qtbase5-private-dev qtmultimedia5-dev libarchive-dev libzstd-dev`
|
||||||
* Older Ubuntu: `sudo apt install cmake extra-cmake-modules libcurl4-gnutls-dev libpcap0.8-dev libsdl2-dev qt5-default qtbase5-private-dev qtmultimedia5-dev libslirp-dev libarchive-dev libzstd-dev`
|
* Older Ubuntu: `sudo apt install cmake extra-cmake-modules libcurl4-gnutls-dev libpcap0.8-dev libsdl2-dev qt5-default qtbase5-private-dev qtmultimedia5-dev libarchive-dev libzstd-dev`
|
||||||
* Arch Linux: `sudo pacman -S base-devel cmake extra-cmake-modules git libpcap sdl2 qt5-base qt5-multimedia libslirp libarchive zstd`
|
* Arch Linux: `sudo pacman -S base-devel cmake extra-cmake-modules git libpcap sdl2 qt5-base qt5-multimedia libarchive zstd`
|
||||||
3. Download the melonDS repository and prepare:
|
3. Download the melonDS repository and prepare:
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/melonDS-emu/melonDS
|
git clone https://github.com/melonDS-emu/melonDS
|
||||||
|
@ -63,7 +63,7 @@ As for the rest, the interface should be pretty straightforward. If you have a q
|
||||||
cd melonDS
|
cd melonDS
|
||||||
```
|
```
|
||||||
#### Dynamic builds (with DLLs)
|
#### Dynamic builds (with DLLs)
|
||||||
5. Install dependencies: `pacman -S mingw-w64-x86_64-{cmake,SDL2,toolchain,qt5-base,qt5-svg,qt5-multimedia,qt5-tools,libslirp,libarchive,zstd}`
|
5. Install dependencies: `pacman -S mingw-w64-x86_64-{cmake,SDL2,toolchain,qt5-base,qt5-svg,qt5-multimedia,qt5-tools,libarchive,zstd}`
|
||||||
6. Compile:
|
6. Compile:
|
||||||
```bash
|
```bash
|
||||||
cmake -B build
|
cmake -B build
|
||||||
|
@ -74,7 +74,7 @@ As for the rest, the interface should be pretty straightforward. If you have a q
|
||||||
If everything went well, melonDS and the libraries it needs should now be in the `dist` folder.
|
If everything went well, melonDS and the libraries it needs should now be in the `dist` folder.
|
||||||
|
|
||||||
#### Static builds (without DLLs, standalone executable)
|
#### Static builds (without DLLs, standalone executable)
|
||||||
5. Install dependencies: `pacman -S mingw-w64-x86_64-{cmake,SDL2,toolchain,qt5-static,libslirp,libarchive,zstd}`
|
5. Install dependencies: `pacman -S mingw-w64-x86_64-{cmake,SDL2,toolchain,qt5-static,libarchive,zstd}`
|
||||||
6. Compile:
|
6. Compile:
|
||||||
```bash
|
```bash
|
||||||
cmake -B build -DBUILD_STATIC=ON -DCMAKE_PREFIX_PATH=/mingw64/qt5-static
|
cmake -B build -DBUILD_STATIC=ON -DCMAKE_PREFIX_PATH=/mingw64/qt5-static
|
||||||
|
@ -84,7 +84,7 @@ If everything went well, melonDS should now be in the `build` folder.
|
||||||
|
|
||||||
### macOS
|
### macOS
|
||||||
1. Install the [Homebrew Package Manager](https://brew.sh)
|
1. Install the [Homebrew Package Manager](https://brew.sh)
|
||||||
2. Install dependencies: `brew install git pkg-config cmake sdl2 qt@6 libslirp libarchive zstd`
|
2. Install dependencies: `brew install git pkg-config cmake sdl2 qt@6 libarchive zstd`
|
||||||
3. Download the melonDS repository and prepare:
|
3. Download the melonDS repository and prepare:
|
||||||
```zsh
|
```zsh
|
||||||
git clone https://github.com/melonDS-emu/melonDS
|
git clone https://github.com/melonDS-emu/melonDS
|
||||||
|
|
|
@ -84,12 +84,15 @@ if (BUILD_STATIC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
pkg_check_modules(SDL2 REQUIRED IMPORTED_TARGET sdl2)
|
pkg_check_modules(SDL2 REQUIRED IMPORTED_TARGET sdl2)
|
||||||
pkg_check_modules(Slirp REQUIRED slirp)
|
|
||||||
pkg_check_modules(LibArchive REQUIRED IMPORTED_TARGET libarchive)
|
pkg_check_modules(LibArchive REQUIRED IMPORTED_TARGET libarchive)
|
||||||
pkg_check_modules(Zstd REQUIRED IMPORTED_TARGET libzstd)
|
pkg_check_modules(Zstd REQUIRED IMPORTED_TARGET libzstd)
|
||||||
|
|
||||||
fix_interface_includes(PkgConfig::SDL2 PkgConfig::LibArchive)
|
fix_interface_includes(PkgConfig::SDL2 PkgConfig::LibArchive)
|
||||||
|
|
||||||
|
add_subdirectory("../libslirp"
|
||||||
|
"${CMAKE_BINARY_DIR}/libslirp"
|
||||||
|
EXCLUDE_FROM_ALL)
|
||||||
|
|
||||||
add_compile_definitions(ARCHIVE_SUPPORT_ENABLED)
|
add_compile_definitions(ARCHIVE_SUPPORT_ENABLED)
|
||||||
|
|
||||||
add_executable(melonDS ${SOURCES_QT_SDL})
|
add_executable(melonDS ${SOURCES_QT_SDL})
|
||||||
|
@ -162,9 +165,7 @@ endif()
|
||||||
target_link_libraries(melonDS PRIVATE core)
|
target_link_libraries(melonDS PRIVATE core)
|
||||||
target_link_libraries(melonDS PRIVATE PkgConfig::SDL2 PkgConfig::LibArchive PkgConfig::Zstd)
|
target_link_libraries(melonDS PRIVATE PkgConfig::SDL2 PkgConfig::LibArchive PkgConfig::Zstd)
|
||||||
target_link_libraries(melonDS PRIVATE ${QT_LINK_LIBS} ${CMAKE_DL_LIBS})
|
target_link_libraries(melonDS PRIVATE ${QT_LINK_LIBS} ${CMAKE_DL_LIBS})
|
||||||
|
target_link_libraries(melonDS PRIVATE slirp)
|
||||||
target_include_directories(melonDS PRIVATE "${Slirp_INCLUDE_DIRS}")
|
|
||||||
target_link_libraries(melonDS PRIVATE "${Slirp_LINK_LIBRARIES}")
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
option(PORTABLE "Make a portable build that looks for its configuration in the current directory" ON)
|
option(PORTABLE "Make a portable build that looks for its configuration in the current directory" ON)
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
"default-features": false,
|
"default-features": false,
|
||||||
"features": ["bzip2", "crypto", "lz4", "zstd"]
|
"features": ["bzip2", "crypto", "lz4", "zstd"]
|
||||||
},
|
},
|
||||||
"libslirp",
|
|
||||||
"zstd",
|
"zstd",
|
||||||
{
|
{
|
||||||
"name": "qtbase",
|
"name": "qtbase",
|
||||||
|
|
Loading…
Reference in New Issue