项目作者: dosbox-staging

项目描述 :
DOS/x86 emulator focusing on ease of use
高级语言: C++
项目地址: git://github.com/dosbox-staging/dosbox-staging.git
创建时间: 2019-09-14T22:08:30Z
项目社区:https://github.com/dosbox-staging/dosbox-staging

开源协议:GNU General Public License v2.0

下载


DOSBox Staging

GPL-2.0-or-later
Chat

This repository attempts to modernize the DOSBox codebase by using current
development practices and tools, fixing issues, and adding features that better
support today’s systems.

Donations

If you enjoy using DOSBox Staging, please consider a
donation
to the
project.

If you want to help but can’t afford a donation, check out the Get
involved
page of our website
for other ways to contribute.

Build status

Linux x86\_64 build status
Linux other build status
Windows (VisualStudio) build status
Windows (MSYS2) build status
macOS build status

Stable release builds

Linux,
Windows,
macOS

Test builds & development snapshots

Development builds.

Key features for developers

Feature Status
Version control Git
Language C++20
SDL >= 2.30.0
Logging Loguru for C++3
Buildsystem Meson or Visual Studio 2022
CI Yes
Static analysis Yes1,2
Dynamic analysis Yes
clang-format Yes
Development builds Yes
Unit tests Yes4

Source code analysis tools

Dependencies

DOSBox Staging has the following library dependencies:

Package Lib name Provides feature Presence Meson wrap VCPKG Repo availability
FluidSynth fluidsynth General MIDI playback Optional yes yes common
Google Test+Mock gmock Framework for unit testing (development) Optional yes yes common
IIR iir1 Audio filtering Mandatory yes yes rare
libpng libpng PNG-encoding of screen captures Optional yes yes very common
Munt libmt32emu Roland MT-32 and CM-32L playback Optional yes yes rare
Opus File opusfile CDDA playback for Opus-encoded track files Mandatory no 🔴 yes common
SDL 2.0 sdl2 OS-agnostic API for video, audio, and eventing Mandatory yes yes common
SDL_net 2.0 sdl2-net Network API for emulated serial and IPX Optional yes yes common
slirp libslirp Unprivileged virtual TCP/IP stack for Ethernet Optional yes yes less common
SpeexDSP speexdsp Audio resampling Mandatory yes yes common
Tracy Profiler tracy Event profile (development) Optional yes yes rare
zlib zlib ZMBV video capture Optional no 🔴 yes very common
zlib-ng zlib-ng ZMBV video capture (more performant zlib replacement) Optional yes yes common

See the Meson wrap files in subprojects the current library versions we use.

Get the sources

Clone the repository (one-time step):

  1. git clone https://github.com/dosbox-staging/dosbox-staging.git

Build instructions

Read BUILD.md for the comprehensive compilation guide.

Note

CMake support is currently an experimental internal-only, work-in-progress
feature; it’s not ready for public consumption yet. Please ignore the
CMakeLists.txt files in the source tree.

Linux, macOS

Install build dependencies appropriate for your OS:

  1. # Fedora
  2. sudo dnf install ccache gcc-c++ meson alsa-lib-devel libatomic libpng-devel \
  3. SDL2-devel SDL2_net-devel opusfile-devel \
  4. fluidsynth-devel iir1-devel mt32emu-devel libslirp-devel \
  5. speexdsp-devel libXi-devel zlib-ng-devel
  1. # Debian, Ubuntu
  2. sudo apt install ccache build-essential libasound2-dev libatomic1 libpng-dev \
  3. libsdl2-dev libsdl2-net-dev libopusfile-dev \
  4. libfluidsynth-dev libslirp-dev libspeexdsp-dev libxi-dev
  5. # Install Meson on Debian-11 "Bullseye" or Ubuntu-21.04 and newer
  6. sudo apt install meson
  1. # Arch, Manjaro
  2. sudo pacman -S ccache gcc meson alsa-lib libpng sdl2 sdl2_net \
  3. opusfile fluidsynth libslirp speexdsp libxi pkgconf
  1. # openSUSE
  2. sudo zypper install ccache gcc gcc-c++ meson alsa-devel libatomic1 libpng-devel \
  3. libSDL2-devel libSDL2_net-devel \
  4. opusfile-devel fluidsynth-devel libmt32emu-devel libslirp-devel \
  5. speexdsp libXi-devel
  1. # Void Linux
  2. sudo xbps-install -S SDL2-devel SDL2_net-devel alsa-lib-devel \
  3. fluidsynth-devel libiir1-devel libmt32emu-devel \
  4. libpng-devel libslirp-devel opusfile-devel \
  5. speexdsp-devel libatomic-devel libXi-devel
  1. # NixOS
  2. # With Home Manager on home.nix (Recommended Permanent Installation)
  3. home.packages = [ pkg-config gcc_multi cmake ccache SDL2 SDL2_net \
  4. fluidsynth glib gtest libGL libGLU libjack2 libmt32emu libogg \
  5. libpng libpulseaudio libslirp libsndfile meson ninja opusfile \
  6. libselinux speexdsp stdenv alsa-lib xorg.libXi irr1 ]
  7. # Note: the same package list will work with environment.systemPackages
  8. # on configuration.nix
  1. # macOS
  2. xcode-select --install
  3. brew install cmake ccache meson libpng sdl2 sdl2_net opusfile \
  4. fluid-synth libslirp pkg-config python3 speexdsp

Build and stay up-to-date with the latest sources

  1. Check out the main branch:

    1. # commit or stash any personal code changes
    2. git checkout main -f
  2. Pull the latest updates. This is necessary every time you want a new build:

    1. git pull
  3. Set up the build. This is a one-time step either after cloning the repo or
    cleaning your working directories:

    1. meson setup build

    The above enables all of DOSBox Staging’s functional features. If you’re
    interested in seeing all of Meson’s setup options, run meson configure.

  4. Compile the sources. This is necessary every time you want a new build:

    1. meson compile -C build

    Your binary is: build/dosbox

    The binary depends on local resources relative to it, so we suggest
    symlinking to the binary from your PATH, such as into ~/.local/bin/.

    Have fun!

Windows – Visual Studio (2022 or newer)

First, you need to setup vcpkg to install build dependencies. Once vcpkg
is bootstrapped, open PowerShell and run:

  1. PS:\> .\vcpkg integrate install

This step will ensure that MSVC can use vcpkg to build, find and links all
dependencies.

Start Visual Studio and open the file vs\dosbox.sln. Make sure you have
x64 selected as the solution platform. Use Ctrl+Shift+B to build all
projects.

Note, the first time you build a configuration, dependencies will be built
automatically and stored in the vcpkg_installed directory. This can take
a significant length of time.

Windows (MSYS2), macOS (MacPorts), Haiku, NixOS, others

Instructions for other build systems and operating systems are documented
in BUILD.md.

Links to OS-specific instructions: MSYS2, MacPorts, Haiku, NixOS.

Imported branches, community patches, old forks

Upstream commits are imported to this repo in a timely manner,
see branch svn/trunk.

  • svn/* - branches from SVN
  • forks/* - code for various abandoned DOSBox forks
  • vogons/* - community patches posted on the Vogons forum

Git tags matching pattern svn/* are pointing to the commits referenced by SVN
“tag” paths at the time of creation.

Additionally, we attach some optional metadata to the commits in the form of
Git notes. To fetch them, run:

  1. git fetch origin "refs/notes/*:refs/notes/*"

Website & documentation

Please refer to the documentation guide before making
changes to the website or the documentation.