mirror of
https://github.com/kyleneideck/BackgroundMusic
synced 2025-02-16 20:28:26 +00:00
Add -w option to build_and_install.sh, which passes -Wno-error to the compiler.
-Wno-error tells the compiler not to treat warnings as errors. Using the option in the one-liner install command in README.md, since it's mostly used by users rather than developers. Also, log the options passed to build_and_install.sh in build_and_install.log.
This commit is contained in:
parent
3ee563e4c5
commit
523ad02761
2 changed files with 10 additions and 3 deletions
|
@ -65,7 +65,7 @@ If you're comfortable with it, you can just paste the following at a Terminal pr
|
|||
```shell
|
||||
(set -eo pipefail; URL='https://github.com/kyleneideck/BackgroundMusic/archive/master.tar.gz'; \
|
||||
cd $(mktemp -d); echo Downloading $URL to $(pwd); curl -qfL# $URL | gzcat - | tar x && \
|
||||
/bin/bash BackgroundMusic-master/build_and_install.sh && rm -rf BackgroundMusic-master)
|
||||
/bin/bash BackgroundMusic-master/build_and_install.sh -w && rm -rf BackgroundMusic-master)
|
||||
```
|
||||
|
||||
Otherwise, to build and install:
|
||||
|
|
|
@ -127,6 +127,7 @@ usage() {
|
|||
echo "Usage: $0 [options]" >&2
|
||||
echo -e "\t-n Don't clean before building/installing." >&2
|
||||
echo -e "\t-d Debug build. (Release is the default.)" >&2
|
||||
echo -e "\t-w Ignore compiler warnings. (They're treated as errors by default.)" >&2
|
||||
echo -e "\t-x [options] Extra options to pass to xcodebuild." >&2
|
||||
echo -e "\t-c Continue on script errors. Might not be safe." >&2
|
||||
echo -e "\t-h Print this usage statement." >&2
|
||||
|
@ -212,7 +213,7 @@ show_spinner() {
|
|||
}
|
||||
|
||||
parse_options() {
|
||||
while getopts ":ndx:ch" opt; do
|
||||
while getopts ":ndwx:ch" opt; do
|
||||
case $opt in
|
||||
n)
|
||||
CLEAN=""
|
||||
|
@ -220,6 +221,10 @@ parse_options() {
|
|||
d)
|
||||
CONFIGURATION="Debug"
|
||||
;;
|
||||
w)
|
||||
# TODO: What if they also pass their own OTHER_CFLAGS with -x?
|
||||
XCODEBUILD_OPTIONS="${XCODEBUILD_OPTIONS} OTHER_CFLAGS=\"-Wno-error\""
|
||||
;;
|
||||
x)
|
||||
XCODEBUILD_OPTIONS="$OPTARG"
|
||||
;;
|
||||
|
@ -371,9 +376,11 @@ handle_check_xcode_failure() {
|
|||
log_debug_info() {
|
||||
# Log some environment details, version numbers, etc. This takes a while, so we do it in the
|
||||
# background.
|
||||
|
||||
(set +e; trap - ERR
|
||||
echo "Background Music Build Log" >> ${LOG_FILE}
|
||||
echo "----" >> ${LOG_FILE}
|
||||
echo "Build script args: $*" >> ${LOG_FILE}
|
||||
echo "System details:" >> ${LOG_FILE}
|
||||
|
||||
sw_vers >> ${LOG_FILE} 2>&1
|
||||
|
@ -454,7 +461,7 @@ fi
|
|||
|
||||
handle_check_xcode_result
|
||||
|
||||
log_debug_info
|
||||
log_debug_info $*
|
||||
|
||||
# BGMDriver
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue