mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-08 02:53:03 +08:00
Cleanup Bash scripts.
This makes them pass shellcheck. Except for a few unused export warnings. I also wonder if the majority of these files should be in the root of the project, or should be moved to "build-scripts" (or should still even exist). a few minor changes one more minor changes
This commit is contained in:
parent
f11408c5a4
commit
694cc766a4
@ -3,7 +3,7 @@
|
||||
# If an error occurs, quit the script and inform the user. This ensures scripts
|
||||
# like ./build-macos and ./build-macos-sdl2 etc. Don't continue on if Autotools isn't installed.
|
||||
function finish {
|
||||
if [ $success -eq 0 ]; then
|
||||
if [ "${success}" -eq 0 ]; then
|
||||
echo 'autogen.sh failed to complete: verify that GNU Autotools is installed on the system and try again'
|
||||
fi
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
file="$1"
|
||||
file="${1}"
|
||||
bitrate=15000000
|
||||
aspect_ratio=4:3
|
||||
overscan_percent=10
|
||||
@ -7,12 +7,12 @@ final_height=720
|
||||
final_width=960
|
||||
|
||||
# non-editable part
|
||||
render_width=$((($final_width * (100-$overscan_percent))/100))
|
||||
render_height=$((($final_height * (100-$overscan_percent))/100))
|
||||
render_width=$(((final_width * (100-overscan_percent))/100))
|
||||
render_height=$(((final_height * (100-overscan_percent))/100))
|
||||
|
||||
# announce
|
||||
echo "Rendering as $render_width x $render_height encoding to $final_width x $final_height"
|
||||
echo "Rendering as ${render_width} x ${render_height} encoding to ${final_width} x ${final_height}"
|
||||
|
||||
# go
|
||||
ffmpeg -i "$file" -acodec aac -ab 384000 -vcodec libx264 -pix_fmt yuv420p -vsync vfr -bsf:a aac_adtstoasc -vf "scale=$render_width:$render_height,pad=width=$final_width:height=$final_height:"'x=(ow-iw)/2:y=(oh-ih)/2' -vb "$bitrate" -minrate "$bitrate" -maxrate "$bitrate" -bufsize 8000000 -g 15 -bf 2 -threads 0 -aspect "$aspect_ratio" -y -f mp4 "$file.mp4" || exit 1
|
||||
ffmpeg -i "${file}" -acodec aac -ab 384000 -vcodec libx264 -pix_fmt yuv420p -vsync vfr -bsf:a aac_adtstoasc -vf "scale=${render_width}:${render_height},pad=width=${final_width}:height=${final_height}:"'x=(ow-iw)/2:y=(oh-ih)/2' -vb "${bitrate}" -minrate "${bitrate}" -maxrate "${bitrate}" -bufsize 8000000 -g 15 -bf 2 -threads 0 -aspect "${aspect_ratio}" -y -f mp4 "${file}.mp4" || exit 1
|
||||
|
||||
|
22
build
22
build
@ -1,5 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# allow 32-bit on 64-bit (x86) builds
|
||||
if [ "$1" == "32" ]; then
|
||||
CC="$(which gcc) -m32"
|
||||
CXX="$(which g++) -m32"
|
||||
export CC
|
||||
export CXX
|
||||
shift
|
||||
opt="--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu"
|
||||
fi
|
||||
|
||||
# Jonathan C dev hack: refer to LNKDOS16 in /usr/src/doslib
|
||||
doslib=
|
||||
if [ -d "/usr/src/doslib" ]; then doslib="/usr/src/doslib"; fi
|
||||
|
||||
if [ -n "${doslib}" ]; then
|
||||
if [ -x "${doslib}/tool/linker/linux-host/lnkdos16" ]; then
|
||||
export PATH="${doslib}/tool/linker/linux-host:${PATH}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# I'm sick and tired of all the churn the three versions of autoconf
|
||||
# are causing in this repo. Stop committing the configure scripts
|
||||
# and just autoregen.
|
||||
@ -19,6 +39,6 @@ echo Compiling our internal SDLnet 1.x
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
chmod +x configure
|
||||
./configure --enable-debug --prefix=/usr "$@" || exit 1
|
||||
./configure --enable-debug --prefix=/usr "${@}" "${opt}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
15
build-debug
15
build-debug
@ -2,19 +2,20 @@
|
||||
|
||||
# allow 32-bit on 64-bit (x86) builds
|
||||
if [ "$1" == "32" ]; then
|
||||
export CC=`which gcc`" -m32"
|
||||
export CXX=`which g++`" -m32"
|
||||
CC="$(which gcc) -m32"
|
||||
CXX="$(which g++) -m32"
|
||||
export CC CXX
|
||||
shift
|
||||
opt="--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu"
|
||||
fi
|
||||
|
||||
# Jonathan C dev hack: refer to LNKDOS16 in /usr/src/doslib
|
||||
doslib=
|
||||
if [ -d /usr/src/doslib ]; then doslib=/usr/src/doslib; fi
|
||||
if [ -d /usr/src/doslib ]; then doslib="/usr/src/doslib"; fi
|
||||
|
||||
if [ -n "$doslib" ]; then
|
||||
if [ -x "$doslib/tool/linker/linux-host/lnkdos16" ]; then
|
||||
export PATH="$doslib/tool/linker/linux-host:$PATH"
|
||||
if [ -n "${doslib}" ]; then
|
||||
if [ -x "${doslib}/tool/linker/linux-host/lnkdos16" ]; then
|
||||
export PATH="${doslib}/tool/linker/linux-host:${PATH}"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -37,6 +38,6 @@ echo Compiling our internal SDLnet 1.x
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
chmod +x configure
|
||||
./configure --enable-debug=heavy --prefix=/usr "$@" $opt || exit 1
|
||||
./configure --enable-debug=heavy --prefix=/usr "${@}" "${opt}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# allow 32-bit on 64-bit (x86) builds
|
||||
if [ "$1" == "32" ]; then
|
||||
export CC=`which gcc`" -m32"
|
||||
export CXX=`which g++`" -m32"
|
||||
if [ "${1}" == "32" ]; then
|
||||
CC="$(which gcc) -m32"
|
||||
CXX="$(which g++) -m32"
|
||||
export CC CXX
|
||||
shift
|
||||
fi
|
||||
|
||||
@ -17,8 +18,9 @@ chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
chmod +x configure
|
||||
|
||||
export CFLAGS="$CFLAGS -g3 -O0 -fno-inline -fno-omit-frame-pointer"
|
||||
export CXXFLAGS="$CXXFLAGS -g3 -O0 -fno-inline -fno-omit-frame-pointer"
|
||||
CFLAGS="${CFLAGS} -g3 -O0 -fno-inline -fno-omit-frame-pointer"
|
||||
CXXFLAGS="${CXXFLAGS} -g3 -O0 -fno-inline -fno-omit-frame-pointer"
|
||||
export CFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own copy of SDL 1.x
|
||||
echo Compiling our internal SDL 1.x
|
||||
@ -31,6 +33,6 @@ echo Compiling our internal SDLnet 1.x
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
# NTS: --disable-dynamic-core is needed. the dynamic core doesn't work properly with the CFLAGS given above
|
||||
./configure --enable-debug=heavy --prefix=/usr --disable-dynamic-core "$@" || exit 1
|
||||
./configure --enable-debug=heavy --prefix=/usr --disable-dynamic-core "${@}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# allow 32-bit on 64-bit (x86) builds
|
||||
if [ "$1" == "32" ]; then
|
||||
export CC=`which gcc`" -m32"
|
||||
export CXX=`which g++`" -m32"
|
||||
if [ "${1}" == "32" ]; then
|
||||
CC="$(which gcc) -m32"
|
||||
CXX="$(which g++) -m32"
|
||||
export CC CXX
|
||||
shift
|
||||
fi
|
||||
|
||||
@ -17,16 +18,17 @@ chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
chmod +x configure
|
||||
|
||||
export CFLAGS="$CFLAGS -g3 -O0 -fno-inline -fno-omit-frame-pointer"
|
||||
export CXXFLAGS="$CXXFLAGS -g3 -O0 -fno-inline -fno-omit-frame-pointer"
|
||||
CFLAGS="${CFLAGS} -g3 -O0 -fno-inline -fno-omit-frame-pointer"
|
||||
CXXFLAGS="${CXXFLAGS} -g3 -O0 -fno-inline -fno-omit-frame-pointer"
|
||||
export CFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own copy of SDL 2.x IF the system does not provide one
|
||||
if [[ "$no_host_sdl2" ]]; then
|
||||
if [[ "${no_host_sdl2}" ]]; then
|
||||
x= # doesn't work well cross-compiling
|
||||
else
|
||||
x=`which sdl2-config`
|
||||
x=$(which sdl2-config)
|
||||
fi
|
||||
if test -z "$x" ; then
|
||||
if test -z "${x}" ; then
|
||||
echo Compiling our internal SDL 2.x
|
||||
(cd vs/sdl2 && ./build-dosbox.sh) || exit 1
|
||||
fi
|
||||
@ -36,6 +38,6 @@ echo Compiling our internal SDLnet 1.x
|
||||
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# NTS: --disable-dynamic-core is needed. the dynamic core doesn't work properly with the CFLAGS given above
|
||||
./configure --enable-debug=heavy --prefix=/usr --disable-dynamic-core --enable-sdl2 "$@" || exit 1
|
||||
./configure --enable-debug=heavy --prefix=/usr --disable-dynamic-core --enable-sdl2 "${@}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
@ -2,8 +2,9 @@
|
||||
|
||||
# allow 32-bit on 64-bit (x86) builds
|
||||
if [ "$1" == "32" ]; then
|
||||
export CC=`which gcc`" -m32"
|
||||
export CXX=`which g++`" -m32"
|
||||
CC="$(which gcc) -m32"
|
||||
CXX="$(which g++) -m32"
|
||||
export CC CXX
|
||||
shift
|
||||
opt="--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu"
|
||||
fi
|
||||
@ -13,8 +14,9 @@ fi
|
||||
# and just autoregen.
|
||||
./autogen.sh || exit 1
|
||||
|
||||
export CFLAGS="$CFLAGS -pg -fprofile-arcs"
|
||||
export CXXFLAGS="$CXXFLAGS -pg -fprofile-arcs"
|
||||
CFLAGS="${CFLAGS} -pg -fprofile-arcs"
|
||||
CXXFLAGS="${CXXFLAGS} -pg -fprofile-arcs"
|
||||
export CFLAGS CXXFLAGS
|
||||
|
||||
# fix
|
||||
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
@ -30,6 +32,6 @@ echo Compiling our internal SDLnet 1.x
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
chmod +x configure
|
||||
./configure --enable-debug=heavy --prefix=/usr "$@" $opt || exit 1
|
||||
./configure --enable-debug=heavy --prefix=/usr "${@}" "${opt}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
@ -6,49 +6,49 @@
|
||||
./autogen.sh || exit 1
|
||||
|
||||
# where are we?
|
||||
top=`pwd`
|
||||
if test -z "$top" ; then exit 1; fi
|
||||
top=$(pwd)
|
||||
if test -z "${top}" ; then exit 1; fi
|
||||
|
||||
# fix
|
||||
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
# prefer to compile against our own copy of SDL 1.x
|
||||
echo Compiling our internal SDL 1.x
|
||||
echo "Compiling our internal SDL 1.x"
|
||||
(cd vs/sdl && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# prefer to compile against our own copy of SDLnet 1.x
|
||||
echo Compiling our internal SDLnet 1.x
|
||||
echo "Compiling our internal SDLnet 1.x"
|
||||
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# prefer to compile against our own zlib
|
||||
echo Compiling our internal zlib
|
||||
echo "Compiling our internal zlib"
|
||||
(cd vs/zlib && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/zlib/linux-host/include "
|
||||
nld="-L$top/vs/zlib/linux-host/lib "
|
||||
export CFLAGS="$new$CFLAGS -g3"
|
||||
export LDFLAGS="$nld$LDFLAGS -g3"
|
||||
export CPPFLAGS="$new$CPPFLAGS -g3"
|
||||
export CXXFLAGS="$new$CXXFLAGS -g3"
|
||||
new="-I${top}/vs/zlib/linux-host/include "
|
||||
nld="-L${top}/vs/zlib/linux-host/lib "
|
||||
export CFLAGS="${new}${CFLAGS} -g3"
|
||||
export LDFLAGS="${nld}${LDFLAGS} -g3"
|
||||
export CPPFLAGS="${new}${CPPFLAGS} -g3"
|
||||
export CXXFLAGS="${new}${CXXFLAGS} -g3"
|
||||
|
||||
# prefer to compile against our own libpng (comment this out to disable)
|
||||
echo Compiling our internal libpng
|
||||
echo "Compiling our internal libpng"
|
||||
(cd vs/libpng && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/libpng/linux-host/include "
|
||||
nld="-L$top/vs/libpng/linux-host/lib "
|
||||
export CFLAGS="$new$CFLAGS -g3"
|
||||
export LDFLAGS="$nld$LDFLAGS -g3"
|
||||
export CPPFLAGS="$new$CPPFLAGS -g3"
|
||||
export CXXFLAGS="$new$CXXFLAGS -g3"
|
||||
new="-I${top}/vs/libpng/linux-host/include "
|
||||
nld="-L${top}/vs/libpng/linux-host/lib "
|
||||
export CFLAGS="${new}${CFLAGS} -g3"
|
||||
export LDFLAGS="${nld}${LDFLAGS} -g3"
|
||||
export CPPFLAGS="${new}${CPPFLAGS} -g3"
|
||||
export CXXFLAGS="${new}${CXXFLAGS} -g3"
|
||||
|
||||
# prefer to compile against our own freetype
|
||||
echo Compiling our internal freetype
|
||||
echo "Compiling our internal freetype"
|
||||
(cd vs/freetype && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L$top/vs/freetype/linux-host/lib -lfreetype "
|
||||
export CFLAGS="$new$CFLAGS -g3 "
|
||||
export LDFLAGS="$nld$LDFLAGS -g3"
|
||||
export CPPFLAGS="$new$CPPFLAGS -g3 "
|
||||
export CXXFLAGS="$new$CXXFLAGS -g3"
|
||||
new="-I${top}/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L${top}/vs/freetype/linux-host/lib -lfreetype "
|
||||
export CFLAGS="${new}${CFLAGS} -g3"
|
||||
export LDFLAGS="${nld}${LDFLAGS} -g3"
|
||||
export CPPFLAGS="${new}${CPPFLAGS} -g3"
|
||||
export CXXFLAGS="${new}${CXXFLAGS} -g3"
|
||||
export INTERNAL_FREETYPE=1
|
||||
|
||||
brew list fluid-synth &>/dev/null || brew install fluid-synth
|
||||
@ -59,20 +59,20 @@ opts=
|
||||
|
||||
# if Brew has installed packages, try to use those too
|
||||
brew="/opt/homebrew"
|
||||
if [[ -d "$brew" && -d "$brew/include" && -d "$brew/lib" ]]; then
|
||||
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 -g3"
|
||||
export LDFLAGS="$LDFLAGS$nld -g3"
|
||||
export CPPFLAGS="$CPPFLAGS$new -g3"
|
||||
export CXXFLAGS="$CXXFLAGS$new -g3"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$brew/lib/pkgconfig"
|
||||
new=" -I${brew}/include"
|
||||
nld=" -L${brew}/lib"
|
||||
export CFLAGS="${CFLAGS}${new} -g3"
|
||||
export LDFLAGS="${LDFLAGS}${nld} -g3"
|
||||
export CPPFLAGS="${CPPFLAGS}${new} -g3"
|
||||
export CXXFLAGS="${CXXFLAGS}${new} -g3"
|
||||
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${brew}/lib/pkgconfig"
|
||||
fi
|
||||
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
echo "Compiling DOSBox-X"
|
||||
chmod +x configure
|
||||
./configure --enable-debug=heavy --prefix=/usr $opts "$@" || exit 1
|
||||
./configure --enable-debug=heavy --prefix=/usr "${opts}" "${@}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
@ -6,48 +6,48 @@
|
||||
./autogen.sh || exit 1
|
||||
|
||||
# where are we?
|
||||
top=`pwd`
|
||||
if test -z "$top" ; then exit 1; fi
|
||||
top=$(pwd)
|
||||
if test -z "${top}" ; then exit 1; fi
|
||||
|
||||
# fix
|
||||
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
# prefer to compile against our own copy of SDL 2.x IF the system does not provide one
|
||||
x=`which sdl2-config`
|
||||
#if test -z "$x" ; then
|
||||
echo Compiling our internal SDL 2.x
|
||||
#x=$(which sdl2-config)
|
||||
#if test -z "${x}" ; then
|
||||
echo "Compiling our internal SDL 2.x"
|
||||
(cd vs/sdl2 && ./build-dosbox.sh) || exit 1
|
||||
#fi
|
||||
|
||||
# prefer to compile against our own zlib
|
||||
echo Compiling our internal zlib
|
||||
echo "Compiling our internal zlib"
|
||||
(cd vs/zlib && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/zlib/linux-host/include "
|
||||
nld="-L$top/vs/zlib/linux-host/lib "
|
||||
export CFLAGS="$new$CFLAGS -g3"
|
||||
export LDFLAGS="$nld$LDFLAGS -g3"
|
||||
export CPPFLAGS="$new$CPPFLAGS -g3"
|
||||
export CXXFLAGS="$new$CXXFLAGS -g3"
|
||||
new="-I${top}/vs/zlib/linux-host/include "
|
||||
nld="-L${top}/vs/zlib/linux-host/lib "
|
||||
export CFLAGS="${new}${CFLAGS} -g3"
|
||||
export LDFLAGS="${nld}${LDFLAGS} -g3"
|
||||
export CPPFLAGS="${new}${CPPFLAGS} -g3"
|
||||
export CXXFLAGS="${new}${CXXFLAGS} -g3"
|
||||
|
||||
# prefer to compile against our own libpng (comment this out to disable)
|
||||
echo Compiling our internal libpng
|
||||
echo "Compiling our internal libpng"
|
||||
(cd vs/libpng && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/libpng/linux-host/include "
|
||||
nld="-L$top/vs/libpng/linux-host/lib "
|
||||
export CFLAGS="$new$CFLAGS -g3"
|
||||
export LDFLAGS="$nld$LDFLAGS -g3"
|
||||
export CPPFLAGS="$new$CPPFLAGS -g3"
|
||||
export CXXFLAGS="$new$CXXFLAGS -g3"
|
||||
new="-I${top}/vs/libpng/linux-host/include "
|
||||
nld="-L${top}/vs/libpng/linux-host/lib "
|
||||
export CFLAGS="${new}${CFLAGS} -g3"
|
||||
export LDFLAGS="${nld}${LDFLAGS} -g3"
|
||||
export CPPFLAGS="${new}${CPPFLAGS} -g3"
|
||||
export CXXFLAGS="${new}${CXXFLAGS} -g3"
|
||||
|
||||
# prefer to compile against our own freetype
|
||||
echo Compiling our internal freetype
|
||||
echo "Compiling our internal freetype"
|
||||
(cd vs/freetype && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L$top/vs/freetype/linux-host/lib -lfreetype "
|
||||
export CFLAGS="$new$CFLAGS -g3"
|
||||
export LDFLAGS="$nld$LDFLAGS -g3"
|
||||
export CPPFLAGS="$new$CPPFLAGS -g3"
|
||||
export CXXFLAGS="$new$CXXFLAGS -g3"
|
||||
new="-I${top}/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L${top}/vs/freetype/linux-host/lib -lfreetype "
|
||||
export CFLAGS="${new}${CFLAGS} -g3"
|
||||
export LDFLAGS="${nld}${LDFLAGS} -g3"
|
||||
export CPPFLAGS="${new}${CPPFLAGS} -g3"
|
||||
export CXXFLAGS="${new}${CXXFLAGS} -g3"
|
||||
export INTERNAL_FREETYPE=1
|
||||
|
||||
brew list fluid-synth &>/dev/null || brew install fluid-synth
|
||||
@ -58,20 +58,20 @@ opts=
|
||||
|
||||
# if Brew has installed packages, try to use those too
|
||||
brew="/opt/homebrew"
|
||||
if [[ -d "$brew" && -d "$brew/include" && -d "$brew/lib" ]]; then
|
||||
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 -g3"
|
||||
export LDFLAGS="$LDFLAGS$nld -g3"
|
||||
export CPPFLAGS="$CPPFLAGS$new -g3"
|
||||
export CXXFLAGS="$CXXFLAGS$new -g3"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$brew/lib/pkgconfig"
|
||||
new=" -I${brew}/include"
|
||||
nld=" -L${brew}/lib"
|
||||
export CFLAGS="${CFLAGS}${new} -g3"
|
||||
export LDFLAGS="${LDFLAGS}${nld} -g3"
|
||||
export CPPFLAGS="${CPPFLAGS}${new} -g3"
|
||||
export CXXFLAGS="${CXXFLAGS}${new} -g3"
|
||||
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${brew}/lib/pkgconfig"
|
||||
fi
|
||||
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
echo "Compiling DOSBox-X"
|
||||
chmod +x configure
|
||||
./configure --enable-debug=heavy --prefix=/usr --enable-sdl2 $opts "$@" || exit 1
|
||||
./configure --enable-debug=heavy --prefix=/usr --enable-sdl2 "${opts}" "${@}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
@ -2,13 +2,24 @@
|
||||
|
||||
# allow 32-bit on 64-bit (x86) builds
|
||||
if [ "$1" == "32" ]; then
|
||||
export CC=`which gcc`" -m32"
|
||||
export CXX=`which g++`" -m32"
|
||||
CC="$(which gcc) -m32"
|
||||
CXX="$(which g++) -m32"
|
||||
export CC CXX
|
||||
no_host_sdl2=1
|
||||
shift
|
||||
opt="--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu"
|
||||
fi
|
||||
|
||||
# Jonathan C dev hack: refer to LNKDOS16 in /usr/src/doslib
|
||||
doslib=
|
||||
if [ -d /usr/src/doslib ]; then doslib="/usr/src/doslib"; fi
|
||||
|
||||
if [ -n "${doslib}" ]; then
|
||||
if [ -x "${doslib}/tool/linker/linux-host/lnkdos16" ]; then
|
||||
export PATH="${doslib}/tool/linker/linux-host:${PATH}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# I'm sick and tired of all the churn the three versions of autoconf
|
||||
# are causing in this repo. Stop committing the configure scripts
|
||||
# and just autoregen.
|
||||
@ -21,18 +32,20 @@ chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
if [[ "$no_host_sdl2" ]]; then
|
||||
x= # doesn't work well cross-compiling
|
||||
else
|
||||
x=`which sdl2-config`
|
||||
x=$(which sdl2-config)
|
||||
fi
|
||||
if test -z "$x" ; then
|
||||
echo Compiling our internal SDL 2.x
|
||||
if test -z "${x}" ; then
|
||||
echo "Compiling our internal SDL 2.x"
|
||||
(cd vs/sdl2 && ./build-dosbox.sh) || exit 1
|
||||
fi
|
||||
|
||||
# prefer to compile against our own copy of SDLnet 1.x
|
||||
echo Compiling our internal SDLnet 1.x
|
||||
echo "Compiling our internal SDLnet 1.x"
|
||||
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# now compile ourself
|
||||
echo "Compiling DOSBox-X"
|
||||
chmod +x configure
|
||||
./configure --enable-debug=heavy --prefix=/usr --enable-sdl2 "$@" $opt || exit 1
|
||||
./configure --enable-debug=heavy --prefix=/usr --enable-sdl2 "${@}" "${opt}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
@ -1,14 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Do you like Clang/LLVM? Use this script to build DOSBox-X!
|
||||
export CC=`which clang`
|
||||
export CXX=`which clang++`
|
||||
export CPP=`which clang-cpp`
|
||||
CC=$(which clang)
|
||||
CXX=$(which clang++)
|
||||
CPP=$(which clang-cpp)
|
||||
export CC CXX CPP
|
||||
|
||||
# allow 32-bit on 64-bit (x86) builds
|
||||
if [ "$1" == "32" ]; then
|
||||
export CC=`which clang`" -m32"
|
||||
export CXX=`which clang++`" -m32"
|
||||
if [ "${1}" == "32" ]; then
|
||||
CC="$(which clang) -m32"
|
||||
CXX="$(which clang++) -m32"
|
||||
export CC CXX
|
||||
shift
|
||||
opt="--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu"
|
||||
fi
|
||||
@ -22,16 +24,16 @@ fi
|
||||
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
# prefer to compile against our own copy of SDL 1.x
|
||||
echo Compiling our internal SDL 1.x
|
||||
echo "Compiling our internal SDL 1.x"
|
||||
(cd vs/sdl && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# prefer to compile against our own copy of SDLnet 1.x
|
||||
echo Compiling our internal SDLnet 1.x
|
||||
echo "Compiling our internal SDLnet 1.x"
|
||||
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
echo "Compiling DOSBox-X"
|
||||
chmod +x configure
|
||||
./configure --enable-debug=heavy --prefix=/usr "$@" $opt || exit 1
|
||||
./configure --enable-debug=heavy --prefix=/usr "${@}" "${opt}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
@ -8,34 +8,35 @@
|
||||
./autogen.sh || exit 1
|
||||
|
||||
# for sdl2-config and sdl-config
|
||||
export PATH=$EMSDK/upstream/emscripten/system/bin:$PATH
|
||||
export PATH=${EMSDK}/upstream/emscripten/system/bin:${PATH}
|
||||
|
||||
export CC="emcc"
|
||||
export CXX="em++"
|
||||
export LD="emcc"
|
||||
export LD_CXX="em++"
|
||||
export AR="emar"
|
||||
export RANLIB="emranlib"
|
||||
export CFLAGS="-DEMTERPRETER_SYNC"
|
||||
export CXXFLAGS="-DEMSCRIPTEN=1 -DEMTERPRETER_SYNC -s USE_ZLIB=1 -s USE_SDL=2"
|
||||
export LDFLAGS="-DEMSCRIPTEN=1 -DEMTERPRETER_SYNC -s USE_ZLIB=1 -s USE_SDL=2 -s FORCE_FILESYSTEM=1 -s ALLOW_MEMORY_GROWTH=1 -s TOTAL_MEMORY=100663296 -s ASYNCIFY -s ERROR_ON_UNDEFINED_SYMBOLS=0"
|
||||
CC="emcc"
|
||||
CXX="em++"
|
||||
LD="emcc"
|
||||
LD_CXX="em++"
|
||||
AR="emar"
|
||||
RANLIB="emranlib"
|
||||
CFLAGS="-DEMTERPRETER_SYNC"
|
||||
CXXFLAGS="-DEMSCRIPTEN=1 -DEMTERPRETER_SYNC -s USE_ZLIB=1 -s USE_SDL=2"
|
||||
LDFLAGS="-DEMSCRIPTEN=1 -DEMTERPRETER_SYNC -s USE_ZLIB=1 -s USE_SDL=2 -s FORCE_FILESYSTEM=1 -s ALLOW_MEMORY_GROWTH=1 -s TOTAL_MEMORY=100663296 -s ASYNCIFY -s ERROR_ON_UNDEFINED_SYMBOLS=0"
|
||||
export CC CXX LD LD_CXX AR RANLIB CFLAGS CXXFLAGS LDFLAGS
|
||||
|
||||
# where are we?
|
||||
top=`pwd`
|
||||
if test -z "$top" ; then exit 1; fi
|
||||
top=$(pwd)
|
||||
if test -z "${top}" ; then exit 1; fi
|
||||
|
||||
# fix
|
||||
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
echo Compiling DOSBox-X
|
||||
echo "Compiling DOSBox-X"
|
||||
chmod +x configure
|
||||
|
||||
# build command borrowed from Yksoft1 vanilla DOSBox-X port with modifications
|
||||
./configure \
|
||||
--host=x86_64-linux --disable-dynrec --disable-dynamic-x86 --disable-fpu-x86 --disable-dynamic-core \
|
||||
--enable-sdl2 --with-sdl-prefix=$EMSDK/upstream/emscripten/system --disable-screenshots \
|
||||
--enable-sdl2 --with-sdl-prefix="${EMSDK}/upstream/emscripten/system" --disable-screenshots \
|
||||
--disable-opengl --disable-mt32 --enable-emscripten --enable-force-menu-sdldraw --disable-x11 \
|
||||
--disable-avcodec --disable-libslirp --disable-libfluidsynth --disable-freetype "$@"
|
||||
--disable-avcodec --disable-libslirp --disable-libfluidsynth --disable-freetype "${@}"
|
||||
|
||||
make -j6 || exit 1
|
||||
|
||||
|
100
build-macos
100
build-macos
@ -6,16 +6,16 @@
|
||||
./autogen.sh || exit 1
|
||||
|
||||
# where are we?
|
||||
top=`pwd`
|
||||
if test -z "$top" ; then exit 1; fi
|
||||
top=$(pwd)
|
||||
if test -z "${top}" ; then exit 1; fi
|
||||
|
||||
# fix
|
||||
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
orig_CFLAGS="$CFLAGS"
|
||||
orig_LDFLAGS="$LDFLAGS"
|
||||
orig_CPPFLAGS="$CPPFLAGS"
|
||||
orig_CXXFLAGS="$CXXFLAGS"
|
||||
orig_CFLAGS="${CFLAGS}"
|
||||
orig_LDFLAGS="${LDFLAGS}"
|
||||
orig_CPPFLAGS="${CPPFLAGS}"
|
||||
orig_CXXFLAGS="${CXXFLAGS}"
|
||||
|
||||
# Ensure sdl2 isn't detected as we aren't going to use it, and the presence of
|
||||
# this folder will cause the build to fail.
|
||||
@ -35,9 +35,9 @@ do_cleanup() {
|
||||
|
||||
universal=0
|
||||
architectures="$(uname -m)"
|
||||
if [ "$1" = "universal" ]; then
|
||||
if [ "${1}" = "universal" ]; then
|
||||
shift
|
||||
if [ "$architectures" = "arm64" ]; then
|
||||
if [ "${architectures}" = "arm64" ]; then
|
||||
# We can only build universal binaries on an arm64 host because we
|
||||
# need homebrew functional under both architectures.
|
||||
universal=1
|
||||
@ -62,11 +62,11 @@ elif [ -x /usr/local/Homebrew/bin/brew ]; then
|
||||
fi
|
||||
|
||||
# x86_64 on arm64 for universal builds if x86_64 Homebrew is installed
|
||||
if [ -n "$x86_64_brew_cmd" ] && [ "$universal" -eq 1 ]; then
|
||||
x86_64_brew_cmd="/usr/bin/arch -x86_64 $x86_64_brew_cmd"
|
||||
if [ -n "${x86_64_brew_cmd}" ] && [ "${universal}" -eq 1 ]; then
|
||||
x86_64_brew_cmd="/usr/bin/arch -x86_64 ${x86_64_brew_cmd}"
|
||||
fi
|
||||
|
||||
for arch in $architectures; do
|
||||
for arch in ${architectures}; do
|
||||
declare brew_cmd="${arch}_brew_cmd"
|
||||
if [ -n "${!brew_cmd}" ]; then
|
||||
${!brew_cmd} list fluid-synth &>/dev/null || ${!brew_cmd} install fluid-synth
|
||||
@ -76,56 +76,61 @@ for arch in $architectures; do
|
||||
|
||||
do_cleanup
|
||||
|
||||
arch_flags="-arch $arch -mmacosx-version-min=10.12 "
|
||||
export CFLAGS="$arch_flags$orig_CFLAGS"
|
||||
export LDFLAGS="$arch_flags$orig_LDFLAGS"
|
||||
export CPPFLAGS="$arch_flags$orig_CPPFLAGS"
|
||||
export CXXFLAGS="$arch_flags$orig_CXXFLAGS"
|
||||
arch_flags="-arch ${arch} -mmacosx-version-min=10.12 "
|
||||
CFLAGS="${arch_flags}${orig_CFLAGS}"
|
||||
LDFLAGS="${arch_flags}${orig_LDFLAGS}"
|
||||
CPPFLAGS="${arch_flags}${orig_CPPFLAGS}"
|
||||
CXXFLAGS="${arch_flags}${orig_CXXFLAGS}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own copy of SDL 1.x
|
||||
echo Compiling our internal SDL 1.x
|
||||
echo "Compiling our internal SDL 1.x"
|
||||
(cd vs/sdl && ./build-dosbox.sh) || exit 1
|
||||
new=" -I$top/vs/sdl/linux-host/include"
|
||||
nld=" -L$top/vs/sdl/linux-host/lib"
|
||||
export CFLAGS="$CFLAGS$new"
|
||||
export LDFLAGS="$LDFLAGS$nld"
|
||||
export CPPFLAGS="$CPPFLAGS$new"
|
||||
export CXXFLAGS="$CXXFLAGS$new"
|
||||
CFLAGS="${CFLAGS}${new}"
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
CXXFLAGS="${CXXFLAGS}${new}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own copy of SDLnet 1.x
|
||||
echo Compiling our internal SDLnet 1.x
|
||||
echo "Compiling our internal SDLnet 1.x"
|
||||
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# prefer to compile against our own zlib
|
||||
echo Compiling our internal zlib
|
||||
echo "Compiling our internal zlib"
|
||||
(cd vs/zlib && ./build-dosbox.sh) || exit 1
|
||||
new=" -I$top/vs/zlib/linux-host/include"
|
||||
nld=" -L$top/vs/zlib/linux-host/lib"
|
||||
export CFLAGS="$CFLAGS$new"
|
||||
export LDFLAGS="$LDFLAGS$nld"
|
||||
export CPPFLAGS="$CPPFLAGS$new"
|
||||
export CXXFLAGS="$CXXFLAGS$new"
|
||||
CFLAGS="${CFLAGS}${new}"
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
CXXFLAGS="${CXXFLAGS}${new}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own libpng (comment this out to disable)
|
||||
echo Compiling our internal libpng
|
||||
echo "Compiling our internal libpng"
|
||||
(cd vs/libpng && ./build-dosbox.sh) || exit 1
|
||||
new=" -I$top/vs/libpng/linux-host/include"
|
||||
nld=" -L$top/vs/libpng/linux-host/lib"
|
||||
export CFLAGS="$CFLAGS$new"
|
||||
export LDFLAGS="$LDFLAGS$nld"
|
||||
export CPPFLAGS="$CPPFLAGS$new"
|
||||
export CXXFLAGS="$CXXFLAGS$new"
|
||||
CFLAGS="${CFLAGS}${new}"
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
CXXFLAGS="${CXXFLAGS}${new}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own freetype
|
||||
echo Compiling our internal freetype
|
||||
(cd vs/freetype && ./build-dosbox.sh) || exit 1
|
||||
new=" -I$top/vs/freetype/linux-host/include/freetype2"
|
||||
nld=" -L$top/vs/freetype/linux-host/lib -lfreetype"
|
||||
export CFLAGS="$CFLAGS$new"
|
||||
export LDFLAGS="$LDFLAGS$nld"
|
||||
export CPPFLAGS="$CPPFLAGS$new"
|
||||
export CXXFLAGS="$CXXFLAGS$new"
|
||||
export INTERNAL_FREETYPE=1
|
||||
CFLAGS="${CFLAGS}${new}"
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
CXXFLAGS="${CXXFLAGS}${new}"
|
||||
INTERNAL_FREETYPE=1
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS INTERNAL_FREETYPE
|
||||
|
||||
opts=
|
||||
|
||||
@ -134,22 +139,23 @@ for arch in $architectures; do
|
||||
echo "Brew is installed, I'm going to use it's libraries too"
|
||||
new=" -I$(${!brew_cmd} --prefix)/include"
|
||||
nld=" -L$(${!brew_cmd} --prefix)/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_cmd} --prefix)/lib/pkgconfig"
|
||||
CFLAGS="${CFLAGS}${new}"
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
CXXFLAGS="${CXXFLAGS}${new}"
|
||||
PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(${!brew_cmd} --prefix)/lib/pkgconfig"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS PKG_CONFIG_PATH
|
||||
fi
|
||||
|
||||
if [ "$universal" = 1 ]; then
|
||||
opts="$opts --enable-universal"
|
||||
if [ "${universal}" = 1 ]; then
|
||||
opts="${opts} --enable-universal"
|
||||
fi
|
||||
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
echo "Compiling DOSBox-X"
|
||||
chmod +x configure
|
||||
./configure --enable-debug=heavy --prefix=/usr $opts "$@" || exit 1
|
||||
./configure --enable-debug=heavy --prefix=/usr "${opts}" "${@}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
cp src/dosbox-x src/dosbox-x-$arch
|
||||
cp src/dosbox-x "src/dosbox-x-${arch}"
|
||||
done
|
116
build-macos-sdl2
116
build-macos-sdl2
@ -6,16 +6,16 @@
|
||||
./autogen.sh || exit 1
|
||||
|
||||
# where are we?
|
||||
top=`pwd`
|
||||
if test -z "$top" ; then exit 1; fi
|
||||
top=$(pwd)
|
||||
if test -z "${top}" ; then exit 1; fi
|
||||
|
||||
# fix
|
||||
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
orig_CFLAGS="$CFLAGS"
|
||||
orig_LDFLAGS="$LDFLAGS"
|
||||
orig_CPPFLAGS="$CPPFLAGS"
|
||||
orig_CXXFLAGS="$CXXFLAGS"
|
||||
orig_CFLAGS="${CFLAGS}"
|
||||
orig_LDFLAGS="${LDFLAGS}"
|
||||
orig_CPPFLAGS="${CPPFLAGS}"
|
||||
orig_CXXFLAGS="${CXXFLAGS}"
|
||||
|
||||
# Remove our temporary copies of dosbox-x executable before rebuilding
|
||||
rm -f src/dosbox-x-arm64 src/dosbox-x-x86_64
|
||||
@ -30,9 +30,9 @@ do_cleanup() {
|
||||
|
||||
universal=0
|
||||
architectures="$(uname -m)"
|
||||
if [ "$1" = "universal" ]; then
|
||||
if [ "${1}" = "universal" ]; then
|
||||
shift
|
||||
if [ "$architectures" = "arm64" ]; then
|
||||
if [ "${architectures}" = "arm64" ]; then
|
||||
# We can only build universal binaries on an arm64 host because we
|
||||
# need homebrew functional under both architectures.
|
||||
universal=1
|
||||
@ -57,11 +57,11 @@ elif [ -x /usr/local/Homebrew/bin/brew ]; then
|
||||
fi
|
||||
|
||||
# x86_64 on arm64 for universal builds if x86_64 Homebrew is installed
|
||||
if [ -n "$x86_64_brew_cmd" ] && [ "$universal" -eq 1 ]; then
|
||||
x86_64_brew_cmd="/usr/bin/arch -x86_64 $x86_64_brew_cmd"
|
||||
if [ -n "${x86_64_brew_cmd}" ] && [ "${universal}" -eq 1 ]; then
|
||||
x86_64_brew_cmd="/usr/bin/arch -x86_64 ${x86_64_brew_cmd}"
|
||||
fi
|
||||
|
||||
for arch in $architectures; do
|
||||
for arch in ${architectures}; do
|
||||
declare brew_cmd="${arch}_brew_cmd"
|
||||
if [ -n "${!brew_cmd}" ]; then
|
||||
${!brew_cmd} list fluid-synth &>/dev/null || ${!brew_cmd} install fluid-synth
|
||||
@ -71,52 +71,57 @@ for arch in $architectures; do
|
||||
|
||||
do_cleanup
|
||||
|
||||
arch_flags="-arch $arch -mmacosx-version-min=10.12 "
|
||||
export CFLAGS="$arch_flags$orig_CFLAGS"
|
||||
export LDFLAGS="$arch_flags$orig_LDFLAGS"
|
||||
export CPPFLAGS="$arch_flags$orig_CPPFLAGS"
|
||||
export CXXFLAGS="$arch_flags$orig_CXXFLAGS"
|
||||
arch_flags="-arch ${arch} -mmacosx-version-min=10.12 "
|
||||
CFLAGS="${arch_flags}${orig_CFLAGS}"
|
||||
LDFLAGS="${arch_flags}${orig_LDFLAGS}"
|
||||
CPPFLAGS="${arch_flags}${orig_CPPFLAGS}"
|
||||
CXXFLAGS="${arch_flags}${orig_CXXFLAGS}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own copy of SDL 2.x IF the system does not provide one
|
||||
echo Compiling our internal SDL 2.x
|
||||
echo "Compiling our internal SDL 2.x"
|
||||
(cd vs/sdl2 && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/sdl2/linux-host/include "
|
||||
nld="-L$top/vs/sdl2/linux-host/lib "
|
||||
export CFLAGS="$CFLAGS$new"
|
||||
export LDFLAGS="$LDFLAGS$nld"
|
||||
export CPPFLAGS="$CPPFLAGS$new"
|
||||
export CXXFLAGS="$CXXFLAGS$new"
|
||||
new="-I${top}/vs/sdl2/linux-host/include "
|
||||
nld="-L${top}/vs/sdl2/linux-host/lib "
|
||||
CFLAGS="${CFLAGS}${new}"
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
CXXFLAGS="${CXXFLAGS}${new}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own zlib
|
||||
echo Compiling our internal zlib
|
||||
echo "Compiling our internal zlib"
|
||||
(cd vs/zlib && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/zlib/linux-host/include "
|
||||
nld="-L$top/vs/zlib/linux-host/lib "
|
||||
export CFLAGS="$CFLAGS$new"
|
||||
export LDFLAGS="$LDFLAGS$nld"
|
||||
export CPPFLAGS="$CPPFLAGS$new"
|
||||
export CXXFLAGS="$CXXFLAGS$new"
|
||||
new="-I${top}/vs/zlib/linux-host/include "
|
||||
nld="-L${top}/vs/zlib/linux-host/lib "
|
||||
CFLAGS="${CFLAGS}${new}"
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
CXXFLAGS="${CXXFLAGS}${new}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own libpng (comment this out to disable)
|
||||
echo Compiling our internal libpng
|
||||
echo "Compiling our internal libpng"
|
||||
(cd vs/libpng && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/libpng/linux-host/include "
|
||||
nld="-L$top/vs/libpng/linux-host/lib "
|
||||
export CFLAGS="$CFLAGS$new"
|
||||
export LDFLAGS="$LDFLAGS$nld"
|
||||
export CPPFLAGS="$CPPFLAGS$new"
|
||||
export CXXFLAGS="$CXXFLAGS$new"
|
||||
new="-I${top}/vs/libpng/linux-host/include "
|
||||
nld="-L${top}/vs/libpng/linux-host/lib "
|
||||
CFLAGS="${CFLAGS}${new}"
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
CXXFLAGS="${CXXFLAGS}${new}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own freetype
|
||||
echo Compiling our internal freetype
|
||||
echo "Compiling our internal freetype"
|
||||
(cd vs/freetype && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L$top/vs/freetype/linux-host/lib -lfreetype "
|
||||
export CFLAGS="$CFLAGS$new"
|
||||
export LDFLAGS="$LDFLAGS$nld"
|
||||
export CPPFLAGS="$CPPFLAGS$new"
|
||||
export CXXFLAGS="$CXXFLAGS$new"
|
||||
export INTERNAL_FREETYPE=1
|
||||
new="-I${top}/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L${top}/vs/freetype/linux-host/lib -lfreetype "
|
||||
CFLAGS="${CFLAGS}${new}"
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
CXXFLAGS="${CXXFLAGS}${new}"
|
||||
INTERNAL_FREETYPE=1
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS INTERNAL_FREETYPE
|
||||
|
||||
opts=
|
||||
|
||||
@ -125,22 +130,23 @@ for arch in $architectures; do
|
||||
echo "Brew is installed, I'm going to use it's libraries too"
|
||||
new=" -I$(${!brew_cmd} --prefix)/include"
|
||||
nld=" -L$(${!brew_cmd} --prefix)/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_cmd} --prefix)/lib/pkgconfig"
|
||||
CFLAGS="${CFLAGS}${new}"
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
CXXFLAGS="${CXXFLAGS}${new}"
|
||||
PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:$(${!brew_cmd} --prefix)/lib/pkgconfig"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS PKG_CONFIG_PATH
|
||||
fi
|
||||
|
||||
if [ "$universal" = 1 ]; then
|
||||
opts="$opts --enable-universal"
|
||||
if [ "${universal}" = 1 ]; then
|
||||
opts="${opts} --enable-universal"
|
||||
fi
|
||||
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
echo "Compiling DOSBox-X"
|
||||
chmod +x configure
|
||||
./configure --enable-debug=heavy --prefix=/usr --enable-sdl2 $opts "$@" || exit 1
|
||||
./configure --enable-debug=heavy --prefix=/usr --enable-sdl2 "${opts}" "${@}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
cp src/dosbox-x src/dosbox-x-$arch
|
||||
cp src/dosbox-x "src/dosbox-x-{$arch}"
|
||||
done
|
59
build-mingw
59
build-mingw
@ -6,8 +6,8 @@
|
||||
./autogen.sh || exit 1
|
||||
|
||||
# where are we?
|
||||
top=`pwd`
|
||||
if test -z "$top" ; then exit 1; fi
|
||||
top=$(pwd)
|
||||
if test -z "${top}" ; then exit 1; fi
|
||||
|
||||
# fix
|
||||
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
@ -15,11 +15,11 @@ chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
sed -i 's/^#define ENABLE_IM_EVENT 1$/\/\/#define ENABLE_IM_EVENT 1/g' vs/sdl/include/SDL_platform.h
|
||||
|
||||
# prefer to compile against our own copy of SDL 1.x
|
||||
echo Compiling our internal SDL 1.x
|
||||
echo "Compiling our internal SDL 1.x"
|
||||
(cd vs/sdl && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# prefer to compile against our own copy of SDLnet 1.x
|
||||
echo Compiling our internal SDLnet 1.x
|
||||
echo "Compiling our internal SDLnet 1.x"
|
||||
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
|
||||
|
||||
sed -i 's/^\/\/#define ENABLE_IM_EVENT 1$/#define ENABLE_IM_EVENT 1/g' vs/sdl/include/SDL_platform.h
|
||||
@ -28,43 +28,46 @@ sed -i 's/^\/\/#define ENABLE_IM_EVENT 1$/#define ENABLE_IM_EVENT 1/g' vs/sdl/in
|
||||
# NTS: MinGW provides zlib for us
|
||||
if false; then
|
||||
# prefer to compile against our own zlib
|
||||
echo Compiling our internal zlib
|
||||
echo "Compiling our internal zlib"
|
||||
(cd vs/zlib && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/zlib/linux-host/include "
|
||||
nld="-L$top/vs/zlib/linux-host/lib "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
new="-I${top}/vs/zlib/linux-host/include "
|
||||
nld="-L${top}/vs/zlib/linux-host/lib "
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
fi
|
||||
|
||||
# prefer to compile against our own libpng (comment this out to disable)
|
||||
echo Compiling our internal libpng
|
||||
echo "Compiling our internal libpng"
|
||||
(cd vs/libpng && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/libpng/linux-host/include "
|
||||
nld="-L$top/vs/libpng/linux-host/lib "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
new="-I${top}/vs/libpng/linux-host/include "
|
||||
nld="-L${top}/vs/libpng/linux-host/lib "
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own freetype
|
||||
echo Compiling our internal freetype
|
||||
echo "Compiling our internal freetype"
|
||||
(cd vs/freetype && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L$top/vs/freetype/linux-host/lib -lfreetype "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
export INTERNAL_FREETYPE=1
|
||||
new="-I${top}/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L${top}/vs/freetype/linux-host/lib -lfreetype "
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
INTERNAL_FREETYPE=1
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS INTERNAL_FREETYPE
|
||||
|
||||
pacman -S --needed --noconfirm mingw-w64-x86_64-libslirp &>/dev/null
|
||||
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
echo "Compiling DOSBox-X"
|
||||
chmod +x configure
|
||||
# FIXME: I would like MinGW builds to enable the debugger, eventually
|
||||
./configure --enable-d3d9 --enable-d3d-shaders --disable-libfluidsynth --prefix=/usr "$@" || exit 1
|
||||
./configure --enable-d3d9 --enable-d3d-shaders --disable-libfluidsynth --prefix=/usr "${@}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
@ -6,58 +6,61 @@
|
||||
./autogen.sh || exit 1
|
||||
|
||||
# where are we?
|
||||
top=`pwd`
|
||||
if test -z "$top" ; then exit 1; fi
|
||||
top=$(pwd)
|
||||
if test -z "${top}" ; then exit 1; fi
|
||||
|
||||
# fix
|
||||
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
# prefer to compile against our own copy of SDL 1.x
|
||||
echo Compiling our internal SDL 1.x
|
||||
echo "Compiling our internal SDL 1.x"
|
||||
(cd vs/sdl && ./build-dosbox.sh hx-dos) || exit 1
|
||||
|
||||
# prefer to compile against our own copy of SDLnet 1.x
|
||||
echo Compiling our internal SDLnet 1.x
|
||||
echo "Compiling our internal SDLnet 1.x"
|
||||
(cd vs/sdlnet && ./build-dosbox.sh hx-dos) || exit 1
|
||||
|
||||
# NTS: MinGW provides zlib for us
|
||||
if false; then
|
||||
# prefer to compile against our own zlib
|
||||
echo Compiling our internal zlib
|
||||
echo "Compiling our internal zlib"
|
||||
(cd vs/zlib && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/zlib/linux-host/include "
|
||||
nld="-L$top/vs/zlib/linux-host/lib "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
new="-I${top}/vs/zlib/linux-host/include "
|
||||
nld="-L${top}/vs/zlib/linux-host/lib "
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
fi
|
||||
|
||||
# prefer to compile against our own libpng (comment this out to disable)
|
||||
echo Compiling our internal libpng
|
||||
echo "Compiling our internal libpng"
|
||||
(cd vs/libpng && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/libpng/linux-host/include "
|
||||
nld="-L$top/vs/libpng/linux-host/lib "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
new="-I${top}/vs/libpng/linux-host/include "
|
||||
nld="-L${top}/vs/libpng/linux-host/lib "
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own freetype
|
||||
echo Compiling our internal freetype
|
||||
echo "Compiling our internal freetype"
|
||||
(cd vs/freetype && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L$top/vs/freetype/linux-host/lib -lfreetype "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
export INTERNAL_FREETYPE=1
|
||||
new="-I${top}/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L${top}/vs/freetype/linux-host/lib -lfreetype "
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
INTERNAL_FREETYPE=1
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS INTERNAL_FREETYPE
|
||||
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
echo "Compiling DOSBox-X"
|
||||
chmod +x configure
|
||||
# FIXME: I would like MinGW builds to enable the debugger, eventually
|
||||
./configure --disable-libfluidsynth --disable-opengl --enable-hx-dos --prefix=/usr "$@" || exit 1
|
||||
./configure --disable-libfluidsynth --disable-opengl --enable-hx-dos --prefix=/usr "${@}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
@ -6,58 +6,60 @@
|
||||
./autogen.sh || exit 1
|
||||
|
||||
# where are we?
|
||||
top=`pwd`
|
||||
if test -z "$top" ; then exit 1; fi
|
||||
top=$(pwd)
|
||||
if test -z "${top}" ; then exit 1; fi
|
||||
|
||||
# fix
|
||||
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
# prefer to compile against our own copy of SDL 1.x
|
||||
echo Compiling our internal SDL 1.x
|
||||
echo "Compiling our internal SDL 1.x"
|
||||
(cd vs/sdl && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# prefer to compile against our own copy of SDLnet 1.x
|
||||
echo Compiling our internal SDLnet 1.x
|
||||
echo "Compiling our internal SDLnet 1.x"
|
||||
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# NTS: MinGW provides zlib for us
|
||||
if false; then
|
||||
# prefer to compile against our own zlib
|
||||
echo Compiling our internal zlib
|
||||
echo "Compiling our internal zlib"
|
||||
(cd vs/zlib && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/zlib/linux-host/include "
|
||||
nld="-L$top/vs/zlib/linux-host/lib "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
new="-I${top}/vs/zlib/linux-host/include "
|
||||
nld="-L${top}/vs/zlib/linux-host/lib "
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
fi
|
||||
|
||||
# prefer to compile against our own libpng (comment this out to disable)
|
||||
echo Compiling our internal libpng
|
||||
echo "Compiling our internal libpng"
|
||||
(cd vs/libpng && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/libpng/linux-host/include "
|
||||
nld="-L$top/vs/libpng/linux-host/lib "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
new="-I${top}/vs/libpng/linux-host/include "
|
||||
nld="-L${top}/vs/libpng/linux-host/lib "
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own freetype
|
||||
echo Compiling our internal freetype
|
||||
echo "Compiling our internal freetype"
|
||||
(cd vs/freetype && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L$top/vs/freetype/linux-host/lib -lfreetype "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
export INTERNAL_FREETYPE=1
|
||||
new="-I${top}/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L${top}/vs/freetype/linux-host/lib -lfreetype "
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
INTERNAL_FREETYPE=1
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS INTERNAL_FREETYPE
|
||||
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
echo "Compiling DOSBox-X"
|
||||
chmod +x configure
|
||||
# FIXME: I would like MinGW builds to enable the debugger, eventually
|
||||
./configure --disable-libfluidsynth --disable-libslirp --enable-d3d9 --enable-d3d-shaders --prefix=/usr "$@" || exit 1
|
||||
./configure --disable-libfluidsynth --disable-libslirp --enable-d3d9 --enable-d3d-shaders --prefix=/usr "${@}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
@ -6,61 +6,64 @@
|
||||
./autogen.sh || exit 1
|
||||
|
||||
# where are we?
|
||||
top=`pwd`
|
||||
if test -z "$top" ; then exit 1; fi
|
||||
top=$(pwd)
|
||||
if test -z "${top}" ; then exit 1; fi
|
||||
|
||||
# fix
|
||||
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
# prefer to compile against our own copy of SDL 2.x IF the system does not provide one
|
||||
x=`which sdl2-config`
|
||||
if test -z "$x" ; then
|
||||
echo Compiling our internal SDL 2.x
|
||||
x=$(which sdl2-config)
|
||||
if test -z "${x}" ; then
|
||||
echo "Compiling our internal SDL 2.x"
|
||||
(cd vs/sdl2 && ./build-dosbox.sh) || exit 1
|
||||
fi
|
||||
|
||||
# prefer to compile against our own copy of SDLnet 1.x
|
||||
echo Compiling our internal SDLnet 1.x
|
||||
echo "Compiling our internal SDLnet 1.x"
|
||||
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# NTS: MinGW provides zlib for us
|
||||
if false; then
|
||||
# prefer to compile against our own zlib
|
||||
echo Compiling our internal zlib
|
||||
echo "Compiling our internal zlib"
|
||||
(cd vs/zlib && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/zlib/linux-host/include "
|
||||
nld="-L$top/vs/zlib/linux-host/lib "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
new="-I${top}/vs/zlib/linux-host/include "
|
||||
nld="-L${top}/vs/zlib/linux-host/lib "
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
fi
|
||||
|
||||
# prefer to compile against our own libpng (comment this out to disable)
|
||||
echo Compiling our internal libpng
|
||||
echo "Compiling our internal libpng"
|
||||
(cd vs/libpng && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/libpng/linux-host/include "
|
||||
nld="-L$top/vs/libpng/linux-host/lib "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own freetype
|
||||
echo Compiling our internal freetype
|
||||
echo "Compiling our internal freetype"
|
||||
(cd vs/freetype && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L$top/vs/freetype/linux-host/lib -lfreetype "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
export INTERNAL_FREETYPE=1
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
INTERNAL_FREETYPE=1
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS INTERNAL_FREETYPE
|
||||
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
echo "Compiling DOSBox-X"
|
||||
chmod +x configure
|
||||
# FIXME: I would like MinGW builds to enable the debugger, eventually
|
||||
./configure --disable-libfluidsynth --disable-libslirp --enable-d3d9 --enable-d3d-shaders --prefix=/usr --enable-sdl2 "$@" || exit 1
|
||||
./configure --disable-libfluidsynth --disable-libslirp --enable-d3d9 --enable-d3d-shaders --prefix=/usr --enable-sdl2 "${@}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
@ -6,63 +6,65 @@
|
||||
./autogen.sh || exit 1
|
||||
|
||||
# where are we?
|
||||
top=`pwd`
|
||||
if test -z "$top" ; then exit 1; fi
|
||||
top=$(pwd)
|
||||
if test -z "${top}" ; then exit 1; fi
|
||||
|
||||
# fix
|
||||
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
# prefer to compile against our own copy of SDL 2.x IF the system does not provide one
|
||||
x=`which sdl2-config`
|
||||
if test -z "$x" ; then
|
||||
echo Compiling our internal SDL 2.x
|
||||
x=$(which sdl2-config)
|
||||
if test -z "${x}" ; then
|
||||
echo "Compiling our internal SDL 2.x"
|
||||
(cd vs/sdl2 && ./build-dosbox.sh) || exit 1
|
||||
fi
|
||||
|
||||
# prefer to compile against our own copy of SDLnet 1.x
|
||||
echo Compiling our internal SDLnet 1.x
|
||||
echo "Compiling our internal SDLnet 1.x"
|
||||
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# NTS: MinGW provides zlib for us
|
||||
if false; then
|
||||
# prefer to compile against our own zlib
|
||||
echo Compiling our internal zlib
|
||||
echo "Compiling our internal zlib"
|
||||
(cd vs/zlib && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/zlib/linux-host/include "
|
||||
nld="-L$top/vs/zlib/linux-host/lib "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
new="-I${top}/vs/zlib/linux-host/include "
|
||||
nld="-L${top}/vs/zlib/linux-host/lib "
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
fi
|
||||
|
||||
# prefer to compile against our own libpng (comment this out to disable)
|
||||
echo Compiling our internal libpng
|
||||
echo "Compiling our internal libpng"
|
||||
(cd vs/libpng && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/libpng/linux-host/include "
|
||||
nld="-L$top/vs/libpng/linux-host/lib "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
new="-I${top}/vs/libpng/linux-host/include "
|
||||
nld="-L${top}/vs/libpng/linux-host/lib "
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own freetype
|
||||
echo Compiling our internal freetype
|
||||
echo "Compiling our internal freetype"
|
||||
(cd vs/freetype && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L$top/vs/freetype/linux-host/lib -lfreetype "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
export INTERNAL_FREETYPE=1
|
||||
new="-I${top}/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L${top}/vs/freetype/linux-host/lib -lfreetype "
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
INTERNAL_FREETYPE=1
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS INTERNAL_FREETYPE
|
||||
|
||||
pacman -S --needed --noconfirm mingw-w64-x86_64-libslirp &>/dev/null
|
||||
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
echo "Compiling DOSBox-X"
|
||||
chmod +x configure
|
||||
# FIXME: I would like MinGW builds to enable the debugger, eventually
|
||||
./configure --enable-d3d9 --enable-d3d-shaders --disable-libfluidsynth --prefix=/usr --enable-sdl2 "$@" || exit 1
|
||||
./configure --enable-d3d9 --enable-d3d-shaders --disable-libfluidsynth --prefix=/usr --enable-sdl2 "${@}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
@ -6,60 +6,63 @@
|
||||
./autogen.sh || exit 1
|
||||
|
||||
# where are we?
|
||||
top=`pwd`
|
||||
if test -z "$top" ; then exit 1; fi
|
||||
top=$(pwd)
|
||||
if test -z "${top}" ; then exit 1; fi
|
||||
|
||||
# fix
|
||||
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
# prefer to compile against our own copy of SDL 1.x
|
||||
echo Compiling our internal SDL 1.x
|
||||
echo "Compiling our internal SDL 1.x"
|
||||
(cd vs/sdl && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# prefer to compile against our own copy of SDLnet 1.x
|
||||
echo Compiling our internal SDLnet 1.x
|
||||
echo "Compiling our internal SDLnet 1.x"
|
||||
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# NTS: MinGW provides zlib for us
|
||||
if false; then
|
||||
# prefer to compile against our own zlib
|
||||
echo Compiling our internal zlib
|
||||
echo "Compiling our internal zlib"
|
||||
(cd vs/zlib && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/zlib/linux-host/include "
|
||||
nld="-L$top/vs/zlib/linux-host/lib "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
new="-I${top}/vs/zlib/linux-host/include "
|
||||
nld="-L${top}/vs/zlib/linux-host/lib "
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
fi
|
||||
|
||||
# prefer to compile against our own libpng (comment this out to disable)
|
||||
echo Compiling our internal libpng
|
||||
echo "Compiling our internal libpng"
|
||||
(cd vs/libpng && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/libpng/linux-host/include "
|
||||
nld="-L$top/vs/libpng/linux-host/lib "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
new="-I${top}/vs/libpng/linux-host/include "
|
||||
nld="-L${top}/vs/libpng/linux-host/lib "
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own freetype
|
||||
echo Compiling our internal freetype
|
||||
echo "Compiling our internal freetype"
|
||||
(cd vs/freetype && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L$top/vs/freetype/linux-host/lib -lfreetype "
|
||||
export CFLAGS="$new$CFLAGS"
|
||||
export LDFLAGS="$nld$LDFLAGS"
|
||||
export CPPFLAGS="$new$CPPFLAGS"
|
||||
export CXXFLAGS="$new$CXXFLAGS"
|
||||
export INTERNAL_FREETYPE=1
|
||||
new="-I${top}/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L${top}/vs/freetype/linux-host/lib -lfreetype "
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
CXXFLAGS="${new}${CXXFLAGS}"
|
||||
INTERNAL_FREETYPE=1
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS INTERNAL_FREETYPE
|
||||
|
||||
pacman -S --needed --noconfirm mingw-w64-x86_64-libslirp &>/dev/null
|
||||
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
echo "Compiling DOSBox-X"
|
||||
chmod +x configure
|
||||
# FIXME: I would like MinGW builds to enable the debugger, eventually
|
||||
./configure --enable-force-menu-sdldraw --enable-d3d9 --enable-d3d-shaders --disable-libfluidsynth --prefix=/usr "$@" || exit 1
|
||||
./configure --enable-force-menu-sdldraw --enable-d3d9 --enable-d3d-shaders --disable-libfluidsynth --prefix=/usr "${@}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
11
build-riscos
11
build-riscos
@ -5,15 +5,16 @@
|
||||
# and just autoregen.
|
||||
./autogen.sh || exit 1
|
||||
|
||||
echo Compiling DOSBox-X
|
||||
echo "Compiling DOSBox-X"
|
||||
chmod +x configure
|
||||
|
||||
# for sdl-config
|
||||
export PATH=$GCCSDK_INSTALL_ENV/bin:$PATH
|
||||
export CPPFLAGS=-I$GCCSDK_INSTALL_ENV/include
|
||||
export LDFLAGS="-L$GCCSDK_INSTALL_ENV/lib -static"
|
||||
PATH=${GCCSDK_INSTALL_ENV}/bin:$PATH
|
||||
CPPFLAGS=-I${GCCSDK_INSTALL_ENV}/include
|
||||
LDFLAGS="-L${GCCSDK_INSTALL_ENV}/lib -static"
|
||||
export PATH CPPFLAGS LDFLAGS
|
||||
|
||||
./configure --host=arm-unknown-riscos "$@"
|
||||
./configure --host=arm-unknown-riscos "${@}"
|
||||
make -j3 || exit 1
|
||||
elf2aif src/dosbox-x !DosBox-X/dosbox-x,ff8
|
||||
cp contrib/fonts/FREECG98.BMP !DosBox-X/resources/freecg98.bmp,69c
|
||||
|
@ -5,17 +5,17 @@
|
||||
# git clone https://github.com/joncampbell123/dosbox-x dosbox-x-sdl2
|
||||
#
|
||||
# Then run this script
|
||||
arch=`uname -m`
|
||||
name=`date +%F-%T | sed -e 's/:/-/g' | sed -e 's/-//g'`
|
||||
name="dosbox-x-macosx-$arch-$name.zip"
|
||||
arch=$(uname -m)
|
||||
name=$(date +%F-%T | sed -e 's/:/-/g' | sed -e 's/-//g')
|
||||
name="dosbox-x-macosx-${arch}-${name}.zip"
|
||||
|
||||
echo "Will pack to $name"
|
||||
echo "Will pack to ${name}"
|
||||
sleep 1
|
||||
|
||||
top=`pwd`
|
||||
cd "$top" || exit 1
|
||||
top=$(pwd)
|
||||
cd "${top}" || exit 1
|
||||
|
||||
cd "$top/dosbox-x" || exit 1
|
||||
cd "${top}/dosbox-x" || exit 1
|
||||
git clean -dfx
|
||||
git reset --hard
|
||||
git checkout master
|
||||
@ -30,7 +30,7 @@ cp CHANGELOG CHANGELOG.txt || exit 1
|
||||
cp COPYING COPYING.txt || exit 1
|
||||
cp contrib/macos/readme.txt README.txt || exit 1
|
||||
|
||||
cd "$top/dosbox-x-sdl2" || exit 1
|
||||
cd "${top}/dosbox-x-sdl2" || exit 1
|
||||
git clean -dfx
|
||||
git reset --hard
|
||||
git checkout master
|
||||
@ -45,10 +45,9 @@ cp CHANGELOG CHANGELOG.txt || exit 1
|
||||
cp COPYING COPYING.txt || exit 1
|
||||
cp contrib/macos/readme.txt README.txt || exit 1
|
||||
|
||||
cd "$top" || exit 1
|
||||
cd "${top}" || exit 1
|
||||
echo "Packing up now..."
|
||||
|
||||
zip -r -9 "$name" dosbox-x/dosbox-x.app dosbox-x/CHANGELOG.txt dosbox-x/COPYING.txt dosbox-x/README.txt dosbox-x-sdl2/dosbox-x.app dosbox-x-sdl2/CHANGELOG.txt dosbox-x-sdl2/COPYING.txt dosbox-x-sdl2/README.txt || exit 1
|
||||
|
||||
exit 0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
repodir=`cat /mingw/msys/1.0/pwd.txt`
|
||||
cd $repodir
|
||||
./$1
|
||||
#!/bin/sh
|
||||
repodir=$(cat /mingw/msys/1.0/pwd.txt)
|
||||
cd "${repodir}" || exit
|
||||
./"${1}"
|
||||
|
@ -1,93 +1,93 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Setup:
|
||||
# git clone https://github.com/joncampbell123/dosbox-x dosbox-x-mingw-hx-dos
|
||||
#
|
||||
# Then run this script
|
||||
name=`date +%F-%T | sed -e 's/:/-/g' | sed -e 's/-//g'`
|
||||
name="dosbox-x-mingw-hx-dos-$name.zip"
|
||||
|
||||
echo "Will pack to $name"
|
||||
sleep 1
|
||||
|
||||
# CHECK: You must use MinGW, not MinGW32/MinGW64.
|
||||
# The MinGW32/MinGW64 version has extra dependencies that require
|
||||
# Windows XP or higher and KERNEL functions not provided by HX-DOS.
|
||||
#
|
||||
# The main MinGW version can target all the way down to Windows 95
|
||||
# (as long as a working MSVCRT.DLL is installed) and the compiled
|
||||
# binaries will work in HX-DOS.
|
||||
|
||||
# Check 1: Make sure this is the MinGW environment.
|
||||
#
|
||||
# MinGW and MinGW32 will have MSYSTEM=MINGW32
|
||||
# MinGW64 will have MSYSTEM=MINGW64.
|
||||
if [[ x"$MSYSTEM" != x"MINGW32" ]]; then
|
||||
echo "MinGW (not MinGW 64-bit) shell environment required"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check 2: Make sure this is the MinGW environment, not MinGW32/MinGW64.
|
||||
#
|
||||
# MinGW32/MinGW64 will have MSYSTEM_CARCH=i686
|
||||
# MinGW will not have any such variable
|
||||
if [ -n "$MSYSTEM_CARCH" ]; then
|
||||
echo "Please use the original MinGW build environment, not MinGW32/MinGW64"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# OK GO
|
||||
|
||||
top=`pwd`
|
||||
cd "$top" || exit 1
|
||||
|
||||
hxdosdir="dosbox-x-mingw-hx-dos"
|
||||
tooldir="$top/$hxdosdir/vs/tool"
|
||||
|
||||
cd "$top/$hxdosdir" || exit 1
|
||||
git clean -dfx
|
||||
git reset --hard
|
||||
git checkout master
|
||||
git clean -dfx
|
||||
git reset --hard
|
||||
git pull
|
||||
git clean -dfx
|
||||
git reset --hard
|
||||
./build-mingw-hx-dos || exit 1
|
||||
|
||||
# The paths of copied files and HX DOS Extender files
|
||||
copydir="build-scripts/mingw/dosbox-x-mingw-hx-dos"
|
||||
hxdir="build-scripts/mingw/hxdos-bin"
|
||||
|
||||
strip src/dosbox-x.exe || exit 1
|
||||
cp src/dosbox-x.exe dosbox-x.exe || exit 1
|
||||
$hxdir/pestub.exe -n dosbox-x.exe
|
||||
$tooldir/upx.exe --strip-relocs=0 --lzma -9 dosbox-x.exe
|
||||
cp CHANGELOG CHANGELOG.txt || exit 1
|
||||
cp COPYING COPYING.txt || exit 1
|
||||
cp dosbox-x.reference.conf dosbox-x.ref || exit 1
|
||||
cp dosbox-x.reference.full.conf dosbox-x.ref.full || exit 1
|
||||
cp contrib/windows/installer/inpout32.dll INPOUT32.DLL || exit 1
|
||||
cp contrib/fonts/FREECG98.BMP . || exit 1
|
||||
cp contrib/fonts/wqy_1?pt.bdf . || exit 1
|
||||
cp contrib/fonts/Nouveau_IBM.ttf . || exit 1
|
||||
cp $hxdir/DPMILD32.EXE . || exit 1
|
||||
cp $hxdir/HDPMI32.EXE . || exit 1
|
||||
cp $hxdir/HXGUIHLP.INI . || exit 1
|
||||
cp $hxdir/README.TXT . || exit 1
|
||||
cp $hxdir/WATTCP.CFG . || exit 1
|
||||
cp $hxdir/WINSPOOL.DRV . || exit 1
|
||||
cp $hxdir/*.DLL . || exit 1
|
||||
mkdir -p drivez || exit 1
|
||||
cp contrib/windows/installer/drivez_readme.txt drivez/readme.txt || exit 1
|
||||
mkdir -p language || exit 1
|
||||
for i in `ls contrib/translations/` ; do cp contrib/translations/$i/*.lng language/; done
|
||||
|
||||
cd "$top/$hxdosdir" || exit 1
|
||||
echo "Packing up now..."
|
||||
|
||||
$tooldir/zip.exe -r -9 ../"$name" {CHANGELOG.txt,COPYING.txt,dosbox-x.exe,dosbox-x.ref,dosbox-x.ref.full,FREECG98.BMP,wqy_1?pt.bdf,Nouveau_IBM.ttf,DPMILD32.EXE,HDPMI32.EXE,HXGUIHLP.INI,README.TXT,WATTCP.CFG,WINSPOOL.DRV,*.DLL,drivez/*,language/*} || exit 1
|
||||
cd ..
|
||||
|
||||
exit 0
|
||||
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Setup:
|
||||
# git clone https://github.com/joncampbell123/dosbox-x dosbox-x-mingw-hx-dos
|
||||
#
|
||||
# Then run this script
|
||||
name=$(date +%F-%T | sed -e 's/:/-/g' | sed -e 's/-//g')
|
||||
name="dosbox-x-mingw-hx-dos-${name}.zip"
|
||||
|
||||
echo "Will pack to ${name}"
|
||||
sleep 1
|
||||
|
||||
# CHECK: You must use MinGW, not MinGW32/MinGW64.
|
||||
# The MinGW32/MinGW64 version has extra dependencies that require
|
||||
# Windows XP or higher and KERNEL functions not provided by HX-DOS.
|
||||
#
|
||||
# The main MinGW version can target all the way down to Windows 95
|
||||
# (as long as a working MSVCRT.DLL is installed) and the compiled
|
||||
# binaries will work in HX-DOS.
|
||||
|
||||
# Check 1: Make sure this is the MinGW environment.
|
||||
#
|
||||
# MinGW and MinGW32 will have MSYSTEM=MINGW32
|
||||
# MinGW64 will have MSYSTEM=MINGW64.
|
||||
if [[ x"${MSYSTEM}" != x"MINGW32" ]]; then
|
||||
echo "MinGW (not MinGW 64-bit) shell environment required"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check 2: Make sure this is the MinGW environment, not MinGW32/MinGW64.
|
||||
#
|
||||
# MinGW32/MinGW64 will have MSYSTEM_CARCH=i686
|
||||
# MinGW will not have any such variable
|
||||
if [ -n "${MSYSTEM_CARCH}" ]; then
|
||||
echo "Please use the original MinGW build environment, not MinGW32/MinGW64"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# OK GO
|
||||
|
||||
top=$(pwd)
|
||||
cd "${top}" || exit 1
|
||||
|
||||
hxdosdir="dosbox-x-mingw-hx-dos"
|
||||
tooldir="${top}/${hxdosdir}/vs/tool"
|
||||
|
||||
cd "${top}/${hxdosdir}" || exit 1
|
||||
git clean -dfx
|
||||
git reset --hard
|
||||
git checkout master
|
||||
git clean -dfx
|
||||
git reset --hard
|
||||
git pull
|
||||
git clean -dfx
|
||||
git reset --hard
|
||||
./build-mingw-hx-dos || exit 1
|
||||
|
||||
# The paths of copied files and HX DOS Extender files
|
||||
copydir="build-scripts/mingw/dosbox-x-mingw-hx-dos"
|
||||
hxdir="build-scripts/mingw/hxdos-bin"
|
||||
|
||||
strip src/dosbox-x.exe || exit 1
|
||||
cp src/dosbox-x.exe dosbox-x.exe || exit 1
|
||||
"${hxdir}"/pestub.exe -n dosbox-x.exe
|
||||
"${tooldir}"/upx.exe --strip-relocs=0 --lzma -9 dosbox-x.exe
|
||||
cp CHANGELOG CHANGELOG.txt || exit 1
|
||||
cp COPYING COPYING.txt || exit 1
|
||||
cp dosbox-x.reference.conf dosbox-x.ref || exit 1
|
||||
cp dosbox-x.reference.full.conf dosbox-x.ref.full || exit 1
|
||||
cp contrib/windows/installer/inpout32.dll INPOUT32.DLL || exit 1
|
||||
cp contrib/fonts/FREECG98.BMP . || exit 1
|
||||
cp contrib/fonts/wqy_1?pt.bdf . || exit 1
|
||||
cp contrib/fonts/Nouveau_IBM.ttf . || exit 1
|
||||
cp ${hxdir}/DPMILD32.EXE . || exit 1
|
||||
cp ${hxdir}/HDPMI32.EXE . || exit 1
|
||||
cp ${hxdir}/HXGUIHLP.INI . || exit 1
|
||||
cp ${hxdir}/README.TXT . || exit 1
|
||||
cp ${hxdir}/WATTCP.CFG . || exit 1
|
||||
cp ${hxdir}/WINSPOOL.DRV . || exit 1
|
||||
cp ${hxdir}/*.DLL . || exit 1
|
||||
mkdir -p drivez || exit 1
|
||||
cp contrib/windows/installer/drivez_readme.txt drivez/readme.txt || exit 1
|
||||
mkdir -p language || exit 1
|
||||
find contrib/translations/ -type f -name '*.lng' -exec cp {} language/ \;
|
||||
|
||||
cd "${top}/${hxdosdir}" || exit 1
|
||||
echo "Packing up now..."
|
||||
|
||||
"${tooldir}"/zip.exe -r -9 ../"${name}" {CHANGELOG.txt,COPYING.txt,dosbox-x.exe,dosbox-x.ref,dosbox-x.ref.full,FREECG98.BMP,wqy_1?pt.bdf,Nouveau_IBM.ttf,DPMILD32.EXE,HDPMI32.EXE,HXGUIHLP.INI,README.TXT,WATTCP.CFG,WINSPOOL.DRV,*.DLL,drivez/*,language/*} || exit 1
|
||||
cd ..
|
||||
|
||||
exit 0
|
||||
|
||||
|
@ -1,85 +1,84 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Setup:
|
||||
# git clone https://github.com/joncampbell123/dosbox-x dosbox-x-mingw
|
||||
#
|
||||
# Then run this script
|
||||
|
||||
# Check 1: Make sure this is the MinGW32 environment.
|
||||
#
|
||||
# MinGW and MinGW32 will have MSYSTEM=MINGW32
|
||||
# MinGW64 will have MSYSTEM=MINGW64.
|
||||
if [[ "$MSYSTEM" == "MINGW32" ]]; then
|
||||
cputype=win32
|
||||
elif [[ "$MSYSTEM" == "MINGW64" ]]; then
|
||||
cputype=win64
|
||||
else
|
||||
echo "MinGW32/MINGW64 (not MinGW) shell environment required"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
name=`date +%F-%T | sed -e 's/:/-/g' | sed -e 's/-//g'`
|
||||
name="dosbox-x-mingw-$cputype-$name.zip"
|
||||
|
||||
echo "Will pack to $name"
|
||||
sleep 1
|
||||
|
||||
# OK GO
|
||||
|
||||
top=`pwd`
|
||||
cd "$top" || exit 1
|
||||
|
||||
build="$top/mingw-build"
|
||||
rm -Rf "$build"
|
||||
mkdir -p "$build" || exit 1
|
||||
|
||||
ziptool="$top/dosbox-x-mingw/vs/tool/zip.exe"
|
||||
|
||||
# do it
|
||||
for what in mingw mingw-sdl2 mingw-lowend mingw-lowend-sdl2; do
|
||||
buildtarget="$build/$what"
|
||||
mkdir -p "$buildtarget" || exit 1
|
||||
mkdir -p "$buildtarget/drivez" || exit 1
|
||||
mkdir -p "$buildtarget/scripts" || exit 1
|
||||
mkdir -p "$buildtarget/shaders" || exit 1
|
||||
mkdir -p "$buildtarget/glshaders" || exit 1
|
||||
mkdir -p "$buildtarget/languages" || exit 1
|
||||
cd "$top/dosbox-x-mingw" || exit 1
|
||||
git clean -dfx
|
||||
git reset --hard
|
||||
git checkout master
|
||||
git clean -dfx
|
||||
git reset --hard
|
||||
git pull
|
||||
git clean -dfx
|
||||
git reset --hard
|
||||
./build-$what || exit 1
|
||||
strip src/dosbox-x.exe || exit 1
|
||||
cp src/dosbox-x.exe "$buildtarget/dosbox-x.exe" || exit 1
|
||||
cp CHANGELOG "$buildtarget/CHANGELOG.txt" || exit 1
|
||||
cp dosbox-x.reference.conf "$buildtarget/dosbox-x.reference.conf" || exit 1
|
||||
cp dosbox-x.reference.full.conf "$buildtarget/dosbox-x.reference.full.conf" || exit 1
|
||||
if [[ "$MSYSTEM" == "MINGW32" ]]; then
|
||||
cp contrib/windows/installer/inpout32.dll "$buildtarget/inpout32.dll" || exit 1
|
||||
else
|
||||
cp contrib/windows/installer/inpoutx64.dll "$buildtarget/inpoutx64.dll" || exit 1
|
||||
fi
|
||||
cp contrib/fonts/FREECG98.BMP "$buildtarget/FREECG98.BMP" || exit 1
|
||||
cp contrib/fonts/wqy_1?pt.bdf "$buildtarget/" || exit 1
|
||||
cp contrib/fonts/Nouveau_IBM.ttf "$buildtarget/Nouveau_IBM.ttf" || exit 1
|
||||
cp contrib/fonts/SarasaGothicFixed.ttf "$buildtarget/SarasaGothicFixed.ttf" || exit 1
|
||||
cp contrib/windows/installer/drivez_readme.txt "$buildtarget/drivez/readme.txt" || exit 1
|
||||
cp contrib/windows/installer/windows_explorer_context_menu*.bat "$buildtarget/scripts/" || exit 1
|
||||
cp contrib/windows/shaders/* "$buildtarget/shaders/" || exit 1
|
||||
cp contrib/glshaders/* "$buildtarget/glshaders/" || exit 1
|
||||
cp contrib/translations/*/*.lng "$buildtarget/languages/" || exit 1
|
||||
|
||||
done
|
||||
|
||||
cd "$top" || exit 1
|
||||
echo "Packing up now..."
|
||||
|
||||
$ziptool -r -9 "$name" "mingw-build" || exit 1
|
||||
|
||||
exit 0
|
||||
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Setup:
|
||||
# git clone https://github.com/joncampbell123/dosbox-x dosbox-x-mingw
|
||||
#
|
||||
# Then run this script
|
||||
|
||||
# Check 1: Make sure this is the MinGW32 environment.
|
||||
#
|
||||
# MinGW and MinGW32 will have MSYSTEM=MINGW32
|
||||
# MinGW64 will have MSYSTEM=MINGW64.
|
||||
if [[ "${MSYSTEM}" == "MINGW32" ]]; then
|
||||
cputype=win32
|
||||
elif [[ "${MSYSTEM}" == "MINGW64" ]]; then
|
||||
cputype=win64
|
||||
else
|
||||
echo "MinGW32/MINGW64 (not MinGW) shell environment required"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
name=$(date +%F-%T | sed -e 's/:/-/g' | sed -e 's/-//g')
|
||||
name="dosbox-x-mingw-${cputype}-${name}.zip"
|
||||
|
||||
echo "Will pack to ${name}"
|
||||
sleep 1
|
||||
|
||||
# OK GO
|
||||
|
||||
top=$(pwd)
|
||||
cd "${top}" || exit 1
|
||||
|
||||
build="${top}/mingw-build"
|
||||
rm -Rf "${build}"
|
||||
mkdir -p "${build}" || exit 1
|
||||
|
||||
ziptool="${top}/dosbox-x-mingw/vs/tool/zip.exe"
|
||||
|
||||
# do it
|
||||
for what in mingw mingw-sdl2 mingw-lowend mingw-lowend-sdl2; do
|
||||
buildtarget="${build}/${what}"
|
||||
mkdir -p "${buildtarget}" || exit 1
|
||||
mkdir -p "${buildtarget}/drivez" || exit 1
|
||||
mkdir -p "${buildtarget}/scripts" || exit 1
|
||||
mkdir -p "${buildtarget}/shaders" || exit 1
|
||||
mkdir -p "${buildtarget}/glshaders" || exit 1
|
||||
mkdir -p "${buildtarget}/languages" || exit 1
|
||||
cd "${top}/dosbox-x-mingw" || exit 1
|
||||
git clean -dfx
|
||||
git reset --hard
|
||||
git checkout master
|
||||
git clean -dfx
|
||||
git reset --hard
|
||||
git pull
|
||||
git clean -dfx
|
||||
git reset --hard
|
||||
./build-${what} || exit 1
|
||||
strip src/dosbox-x.exe || exit 1
|
||||
cp src/dosbox-x.exe "$buildtarget/dosbox-x.exe" || exit 1
|
||||
cp CHANGELOG "$buildtarget/CHANGELOG.txt" || exit 1
|
||||
cp dosbox-x.reference.conf "$buildtarget/dosbox-x.reference.conf" || exit 1
|
||||
cp dosbox-x.reference.full.conf "$buildtarget/dosbox-x.reference.full.conf" || exit 1
|
||||
if [[ "${MSYSTEM}" == "MINGW32" ]]; then
|
||||
cp contrib/windows/installer/inpout32.dll "${buildtarget}/inpout32.dll" || exit 1
|
||||
else
|
||||
cp contrib/windows/installer/inpoutx64.dll "${buildtarget}/inpoutx64.dll" || exit 1
|
||||
fi
|
||||
cp contrib/fonts/FREECG98.BMP "${buildtarget}/FREECG98.BMP" || exit 1
|
||||
cp contrib/fonts/wqy_1?pt.bdf "${buildtarget}/" || exit 1
|
||||
cp contrib/fonts/Nouveau_IBM.ttf "${buildtarget}/Nouveau_IBM.ttf" || exit 1
|
||||
cp contrib/fonts/SarasaGothicFixed.ttf "${buildtarget}/SarasaGothicFixed.ttf" || exit 1
|
||||
cp contrib/windows/installer/drivez_readme.txt "${buildtarget}/drivez/readme.txt" || exit 1
|
||||
cp contrib/windows/installer/windows_explorer_context_menu*.bat "{$buildtarget}/scripts/" || exit 1
|
||||
cp contrib/windows/shaders/* "${buildtarget}/shaders/" || exit 1
|
||||
cp contrib/glshaders/* "${buildtarget}/glshaders/" || exit 1
|
||||
cp contrib/translations/*/*.lng "${buildtarget}/languages/" || exit 1
|
||||
|
||||
done
|
||||
|
||||
cd "${top}" || exit 1
|
||||
echo "Packing up now..."
|
||||
|
||||
$ziptool -r -9 "${name}" "mingw-build" || exit 1
|
||||
|
||||
exit 0
|
||||
|
40
build-sdl2
40
build-sdl2
@ -1,5 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# allow 32-bit on 64-bit (x86) builds
|
||||
if [ "$1" == "32" ]; then
|
||||
CC="$(which gcc) -m32"
|
||||
CXX="$(which g++) -m32"
|
||||
export CC
|
||||
export CXX
|
||||
no_host_sdl2=1
|
||||
shift
|
||||
opt="--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu"
|
||||
fi
|
||||
|
||||
# Jonathan C dev hack: refer to LNKDOS16 in /usr/src/doslib
|
||||
doslib=
|
||||
if [ -d "/usr/src/doslib" ]; then doslib="/usr/src/doslib"; fi
|
||||
|
||||
if [ -n "${doslib}" ]; then
|
||||
if [ -x "${doslib}/tool/linker/linux-host/lnkdos16" ]; then
|
||||
export PATH="${doslib}/tool/linker/linux-host:${PATH}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# I'm sick and tired of all the churn the three versions of autoconf
|
||||
# are causing in this repo. Stop committing the configure scripts
|
||||
# and just autoregen.
|
||||
@ -8,17 +29,24 @@
|
||||
# fix
|
||||
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
# prefer to compile against our own copy of SDL 2.x
|
||||
echo Compiling our internal SDL 2.x
|
||||
(cd vs/sdl2 && ./build-dosbox.sh) || exit 1
|
||||
# prefer to compile against our own copy of SDL 2.x IF the system does not provide one
|
||||
if [[ "$no_host_sdl2" ]]; then
|
||||
x= # doesn't work well cross-compiling
|
||||
else
|
||||
x=$(which sdl2-config)
|
||||
fi
|
||||
if test -z "${x}" ; then
|
||||
echo "Compiling our internal SDL 2.x"
|
||||
(cd vs/sdl2 && ./build-dosbox.sh) || exit 1
|
||||
fi
|
||||
|
||||
# prefer to compile against our own copy of SDLnet 1.x
|
||||
echo Compiling our internal SDLnet 1.x
|
||||
echo "Compiling our internal SDLnet 1.x"
|
||||
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
echo "Compiling DOSBox-X"
|
||||
chmod +x configure
|
||||
./configure --enable-debug --prefix=/usr --enable-sdl2 "$@" || exit 1
|
||||
./configure --enable-debug --prefix=/usr --enable-sdl2 "${@}" "${opt}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
6
cleanup
6
cleanup
@ -1,11 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
make clean 2>/dev/null
|
||||
make distclean 2>/dev/null
|
||||
find -name \*~ -delete
|
||||
find -name BuildLog.htm -delete
|
||||
find . -name \*~ -delete
|
||||
find . -name BuildLog.htm -delete
|
||||
rm -Rfv autom4te.cache stderr.txt stdout.txt
|
||||
for i in DOSBox.exe DOSBox.map zlibstat.lib SDL.dll SDL.lib SDL_net.dll SDL_net.lib SDLmain.lib zlib.lib libpng.lib libpng16.lib libpng16.exp libpng16d.lib libpng16d.exp vc90.pdb; do rm -v $i >/dev/null 2>&1; done
|
||||
for ext in intermediate.manifest res dep aps pdb bsc exp obj ncb opt plg idb pch; do find -name \*.$ext -exec rm -v {} +; done
|
||||
for ext in intermediate.manifest res dep aps pdb bsc exp obj ncb opt plg idb pch; do find . -name \*.$ext -exec rm -v {} +; done
|
||||
rm -Rfv visualc_net/Debug
|
||||
rm -Rfv visualc_net/Release
|
||||
rm -Rfv visualc_net/libpng/projects/visualc71/Win32_LIB_Debug
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
for ext in c cpp h; do
|
||||
find -iname \*.$ext | while read X; do dos2unix -- "$X" || exit 1; done
|
||||
find . -iname \*.$ext | while read -r X; do dos2unix -- "${X}" || exit 1; done
|
||||
done
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#/bin/bash
|
||||
#!/bin/bash
|
||||
#
|
||||
# dosbox-x-sdl2 should be master-sdl2 branch
|
||||
# dosbox-x should be master branch
|
||||
diff -N -w -u -x '*~' -x '.git*' -x 'autom4te.cache' -x '*.m4' -x 'build-*' -x 'merge-*' -x 'config.*' -x 'configure' -x '*.in' -x 'Makefile' -x 'depcomp' -x 'git*.sh' -x 'install-sh' -x '.deps' -r dosbox-x-sdl2 dosbox-x >dosbox-sdl2-diff.patch
|
||||
echo Patch written to dosbox-sdl2-diff.patch
|
||||
echo "Patch written to dosbox-sdl2-diff.patch"
|
||||
|
@ -1,14 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Look for GCC-4.8
|
||||
x=`which gcc-4.8`
|
||||
gdir=`dirname $x`
|
||||
x=$(which gcc-4.8)
|
||||
gdir=$(dirname "${x}")
|
||||
|
||||
export CC="$gdir/gcc-4.8"
|
||||
export CPP="$gdir/cpp-4.8"
|
||||
export CXX="$gdir/g++-4.8"
|
||||
CC="${gdir}/gcc-4.8"
|
||||
CPP="${gdir}/cpp-4.8"
|
||||
CXX="${gdir}/g++-4.8"
|
||||
export CC CPP CXX
|
||||
|
||||
echo Starting subshell. Type exit to exit.
|
||||
|
||||
$SHELL
|
||||
echo "Starting subshell. Type exit to exit."
|
||||
|
||||
${SHELL}
|
||||
|
@ -1,24 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Look for GCC-4.8
|
||||
x=`which gcc-4.8 2>/dev/null`
|
||||
if [ -n "$x" ]; then
|
||||
gdir=`dirname $x`
|
||||
x=$(which gcc-4.8 2>/dev/null)
|
||||
if [ -n "${x}" ]; then
|
||||
gdir=$(dirname "${x}")
|
||||
elif [ -f "/usr/gcc-4.8/bin/gcc" ]; then
|
||||
gdir="/usr/gcc-4.8/bin"
|
||||
else
|
||||
echo Cannot find GCC 4.8
|
||||
echo "Cannot find GCC 4.8"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo GCC is in $gdir
|
||||
echo "GCC is in ${gdir}"
|
||||
|
||||
export CC="$gdir/gcc"
|
||||
export CPP="$gdir/cpp"
|
||||
export CXX="$gdir/g++"
|
||||
export PATH="$gdir:$PATH"
|
||||
CC="${gdir}/gcc"
|
||||
CPP="${gdir}/cpp"
|
||||
CXX="${gdir}/g++"
|
||||
PATH="${gdir}:${PATH}"
|
||||
export CC CPP CXX PATH
|
||||
|
||||
echo Starting subshell. Type exit to exit.
|
||||
|
||||
$SHELL
|
||||
echo "Starting subshell. Type exit to exit."
|
||||
|
||||
${SHELL}
|
||||
|
@ -1,24 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Look for GCC-8.3
|
||||
x=`which gcc-8.3 2>/dev/null`
|
||||
if [ -n "$x" ]; then
|
||||
gdir=`dirname $x`
|
||||
x=$(which gcc-8.3 2>/dev/null)
|
||||
if [ -n "${x}" ]; then
|
||||
gdir=$(dirname "${x}")
|
||||
elif [ -f "/usr/gcc-8.3/bin/gcc" ]; then
|
||||
gdir="/usr/gcc-8.3/bin"
|
||||
else
|
||||
echo Cannot find GCC 8.3
|
||||
echo "Cannot find GCC 8.3"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo GCC is in $gdir
|
||||
echo "GCC is in ${gdir}"
|
||||
|
||||
export CC="$gdir/gcc"
|
||||
export CPP="$gdir/cpp"
|
||||
export CXX="$gdir/g++"
|
||||
export PATH="$gdir:$PATH"
|
||||
CC="${gdir}/gcc"
|
||||
CPP="${gdir}/cpp"
|
||||
CXX="${gdir}/g++"
|
||||
PATH="${gdir}:${PATH}"
|
||||
export CC CPP CXX PATH
|
||||
|
||||
echo Starting subshell. Type exit to exit.
|
||||
|
||||
$SHELL
|
||||
echo "Starting subshell. Type exit to exit."
|
||||
|
||||
${SHELL}
|
||||
|
@ -1,24 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Look for GCC-8.4
|
||||
x=`which gcc-8.4 2>/dev/null`
|
||||
if [ -n "$x" ]; then
|
||||
gdir=`dirname $x`
|
||||
x=$(which gcc-8.4 2>/dev/null)
|
||||
if [ -n "${x}" ]; then
|
||||
gdir=$(dirname "${x}")
|
||||
elif [ -f "/usr/gcc-8.4/bin/gcc" ]; then
|
||||
gdir="/usr/gcc-8.4/bin"
|
||||
else
|
||||
echo Cannot find GCC 8.4
|
||||
echo "Cannot find GCC 8.4"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo GCC is in $gdir
|
||||
echo "GCC is in ${gdir}"
|
||||
|
||||
export CC="$gdir/gcc"
|
||||
export CPP="$gdir/cpp"
|
||||
export CXX="$gdir/g++"
|
||||
export PATH="$gdir:$PATH"
|
||||
CC="${gdir}/gcc"
|
||||
CPP="${gdir}/cpp"
|
||||
CXX="${gdir}/g++"
|
||||
PATH="${gdir}:${PATH}"
|
||||
export CC CPP CXX PATH
|
||||
|
||||
echo Starting subshell. Type exit to exit.
|
||||
|
||||
$SHELL
|
||||
echo "Starting subshell. Type exit to exit."
|
||||
|
||||
${SHELL}
|
||||
|
@ -1,24 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Look for GCC-9.2
|
||||
x=`which gcc-9.2 2>/dev/null`
|
||||
if [ -n "$x" ]; then
|
||||
gdir=`dirname $x`
|
||||
x=$(which gcc-9.2 2>/dev/null)
|
||||
if [ -n "${x}" ]; then
|
||||
gdir=$(dirname "${x}")
|
||||
elif [ -f "/usr/gcc-9.2/bin/gcc" ]; then
|
||||
gdir="/usr/gcc-9.2/bin"
|
||||
else
|
||||
echo Cannot find GCC 9.2
|
||||
echo "Cannot find GCC 9.2"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo GCC is in $gdir
|
||||
echo "GCC is in ${gdir}"
|
||||
|
||||
export CC="$gdir/gcc"
|
||||
export CPP="$gdir/cpp"
|
||||
export CXX="$gdir/g++"
|
||||
export PATH="$gdir:$PATH"
|
||||
CC="${gdir}/gcc"
|
||||
CPP="${gdir}/cpp"
|
||||
CXX="${gdir}/g++"
|
||||
PATH="${gdir}:${PATH}"
|
||||
export CC CPP CXX PATH
|
||||
|
||||
echo Starting subshell. Type exit to exit.
|
||||
echo "Starting subshell. Type exit to exit."
|
||||
|
||||
$SHELL
|
||||
|
||||
|
@ -1,24 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Look for GCC-9.3
|
||||
x=`which gcc-9.3 2>/dev/null`
|
||||
if [ -n "$x" ]; then
|
||||
gdir=`dirname $x`
|
||||
x=$(which gcc-9.3 2>/dev/null)
|
||||
if [ -n "${x}" ]; then
|
||||
gdir=$(dirname "${x}")
|
||||
elif [ -f "/usr/gcc-9.3/bin/gcc" ]; then
|
||||
gdir="/usr/gcc-9.3/bin"
|
||||
else
|
||||
echo Cannot find GCC 9.3
|
||||
echo "Cannot find GCC 9.3"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo GCC is in $gdir
|
||||
echo "GCC is in ${gdir}"
|
||||
|
||||
export CC="$gdir/gcc"
|
||||
export CPP="$gdir/cpp"
|
||||
export CXX="$gdir/g++"
|
||||
export PATH="$gdir:$PATH"
|
||||
CC="${gdir}/gcc"
|
||||
CPP="${gdir}/cpp"
|
||||
CXX="${gdir}/g++"
|
||||
PATH="${gdir}:${PATH}"
|
||||
export CC CPP CXX PATH
|
||||
|
||||
echo Starting subshell. Type exit to exit.
|
||||
|
||||
$SHELL
|
||||
echo "Starting subshell. Type exit to exit."
|
||||
|
||||
${SHELL}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
url="https://github.com/wcp16/dosbox-xe.git"
|
||||
branch="dosbox-sdl2-upstream"
|
||||
git remote add "$branch" "$url" || git remote set-url "$branch" "$url" || exit 1
|
||||
git fetch "$branch" || exit 1
|
||||
git remote add "${branch}" "${url}" || git remote set-url "${branch}" "${url}" || exit 1
|
||||
git fetch "${branch}" || exit 1
|
||||
git checkout -t "remotes/origin/master-sdl2" || git checkout "master-sdl2" || exit 1
|
||||
|
||||
|
@ -1,19 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
# sort of like svn-update-all
|
||||
|
||||
curbranch=`git branch | grep '^\*' | sed -e 's/^\* //'`
|
||||
if [[ x"$curbranch" == x"" ]]; then
|
||||
echo Unable to determine current branch
|
||||
curbranch=$(git branch | grep '^\*' | sed -e 's/^\* //')
|
||||
if [[ "${curbranch}" == "" ]]; then
|
||||
echo "Unable to determine current branch"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make clean 2>/dev/null
|
||||
make distclean 2>/dev/null
|
||||
./cleantree 2>/dev/null
|
||||
for i in \* \*/\* \*/\*/\*; do git add $i 2>/dev/null; done
|
||||
for i in \* \*/\* \*/\*/\*; do git add "${i}" 2>/dev/null; done
|
||||
git commit -a
|
||||
./cleantree 2>/dev/null
|
||||
git push origin "$curbranch"
|
||||
git pull origin "$curbranch"
|
||||
git push origin "${curbranch}"
|
||||
git pull origin "${curbranch}"
|
||||
git fetch
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
make clean 2>/dev/null
|
||||
make distclean 2>/dev/null
|
||||
./cleantree 2>/dev/null
|
||||
for i in \* \*/\* \*/\*/\*; do git add $i 2>/dev/null; done
|
||||
for i in \* \*/\* \*/\*/\*; do git add "${i}" 2>/dev/null; done
|
||||
git commit -a
|
||||
./cleantree 2>/dev/null
|
||||
|
||||
|
@ -1,27 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ ! -x $(which flatpak-builder) ]]; then
|
||||
echo Please install flatpak-builder
|
||||
echo "Please install flatpak-builder"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ ! $(flatpak list|grep org.freedesktop.Sdk|wc -l) -ge 1 ]]; then
|
||||
echo Please ensure the necessary SDK and matching runtime are installed by running:
|
||||
echo flatpak install flathub org.freedesktop.Platform//21.08 org.freedesktop.Sdk//21.08
|
||||
if [[ ! $(flatpak list|grep -c org.freedesktop.Sdk) -ge 1 ]]; then
|
||||
echo "Please ensure the necessary SDK and matching runtime are installed by running:"
|
||||
echo "flatpak install flathub org.freedesktop.Platform//22.08 org.freedesktop.Sdk//22.08"
|
||||
exit
|
||||
fi
|
||||
|
||||
flatpak-builder --repo=myrepo --force-clean build-flatpak contrib/linux/com.dosbox_x.DOSBox-X.yaml
|
||||
if [ $? -eq 0 ]; then
|
||||
if flatpak-builder --repo=myrepo --force-clean build-flatpak contrib/linux/com.dosbox_x.DOSBox-X.yaml
|
||||
then
|
||||
echo
|
||||
echo You can now install the flatpak by running the following commands:
|
||||
echo "You can now install the flatpak by running the following commands:"
|
||||
echo
|
||||
echo flatpak --user remote-add --no-gpg-verify myrepo myrepo
|
||||
echo flatpak --user install myrepo com.dosbox_x.DOSBox-X
|
||||
echo " flatpak --user remote-add --no-gpg-verify myrepo myrepo"
|
||||
echo " flatpak --user install myrepo com.dosbox_x.DOSBox-X"
|
||||
echo
|
||||
echo You can then run the flatpak as follows:
|
||||
echo flatpak --user run com.dosbox_x.DOSBox-X
|
||||
echo "You can then run the flatpak as follows:"
|
||||
echo " flatpak --user run com.dosbox_x.DOSBox-X"
|
||||
echo
|
||||
echo Or you can test it without installing by running:
|
||||
echo flatpak-builder --run build-flatpak contrib/linux/com.dosbox_x.DOSBox-X.yaml dosbox-x
|
||||
echo "Or you can test it without installing by running:"
|
||||
echo " flatpak-builder --run build-flatpak contrib/linux/com.dosbox_x.DOSBox-X.yaml dosbox-x"
|
||||
fi
|
||||
|
@ -1,18 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
arch=`uname -m`
|
||||
if [ -z "$arch" ]; then
|
||||
echo Sorry, cannot identify architecture
|
||||
arch=$(uname -m)
|
||||
if [ -z "${arch}" ]; then
|
||||
echo "Sorry, cannot identify architecture"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f /etc/os-release ]; then
|
||||
dist=`cat /etc/os-release | grep "^ID=" | cut -d \" -f 2`
|
||||
dist=$(grep "^ID=" /etc/os-release | cut -d \" -f 2)
|
||||
else
|
||||
dist=""
|
||||
fi
|
||||
|
||||
if [ -z "$dist" ]; then
|
||||
echo Sorry, cannot identify Linux distro
|
||||
if [ -z "${dist}" ]; then
|
||||
echo "Sorry, cannot identify Linux distro"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -22,16 +22,15 @@ echo "Please install rpm-build package to continue."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Making RPM for $dist"
|
||||
echo "Making RPM for ${dist}"
|
||||
|
||||
dir="release/linux-$dist"
|
||||
mkdir -p "$dir" || exit 1
|
||||
dir="release/linux-${dist}"
|
||||
mkdir -p "${dir}" || exit 1
|
||||
|
||||
tar="../@PACKAGE_NAME@-@PACKAGE_VERSION@.tar.xz"
|
||||
|
||||
tar -cvJf "$tar" --exclude=\*.git --exclude=\*.tar.xz --exclude=\*.a --exclude=\*.la --exclude=\*.Po --exclude=\*.o -C .. dosbox-x || exit 1
|
||||
cp -vf "$tar" ~/rpmbuild/SOURCES/ || exit 1
|
||||
tar -cvJf "${tar}" --exclude=\*.git --exclude=\*.tar.xz --exclude=\*.a --exclude=\*.la --exclude=\*.Po --exclude=\*.o -C .. dosbox-x || exit 1
|
||||
cp -vf "${tar}" ~/rpmbuild/SOURCES/ || exit 1
|
||||
rpmbuild -bb contrib/linux/dosbox-x.spec || exit 1
|
||||
rm -v "$tar" || exit 1
|
||||
mv -v ~/rpmbuild/RPMS/$arch/@PACKAGE_NAME@-*@PACKAGE_VERSION@*.rpm "$dir/" || exit 1
|
||||
|
||||
rm -v "${tar}" || exit 1
|
||||
mv -v ~/rpmbuild/RPMS/"${arch}"/@PACKAGE_NAME@-*@PACKAGE_VERSION@*.rpm "${dir}/" || exit 1
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
curbranch=`git branch | grep \* | cut -d ' ' -f 2`
|
||||
curbranch=$(git branch --show-current)
|
||||
|
||||
if [[ x"$curbranch" == x"master" || x"$curbranch" == x"develop" ]]; then
|
||||
if [[ "${curbranch}" == "master" || "${curbranch}" == "develop" ]]; then
|
||||
rm -f include/build_timestamp.h
|
||||
git checkout include/build_timestamp.h
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
mikmod -o 16s -f 48000 -hq -p 0 -d wav,file="$1.wav" "$1"
|
||||
mikmod -o 16s -f 48000 -hq -p 0 -d wav,file="${1}.wav" "${1}"
|
||||
|
13
mtavi2wav.sh
13
mtavi2wav.sh
@ -6,15 +6,14 @@
|
||||
|
||||
# get the track names. DOSBox-X always writes track names
|
||||
declare -a NAMES
|
||||
for x in `ffprobe "$1" 2>&1 | grep title | cut -d ':' -f 2 | sed -e 's/^ *//'`; do
|
||||
NAMES=("${NAMES[@]}" "$x")
|
||||
for x in $(ffprobe "${1}" 2>&1 | grep title | cut -d ':' -f 2 | sed -e 's/^ *//'); do
|
||||
NAMES=("${NAMES[@]}" "${x}")
|
||||
done
|
||||
|
||||
# do it
|
||||
i=0
|
||||
for name in ${NAMES[@]}; do
|
||||
name=`echo "$name" | sed -e 's/ /_/'` # in case of spaces
|
||||
ffmpeg -i "$1" -acodec copy -map 0:$i -vn -y -f wav "$1.$i-$name.wav" || break
|
||||
i=$(($i+1))
|
||||
for name in "${NAMES[@]}"; do
|
||||
name="${name// /_}" # in case of spaces
|
||||
ffmpeg -i "${1}" -acodec copy -map 0:${i} -vn -y -f wav "${1}.${i}-${name}.wav" || break
|
||||
i=$((i+1))
|
||||
done
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
file="$1"
|
||||
file="${1}"
|
||||
bitrate=15000000
|
||||
aspect_ratio=4:3
|
||||
overscan_percent=10
|
||||
@ -7,12 +7,12 @@ final_height=1080
|
||||
final_width=1440
|
||||
|
||||
# non-editable part
|
||||
render_width=$((($final_width * (100-$overscan_percent))/100))
|
||||
render_height=$((($final_height * (100-$overscan_percent))/100))
|
||||
render_width=$(((final_width * (100-overscan_percent))/100))
|
||||
render_height=$(((final_height * (100-overscan_percent))/100))
|
||||
|
||||
# announce
|
||||
echo "Rendering as $render_width x $render_height encoding to $final_width x $final_height"
|
||||
echo "Rendering as ${render_width} x ${render_height} encoding to ${final_width} x ${final_height}"
|
||||
|
||||
# go
|
||||
ffmpeg -i "$file" -acodec copy -vcodec libx264 -pix_fmt yuv420p -r 300000/1001 -vsync vfr -bsf:a aac_adtstoasc -vf "scale=$render_width:$render_height,pad=width=$final_width:height=$final_height:"'x=(ow-iw)/2:y=(oh-ih)/2' -vb "$bitrate" -minrate "$bitrate" -maxrate "$bitrate" -bufsize 8000000 -g 15 -bf 2 -threads 0 -aspect "$aspect_ratio" -y -f mp4 "$file.mp4" || exit 1
|
||||
ffmpeg -i "${file}" -acodec copy -vcodec libx264 -pix_fmt yuv420p -r 300000/1001 -vsync vfr -bsf:a aac_adtstoasc -vf "scale=${render_width}:${render_height},pad=width=${final_width}:height=${final_height}:"'x=(ow-iw)/2:y=(oh-ih)/2' -vb "${bitrate}" -minrate "${bitrate}" -maxrate "${bitrate}" -bufsize 8000000 -g 15 -bf 2 -threads 0 -aspect "${aspect_ratio}" -y -f mp4 "${file}.mp4" || exit 1
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
file="$1"
|
||||
file="${1}"
|
||||
bitrate=15000000
|
||||
aspect_ratio=4:3
|
||||
overscan_percent=10
|
||||
@ -7,12 +7,12 @@ final_height=2160 # 4K UHD
|
||||
final_width=2880
|
||||
|
||||
# non-editable part
|
||||
render_width=$((($final_width * (100-$overscan_percent))/100))
|
||||
render_height=$((($final_height * (100-$overscan_percent))/100))
|
||||
render_width=$(((final_width * (100-overscan_percent))/100))
|
||||
render_height=$(((final_height * (100-overscan_percent))/100))
|
||||
|
||||
# announce
|
||||
echo "Rendering as $render_width x $render_height encoding to $final_width x $final_height"
|
||||
echo "Rendering as ${render_width} x ${render_height} encoding to ${final_width} x ${final_height}"
|
||||
|
||||
# go
|
||||
ffmpeg -i "$file" -acodec copy -vcodec libx264 -pix_fmt yuv420p -r 300000/1001 -vsync vfr -bsf:a aac_adtstoasc -vf "scale=$render_width:$render_height,pad=width=$final_width:height=$final_height:"'x=(ow-iw)/2:y=(oh-ih)/2' -vb "$bitrate" -minrate "$bitrate" -maxrate "$bitrate" -bufsize 8000000 -g 15 -bf 2 -threads 0 -aspect "$aspect_ratio" -y -f mp4 "$file.mp4" || exit 1
|
||||
ffmpeg -i "${file}" -acodec copy -vcodec libx264 -pix_fmt yuv420p -r 300000/1001 -vsync vfr -bsf:a aac_adtstoasc -vf "scale=${render_width}:${render_height},pad=width=${final_width}:height=${final_height}:"'x=(ow-iw)/2:y=(oh-ih)/2' -vb "${bitrate}" -minrate "${bitrate}" -maxrate "${bitrate}" -bufsize 8000000 -g 15 -bf 2 -threads 0 -aspect "${aspect_ratio}" -y -f mp4 "${file}.mp4" || exit 1
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
file="$1"
|
||||
file="${1}"
|
||||
bitrate=15000000
|
||||
aspect_ratio=4:3
|
||||
overscan_percent=10
|
||||
@ -7,12 +7,12 @@ final_height=720
|
||||
final_width=960
|
||||
|
||||
# non-editable part
|
||||
render_width=$((($final_width * (100-$overscan_percent))/100))
|
||||
render_height=$((($final_height * (100-$overscan_percent))/100))
|
||||
render_width=$(((final_width * (100-overscan_percent))/100))
|
||||
render_height=$(((final_height * (100-overscan_percent))/100))
|
||||
|
||||
# announce
|
||||
echo "Rendering as $render_width x $render_height encoding to $final_width x $final_height"
|
||||
echo "Rendering as ${render_width} x ${render_height} encoding to ${final_width} x ${final_height}"
|
||||
|
||||
# go
|
||||
ffmpeg -i "$file" -acodec copy -vcodec libx264 -pix_fmt yuv420p -r 300000/1001 -vsync vfr -bsf:a aac_adtstoasc -vf "scale=$render_width:$render_height,pad=width=$final_width:height=$final_height:"'x=(ow-iw)/2:y=(oh-ih)/2' -vb "$bitrate" -minrate "$bitrate" -maxrate "$bitrate" -bufsize 8000000 -g 15 -bf 2 -threads 0 -aspect "$aspect_ratio" -y -f mp4 "$file.mp4" || exit 1
|
||||
ffmpeg -i "${file}" -acodec copy -vcodec libx264 -pix_fmt yuv420p -r 300000/1001 -vsync vfr -bsf:a aac_adtstoasc -vf "scale=${render_width}:${render_height},pad=width=${final_width}:height=${final_height}:"'x=(ow-iw)/2:y=(oh-ih)/2' -vb "${bitrate}" -minrate "${bitrate}" -maxrate "${bitrate}" -bufsize 8000000 -g 15 -bf 2 -threads 0 -aspect "${aspect_ratio}" -y -f mp4 "${file}.mp4" || exit 1
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
src="$1"
|
||||
dst="$1.1080p.mp4"
|
||||
src="${1}"
|
||||
dst="${1}.1080p.mp4"
|
||||
|
||||
fwidth=1440
|
||||
fheight=1080
|
||||
# 95% title safe area
|
||||
swidth=$((($fwidth*90)/100))
|
||||
sheight=$((($fheight*90)/100))
|
||||
swidth=$(((fwidth*90)/100))
|
||||
sheight=$(((fheight*90)/100))
|
||||
|
||||
ffmpeg -i "$src" -acodec aac -ab 256000 -vcodec libx264 -g 15 -bf 2 -vf "scale=$swidth:$sheight,pad=$fwidth:$fheight:(ow-iw)/2:(oh-ih)/2:black,setdar=4:3" -vb 15000000 -preset superfast -pix_fmt yuv420p -y -f mp4 "$dst"
|
||||
ffmpeg -i "${src}" -acodec aac -ab 256000 -vcodec libx264 -g 15 -bf 2 -vf "scale=${swidth}:${sheight},pad=${fwidth}:${fheight}:(ow-iw)/2:(oh-ih)/2:black,setdar=4:3" -vb 15000000 -preset superfast -pix_fmt yuv420p -y -f mp4 "${dst}"
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
src="$1"
|
||||
dst="$1.1080p.mp4"
|
||||
src="${1}"
|
||||
dst="${1}.1080p.mp4"
|
||||
|
||||
fwidth=1440
|
||||
fheight=1080
|
||||
# 95% title safe area
|
||||
swidth=$((($fwidth*90)/100))
|
||||
sheight=$((($fheight*90)/100))
|
||||
swidth=$(((fwidth*90)/100))
|
||||
sheight=$(((fheight*90)/100))
|
||||
|
||||
ffmpeg -i "$src" -bsf:a aac_adtstoasc -acodec copy -vcodec libx264 -g 15 -bf 2 -vf "scale=$swidth:$sheight,pad=$fwidth:$fheight:(ow-iw)/2:(oh-ih)/2:black,setdar=4:3" -vb 15000000 -preset superfast -pix_fmt yuv420p -y -f mp4 "$dst"
|
||||
ffmpeg -i "${src}" -bsf:a aac_adtstoasc -acodec copy -vcodec libx264 -g 15 -bf 2 -vf "scale=${swidth}:${sheight},pad=${fwidth}:${fheight}:(ow-iw)/2:(oh-ih)/2:black,setdar=4:3" -vb 15000000 -preset superfast -pix_fmt yuv420p -y -f mp4 "${dst}"
|
||||
|
||||
|
@ -1,29 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$1" ]
|
||||
if [ -z "${1}" ]
|
||||
then
|
||||
echo "No version number specified."
|
||||
exit
|
||||
fi
|
||||
|
||||
ver=$1
|
||||
ver=${1}
|
||||
|
||||
pushd "$(git rev-parse --show-toplevel)" > /dev/null || exit
|
||||
|
||||
find contrib/translations -type f -name '*.lng' | xargs sed -b -i "s/^:DOSBOX-X:VERSION:\([0-9.]\+\)/:DOSBOX-X:VERSION:$ver/"
|
||||
find contrib/translations -type f -name '*.lng' -exec sed -b -i "s/^:DOSBOX-X:VERSION:\([0-9.]\+\)/:DOSBOX-X:VERSION:${ver}/" {} +
|
||||
|
||||
ls -1 dosbox-x.reference.conf dosbox-x.reference.full.conf contrib/windows/installer/dosbox-x.reference.setup.conf | xargs sed -b -i "s/^# This is the configuration file for DOSBox-X \([0-9.]\+\)/# This is the configuration file for DOSBox-X $ver./"
|
||||
find . -type f -name '*.conf' -exec sed -b -i "s/^# This is the configuration file for DOSBox-X \([0-9.]\+\)/# This is the configuration file for DOSBox-X ${ver}./" {} +
|
||||
|
||||
sed -b -i "s/PACKAGE_STRING \"dosbox-x \([0-9.]\+\)\"/PACKAGE_STRING \"dosbox-x $ver\"/" vs/config_package.h
|
||||
sed -b -i "s/PACKAGE_STRING \"dosbox-x \([0-9.]\+\)\"/PACKAGE_STRING \"dosbox-x ${ver}\"/" vs/config_package.h
|
||||
|
||||
sed -b -i "s/VERSION \"\([0-9.]\+\)\"/VERSION \"$ver\"/g" vs/config_package.h
|
||||
sed -b -i "s/VERSION \"\([0-9.]\+\)\"/VERSION \"${ver}\"/g" vs/config_package.h
|
||||
|
||||
sed -b -i "s/^AC_INIT(dosbox-x,\([0-9.]\+\)/AC_INIT(dosbox-x,$ver/" configure.ac
|
||||
sed -b -i "s/^AC_INIT(dosbox-x,\([0-9.]\+\)/AC_INIT(dosbox-x,${ver}/" configure.ac
|
||||
|
||||
sed -b -i "s/^#define MyAppVersion \"\([0-9.]\+\)\"/#define MyAppVersion \"$ver\"/" contrib/windows/installer/DOSBox-X-setup.iss
|
||||
sed -b -i "s/^#define MyAppVersion \"\([0-9.]\+\)\"/#define MyAppVersion \"${ver}\"/" contrib/windows/installer/DOSBox-X-setup.iss
|
||||
|
||||
ver=`echo $ver | tr . ,`
|
||||
ver=$(echo "${ver}" | tr . ,)
|
||||
|
||||
sed -b -i "s/^#define VERSION_NUMBER \([0-9,]\+\)/#define VERSION_NUMBER $ver,0/" src/winres.rc
|
||||
sed -b -i "s/^#define VERSION_NUMBER \([0-9,]\+\)/#define VERSION_NUMBER ${ver},0/" src/winres.rc
|
||||
|
||||
popd > /dev/null || exit
|
||||
|
Loading…
x
Reference in New Issue
Block a user