mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-14 19:08:32 +08:00
Merge branch 'master' of https://github.com/joncampbell123/dosbox-x
This commit is contained in:
@@ -17,20 +17,18 @@ dosbox-x.app: src/dosbox-x contrib/macos/dosbox.icns
|
|||||||
cp -v contrib/fonts/FREECG98.BMP dosbox-x.app/Contents/Resources/freecg98.bmp
|
cp -v contrib/fonts/FREECG98.BMP dosbox-x.app/Contents/Resources/freecg98.bmp
|
||||||
cp -v src/dosbox-x dosbox-x.app/Contents/MacOS/DosBox
|
cp -v src/dosbox-x dosbox-x.app/Contents/MacOS/DosBox
|
||||||
# this is where it gets ugly
|
# this is where it gets ugly
|
||||||
otool -L dosbox-x.app/Contents/MacOS/DosBox | grep -E '/usr/local/lib|/usr/local/opt/ffmpeg/lib' | while read X; do Y=`echo "$$X" | sed -E '/^ +/s///' | cut -d ' ' -f 1`; \
|
otool -L dosbox-x.app/Contents/MacOS/DosBox | grep -E '/usr/local/lib|/usr/local/opt/ffmpeg/lib|/opt/homebrew/' | while read X; do Y=`echo "$$X" | sed -E '/^ +/s///' | cut -d ' ' -f 1`; \
|
||||||
dylib=`basename $$Y`; \
|
dylib=`basename $$Y`; \
|
||||||
cp -v $$Y dosbox-x.app/Contents/MacOS/; \
|
cp -v $$Y dosbox-x.app/Contents/MacOS/; \
|
||||||
install_name_tool -change $$Y @executable_path/$$dylib dosbox-x.app/Contents/MacOS/DosBox; \
|
install_name_tool -change $$Y @executable_path/$$dylib dosbox-x.app/Contents/MacOS/DosBox; \
|
||||||
done
|
done
|
||||||
# and the libs too
|
# and the libs too. NTS: Cannot use install_name_tool anymore to change anything about dylib files because that invalidates code signing of those files
|
||||||
for pass in 1 2 3 4 5; do \
|
for pass in 1 2 3 4 5; do \
|
||||||
for dolib in dosbox-x.app/Contents/MacOS/*.dylib; do \
|
for dolib in dosbox-x.app/Contents/MacOS/*.dylib; do \
|
||||||
otool -L "$$dolib" | grep '/usr/local/lib' | while read X; do Y=`echo "$$X" | sed -E '/^ +/s///' | cut -d ' ' -f 1`; \
|
otool -L "$$dolib" | grep -E '/usr/local/lib|/usr/local/opt/ffmpeg/lib|/opt/homebrew/' | while read X; do Y=`echo "$$X" | sed -E '/^ +/s///' | cut -d ' ' -f 1`; \
|
||||||
dylib=`basename $$Y`; \
|
dylib=`basename $$Y`; \
|
||||||
cp -vn $$Y dosbox-x.app/Contents/MacOS/; \
|
cp -vn $$Y dosbox-x.app/Contents/MacOS/; \
|
||||||
echo "$$Y"; \
|
echo "$$Y"; \
|
||||||
install_name_tool -change $$Y @executable_path/$$dylib "$$dolib"; \
|
|
||||||
install_name_tool -id @executable_path/$$dylib "$$dolib"; \
|
|
||||||
done; \
|
done; \
|
||||||
done; \
|
done; \
|
||||||
done
|
done
|
||||||
|
23
build-macosx
23
build-macosx
@@ -53,9 +53,30 @@ export CPPFLAGS="$new$CPPFLAGS"
|
|||||||
export CXXFLAGS="$new$CXXFLAGS"
|
export CXXFLAGS="$new$CXXFLAGS"
|
||||||
export INTERNAL_FREETYPE=1
|
export INTERNAL_FREETYPE=1
|
||||||
|
|
||||||
|
brew list fluid-synth &>/dev/null || brew install fluid-synth
|
||||||
|
brew list libslirp &>/dev/null || brew install libslirp
|
||||||
|
brew list pkg-config &>/dev/null || brew install pkg-config
|
||||||
|
|
||||||
|
opts=
|
||||||
|
|
||||||
|
# if Brew has installed packages, try to use those too
|
||||||
|
brew="/opt/homebrew"
|
||||||
|
if [[ -d "$brew" && -d "$brew/include" && -d "$brew/lib" ]]; then
|
||||||
|
echo "Brew is installed, I'm going to use it's libraries too"
|
||||||
|
new=" -I$brew/include"
|
||||||
|
nld=" -L$brew/lib"
|
||||||
|
export CFLAGS="$CFLAGS$new"
|
||||||
|
export LDFLAGS="$LDFLAGS$nld"
|
||||||
|
export CPPFLAGS="$CPPFLAGS$new"
|
||||||
|
export CXXFLAGS="$CXXFLAGS$new"
|
||||||
|
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$brew/lib/pkgconfig"
|
||||||
|
else
|
||||||
|
opts+=" --disable-avcodec"
|
||||||
|
fi
|
||||||
|
|
||||||
# now compile ourself
|
# now compile ourself
|
||||||
echo Compiling DOSBox-X
|
echo Compiling DOSBox-X
|
||||||
chmod +x configure
|
chmod +x configure
|
||||||
./configure --enable-core-inline --enable-debug=heavy --prefix=/usr --disable-libfluidsynth --disable-libslirp --disable-avcodec "$@" || exit 1
|
./configure --enable-core-inline --enable-debug=heavy --prefix=/usr $opts "$@" || exit 1
|
||||||
make -j3 || exit 1
|
make -j3 || exit 1
|
||||||
|
|
||||||
|
@@ -54,9 +54,26 @@ brew list fluid-synth &>/dev/null || brew install fluid-synth
|
|||||||
brew list libslirp &>/dev/null || brew install libslirp
|
brew list libslirp &>/dev/null || brew install libslirp
|
||||||
brew list pkg-config &>/dev/null || brew install pkg-config
|
brew list pkg-config &>/dev/null || brew install pkg-config
|
||||||
|
|
||||||
|
opts=
|
||||||
|
|
||||||
|
# if Brew has installed packages, try to use those too
|
||||||
|
brew="/opt/homebrew"
|
||||||
|
if [[ -d "$brew" && -d "$brew/include" && -d "$brew/lib" ]]; then
|
||||||
|
echo "Brew is installed, I'm going to use it's libraries too"
|
||||||
|
new=" -I$brew/include"
|
||||||
|
nld=" -L$brew/lib"
|
||||||
|
export CFLAGS="$CFLAGS$new"
|
||||||
|
export LDFLAGS="$LDFLAGS$nld"
|
||||||
|
export CPPFLAGS="$CPPFLAGS$new"
|
||||||
|
export CXXFLAGS="$CXXFLAGS$new"
|
||||||
|
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$brew/lib/pkgconfig"
|
||||||
|
else
|
||||||
|
opts+=" --disable-avcodec"
|
||||||
|
fi
|
||||||
|
|
||||||
# now compile ourself
|
# now compile ourself
|
||||||
echo Compiling DOSBox-X
|
echo Compiling DOSBox-X
|
||||||
chmod +x configure
|
chmod +x configure
|
||||||
./configure --enable-core-inline --enable-debug=heavy --prefix=/usr --enable-sdl2 --disable-avcodec "$@" || exit 1
|
./configure --enable-core-inline --enable-debug=heavy --prefix=/usr --enable-sdl2 $opts "$@" || exit 1
|
||||||
make -j3 || exit 1
|
make -j3 || exit 1
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user