Re: The Unofficial XYplorer Archive
Posted: 28 Mar 2015 16:24
Meanwhile, to gain access to the Archive you just need to give an email address to which I can send an invitation - in a private message of course
Forum for XYplorer Users and Developers
https://www.xyplorer.com/xyfc/
Code: Select all
SUpdater's Archiver:
XYplorer 15.00.0521 [2015-04-30 16.34.52] [44aac6bf5e8af1418126aea7b0416cdc80125045baf7692b6b40cc0f5b0cd243 80032d5eb3803b23b3d584d42064eb94fb2e5410b83d0e0d86ef90d3ee71faa8].zip
the Unofficial XYplorer Archive script:
XYplorer 15.00.0521 [2015-04-30 20.34.52] [44aac6bf5e8af1418126aea7b0416cdc80125045baf7692b6b40cc0f5b0cd243 80032d5eb3803b23b3d584d42064eb94fb2e5410b83d0e0d86ef90d3ee71faa8].zipCode: Select all
if (compare($time, eval($dst_b_$year), "d") == -1 OR compare(eval($dst_e_$year), $time, "d") == -1) { //if time is NOT during DST...
$time = formatdate($time, "yyyy-mm-dd hh.nn.ss", "h", -1); //...push it just 1 hour back (from UTC+1 to UTC),...
} else { //...else...
$time = formatdate($time, "yyyy-mm-dd hh.nn.ss", "h", -2); //...push it 2 hours back (from UTC+1 + DST to UTC)
};Code: Select all
load "dlntuxya.xys","_dlntuxya",f;Code: Select all
"TUXYA : tuxya"
//modified 4 regions. Modification are commented. The caption above is part of the modification
global $allitems; // //<< modified.
setting "BackgroundFileOps", "0"; //avoid timing problems by temporarily switching to synchronous file operations mode
if ($allitems == '') { $allitems = get("SelectedItemsPathNames", <crlf>); } //create a ΒΆ-separated list of full paths+names of all the selected items
// // ^^ modified.
$total = gettoken("$allitems", "count", <crlf>); //count the number of selected files
$i = 1; //start the counter
$dst_b_1999 = "1999-03-28"; //$dst_b_1999 = "1999-03-".(31 - ((floor((5 * 1999) / 4) + 4) % 7));
//when European DST began in 1999, in ISO 8601 - https://en.wikipedia.org/wiki/European_Summer_Time#Exact_timing_for_the_next_several_years
$dst_e_1999 = "1999-10-31"; //$dst_e_1999 = "1999-10-".(31 - ((floor((5 * 1999) / 4) + 1) % 7));
//when European DST ended in 1999, in ISO 8601 - https://en.wikipedia.org/wiki/European_Summer_Time#Exact_timing_for_the_next_several_years
$dst_b_2000 = "2000-03-26"; $dst_e_2000 = "2000-10-29";
$dst_b_2001 = "2001-03-25"; $dst_e_2001 = "2001-10-28";
$dst_b_2002 = "2002-03-31"; $dst_e_2002 = "2002-10-27";
$dst_b_2003 = "2003-03-30"; $dst_e_2003 = "2003-10-26";
$dst_b_2004 = "2004-03-28"; $dst_e_2004 = "2004-10-31";
$dst_b_2005 = "2005-03-27"; $dst_e_2005 = "2005-10-30";
$dst_b_2006 = "2006-03-26"; $dst_e_2006 = "2006-10-29";
$dst_b_2007 = "2007-03-25"; $dst_e_2007 = "2007-10-28";
$dst_b_2008 = "2008-03-30"; $dst_e_2008 = "2008-10-26";
$dst_b_2009 = "2009-03-29"; $dst_e_2009 = "2009-10-25";
$dst_b_2010 = "2010-03-28"; $dst_e_2010 = "2010-10-31";
$dst_b_2011 = "2011-03-27"; $dst_e_2011 = "2011-10-30";
$dst_b_2012 = "2012-03-25"; $dst_e_2012 = "2012-10-28";
$dst_b_2013 = "2013-03-31"; $dst_e_2013 = "2013-10-27";
$dst_b_2014 = "2014-03-30"; $dst_e_2014 = "2014-10-26";
$dst_b_2015 = "2015-03-29"; $dst_e_2015 = "2015-10-25";
foreach ($item, "$allitems", <crlf>) {
if (getpathcomponent("$item", "ext") != "zip") { //if the extension of the processed item is NOT zip...
status "[$i/$total]: $item", , "alert"; //...give some visual feedback in the status bar,...
$i++; //...raise the counter and...
wait "500"; //(wait a little, just to be safe)
continue; //...skip it and continue with the next one
};
$path = getpathcomponent("$item", "path") . "\"; //path of the current item, with final slash added
$filelist = zip_list($item, <crlf>); //inspect the processed item...
$subject = regexmatches($filelist, "XYplorer.*?\.exe"); //...and try to find what it contains
if ($subject != "") { //if there is an executable compatible with this script...
zip_extract($item, $path, $subject); //...extract it in the same folder the archive is located...
} else { //...otherwise...
status "[$i/$total]: $item", , "alert"; //...give some visual feedback in the status bar,...
$i++; //...raise the counter and...
wait "500"; //(wait a little, just to be safe)
continue; //...skip it and continue with the next one
};
$time = report("{modified yyyy-mm-dd hh.nn.ss}", $path . $subject); //get the full date and time XYplorer was compiled in ISO 8601 format
$year = substr($time, 0, 4); //extract just the year
if (compare($time, eval($dst_b_$year), "d") == -1 OR compare(eval($dst_e_$year), $time, "d") == -1) { //if time is NOT during DST...
$time = formatdate($time, "yyyy-mm-dd hh.nn.ss", "h", -1); //...push it just 1 hour back (from UTC+1 to UTC),...
} else { //...else...
$time = formatdate($time, "yyyy-mm-dd hh.nn.ss", "h", -2); //...push it 2 hours back (from UTC+1 + DST to UTC)
};
$vers = property("ProductVersion", $path . $subject); //get the version of XYplorer in the nn.xx.yyyy form
$vers = ("$vers" Like "*#.##.####") ? "$vers" : "$vers.0000"; //pads the version number with zeros if necessary
$hash_zip = hash("sha256", $item, "1"); //calculate the SHA256 of the downloaded .zip file
$hash_xy = hash("sha256", $path . $subject, "1"); //calculate the SHA256 of XYplorer executable
$name_pattern = substr($subject, 0, -4) . " $vers [$time] [$hash_zip $hash_xy].zip"; //name pattern of the .zip file once archived
renameitem($name_pattern, $item); //rename the .zip file
delete "0", "0", $path . $subject; //delete XYplorer executable without prompt nor recycle bin
status "[$i/$total]: $item"; //give some visual feedback in the status bar
$i++; //raise the counter
wait "500"; //wait a little, just to be safe...
};
// //vv till end vv modified (added)
"DLnTUXYA : _DLnTUXYA"
//downloads latest beta noinstall zip archive to <xydata>\tuxya and sends that to main script for renaming.
global $allitems;
$latestbetapage = readurl('http://www.xyplorer.com/version.php', 1,, 1); //get latest major version
$latestbetaver = substr($latestbetapage, 0, 5); //extract maj.min. eg 15.00
if ($latestbetaver == '') {status 'error retrieving latest major version report',,'stop'; end 1;}
$downloadfile = new( <xydata> . '\TUXYA\XYplorer_' . $latestbetaver . '_beta_noinstall.zip', 'file'); //auto auto-prefixing if filename is taken
download 'http://www.xyplorer.com/download/xyplorer_'. $latestbetaver .'_beta_noinstall.zip', $downloadfile, 'o'; //downlado the file
if (filesize($downloadfile) == 0) {status 'download failed',,'stop'; end 1;} //if target filesize remains 0, assume download failed
else { $allitems = $downloadfile; sub "tuxya"; } //send the downloaded archive as input (as global var) to mian script
That ^^ The background utility caught two .0002, and to be faithful to events I uploaded bothadmin wrote:There was a silent hotfix only minutes after the first upload. I did not change the number.
Wow, and I thought I could fool it.Marco wrote:That ^^ The background utility caught two .0002, and to be faithful to events I uploaded bothadmin wrote:There was a silent hotfix only minutes after the first upload. I did not change the number.