Index: /main/trunk/gs-release-builder/nightlies-with-logs.bat
===================================================================
--- /main/trunk/gs-release-builder/nightlies-with-logs.bat	(revision 36336)
+++ /main/trunk/gs-release-builder/nightlies-with-logs.bat	(revision 36336)
@@ -0,0 +1,10 @@
+echo "Running nightly scripts"
+
+C:\greenstone\gs-release-builder\create-gs3-caveat-windows.bat > C:\greenstone\gs-release-builder\logs\gs3.out 2>&1
+
+C:\greenstone\gs-release-builder\create-gs2-caveat-windows.bat > C:\greenstone\gs-release-builder\logs\gs2.out 2>&1
+
+C:\greenstone\gs-release-builder\upload-to-www-internal-windows.pl > C:\greenstone\gs-release-builder\logs\upload.out 2>&1
+
+echo "Done"
+
Index: /main/trunk/gs-release-builder/setup-env.bat
===================================================================
--- /main/trunk/gs-release-builder/setup-env.bat	(revision 36336)
+++ /main/trunk/gs-release-builder/setup-env.bat	(revision 36336)
@@ -0,0 +1,130 @@
+@echo off
+echo.
+echo ******************************
+
+set MY_HOME_DIR=C:\greenstone\gs-release-builder
+set MY_PKG_DIR=%MY_HOME_DIR%\packages
+
+echo %MY_HOME_DIR% %MY_PKG_DIR%
+
+set JAVA_HOME=%MY_PKG_DIR%\jdk8.0.302
+if not exist "%JAVA_HOME%" echo %JAVA_HOME% does not exist& goto done
+set PATH=%JAVA_HOME%\bin;%PATH%
+
+echo + Set JAVA_HOME=%JAVA_HOME% and updated PATH
+
+set PERL_HOME=%MY_PKG_DIR%\strawberry-perl-5.18\perl
+if not exist "%PERL_HOME%" echo %PERL_HOME% does not exist& goto done
+set _PERL_TOPLEVEL=%MY_PKG_DIR%\strawberry-perl-5.18
+
+set PATH=%PERL_HOME%\bin;%PERL_HOME%\site\bin;%_PERL_TOPLEVEL%\c\bin;%PATH%
+echo + Set PERL_HOME=%PERL_HOME% and updated PATH
+
+set ANT_HOME=%MY_PKG_DIR%\apache-ant-1.9.5
+if not exist "%ANT_HOME%" echo %ANT_HOME% does not exist& goto done
+set PATH=%ANT_HOME%\bin;%PATH%
+echo + Set ANT_HOME=%ANT_HOME% and updated PATH
+
+:: Setup Visual Studio
+set vslocation=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build
+if not exist "%vslocation%" echo %vslocation% does not exist& goto done
+pushd "%vslocation%"
+:: host 64bit, target 32 bit
+call vcvarsamd64_x86
+popd
+
+set "MY_HOME_DIR="
+set "MY_PKG_DIR="
+
+goto done
+::: the rest of this is old stuff
+
+:: For notes on compiling GS2 on 64 bit Win 7 see 
+:: http://wiki.greenstone.org/doku.php?id=en:developer:compiling_apache&#compiling_the_apache-httpd_included_with_gs2_on_64_bit_windows_7
+
+:: The following JDK 6 is copied straight from the 32 bit Win machine into the 64 bit Win machine
+:: It was used to debug gli's GS3ServerThread's changeover to use Process.waitFor()
+::set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_13& echo @@@@@@@@@ USING JAVA 6 @@@@@@@@@
+::set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_55
+set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_20
+if not exist "%JAVA_HOME%" echo %JAVA_HOME% does not exist& goto done
+set PATH=%JAVA_HOME%\bin;%PATH%
+
+echo + Set JAVA_HOME=%JAVA_HOME% and updated PATH
+
+rem set PERL_HOME=C:\Perl64
+set PERL_HOME=C:\strawberry-perl32no64\perl
+::if not exist "%PERL_HOME%" echo %PERL_HOME% does not exist& goto done
+set PATH=%PERL_HOME%\bin;%PATH%
+::set PATH=%PERL_HOME%\perl\site\bin;%PERL_HOME%\perl\bin;%PERL_HOME%\c\bin;%PATH%
+
+::echo + Set PERL_PATH=%PERL_HOME% and updated PATH
+
+set ANT_HOME=C:\apache-ant-1.9.4
+set PATH=%ANT_HOME%\bin;%PATH%
+
+
+::set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%PATH%
+::set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;C:\Program Files (x86)\putty;C:\Windows\System32\UnxUtils\usr\local\wbin;%PATH%
+rem set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;C:\Program Files (x86)\putty;C:\Windows\System32\linuxtools;%PATH%
+
+rem echo + Set ANT_HOME=%ANT_HOME% and updated PATH
+
+
+:: Setup Visual Studio env
+:: WORKS:
+::call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
+
+:: Running VS in 64 bit mode doesn't work, need to run in 32 bit mode.
+:: For now only VS9.0 (VS2008) works
+:: call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
+
+::::::set vslocation=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools
+::::::if not exist "%vslocation%" echo %vslocation% does not exist& goto done
+::::::pushd "%vslocation%"
+::::::call vsvars32.bat
+::::::popd
+
+:: Running VS in 64 bit works for Visual Studio 12:
+set vslocation=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
+if not exist "%vslocation%" echo %vslocation% does not exist& goto done
+pushd "%vslocation%"
+call vcvarsall.bat amd64
+popd
+
+rem pushd "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC"
+rem call vcvarsall.bat amd64
+rem popd
+
+:: VS10 fails: Common Tools folder not found for VS10
+rem call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
+
+:: VS12 fails: Calling "vsvars32.bat" above produces the same error as calling
+:: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64_x86\vcvarsamd64_x86.bat
+:: (and possibly the same error as calling
+:: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat without passing "amd64" param)
+rem call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat"
+
+:: Error: https://groups.google.com/forum/#!topic/UniMRCP/Iybpn51UYnI
+:: http://msdn.microsoft.com/en-us/library/ff770576.aspx
+:: http://stackoverflow.com/questions/11544563/can-i-set-the-platform-toolset-from-the-command-line-when-building-with-vs2010s
+:: /p:PlatformToolset=v100
+
+
+:: If using SetEnv.cmd to set up MS SDK env (no longer needed even for compiling GS2 with debug):
+
+::call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
+:: Run with /? to see what options it takes (/x86, /x64, /ia64, /vista, /xp, /win7 and more)
+
+::set sdklocation=C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin
+::if not exist "%sdklocation%" echo %sdklocation% does not exist& goto done
+::pushd "%sdklocation%"
+::call SetEnv.cmd /x64
+::popd
+
+
+:done
+echo Done
+echo ******************************
+echo.
+
Index: /main/trunk/gs-release-builder/upload-to-www-internal-windows.pl
===================================================================
--- /main/trunk/gs-release-builder/upload-to-www-internal-windows.pl	(revision 36336)
+++ /main/trunk/gs-release-builder/upload-to-www-internal-windows.pl	(revision 36336)
@@ -0,0 +1,37 @@
+#!/usr/bin/perl -w
+
+use strict;
+use File::Copy;
+
+my $tar = "\"C:\\greenstone\\gs-release-builder\\release-kits\\bin\\tar.exe\"";
+
+#my $set = `set`;
+#print $set;
+#print "\n";
+my $main_snapshot_dir = "C:\\greenstone\\gs-release-builder\\snapshots\\";
+my $keys_dir = "C:\\greenstone\\gs-release-builder\\keys\\";
+
+my @snap_dirs = ("gs2-caveat", "poo", "gs3-caveat"); # diffcoll?
+#my $private_key_file = $keys_dir . "kjdon-linux-labs.ppk";
+#die "Couldn't find jumphost key file $private_key_file\n" unless -e $private_key_file;
+foreach my $dir (@snap_dirs) {
+	opendir (DIR, "$main_snapshot_dir$dir") || next;
+	print "Attempting to upload snapshots and logs for $dir\n";
+	my @contents = readdir(DIR); close DIR;
+	foreach my $from (@contents) {
+	if ($from =~ /^from/) { # look for the 'from-2022-03-23'
+		my $new_dir = "$main_snapshot_dir$dir\\$from\\uploads";
+		if (!-d $new_dir) {
+			print "directory $new_dir doesn't exist, skipping\n";
+			next;
+		}
+	#	copy ($private_key_file, $new_dir);
+#		my $command = "cd  $new_dir && $tar -c rk* Greenstone* | plink -proxycmd \"plink -i kjdon-linux-labs.ppk kjdon\@linux-labs.cms.waikato.ac.nz -nc %host:%port\" -T -i ".$keys_dir."upload-caveat-ed25519.ppk nzdl-gsorg\@www-internal.greenstone.org";
+		my $command = "cd $new_dir && $tar -c rk* Greenstone* | plink -T -i ".$keys_dir."upload-caveat-ed25519.ppk nzdl-gsorg\@www-internal.greenstone.org";
+		print "About to run: $command\n";
+		STDOUT->flush();
+		system($command);
+	}	
+	}
+}
+print "finished\n";
