our tool binaries, who do not understand the cygwin path format.
echo build failure while copying paths initialization file.; \
exit 1; \
fi; \
-echo cmd is: $(CLAM_BIN)/value_tagger$(EXE_END) $(PRODUCTION_DIR)/codescan.ini; \
-$(CLAM_BIN)/value_tagger$(EXE_END) $(PRODUCTION_DIR)/codescan.ini; \
+bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(CLAM_BIN)/value_tagger$(EXE_END) $(PRODUCTION_DIR)/codescan.ini; \
if [ $$? -ne 0 ]; then \
echo build failure during value tagging.; \
exit 1; \
fi; \
-$(CLAM_BIN)/write_build_config$(EXE_END); \
+bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(CLAM_BIN)/write_build_config$(EXE_END); \
if [ $$? -ne 0 ]; then \
echo build failure while writing config.; \
exit 1; \
fi
error_val=0
if [ -f "$basename.manifest" -a -f "$basename" ]; then
- mt -manifest $basename.manifest $WIN32_MANIFEST_FILE -outputresource:$basename\;$where >/dev/null
+ bash $BUILD_SCRIPTS_DIR/wrapdoze.sh mt -manifest $basename.manifest $WIN32_MANIFEST_FILE -outputresource:$basename\;$where >/dev/null
error_val=$?
elif [ -f "$basename" ]; then
- mt -manifest $WIN32_MANIFEST_FILE -outputresource:$basename\;$where >/dev/null
+ bash $BUILD_SCRIPTS_DIR/wrapdoze.sh mt -manifest $WIN32_MANIFEST_FILE -outputresource:$basename\;$where >/dev/null
error_val=$?
else
echo skipping manifest generation for $basename.
export PDB_DIR = $(TARGETS_DIR)
# set these way up here so we can override them later.
- CC = $(COMPILER_ROOT_DIR)/bin/cl
- LINK_TOOL = $(COMPILER_ROOT_DIR)/bin/link
+ CC = bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/cl
+ LINK_TOOL = bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/link
# This is needed to protect against the use of 64-bit time_t structure
# on windows. We are casting to time_t from a 32-bit structure.
sudo /etc/init.d/alsasound restart
}
- # switches from a /X/path form to an X:/ form.
+ # switches from a /X/path form to an X:/ form. this also processes cygwin paths.
function msys_to_dos_path() {
# we always remove dos slashes in favor of forward slashes.
- echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/'
+ echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/'
}
# switches from an X:/ form to an /X/path form.
#:$FrameworkSDKDir/lib"
# convert framework dir back or things yell like hell.
-export FrameworkDir="$(echo $FrameworkDir | sed -e 's/^\/\(.\)[\\\/]\(.*\)$/\1:\\\2/' | tr "/" "\\" 2>/dev/null )"
+export FrameworkDir=$(msys_to_dos_path $FrameworkDir)
# the redirection of stderr to null is to get around an obnoxious cygwin
# warning that seems to be erroneously bitching about backslashes.
+# mark this as executable because we will need it.
+#chmod 755 $FEISTY_MEOW_SCRIPTS/generator/wrapdoze.sh
+
+# convert all other relevant paths back to dos form, or visual studio barfs.
+#export BUILD_SCRIPTS_DIR=$(msys_to_dos_path $BUILD_SCRIPTS_DIR)
+#export BUILDING_HIERARCHY=$(msys_to_dos_path $BUILDING_HIERARCHY)
+#export BUILDER_DIR=$(msys_to_dos_path $BUILDER_DIR)
+#export BUILD_TOP=$(msys_to_dos_path $BUILD_TOP)
+#export PRODUCTION_DIR=$(msys_to_dos_path $PRODUCTION_DIR)
+#export LOGS_DIR=$(msys_to_dos_path $LOGS_DIR)
+#export TOOL_SOURCES=$(msys_to_dos_path $TOOL_SOURCES)
+#export BINARY_DIR=$(msys_to_dos_path $BINARY_DIR)
+#export TARGETS_DIR=$(msys_to_dos_path $TARGETS_DIR)
+#export INTERMEDIATE_EXE_DIR=$(msys_to_dos_path $INTERMEDIATE_EXE_DIR)
+#export WASTE_DIR=$(msys_to_dos_path $WASTE_DIR)
##############
--- /dev/null
+#!/bin/bash
+
+source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
+
+declare -a commands=()
+
+for i in "$@"; do
+ # we only mess with the command line on windows.
+ if [ "$OS" == "Windows_NT" ]; then
+ commands+=($(msys_to_dos_path $i))
+ else
+ commands+=("$i")
+ fi
+done
+
+# echo commands are now:
+# for i in "${commands[@]}"; do
+# echo $i
+# done
+
+# now actually run the possibly chewed command.
+"${commands[@]}"
+
+