corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [02/38] incubator-corinthia git commit: Completed fetch_downloads extract_downloads pairing
Date Fri, 13 Feb 2015 08:52:14 GMT
Completed  fetch_downloads extract_downloads pairing

The procedures work together and extract_downloads always calls
fetch_downloads just in case needed (already-downloaded files are not
refetched).  Basic tests are successful.


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/a4852151
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/a4852151
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/a4852151

Branch: refs/heads/experimentZip
Commit: a48521515f567038768287d67448cb5748ae3df3
Parents: 1384664
Author: Dennis Hamilton <orcmid@apache.org>
Authored: Fri Jan 2 17:09:25 2015 -0800
Committer: Dennis Hamilton <orcmid@apache.org>
Committed: Fri Jan 2 17:09:42 2015 -0800

----------------------------------------------------------------------
 external/extract_downloads.bat | 15 +++++++++------
 external/fetch_downloads.bat   | 27 +++++++++++++++++----------
 2 files changed, 26 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/a4852151/external/extract_downloads.bat
----------------------------------------------------------------------
diff --git a/external/extract_downloads.bat b/external/extract_downloads.bat
index 4157a8e..a431567 100644
--- a/external/extract_downloads.bat
+++ b/external/extract_downloads.bat
@@ -1,5 +1,5 @@
 @echo off
-rem extract_downloads.bat 1.00       UTF-8
+rem extract_downloads.bat 1.01       UTF-8
 rem    EXTRACT THE EXTERNAL DOWNLOADS TO INCLUDE, LIB, AND BIN FOLDERS
 
 rem Fetch downloads in case not done yet
@@ -21,6 +21,7 @@ CALL :CLEAN
 rem For extractions, use the zip name listed and the path, if any, from the
 rem root of the zipped hierarchy to the level where include and libs are found
 
+rem           File Name                       Top Path
 CALL :SDL2x86 SDL2-devel-2.0.3-VC.zip         SDL2-2.0.3\
 CALL :SDL2x86 SDL2_image-devel-2.0.0-VC.zip   SDL2_image-2.0.0\
 CALL :ICONV   iconv-1.9.2.win32.zip           iconv-1.9.2.win32\
@@ -29,7 +30,7 @@ CALL :ZLIB    zlib128-dll.zip                 ""
 
 EXIT /B 0
 
-rem MOST MAINTENANCE IS BY UPDATING THE FILENAMES AND TOP PATHES ABOVE.
+rem MOST MAINTENANCE IS BY UPDATING THE FILENAMES AND TOP PATHS ABOVE.
 rem    The extraction procedure do not require maintenance unless there is
 rem    a Zip layout change or new extraction cases are needed.
 
@@ -77,7 +78,7 @@ EXIT /B 0
 rem EXTRACT ALL OF ZIP "%~dp0download\%1" TO "%~dp0download\T"
 rem     "%~dp0download\T" is not deleted until needed again, leaving the
 rem     last one for inspection when trouble-shooting.
-RMDIR /S /Q "%~dp0download\T" >nul
+RMDIR /S /Q "%~dp0download\T" >nul 2>&1
 ECHO:     extracting %1
 Cscript /nologo "%~dp0unzip-win.js" //B "%~dp0download\%1" "%~dp0download\T"
 EXIT /B 0
@@ -91,9 +92,9 @@ EXIT /B 2
 
 :CLEAN
 rem clean out any previous material and be quiet about it
-RMDIR /S /Q "%~dp0download\include" >nul
-RMDIR /S /Q "%~dp0download\lib" >nul
-RMDIR /S /Q "%~dp0download\bin" >nul
+RMDIR /S /Q "%~dp0download\include" >nul 2>&1
+RMDIR /S /Q "%~dp0download\lib" >nul 2>&1
+RMDIR /S /Q "%~dp0download\bin" >nul 2>&1
 rem set up empty include, lib, and bin to receive fresh extractions
 MKDIR "%~dp0download\include"
 MKDIR "%~dp0download\lib"
@@ -111,6 +112,8 @@ ECHO: ***    No extractions have been performed.
 ECHO:
 EXIT /B 2
 
+rem 1.01 2015-01-02-17:03 Silence warnings when removing non-existent
+rem      directories
 rem 1.00 2015-01-02-16:25 Complete Full-Functioning Externals Extraction
 rem      Delivering the download\include, donwload\lib, and download\bin
 rem      collections established for the current external downloads.

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/a4852151/external/fetch_downloads.bat
----------------------------------------------------------------------
diff --git a/external/fetch_downloads.bat b/external/fetch_downloads.bat
index 0663217..0d5309b 100644
--- a/external/fetch_downloads.bat
+++ b/external/fetch_downloads.bat
@@ -1,32 +1,39 @@
 @echo off
-rem fetch_downloads.bat               UTF-8
+rem fetch_downloads.bat 1.00              UTF-8
 rem   FETCH EXTERNAL ARCHIVES FOR NATIVE WINDOWS BUILDS OF CORINTHIA
 
-mkdir %~dp0download
+MKDIR "%~dp0download" >nul 2>&1
 rem Make download directory at same location as this script.
-rem It does not matter if the directory already exists.
+rem Be silent even if the directory already exists.  No worries.
 
-rem  MAINTAIN THIS LIST MANUALLY
+rem  MAINTAIN THIS LIST MANUALLY.  MATCH UP IN EXTRACT_DOWNLOADS.BAT
 CALL :FETCH "http://zlib.net/zlib128-dll.zip"
 CALL :FETCH "http://xmlsoft.org/sources/win32/iconv-1.9.2.win32.zip"
 CALL :FETCH "http://xmlsoft.org/sources/win32/libxml2-2.7.8.win32.zip"
 CALL :FETCH "https://www.libsdl.org/release/SDL2-devel-2.0.3-VC.zip"
 CALL :FETCH  "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.0-VC.zip"
 EXIT /B 0
+
+:FETCH
+IF EXIST "%~dp0download\%~n1%~x1" EXIT /B 0
+rem do not download an archive that is already present.
+Cscript /nologo "%~dp0wget-win.js" //B "%1" "%~dp0download\%~n1%~x1"
+IF EXIST "%~dp0download\%~n1%~x1" ECHO:     %~n1%~x1% downloaded
+EXIT /B 0
+
 rem TODO
 rem  * Might want to pass up and act on error codes from the individual
 rem    :FETCH operations.
 rem  * It might be handy to fetch these URLs from a file so that it can
 rem    be kept maintained in one place, even though the win32 cases are
 rem    unique to building for Windows.
+rem  * Silent the warning on download folder already existing
 rem XXX
 rem  * wget-win.js does not do FTP.  So alternative locations have been
 rem    used for iconv and libmxl2.
 
-:FETCH
-IF EXIST "%~dp0download\%~n1%~x1" EXIT /B 0
-rem do not download an archive that is already present.
-ECHO "%~n1%~x1"
-Cscript /nologo "%~dp0wget-win.js" //B "%1" "%~dp0download\%~n1%~x1"
-EXIT /B 0
+rem 1.00 2015-01-02-16:51 Complete with mating to extract_downloads.bat
+rem      The tested version is adjusted to list successful downloads
+rem      and not any that are not needed or fail.
 
+rem               *** end of fetch_downloads.bat ***


Mime
View raw message