Jump to content


New version of AutoPatcher Updater (APUP) v1.0.4


278 replies to this topic

#61 dolivas

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 29 November 2007 - 05:57 AM

View PostDiGiTAL SkReAM, on Nov 28 2007, 11:52 PM, said:

AND, even when I start fresh, no matter what I select, it crashes iwth a RunTime Error 0.
I started from scratch, new download, new directory. I only select the autopatcher engine and the Windows XP x86 patches.
Runtime error 0 at the end.

Yes I have the same problem and the cause is in fact the autopatcher engine is not being unziped. I tried to run with the log switch but it did not show what the error was after researching some more I looked at the apengine.script and noticed that the apengine_exe.zip was not being unziped and then deleted. I also found that the other files that need to be unziped apengine_lng.zip, apengine_bin.zip, are also not being unziped they are being download just fine if you manual unzip them in the directory they are in and run apup with out the engine selected all will be fine. :o

#62 Erik Ramey

    AutoPatcher Elite

  • Veterans
  • PipPipPipPipPip
  • 766 posts
  • Gender:Male
  • Location:Washington State

Posted 29 November 2007 - 06:18 AM

View Postdolivas, on Nov 28 2007, 09:57 PM, said:

Yes I have the same problem and the cause is in fact the autopatcher engine is not being unziped. I tried to run with the log switch but it did not show what the error was after researching some more I looked at the apengine.script and noticed that the apengine_exe.zip was not being unziped and then deleted. I also found that the other files that need to be unziped apengine_lng.zip, apengine_bin.zip, are also not being unziped they are being download just fine if you manual unzip them in the directory they are in and run apup with out the engine selected all will be fine. :o

In your case Dolivas, you are missing uz.exe in the rt folder. Make sure to download the newest version of APUP and update everything including the RT folder. The program uz.exe is short for "UnZip" =)

#63 Cyrus

    AutoPatcher Expert

  • Members
  • PipPipPipPip
  • 254 posts
  • Gender:Male

Posted 29 November 2007 - 06:19 AM

Edit: Erik beat me to the post so please ignore/delete this one.

Off topic: (temporary) 100th post!

Edited by Cyrus, 29 November 2007 - 06:20 AM.


#64 dolivas

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 29 November 2007 - 09:55 AM

View PostErik Ramey, on Nov 29 2007, 01:18 AM, said:

In your case Dolivas, you are missing uz.exe in the rt folder. Make sure to download the newest version of APUP and update everything including the RT folder. The program uz.exe is short for "UnZip" =)


Nope the file is there and I just download it this evening. Trust me there is a problem with the UnZip feature. Just so you know I checked the MD5 and it matches.

Edited by dolivas, 29 November 2007 - 10:25 AM.


#65 Plier

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 29 November 2007 - 01:12 PM

View Postdolivas, on Nov 29 2007, 12:57 AM, said:

Yes I have the same problem and the cause is in fact the autopatcher engine is not being unziped. I tried to run with the log switch but it did not show what the error was after researching some more I looked at the apengine.script and noticed that the apengine_exe.zip was not being unziped and then deleted. I also found that the other files that need to be unziped apengine_lng.zip, apengine_bin.zip, are also not being unziped they are being download just fine if you manual unzip them in the directory they are in and run apup with out the engine selected all will be fine. :o

View Postdolivas, on Nov 29 2007, 04:55 AM, said:

Nope the file is there and I just download it this evening. Trust me there is a problem with the UnZip feature.
My results are exactly the same.

Files download, but apup crashes w/ runtime zero error.

I then manually unzipped files and autopatcher worked fine.

Edited by Plier, 29 November 2007 - 07:31 PM.


#66 trojahn

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 29 November 2007 - 04:42 PM

Hey...

I just found out about this software and it sure does look amazing... But unfortunatelly it's not working for me... I downloaded from the link in this post (today is 11/29/2007) and decompressed it... When I run apup.exe I deselect the Office stuff and let only the engine and portuguese release selected...

When I click Next I see some files being created on the software directory and then the program just stops... The 'Next' button is disabled and the only thing I can do is click on 'Exit'... I tried waiting but theres no CPU or network activity... The program just stops working...

