Skip to content

Commit 4a7e2fc

Browse files
authored
Merge branch 'joncampbell123:master' into master
2 parents 702887f + 1d8f3a2 commit 4a7e2fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+9216
-131875
lines changed

BUILD.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,13 @@ due to requiring parallel Homebrew installations running natively *and* under Ro
252252
```
253253
make dosbox-x.app
254254
```
255+
### _(Experimental)_ Building binaries for old macOS versions (10.12 Sierra and before)
256+
*Old macOS versions may be built using MacPorts libraries with slightly different procedures.
257+
```
258+
sudo port install autoconf automake nasm glfw glew fluidsynth libslirp libpcap pkgconfig libsdl2_net libpng zlib
259+
./build-macosold
260+
```
261+
Use `./build-macosold-sdl2` for SDL2 builds.
255262
256263
## To compile DOSBox-X for DOS with HX-DOS platform
257264
* Start a 32-bit toolchain from the original MinGW (not the MinGW-w64 project).

CHANGELOG

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
Next version
2+
- Remove mixer and VGA capture test modes from integration device. Update
3+
integration device version number. Convert hardcoded magic constants used
4+
in IG into constants in iglib.h which is now shared explicitly with the
5+
iglib.h in DOSLIB. Add integration device interface to allow the guest
6+
to read and set the CPU cycle count of the emulator. (joncampbell123).
7+
- Fix INT 10h AH=0Eh bug where printing BEL triggered screen scroll up if
8+
cursor beyond the last line. Fix for the Elder Scrolls Arena installer.
9+
(joncampbell123).
10+
- FAT filesystem driver (for disk images): If Elder Scrolls Arena calls
11+
INT 21h to find files named *.65 (such as STATES.65) with an attribute mask
12+
of 0xA (VOLUME LABEL | HIDDEN), ignore the VOLUME LABEL bit and scan
13+
normally. The 0xA value is leftover from a divide operation used to make
14+
the file name and is technically a bug in the game, though that happens
15+
to work on real MS-DOS and the DOSBox/DOSBox-X local folder support code
16+
anyway. This fix allows Elder Scrolls Arena to run from a mounted disk
17+
image. (joncampbell123).
18+
- FAT filesystem driver (for disk images): If Elder Scrolls Arena calls
19+
INT 21h to find SAVEGAME.00 (yes, a specific name for some reason) with
20+
an attribute mask of 0x7C (which represents... um... what?), ignore the
21+
VOLUME LABEL bit so that players can load their saved games from the
22+
menu instead of being told that the saved game that is clearly there on
23+
the screen does not exist. What other weird random values of CX attribute
24+
mask does this game use? (joncampbell123).
25+
- PCI bus improvements : Allow device to see full size access (smunaut)
26+
- Fix build error of SDL1 version on ArchLinux (possibly gcc-15) (maron2000)
27+
- Enable building DOSBox-X on older macOS versions and add instructions
28+
(maron2000)
29+
- Add code page 951 in dialog box (1abcd)
30+
- Fix failure of create/opening a temporary file for piping (maron2000)
31+
132
2025.05.03
233
- Show TURBO status in title bar. (maron2000)
334
- Fixed MinGW32 builds failed using gcc15, due to a conflict in __inline__

build-macos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ for arch in ${architectures}; do
7676

7777
do_cleanup
7878

79-
arch_flags="-arch ${arch} -mmacosx-version-min=10.12 "
79+
arch_flags="-arch ${arch} -mmacosx-version-min=10.13 "
8080
CFLAGS="${arch_flags}${orig_CFLAGS}"
8181
LDFLAGS="${arch_flags}${orig_LDFLAGS}"
8282
CPPFLAGS="${arch_flags}${orig_CPPFLAGS}"

build-macos-sdl2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ for arch in ${architectures}; do
7272

7373
do_cleanup
7474

75-
arch_flags="-arch ${arch} -mmacosx-version-min=10.12 "
75+
arch_flags="-arch ${arch} -mmacosx-version-min=10.13 "
7676
CFLAGS="${arch_flags}${orig_CFLAGS}"
7777
LDFLAGS="${arch_flags}${orig_LDFLAGS}"
7878
CPPFLAGS="${arch_flags}${orig_CPPFLAGS}"

