Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-19-2016, 01:42 PM
superemu
Sarnak
 
Join Date: May 2014
Posts: 79
Default eqemu_update.pl keeps asking if I want to update

I am running eqemu_update.pl to update the quests. But, the process keeps asking me if I want to update specific quests, and I have to type 'yes' and <enter> every time. Can I make it just automatically update all quests?
Reply With Quote
  #2  
Old 07-19-2016, 01:50 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Just hold enter until it's done.

The point is so that it doesn't overwrite custom changes, or you have the option to decide if you want to overwrite
Reply With Quote
  #3  
Old 07-19-2016, 02:25 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

eqemu_update.pl
replace sub quest_files_fetch subroutine with the following:
Code:
sub quest_files_fetch{
	if (!-e "updates_staged/Quests-Plugins-master/quests/") {
		print "\n --- Fetching Latest Quests --- \n";
		get_remote_file("https://github.com/EQEmu/Quests-Plugins/archive/master.zip", "updates_staged/Quests-Plugins-master.zip", 1);
		print "\nFetched latest quests...\n";
		mkdir('updates_staged');
		unzip('updates_staged/Quests-Plugins-master.zip', 'updates_staged/');
	}
	$updateall = false;
	$fc = 0;
	use File::Find;
	use File::Compare;
	
	my @files;
	my $start_dir = "updates_staged/Quests-Plugins-master/quests/";
	find( 
		sub { push @files, $File::Find::name unless -d; }, 
		$start_dir
	);
	for my $file (@files) {
		if($file=~/\.pl|\.lua|\.ext/i){
			$staged_file = $file;
			$dest_file = $file;
			$dest_file =~s/updates_staged\/Quests-Plugins-master\///g;
			
			if (!-e $dest_file) {
				copy_file($staged_file, $dest_file);
				print "Installing :: '" . $dest_file . "'\n";
				$fc++;
			}
			
			else{
				$diff = do_file_diff($dest_file, $staged_file);
				$backup_dest = "updates_backups/" . $time_stamp . "/" . $dest_file;
				if($diff ne ""){
					if ($updateall){
						#::: Make a backup
						copy_file($dest_file, $backup_dest);
						#::: Copy staged to running
						copy($staged_file, $dest_file);
						print "Installing :: '" . $dest_file . "'\n\n";
					}
					else{
						print $diff . "\n";
						print "\nFile Different :: '" . $dest_file . "'\n";
						print "\nDo you wish to update this Quest? '" . $dest_file . "' [Yes (Enter) - No (N) - Update All (A)] \nA backup will be found in '" . $backup_dest . "'\n";
						my $input = <STDIN>;
						if($input=~/Y/i){
							#::: Make a backup
							copy_file($dest_file, $backup_dest);
							#::: Copy staged to running
							copy($staged_file, $dest_file);
							print "Installing :: '" . $dest_file . "'\n\n";
						}
						elsif($input=~/A/i){
							print "\nChoosing this option will overwrite ALL quests different from master (i.e. overwrite custom quests) [Type YES if certain] \n";
							my $input = <STDIN>;
							if($input=~/YES/i){$updateall = true;}
							#::: Make a backup
							copy_file($dest_file, $backup_dest);
							#::: Copy staged to running
							copy($staged_file, $dest_file);
							print "Installing :: '" . $dest_file . "'\n\n";
						}
						else{
						}
					}
				$fc++;
				}
			}
		}
	}
	rmtree('updates_staged');
	if($fc == 0){
		print "\nNo Quest Updates found... \n\n";
	}
}
Not the prettiest thing and I didn't check output (print) syntax format, but, in the case you just want to make a pot of coffee or something while it updates ALL quests files that are different from master (including custom quests by the same name), then there ya go.
Reply With Quote
  #4  
Old 07-19-2016, 03:56 PM
superemu
Sarnak
 
Join Date: May 2014
Posts: 79
Default

Great. Thank you. I just wanted to make sure that I wasn't doing something wrong. Everything else runs so smoothly.
Reply With Quote
  #5  
Old 07-19-2016, 04:15 PM
DanCanDo's Avatar
DanCanDo
Discordant
 
Join Date: May 2016
Location: Above Hell
Posts: 400
Default

If I'm not mistaken, when doing updates for quests, even if you let it overwrite
the custom quests, it backs up your old ones ? I haven't ran that update in
awhile, but I thought it did.
Reply With Quote
  #6  
Old 07-19-2016, 04:18 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Yes, it does, however, it does overwrite the ones that EQEMU uses. Semantics. <grin>
Reply With Quote
  #7  
Old 07-19-2016, 04:25 PM
DanCanDo's Avatar
DanCanDo
Discordant
 
Join Date: May 2016
Location: Above Hell
Posts: 400
Default

Myself, running any updates from that script, I do it from a server test folder first, just to
see what's up before I run it on my main custom server.
Reply With Quote
  #8  
Old 07-19-2016, 04:37 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by DanCanDo View Post
If I'm not mistaken, when doing updates for quests, even if you let it overwrite
the custom quests, it backs up your old ones ? I haven't ran that update in
awhile, but I thought it did.
Yes, after having run custom servers for years myself, I don't want a quest update to overwite something that I have customly put in a zone and have it be gone forever.

You're welcome
Reply With Quote
  #9  
Old 07-19-2016, 05:47 PM
DanCanDo's Avatar
DanCanDo
Discordant
 
Join Date: May 2016
Location: Above Hell
Posts: 400
Default

Quote:
Originally Posted by Akkadius View Post
Yes, after having run custom servers for years myself, I don't want a quest update to overwite something that I have customly put in a zone and have it be gone forever.

You're welcome
Thank You
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:45 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3