Here is the log:
AutoPatcher Updater starting.
List file HTTP location: http://www.autopatcher.com/releases.list
Download queue status: 1 files waiting.
releases.list: Download complete.
Download queue status: 0 files waiting.
Download queue status: 2 files waiting.
autopatcher_xp_x86_ptg_nov07.script: Download complete.
Download queue status: 1 files waiting.

--- Edit:
Ok, it started worked somehow... The problem now is that it usually downloads 1 or 2 files and stops again... I need to restart it every time... Pretty annoying...

Edited by trojahn, 29 November 2007 - 05:13 PM.


#67 Cyrus

    AutoPatcher Expert

  • Members
  • PipPipPipPip
  • 254 posts
  • Gender:Male

Posted 29 November 2007 - 10:50 PM

trojahn, that's a known bug and they are working on it. Also, if you have any problems with the Portuguese release itself (not the program as a whole) then I think you should post it in the AutoPatcher Português forum here.

#68 DiGiTAL SkReAM

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 29 November 2007 - 11:17 PM

Now I delete the folder, redownload and run it, and immediately get a Runtime Error 0.

Anxiously awaiting the next beta! B)

Edited by DiGiTAL SkReAM, 29 November 2007 - 11:30 PM.


#69 centralcity

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 30 November 2007 - 12:23 AM

I'm getting the Runtime Error 0 when I try to download the updater engine. It downloads apengine.script but as soon as the file shows up in the folder, I get the error. I'm getting the same error on two machines, one running XP-Pro, the other one running Vista. So far, the other modules are downloading ok, as long as I don't try to download the updater engine.

#70 andyco

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 30 November 2007 - 11:50 AM

View Postcentralcity, on Nov 30 2007, 11:23 AM, said:

I'm getting the Runtime Error 0 when I try to download the updater engine. It downloads apengine.script but as soon as the file shows up in the folder, I get the error. I'm getting the same error on two machines, one running XP-Pro, the other one running Vista. So far, the other modules are downloading ok, as long as I don't try to download the updater engine.

I'm also getting Runtime Error 0 when I try to download the updater engine. I also have trouble downloading the updates for Windows XP (x86). Somewhere along the way the download progress stops. If I try to restart apup and resume the update progress I get the runtime error 0.

I did have a go at rewritting apup as a python script it seems to work ok for the releases I tried (AutoPatcher Engine 5.6.81 + UZ and AutoPatcher for Windows XP (x86) - Beta v3.3). If anyones want's to try it out here it is:
from __future__ import with_statement
import urllib
import re
import os
import md5
import zipfile
import sys
import shutil

perc = -1;
scriptRE = re.compile('(?P<name>[a-zA-Z0-9.]+)=(?P<value>.*)')
wd = os.getcwd()
RDresponse = ""

def downloadFile(url, path, size=None):

	if size!=None: print "\nDownloading (%sMB):\n-v %s\n-> %s" % (round(size/1024/1024, 2), url, path)
	else: print "\nDownloading:\n-v %s\n-> %s" % (url, path)
	
	global perc;
	perc = -1;
	path2 = getAbs(path)
	checkDir(path2)
		
	print "  ",
	f = urllib.urlretrieve(url, path2, downloadProgress)
	
	print "Done"
	
def downloadProgress(*a):
	progress = int(float(a[0]*a[1])/float(a[2])*100)/5
	global perc
	if (perc<progress):
		print min(progress,20)*5,
		perc = progress
	
def clearScreen(numlines=100):
	if os.name == "posix":
		os.system('clear')
	elif os.name in ("nt", "dos", "ce"):
		os.system('CLS')
	else:
		print '\n' * numlines 
	
def chooseRelease():
	releases = {}
	release = 0
	with open("releases.list", "r") as f:
		for line in f:
			result1 = scriptRE.search(line)
			if result1!=None:
				if result1.group("name")=="Name": 
					release += 1
					releases[release] = {}
				releases[release][result1.group("name")] = result1.group("value")

	print ""
	for release in releases:
		print "%i. %s (%s)" % (release, releases[release]["Name"], releases[release]["SystemLanguage"])
		
	selections = input("\nEnter the number for each release (comma separated) to download:")
	
	#clearScreen()
	if type(selections)==int: downloadRelease(releases, selections)
	else: downloadReleases(releases, selections)

