mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
LP-113 new tool installer: added 7z for windows
This commit is contained in:
parent
84880a0b80
commit
4a3b222192
@ -36,12 +36,10 @@ fi
|
||||
# Tools URLs to fetch
|
||||
WGET_URL="http://librepilot.github.io/tools/wget.exe"
|
||||
MAKE_URL="http://librepilot.github.io/tools/make.exe"
|
||||
SEVENZIP_URL="http://librepilot.github.io/tools/7za.exe"
|
||||
|
||||
# Expected tools paths
|
||||
WGET="$TOOLS_DIR/bin/`basename \"$WGET_URL\"`"
|
||||
MAKE="$TOOLS_DIR/bin/`basename \"$MAKE_URL\"`"
|
||||
SEVENZIP="$TOOLS_DIR/bin/`basename \"$SEVENZIP_URL\"`"
|
||||
|
||||
# wget is necessary to fetch other files
|
||||
WGET_NAME="`basename \"$WGET\"`"
|
||||
@ -97,20 +95,9 @@ if [ ! -x "$MAKE" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# 7-Zip is necessary to install some SDKs
|
||||
if [ ! -x "$SEVENZIP" ]; then
|
||||
echo "$SCRIPT_NAME: $SEVENZIP_NAME not found, fetching from $SEVENZIP_URL"
|
||||
SEVENZIP_DIR="`dirname \"$SEVENZIP\"`"
|
||||
mkdir -p "$SEVENZIP_DIR"
|
||||
$WGET --no-check-certificate -N --content-disposition -P "$SEVENZIP_DIR" "$SEVENZIP_URL"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$SCRIPT_NAME: $SEVENZIP_NAME fetch error, hope it's in the path..."
|
||||
SEVENZIP_NAME="`basename \"$SEVENZIP\"`"
|
||||
SEVENZIP="$SEVENZIP_NAME"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Finally we can fetch all SDKs using top level Makefile
|
||||
cd "$ROOT_DIR"
|
||||
./tool_install.sh 7z
|
||||
echo "Run 'tools/bin/make all_sdk_install' to install the other tools"
|
||||
echo " or 'tools/bin/make help' for more info on make targets"
|
||||
|
31
make/tool_install/7z.sh
Normal file
31
make/tool_install/7z.sh
Normal file
@ -0,0 +1,31 @@
|
||||
# tool_url="http://www.7-zip.org/a/7z920.exe"
|
||||
#tool_url="http://www.7-zip.org/a/7z920.msi"
|
||||
tool_url="http://librepilot.github.io/tools/7za.exe"
|
||||
|
||||
tool_install_name="bin/7za.exe"
|
||||
tool_extract_dir="$tools_dir/bin"
|
||||
|
||||
bin_dir=$tool_extract_dir
|
||||
|
||||
no_extract=true
|
||||
|
||||
module_file=bin
|
||||
|
||||
#Override
|
||||
function validate_target { [ "$uname" = Windows ]; }
|
||||
|
||||
# Override
|
||||
function dddownload_and_extract
|
||||
{
|
||||
local full_tool_install_name="$tools_dir/bin/$tool_install_name"
|
||||
if ! [ -e "$full_tool_install_name" ] || $force
|
||||
then
|
||||
download_and_verify && \
|
||||
rm -rf "$full_tool_install_name" && \
|
||||
mkdir -p "$(dirname "$full_tool_install_name")" && \
|
||||
mv "$downloaded_file" "$full_tool_install_name"
|
||||
#msiexec //i "$downloaded_file" //q INSTALLDIR="$tools_dir"
|
||||
#cmd //C "$downloaded_file" /S /D="${tools_dir//\//\\}"
|
||||
fi
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user