mirror of
https://github.com/visualboyadvance-m/visualboyadvance-m
synced 2025-10-05 23:52:49 +02:00
builder: make zip + sig on win + minor changes
Pass command-line arguments to `build_project()` for use in the cmake command. Make `$PROJECT_ARGS` override `$CMAKE_BASE_ARGS` for the project. Override `command()` to call `/bin/command` to avoid the bash builtin which has undesirable behavior when overriding commands. Override `gpg` to invoke either the `gpg` or the `gpg2` binary, whichever is available, or print a warning that gpg is not available. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
@@ -457,7 +457,7 @@ builder() {
|
|||||||
unpack_needed_dists $DOWNLOADED_DISTS
|
unpack_needed_dists $DOWNLOADED_DISTS
|
||||||
build_needed_dists $UNPACKED_DISTS
|
build_needed_dists $UNPACKED_DISTS
|
||||||
|
|
||||||
build_project
|
build_project "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
read_command_line() {
|
read_command_line() {
|
||||||
@@ -2624,7 +2624,7 @@ build_project() {
|
|||||||
cd "$BUILD_ROOT/project"
|
cd "$BUILD_ROOT/project"
|
||||||
|
|
||||||
# FIXME: turn LTO back on when everything works
|
# FIXME: turn LTO back on when everything works
|
||||||
echo_eval_run cmake "'$CHECKOUT'" $REQUIRED_CMAKE_ARGS -DVBAM_STATIC=ON -DENABLE_LTO=OFF $PROJECT_ARGS $CMAKE_BASE_ARGS $@
|
echo_eval_run cmake "'$CHECKOUT'" $REQUIRED_CMAKE_ARGS -DVBAM_STATIC=ON -DENABLE_LTO=OFF $CMAKE_BASE_ARGS $PROJECT_ARGS $@
|
||||||
echo_run make -j$NUM_CPUS VERBOSE=1
|
echo_run make -j$NUM_CPUS VERBOSE=1
|
||||||
|
|
||||||
if [ "$target_os" = mac ]; then
|
if [ "$target_os" = mac ]; then
|
||||||
@@ -2642,6 +2642,13 @@ build_project() {
|
|||||||
$STRIP visualboyadvance-m
|
$STRIP visualboyadvance-m
|
||||||
elif [ "$target_os" = windows ] && path_exists visualboyadvance-m.exe; then
|
elif [ "$target_os" = windows ] && path_exists visualboyadvance-m.exe; then
|
||||||
$STRIP visualboyadvance-m.exe
|
$STRIP visualboyadvance-m.exe
|
||||||
|
|
||||||
|
zip=./visualboyadvance-m-Win-${target_bits:-$bits}bit.zip
|
||||||
|
|
||||||
|
rm -f $zip
|
||||||
|
zip -9 $zip ./visualboyadvance-m.exe
|
||||||
|
|
||||||
|
gpg --detach-sign -a $zip
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dist_post_build project
|
dist_post_build project
|
||||||
@@ -2878,7 +2885,7 @@ ln() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cygpath() {
|
cygpath() {
|
||||||
if sh -c 'command -v cygpath' >/dev/null; then
|
if command -v cygpath >/dev/null; then
|
||||||
command cygpath "$@"
|
command cygpath "$@"
|
||||||
else
|
else
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@@ -2891,6 +2898,20 @@ cygpath() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gpg() {
|
||||||
|
if command -v gpg >/dev/null; then
|
||||||
|
command gpg "$@"
|
||||||
|
elif command -v gpg2 >/dev/null; then
|
||||||
|
command gpg2 "$@"
|
||||||
|
else
|
||||||
|
warn 'GPG not available'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
command() {
|
||||||
|
/bin/command "$@"
|
||||||
|
}
|
||||||
|
|
||||||
fully_resolve_link() {
|
fully_resolve_link() {
|
||||||
file=$1
|
file=$1
|
||||||
# get initial part for non-absolute path, or blank for absolute
|
# get initial part for non-absolute path, or blank for absolute
|
||||||
|
Reference in New Issue
Block a user