def downloadReleases(releases, selections):
	for selection in selections:
		downloadRelease(releases, selection)
	
		
def downloadRelease(releases, selection):
	print "\nDownloading release '%s'..." % releases[selection]["Name"]
	dest = releases[selection]["Script"][releases[selection]["Script"].rindex("/")+1:]
	downloadFile(releases[selection]["Script"], dest)
	
	#get files we need to download
	fileSets = parseScript(dest)
	
	#get updates
	getUpdates(fileSets)

def parseScript(path):
	fileSets = {}
	fileSetNum = -1
	fileNum = -1;
	previous = "";
	
	with open(getAbs(path), "r") as f:
		for line in f:
			result1 = scriptRE.search(line)
			if result1!=None:
				if result1.group("name")=="PreAction":
					os.popen(result1.group("value").replace("autopatcher:", wd));
				
				if result1.group("name")=="PreAction.FileDelete":
					path = getAbs(result1.group("value")[13:]);
					if os.path.exists(path): os.remove(path)
					
				if result1.group("name")=="PreAction.FolderDelete":
					path = getAbs(result1.group("value")[13:]);
					if os.path.exists(path): shutil.rmtree(path)
			
				if result1.group("name")=="Item":
					fileSetNum += 1
					fileSets[fileSetNum] = {}
					fileSets[fileSetNum]["Files"] = {}
					fileSets[fileSetNum]["NeedsUpdating"] = -1
					fileNum = -1
			
				if result1.group("name")=="DetectFile":
					path = result1.group("value")[13:]
					fileNum += 1
					fileSets[fileSetNum]["Files"][fileNum] = {}
					fileSets[fileSetNum]["Files"][fileNum][result1.group("name")] = path

				if result1.group("name")=="DetectHash":
					fileSets[fileSetNum]["Files"][fileNum][result1.group("name")] = result1.group("value")
					
					check = checkFile(fileSets[fileSetNum]["Files"][fileNum]["DetectFile"], result1.group("value"))
					if check>0:
						fileSets[fileSetNum]["NeedsUpdating"] = check
				
				if result1.group("name")=="DownloadFrom":
					fileSets[fileSetNum][result1.group("name")] = result1.group("value")
					
				if result1.group("name")=="DownloadTo":
					fileSets[fileSetNum][result1.group("name")] = result1.group("value")[13:]
					
				if result1.group("name")=="ExpectedSize":
					fileSets[fileSetNum][result1.group("name")] = result1.group("value")
					
				if result1.group("name")=="ExpectedHash":
					fileSets[fileSetNum][result1.group("name")] = result1.group("value")
					
				if result1.group("name")=="ActionAfterDownload.Unzip":
					fileSets[fileSetNum][result1.group("name")] = result1.group("value")

				if result1.group("name")=="ActionAfterDownload":
					fileSets[fileSetNum][result1.group("name")] = result1.group("value")
					
	return fileSets
	