build-macosold

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
#!/usr/bin/env bash
2+
3+
# I'm sick and tired of all the churn the three versions of autoconf
4+
# are causing in this repo. Stop committing the configure scripts
5+
# and just autoregen.
6+
./autogen.sh || exit 1
7+
8+
# where are we?
9+
top=$(pwd)
10+
if test -z "${top}" ; then exit 1; fi
11+
12+
# fix
13+
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
14+
15+
orig_CFLAGS="${CFLAGS}"
16+
orig_LDFLAGS="${LDFLAGS}"
17+
orig_CPPFLAGS="${CPPFLAGS}"
18+
orig_CXXFLAGS="${CXXFLAGS}"
19+
20+
# Ensure sdl2 isn't detected as we aren't going to use it, and the presence of
21+
# this folder will cause the build to fail.
22+
rm -rf vs/sdl2/linux-host vs/sdl2/linux-build
23+
24+
# Remove our temporary copies of dosbox-x executable before rebuilding
25+
rm -f src/dosbox-x-arm64 src/dosbox-x-x86_64
26+
27+
do_cleanup() {
28+
rm -rf vs/sdl/linux-host vs/sdl/linux-build
29+
rm -rf vs/sdlnet/linux-host vs/sdlnet/linux-build
30+
rm -rf vs/zlib/linux-host vs/zlib/linux-build
31+
rm -rf vs/libpng/linux-host vs/libpng/linux-build
32+
rm -rf vs/freetype/linux-host vs/freetype/linux-build
33+
[ -e Makefile ] && make clean
34+
}
35+
36+
universal=0
37+
architectures="$(uname -m)"
38+
#if [ "${1}" = "universal" ]; then
39+
# shift
40+
# if [ "${architectures}" = "arm64" ]; then
41+
# # We can only build universal binaries on an arm64 host because we
42+
# # need homebrew functional under both architectures.
43+
# universal=1
44+
# architectures="arm64 x86_64"
45+
# fi
46+
#fi
47+
48+
arm64_brew_cmd=""
49+
x86_64_brew_cmd=""
50+
# arm64 native Homebrew
51+
#if [ -x /opt/homebrew/bin/brew ]; then
52+
# arm64_brew_cmd="/opt/homebrew/bin/brew"
53+
#fi
54+
55+
# x86_64 Homebrew
56+
#if [ -x /usr/local/bin/brew ]; then
57+
# # old homebrew
58+
# x86_64_brew_cmd="/usr/local/bin/brew"
59+
#elif [ -x /usr/local/Homebrew/bin/brew ]; then
60+
# # new homebrew
61+
# x86_64_brew_cmd="/usr/local/Homebrew/bin/brew"
62+
#fi
63+
64+
# x86_64 on arm64 for universal builds if x86_64 Homebrew is installed
65+
#if [ -n "${x86_64_brew_cmd}" ] && [ "${universal}" -eq 1 ]; then
66+
# x86_64_brew_cmd="/usr/bin/arch -x86_64 ${x86_64_brew_cmd}"
67+
#fi
68+
69+
for arch in ${architectures}; do
70+
#declare brew_cmd="${arch}_brew_cmd"
71+
#if [ -n "${!brew_cmd}" ]; then
72+
# ${!brew_cmd} list fluid-synth &>/dev/null || ${!brew_cmd} install fluid-synth
73+
# ${!brew_cmd} list libslirp &>/dev/null || ${!brew_cmd} install libslirp
74+
# ${!brew_cmd} list pkg-config &>/dev/null || ${!brew_cmd} install pkg-config
75+
#fi
76+
77+
do_cleanup
78+
79+
#arch_flags="-arch ${arch} -mmacosx-version-min=10.11 "
80+
arch_flags="-arch ${arch} "
81+
CFLAGS="${arch_flags}${orig_CFLAGS}"
82+
LDFLAGS="${arch_flags}${orig_LDFLAGS}"
83+
CPPFLAGS="${arch_flags}${orig_CPPFLAGS}"
84+
CXXFLAGS="${arch_flags}${orig_CXXFLAGS}"
85+
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
86+
87+
# prefer to compile against our own copy of SDL 1.x
88+
echo "Compiling our internal SDL 1.x"
89+
(cd vs/sdl && ./build-dosbox.sh) || exit 1
90+
new="-I${top}/vs/sdl/linux-host/include "
91+
nld="-L${top}/vs/sdl/linux-host/lib "
92+
CFLAGS="${CFLAGS}${new}"
93+
LDFLAGS="${LDFLAGS}${nld}"
94+
CPPFLAGS="${CPPFLAGS}${new}"
95+
CXXFLAGS="${CXXFLAGS}${new}"
96+
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
97+
98+
# prefer to compile against our own copy of SDLnet 1.x
99+
echo "Compiling our internal SDLnet 1.x"
100+
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
101+
102+
CPPFLAGS="${CPPFLAGS} $(pkg-config --cflags zlib) "
103+
CFLAGS="${CFLAGS} $(pkg-config --cflags zlib) "
104+
CXXFLAGS="${CXXFLAGS} $(pkg-config --cflags zlib) "
105+
LDFLAGS="${LDFLAGS} $(pkg-config --libs zlib) "
106+
107+
# prefer to compile against our own zlib
108+
#echo "Compiling our internal zlib"
109+
#(cd vs/zlib && ./build-dosbox.sh) || exit 1
110+
#new="-I${top}/vs/zlib/linux-host/include "
111+
#nld="-L${top}/vs/zlib/linux-host/lib "
112+
#CFLAGS="${CFLAGS}${new}"
113+
#LDFLAGS="${LDFLAGS}${nld}"
114+
#CPPFLAGS="${CPPFLAGS}${new}"
115+
#CXXFLAGS="${CXXFLAGS}${new}"
116+
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
117+
118+
CPPFLAGS="${CPPFLAGS} $(pkg-config --cflags libpng) "
119+
CFLAGS="${CFLAGS} $(pkg-config --cflags libpng) "
120+
CXXFLAGS="${CXXFLAGS} $(pkg-config --cflags libpng) "
121+
LDFLAGS="${LDFLAGS} $(pkg-config --libs libpng) "
122+
123+
# prefer to compile against our own libpng (comment this out to disable)
124+
#echo "Compiling our internal libpng"
125+
#(cd vs/libpng && ./build-dosbox.sh) || exit 1
126+
#new="-I${top}/vs/libpng/linux-host/include "
127+
#nld="-L${top}/vs/libpng/linux-host/lib "
128+
#CFLAGS="${CFLAGS}${new}"
129+
#LDFLAGS="${LDFLAGS}${nld}"
130+
#CPPFLAGS="${CPPFLAGS}${new}"
131+
#CXXFLAGS="${CXXFLAGS}${new}"
132+
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
133+
134+
# prefer to compile against our own freetype
135+
echo "Compiling our internal freetype"
136+
(cd vs/freetype && ./build-dosbox.sh) || exit 1
137+
new="-I${top}/vs/freetype/linux-host/include/freetype2 "
138+
nld="-L${top}/vs/freetype/linux-host/lib -lfreetype "
139+
CFLAGS="${CFLAGS}${new}"
140+
LDFLAGS="${LDFLAGS}${nld}"
141+
CPPFLAGS="${CPPFLAGS}${new}"
142+
CXXFLAGS="${CXXFLAGS}${new}"
143+
INTERNAL_FREETYPE=1
144+
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS INTERNAL_FREETYPE
145+
146+
opts=
147+
148+
# if Brew has installed packages, try to use those too
149+
#if [ -n "${!brew_cmd}" ]; then
150+
# echo "Brew is installed, I'm going to use its libraries too"
151+
# new="-I$(${!brew_cmd} --prefix)/include "
152+
# nld="-L$(${!brew_cmd} --prefix)/lib "
153+
# CFLAGS="${CFLAGS}${new}"
154+
# LDFLAGS="${LDFLAGS}${nld}"
155+
# CPPFLAGS="${CPPFLAGS}${new}"
156+
# CXXFLAGS="${CXXFLAGS}${new}"
157+
# PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:$(${!brew_cmd} --prefix)/lib/pkgconfig"
158+
# export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS PKG_CONFIG_PATH
159+
#fi
160+
161+
#if [ "${universal}" = 1 ]; then
162+
# opts="${opts} --enable-universal"
163+
#fi
164+
165+
# now compile ourself
166+
echo "Compiling DOSBox-X"
167+
chmod +x configure
168+
./configure --enable-debug=heavy --prefix=/usr "${opts}" "${@}" || exit 1
169+
make -j3 || exit 1
170+
171+
cp src/dosbox-x "src/dosbox-x-${arch}"
172+
done

