corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis E. Hamilton" <>
Subject RE: Anybody who know how to write .cmd or .bat files for windows ?
Date Wed, 31 Dec 2014 04:38:31 GMT
Looking into what it takes for extract_downloads.bat, I noticed an interesting thing about
the 5 zip files.

If an extract-all happens for, what is produced is zlib128-dll\zlib1.dll zlib128-dll\DLL_FAQ.txt,
zlib128-dll\README.txt, zlib128-dll\USAGE.txt, zlib128-dll\include\, zlib128-dll\lib\, and
zlib128-dll\test\.  There are apparently only x86 lib files.

In the other four cases, the extract is to a secondary directory that has all the goodies.
 E.g., iconv-1.9.2.win32\iconv-1.9.2.win32\, libxml2-2.7.8.win32\libxml2-2.7.8.win32\, SDL2_image-devel-2.0.0-VC\SDL2_image-2.0.0\,
and SDL2-devel-2.0.3-VC\SDL2-2.0.3\  The substructures of those vary, too. The SDL2 archives
include both lib\x86 an lib\x64 libraries, for example.

So, after getting the extracts to work, there is a fair amount of effort to move the correct
material to where they are usable in building code that relies on the externals.

It might be easier, instead of moving everything around, to add the appropriate folders to
the environment variables for INCLUDE and LIBPATH.  The downside is that we need exit from
extract_downloads.bat if it has already been done, whereas extra copying to an download\include
and download\lib folder is not so troublesome.


 - Dennis

-----Original Message-----
From: Dennis E. Hamilton [] 
Sent: Tuesday, December 30, 2014 19:27
Subject: RE: Anybody who know how to write .cmd or .bat files for windows ?

I couldn't use FTP commands because does not accept FTP requests.

I made batch file, fetch_downloads.bat that uses HTML addresses for all five archives.  I
added a wget-win.js script that is used for the individual downloads.  I had to find HTTP
locations for the iconv and libxml archives so that I could use HTTP Requests for all of them.
 (These are on

I think this is workable for now, although there might need to be some error-handling code.

 - Dennis

-----Original Message-----
From: Dennis E. Hamilton [] 
Sent: Tuesday, December 30, 2014 16:12
Subject: RE: Anybody who know how to write .cmd or .bat files for  ?

OK, let's not get ahead of ourselves here.

 -- replying below to --
From: Peter Kelly [] 
Sent: Tuesday, December 30, 2014 15:15
Subject: Re: Anybody who know how to write .cmd or .bat files for windows ?

> On 31 Dec 2014, at 4:08 am, jan i <> wrote:
> Hi
> Peter made 2 excellent scripts in external, to retrieve and populate
> external.
> The idea is brilliant but the are .sh files (requiring bash) so the users
> need cygwin or similar installed, that is a dependency I would NOT like to
> have.
> I thought the scripts was very simply and easy to convert to .cmd files,
> but my command line dos knowledge is somewhat (read: a lot) rusty.
> Could one of you with windows systems, please have a look at the scripts
> and create a "pure" windows variant ?

One of the difficulties here is you need both an external program to retrieve files via HTTP/FTP
(the scripts use wget) and to unzip the files. I don’t think either are available on windows.

  Windows comes with a command-line ftp utility, and it will also work from
  a list of files to download.

  Zip is also built into Windows - it automatically treats zip files as 
  subdirectories.  I am not certain there is a command-line way to 
  do an extract however, but 7-zip could be used for that.

  The advantage of using a Windows .bat file is that nothing but existing
  tools are required and there is no need for users to do much.

  I found a .cmd on StackExchange that does unzipping.  Still looking for
  something simpler.

  I suppose we can assume that Visual Studio is installed?  That increases
  the available tools.

  Also, the Windows Scripting Host is available, and it runs Jscript and

An alternative may be a Python script; functions for doing these are available in the standard

Windows PowerShell may have these capabilities, but I’m not familiar with it.

Dr Peter M. Kelly

PGP key: <>
(fingerprint 5435 6718 59F0 DD1F BFA0 5E46 2523 BAA1 44AE 2966)

View raw message