Skip to content

Commit

Permalink
win32: speed up and simplify deps cloning
Browse files Browse the repository at this point in the history
Use --depth 1 for all the dependencies we clone to speed up the process.

Use the --branch argument for cloning all dependencies. This simplifies
the process and makes it easier to use other copies in an offline
environment where github.com is inaccessible.

Signed-off-by: Ken Dreyer <[email protected]>
  • Loading branch information
ktdreyer committed Oct 10, 2022
1 parent eaf211c commit fdbe11d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions win32_deps_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ source "$SCRIPT_DIR/mingw_conf.sh"
echo "Building zlib."
cd $depsSrcDir
if [[ ! -d $zlibSrcDir ]]; then
git clone https://github.com/madler/zlib
git clone --depth 1 https://github.com/madler/zlib
fi
cd $zlibSrcDir
# Apparently the configure script is broken...
Expand Down Expand Up @@ -213,7 +213,7 @@ EOL
echo "Building libbacktrace."
cd $depsSrcDir
if [[ ! -d $backtraceSrcDir ]]; then
git clone https://github.com/ianlancetaylor/libbacktrace
git clone --depth 1 https://github.com/ianlancetaylor/libbacktrace
fi
mkdir -p $backtraceSrcDir/build
cd $backtraceSrcDir/build
Expand Down Expand Up @@ -290,8 +290,7 @@ $MINGW_DLLTOOL -d $winLibDir/mswsock.def \
echo "Fetching libwnbd."
cd $depsSrcDir
if [[ ! -d $wnbdSrcDir ]]; then
git clone $wnbdUrl
cd $wnbdSrcDir && git checkout $wnbdTag
git clone --branch $wnbdTag --depth 1 $wnbdUrl
fi
cd $wnbdSrcDir
mkdir -p $wnbdLibDir
Expand All @@ -302,10 +301,8 @@ $MINGW_DLLTOOL -d $wnbdSrcDir/libwnbd/libwnbd.def \
echo "Fetching dokany."
cd $depsSrcDir
if [[ ! -d $dokanSrcDir ]]; then
git clone $dokanUrl
git clone --branch $dokanTag --depth 1 $dokanUrl
fi
cd $dokanSrcDir
git checkout $dokanTag

mkdir -p $dokanLibDir
$MINGW_DLLTOOL -d $dokanSrcDir/dokan/dokan.def \
Expand Down

0 comments on commit fdbe11d

Please sign in to comment.