def getUpdates(fileSets):
	global RDresponse;
	
	#get total size and count of updates
	totalSize = 0
	totalCount = 0
	for fileSet in fileSets:
		if fileSets[fileSet]["NeedsUpdating"]>0 and fileSets[fileSet]["DownloadFrom"]!="":
			totalSize += float(fileSets[fileSet]["ExpectedSize"])
			totalCount += 1
			
	print "\n%i files (%sMB) need updating..." % (totalCount, round(totalSize/1024/1024, 2))
		
	#get updates
	for fileSet in fileSets:
		if fileSets[fileSet]["NeedsUpdating"]>0 and fileSets[fileSet]["DownloadFrom"]!="":
				
			#Ask user whether they want to redownload file
			if fileSets[fileSet]["NeedsUpdating"]==1: reason = "exist! Download?"
			else: reason = "match! Redownload?"
			
			if (RDresponse!="ya" and RDresponse!="na"): RDresponse = raw_input("\nThe file '%s' (%sMB) does not %s (y/n/ya/na)" % (fileSets[fileSet]["DownloadTo"], round(float(fileSets[fileSet]["ExpectedSize"])/1024/1024, 2), reason))
			if (RDresponse=="y" or RDresponse=="ya"):
				downloadFile(fileSets[fileSet]["DownloadFrom"], fileSets[fileSet]["DownloadTo"], float(fileSets[fileSet]["ExpectedSize"]))

							
			# if has an after download action
			if "ActionAfterDownload.Unzip" in fileSets[fileSet]:
				path = getAbs(fileSets[fileSet]["DownloadTo"])
				pathDir = os.path.dirname(path)
				if os.path.exists(path):
					print "\nUnzipping '%s'..." % fileSets[fileSet]["DownloadTo"]
					z = zipfile.ZipFile(path, "r")
					for zf in z.infolist():
						newpath = os.path.join(pathDir, zf.filename)
						checkDir(newpath)
						if not zf.filename.endswith("/"): file(newpath, 'wb').write(z.read(zf.filename))
						#if (newpath.lower().endswith(".script")):
							#print "new script "+newpath[len(wd)+1:]
							#fileSets2 = parseScript(newpath[len(wd)+1:])
							#getUpdates(fileSets2)
					z.close()
			if "ActionAfterDownload" in fileSets[fileSet]:
				pass
				
def checkFile(path, sum=None, size=None):
	#print path
	if path=="rt\\uz.exe": return 0

	path2 = getAbs(path)
	#print path2
	if os.path.exists(path2):
		#if file exists but is wrong size, return false
		if size!=None and size!=os.path.getsize(path2):
			#response = raw_input("\nSize of '%s' does not match! Redownload? (y/n)" % path)
			#if (response=="y"): return False
			#else: return True
			return 2
		elif sum!=None and sum.upper()!=hashFile(path2):
			#response = raw_input("\nSum of '%s' does not match! Redownload? (y/n)" % path)
			#if (response=="y"): return False
			#else: return True
			return 3
		else:
			return 0
	else: 
		return 1
		
def checkDir(fullpath):
	fullpathDir = os.path.dirname(fullpath)
	if not os.path.exists(fullpathDir): os.mkdir(fullpathDir)
		
def hashFile(path):
	f = file(path,'rb');
	m = md5.new();
	readBytes = 1024;
	totalBytes = 0;
	while (readBytes):
		readString = f.read(readBytes);
		m.update(readString);
		readBytes = len(readString);
		totalBytes+=readBytes;
	f.close()
	return m.hexdigest().upper()
	
def getAbs(path):
	#return "%s%s%s" % (wd, os.path.sep, path)
	return os.path.join(wd, path)
	
#for arg in sys.argv[1:]:

			
#get releases.list
downloadFile("http://www.autopatcher.com/releases.list", "releases.list")
chooseRelease()

Just put that into filename.py and run it from a command prompt (Requires python to be installed though.)

Edited by andyco, 30 November 2007 - 11:51 AM.


#71 RABC

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 30 November 2007 - 02:29 PM

Brilliant news - welcome back.

#72 Navjot Singh

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 01 December 2007 - 06:53 AM

Just waits at the selection screen...keeps showing Calculating in front of 3 things I selected - engine, win xp 3.3 and office 2007. And then runtime error '0'.

Waiting for a bug free release.

#73 seeker

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 01 December 2007 - 01:02 PM

View PostNavjot Singh, on Dec 1 2007, 01:53 AM, said:

Just waits at the selection screen...keeps showing Calculating in front of 3 things I selected - engine, win xp 3.3 and office 2007. And then runtime error '0'.

Waiting for a bug free release.
I have just about the same issue. Updater starts...if the Engine is selected (I have the newest already) I immediately get runtime Error 0. If I do not select the 'Engine', but only XP Updates and then click 'Next' , the program begins running but after approximately 35 Megs (of a reported 497 megs)just "stops"...

After a few still unsucessful reruns, then APUP won't even start again...no chance to run.! I have to delete any existing MODULES folder (& contents) and then APUP will happily again run! It would appear the (just a guess) a 'prior session' may leave some files incomplete and APUP does not handle that well at all.

