summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--appveyor.yml2
-rwxr-xr-xbuild.sh2
-rw-r--r--build_windows_modules.sh (renamed from build_windows_libraries.sh)22
3 files changed, 15 insertions, 11 deletions
diff --git a/appveyor.yml b/appveyor.yml
index 8c5a2eeab6..9a26b5104d 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -48,7 +48,7 @@ install:
# This is the "test phase", tweak it as you see fit
test_script:
- - bash -x build_windows_libraries.sh
+ - bash -x build_windows_modules.sh
- cargo build
- cargo test
diff --git a/build.sh b/build.sh
index afadb4d5fd..bb86e5c2cb 100755
--- a/build.sh
+++ b/build.sh
@@ -104,7 +104,7 @@ sed -i.bak \
################################################################################
if [[ "$(uname -s)" == "MINGW"* ]]; then
- CPP_BUILD_MODES="Release" ./build_windows_libraries.sh $1
+ CPP_BUILD_MODES="Release" ./build_windows_modules.sh $@
fi
echo "Building Rust code in release mode using $RUSTC_VERSION..."
diff --git a/build_windows_libraries.sh b/build_windows_modules.sh
index b675112e28..aa5a5a1daf 100644
--- a/build_windows_libraries.sh
+++ b/build_windows_modules.sh
@@ -14,20 +14,26 @@ CPP_BUILD_TARGETS=${CPP_BUILD_TARGETS:-"x64"}
# Override this to set a different cargo target directory
CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-"./target/"}
+if [[ "${1:-""}" == "--dev-build" ]]; then
+ DEV_BUILD=true
+fi
# Builds visual studio projects
function build_project
{
local path="$1"
- local solutions="$2"
+ local sln="$1/$2"
+ local solutions="$3"
- # Sometimes the build output needs to be cleaned up
- rm -r $path/bin/* || true
+ if [[ -z "${DEV_BUILD+x}" ]]; then
+ # Clean all intermediate and output files
+ rm -r $path/bin/* || true
+ fi
set -x
for mode in $CPP_BUILD_MODES; do
for target in $CPP_BUILD_TARGETS; do
- cmd.exe "/c msbuild.exe $(to_win_path $path) /p:Configuration=$mode /p:Platform=$target /t:$solutions"
+ cmd.exe "/c msbuild.exe /m $(to_win_path $sln) /p:Configuration=$mode /p:Platform=$target /t:$solutions"
done
done
set +x
@@ -107,7 +113,6 @@ function copy_outputs
}
-
# Since Microsoft likes to name their architectures differently from Rust, this
# function tries to match microsoft names to Rust names.
function arch_from_build_target
@@ -135,7 +140,6 @@ function rustc_host_arch
| tr -d '"'
}
-
function main
{
@@ -143,9 +147,9 @@ function main
local windns_root_path=${CPP_ROOT_PATH:-"./windows/windns"}
local winroute_root_path=${CPP_ROOT_PATH:-"./windows/winroute"}
- build_project "$winfw_root_path/winfw.sln" "$WINFW_SOLUTIONS"
- build_project "$windns_root_path/windns.sln" "$WINDNS_SOLUTIONS"
- build_project "$winroute_root_path/winroute.sln" "$WINROUTE_SOLUTIONS"
+ build_project "$winfw_root_path" "winfw.sln" "$WINFW_SOLUTIONS"
+ build_project "$windns_root_path" "windns.sln" "$WINDNS_SOLUTIONS"
+ build_project "$winroute_root_path" "winroute.sln" "$WINROUTE_SOLUTIONS"
copy_outputs $winfw_root_path "winfw.dll"
copy_outputs $windns_root_path "windns.dll"