build-macosold-sdl2

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
#!/usr/bin/env bash
2+
3+
# I'm sick and tired of all the churn the three versions of autoconf
4+
# are causing in this repo. Stop committing the configure scripts
5+
# and just autoregen.
6+
./autogen.sh || exit 1
7+
8+
# where are we?
9+
top=$(pwd)
10+
if test -z "${top}" ; then exit 1; fi
11+
12+
# fix
13+
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
14+
chmod +x vs/sdl2/build-dosbox.sh
15+
16+
orig_CFLAGS="${CFLAGS}"
17+
orig_LDFLAGS="${LDFLAGS}"
18+
orig_CPPFLAGS="${CPPFLAGS}"
19+
orig_CXXFLAGS="${CXXFLAGS}"
20+
21+
# Remove our temporary copies of dosbox-x executable before rebuilding
22+
rm -f src/dosbox-x-arm64 src/dosbox-x-x86_64
23+
24+
do_cleanup() {
25+
rm -rf vs/sdl2/linux-host vs/sdl2/linux-build
26+
rm -rf vs/zlib/linux-host vs/zlib/linux-build
27+
rm -rf vs/libpng/linux-host vs/libpng/linux-build
28+
rm -rf vs/freetype/linux-host vs/freetype/linux-build
29+
[ -e Makefile ] && make clean
30+
}
31+
32+
universal=0
33+
architectures="$(uname -m)"
34+
#if [ "${1}" = "universal" ]; then
35+
# shift
36+
# if [ "${architectures}" = "arm64" ]; then
37+
# # We can only build universal binaries on an arm64 host because we
38+
# # need homebrew functional under both architectures.
39+
# universal=1
40+
# architectures="arm64 x86_64"
41+
# fi
42+
#fi
43+
44+
arm64_brew_cmd=""
45+
x86_64_brew_cmd=""
46+
# arm64 native Homebrew
47+
#if [ -x /opt/homebrew/bin/brew ]; then
48+
# arm64_brew_cmd="/opt/homebrew/bin/brew"
49+
#fi
50+
51+
# x86_64 Homebrew
52+
#if [ -x /usr/local/bin/brew ]; then
53+
# # old homebrew
54+
# x86_64_brew_cmd="/usr/local/bin/brew"
55+
#elif [ -x /usr/local/Homebrew/bin/brew ]; then
56+
# # new homebrew
57+
# x86_64_brew_cmd="/usr/local/Homebrew/bin/brew"
58+
#fi
59+
60+
# x86_64 on arm64 for universal builds if x86_64 Homebrew is installed
61+
#if [ -n "${x86_64_brew_cmd}" ] && [ "${universal}" -eq 1 ]; then
62+
# x86_64_brew_cmd="/usr/bin/arch -x86_64 ${x86_64_brew_cmd}"
63+
#fi
64+
65+
for arch in ${architectures}; do
66+
# declare brew_cmd="${arch}_brew_cmd"
67+
# if [ -n "${!brew_cmd}" ]; then
68+
# ${!brew_cmd} list fluid-synth &>/dev/null || ${!brew_cmd} install fluid-synth
69+
# ${!brew_cmd} list libslirp &>/dev/null || ${!brew_cmd} install libslirp
70+
# ${!brew_cmd} list pkg-config &>/dev/null || ${!brew_cmd} install pkg-config
71+
# fi
72+
73+
do_cleanup
74+
75+
# arch_flags="-arch ${arch} -mmacosx-version-min=10.11 "
76+
arch_flags="-arch ${arch} "
77+
CFLAGS="${arch_flags}${orig_CFLAGS}"
78+
LDFLAGS="${arch_flags}${orig_LDFLAGS}"
79+
CPPFLAGS="${arch_flags}${orig_CPPFLAGS}"
80+
CXXFLAGS="${arch_flags}${orig_CXXFLAGS}"
81+
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
82+
83+
# prefer to compile against our own copy of SDL 2.x IF the system does not provide one
84+
85+
#echo "Compiling our internal SDL 2.x"
86+
#(cd vs/sdl2 && ./build-dosbox.sh) || exit 1
87+
#new="-I${top}/vs/sdl2/linux-host/include "
88+
#nld="-L${top}/vs/sdl2/linux-host/lib "
89+
#CFLAGS="${CFLAGS}${new}"
90+
#LDFLAGS="${LDFLAGS}${nld}"
91+
#CPPFLAGS="${CPPFLAGS}${new}"
92+
CXXFLAGS="${CXXFLAGS}${new}"
93+
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
94+
95+
# prefer to compile against our own copy of SDLnet 1.x
96+
echo "Compiling our internal SDLnet 1.x"
97+
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
98+
99+
# prefer to compile against our own zlib
100+
#echo "Compiling our internal zlib"
101+
#(cd vs/zlib && ./build-dosbox.sh) || exit 1
102+
#new="-I${top}/vs/zlib/linux-host/include "
103+
#nld="-L${top}/vs/zlib/linux-host/lib "
104+
#CFLAGS="${CFLAGS}${new}"
105+
#LDFLAGS="${LDFLAGS}${nld}"
106+
#CPPFLAGS="${CPPFLAGS}${new}"
107+
#CXXFLAGS="${CXXFLAGS}${new}"
108+
#export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
109+
110+
# prefer to compile against our own libpng (comment this out to disable)
111+
#echo "Compiling our internal libpng"
112+
#(cd vs/libpng && ./build-dosbox.sh) || exit 1
113+
#new="-I${top}/vs/libpng/linux-host/include "
114+
#nld="-L${top}/vs/libpng/linux-host/lib "
115+
#CFLAGS="${CFLAGS}${new}"
116+
#LDFLAGS="${LDFLAGS}${nld}"
117+
#CPPFLAGS="${CPPFLAGS}${new}"
118+
#CXXFLAGS="${CXXFLAGS}${new}"
119+
#export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
120+
121+
# prefer to compile against our own freetype
122+
echo "Compiling our internal freetype"
123+
(cd vs/freetype && ./build-dosbox.sh) || exit 1
124+
new="-I${top}/vs/freetype/linux-host/include/freetype2 "
125+
nld="-L${top}/vs/freetype/linux-host/lib -lfreetype "
126+
CFLAGS="${CFLAGS}${new}"
127+
LDFLAGS="${LDFLAGS}${nld}"
128+
CPPFLAGS="${CPPFLAGS}${new}"
129+
CXXFLAGS="${CXXFLAGS}${new}"
130+
INTERNAL_FREETYPE=1
131+
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS INTERNAL_FREETYPE
132+
133+
opts=
134+
135+
# if Brew has installed packages, try to use those too
136+
# if [ -n "${!brew_cmd}" ]; then
137+
# echo "Brew is installed, I'm going to use its libraries too"
138+
# new="-I$(${!brew_cmd} --prefix)/include "
139+
# nld="-L$(${!brew_cmd} --prefix)/lib "
140+
# CFLAGS="${CFLAGS}${new}"
141+
# LDFLAGS="${LDFLAGS}${nld}"
142+
# CPPFLAGS="${CPPFLAGS}${new}"
143+
# CXXFLAGS="${CXXFLAGS}${new}"
144+
# PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:$(${!brew_cmd} --prefix)/lib/pkgconfig"
145+
# export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS PKG_CONFIG_PATH
146+
# fi
147+
148+
# if [ "${universal}" = 1 ]; then
149+
# opts="${opts} --enable-universal"
150+
# fi
151+
152+
# now compile ourself
153+
echo "Compiling DOSBox-X"
154+
chmod +x configure
155+
./configure --enable-debug=heavy --prefix=/usr --enable-sdl2 "${opts}" "${@}" || exit 1
156+
make -j3 || exit 1
157+
158+
cp src/dosbox-x "src/dosbox-x-${arch}"
159+
done

0 commit comments

Comments
 (0)