Permalink
Browse files

Update windows externals sripts.

  • Loading branch information...
1 parent 00a68e1 commit f671de15bccb61f9667c762bd88f6a707e68dfbc unknown committed with adamv Oct 8, 2009
Showing with 43 additions and 31 deletions.
  1. +2 −1 .gitignore
  2. +3 −0 external/build_wxwidgets_win.cmd
  3. +38 −30 external/get_externals_win.sh
View
@@ -39,8 +39,9 @@ external/stuff/Support
external/stuff/Themes
## Ignore non-source-controlled things in external
-# 'arch' contains downloaded dependency archives
+# 'arch' and 'downloads' contains downloaded dependency archives
external/arch/
+external/downloads/
# 'build_logs' contains logs from command-line build scripts
external/build_logs/
@@ -6,4 +6,7 @@ pushd wxwidgets\build\msw
REM Using a .sln might be faster, but don't want to keep all the .vcprojs up-to-date
nmake -f makefile.vc BUILD=debug UNICODE=1 > wxwidgets_build.log
+REM Make sure this isn't hanging around causing problems...
+taskkill.exe /f /t /im mspdbsrv.exe > nul 2> nul
+
popd
@@ -2,25 +2,32 @@
#FIXME: refactor windows/linux code
+downloads=downloads
+
_download()
{
# Download external libraries
echo "Downloading external libraries..."
echo
- pushd arch
-
- tempdir=`mktemp -d back.XXXXXX` || exit 1
- mv *.zip $tempdir
- mv *.gz $tempdir
- mv *.bz2 $tempdir
-
- curl -O http://curl.haxx.se/download/curl-7.18.2.tar.gz
- curl -O http://libtomcrypt.com/files/crypt-1.11.tar.bz2
- curl -O http://math.libtomcrypt.com/files/ltm-0.39.tar.bz2
- curl -O http://www.equi4.com/pub/mk/metakit-2.4.9.7.tar.gz
- curl -O ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.9.tar.gz
- curl -O http://kent.dl.sourceforge.net/sourceforge/tinyxml/tinyxml_2_5_3.tar.gz
- curl -O http://biolpc22.york.ac.uk/pub/2.8.10/wxWidgets-2.8.10.tar.bz2
+ pushd $downloads
+
+ # Only download files we don't already have.
+ # This lets us delete files to redownload, or get
+ # new versions automatically.
+
+ for url in \
+ http://curl.haxx.se/download/curl-7.18.2.tar.gz \
+ http://libtomcrypt.com/files/crypt-1.11.tar.bz2 \
+ http://math.libtomcrypt.com/files/ltm-0.39.tar.bz2 \
+ http://www.equi4.com/pub/mk/metakit-2.4.9.7.tar.gz \
+ ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.9.tar.gz \
+ http://downloads.sourceforge.net/project/tinyxml/tinyxml/2.5.3/tinyxml_2_5_3.tar.gz \
+ http://downloads.sourceforge.net/project/wxwindows/wxAll/2.8.10/wxWidgets-2.8.10.tar.bz2
+ do
+ if [[ ! -e `basename $url` ]]; then
+ curl -O -L $url
+ fi
+ done
popd
}
@@ -29,31 +36,32 @@ _backup_existing_patches()
{
# Removing previous folders
tempdir=`mktemp -d back.XXXXXX` || exit 1
- echo "Moving existing folders to $tempdir"
- mv curl $tempdir/curl
- mv libtomcrypt $tempdir/libtomcrypt
- mv libtommath $tempdir/libtommath
- mv metakit $tempdir/metakit
- mv pcre $tempdir/pcre
- mv tinyxml $tempdir/tinyxml
+ echo "Backing up patched externals..."
+ for dir in curl libtomcrypt libtommath metakit prce tinyxml wxwidgets
+ do
+ if [[ -e $dir ]]; then
+ mv $dir $tempdir/$dir;
+ fi
+ done
}
_extract_and_patch()
{
# Extract
echo "Extracting libraries.."
echo
- tar -xzf arch/curl-*
- tar -xjf arch/crypt-*
- tar -xjf arch/ltm-*
- tar -xzf arch/metakit-*
- tar -xzf arch/pcre-*
- tar -xzf arch/tinyxml_*
- tar -xjf arch/wxWidgets-*
+ tar -xzf $downloads/curl-*
+ tar -xjf $downloads/crypt-*
+ tar -xjf $downloads/ltm-*
+ tar -xzf $downloads/metakit-*
+ tar -xzf $downloads/pcre-*
+ tar -xzf $downloads/tinyxml_*
+ tar -xjf $downloads/wxWidgets-*
# Rename directories to generic names
echo "Renaming dirs..."
echo
+
mv curl-* curl
mv libtomcrypt-* libtomcrypt
mv libtommath-* libtommath
@@ -97,8 +105,8 @@ _next_steps()
}
-if [[ ! -e arch ]]; then
- mkdir arch
+if [[ ! -e $downloads ]]; then
+ mkdir $downloads
fi
if [[ "$1" != "repatch" ]]; then

0 comments on commit f671de1

Please sign in to comment.