As for the (stalling-point 1) I wonder if this is a busy/timing/retry issue related to the MS site just being very busy. etc.

Comments or?
Thanks

#74 EmuKing

    Member

  • Members
  • PipPip
  • 15 posts

Posted 01 December 2007 - 10:04 PM

Renato,

I posted my apup.log in the winxp 32 bit section for your review. Hope it will help with the runtime error.

The entire post is quite long so I will just post the last few lines for you here:

Starting detection routine for item WindowsXP-KB933360-x86-ENU.exe
Looking for file C:\autopatcher\modules\NonCritical\KB933360_xp_x86_enu.apm_files\WindowsXP-KB933360-x86-ENU.exe
MD5 Hash matches (12CEC6227243831CC1679BE3CF2E287A).
Starting detection routine for item WindowsMedia11-KB939683-x86-ENU.exe
Looking for file C:\autopatcher\modules\NonCritical\KB939683_xp_x86_enu.apm_files\WindowsMedia11-KB939683-x86-ENU.exe
MD5 Hash matches (78483F3595BF4B096E2D8E60190EF9EF).
Finished adding downloads. Process queue.
Download queue status: 4 files waiting.


Regards,

King

:)

#75 Cyrus

    AutoPatcher Expert

  • Members
  • PipPipPipPip
  • 254 posts
  • Gender:Male

Posted 03 December 2007 - 06:00 AM

As Rudy has been pointing out recently, all English scripts other than the one for the AP engine (which works for me but gives some a run-time error) seem to be working properly and should be considered "stable" in the near future, then released on the main page to the general public, nut just the early adopters, developers, and alpha/beta testers such as ourselves.

#76 Renato

    Advanced Member

  • Veterans
  • PipPipPip
  • 198 posts
  • Gender:Male
  • Location:Portugal

Posted 03 December 2007 - 12:44 PM

Added a new version. It should reduce the number of Run-time 0.

#77 Cyrus

    AutoPatcher Expert

  • Members
  • PipPipPipPip
  • 254 posts
  • Gender:Male

Posted 03 December 2007 - 10:27 PM

View PostRenato, on Nov 9 2007, 06:32 AM, said:

Ok, here it is the new version that Antonis released. You may download it here.

Edit 6: I've updated now the server with the new file. To see if you have the latest, the details are: size: 720936 bytes, MD5 hash: 7608F84872E2CBB9FA7E21705ADA913C.
After downloading this latest version, I selected the apup 1.0.3 list from the options, but the zip file that it downloads comes from http://www.autopatch...engine/apup.zip, which is not the same one as above. In addition, the version 1.0.3 has a different hash than the one which we download in the first post. What was changed between these two versions? As far as I can tell, they were both created on today (03/11/07).

Edited by Cyrus, 03 December 2007 - 10:41 PM.


#78 Lucas Malor

    Member

  • Members
  • PipPip
  • 10 posts
  • Gender:Male
  • Interests:Very, very, TOO much!

Posted 03 December 2007 - 11:10 PM

A little question: an old Autopatcher backup can be restored or I must download all the patches again?

If so, in a future will be added a restore tool for old backups?

Thanks!

#79 Cyrus

    AutoPatcher Expert

  • Members
  • PipPipPipPip
  • 254 posts
  • Gender:Male

Posted 03 December 2007 - 11:20 PM

This only overwrites the updater, not the updates. Just run it from the same place that you had your old apup.exe file and you should continue from wherever you left off!

#80 Lucas Malor

    Member

  • Members
  • PipPip
  • 10 posts
  • Gender:Male
  • Interests:Very, very, TOO much!

Posted 03 December 2007 - 11:36 PM

View PostCyrus, on Dec 4 2007, 12:20 AM, said:

This only overwrites the updater, not the updates. Just run it from the same place that you had your old apup.exe file and you should continue from wherever you left off!

No, I didn't mean an old backup of the new apup..... I mean an old Autopatcher backup, "pre-Microsoft_pain_in_the_arse" :P How can I "recycle" them?

Edited by Lucas Malor, 03 December 2007 - 11:36 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users