diff --git a/utils/scripts/eqemu_server.pl b/utils/scripts/eqemu_server.pl index dd0448ddc..16c592187 100644 --- a/utils/scripts/eqemu_server.pl +++ b/utils/scripts/eqemu_server.pl @@ -43,8 +43,12 @@ if($Config{osname}=~/Win|MS/i){ $has_internet_connection = check_internet_connection(); ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(); +if(-e "eqemu_server_skip_update.txt"){ + $skip_self_update_check = 1; +} + #::: Check for script self update -do_self_update_check_routine(); +do_self_update_check_routine() if !$skip_self_update_check; get_perl_version(); read_eqemu_config_xml(); get_mysql_path(); @@ -558,6 +562,7 @@ sub do_self_update_check_routine { } unlink("updates_staged/eqemu_server.pl"); + unlink("updates_staged"); } } @@ -720,13 +725,14 @@ sub show_menu_prompt { print " [utility_scripts] Download utility scripts to run and operate the EQEmu Server\n"; if($OS eq "Windows"){ print ">>> Windows\n"; - print " [windows_server_download] Updates server code from latest stable\n"; - print " [windows_server_download_bots] Updates server code (bots enabled) from latest\n"; + print " [windows_server_download] Updates server via latest 'stable' code\n"; + print " [windows_server_latest] Updates server via latest commit 'unstable'\n"; + print " [windows_server_download_bots] Updates server (bots) from latest 'stable'\n"; print " [fetch_dlls] Grabs dll's needed to run windows binaries\n"; print " [setup_loginserver] Sets up loginserver for Windows\n"; } print " \n> main - go back to main menu\n"; - print "Enter a command #> "; + print "Enter a command #> "; $last_menu = trim($input); } elsif($input eq "backup_database"){ database_dump(); $dc = 1; } @@ -741,6 +747,7 @@ sub show_menu_prompt { elsif($input eq "quests"){ quest_files_fetch(); $dc = 1; } elsif($input eq "lua_modules"){ lua_modules_fetch(); $dc = 1; } elsif($input eq "windows_server_download"){ fetch_latest_windows_binaries(); $dc = 1; } + elsif($input eq "windows_server_latest"){ fetch_latest_windows_appveyor(); $dc = 1; } elsif($input eq "windows_server_download_bots"){ fetch_latest_windows_binaries_bots(); $dc = 1; } elsif($input eq "fetch_dlls"){ fetch_server_dlls(); $dc = 1; } elsif($input eq "utility_scripts"){ fetch_utility_scripts(); $dc = 1; } @@ -1205,6 +1212,29 @@ sub copy_file { copy $l_source_file, $l_destination_file; } +sub fetch_latest_windows_appveyor { + print "[Update] Fetching Latest Windows Binaries (unstable) from Appveyor... \n"; + get_remote_file("https://ci.appveyor.com/api/projects/KimLS/server/artifacts/build_x86.zip", "updates_staged/master_windows_build.zip", 1); + print "[Update] Fetched Latest Windows Binaries (unstable) from Appveyor... \n"; + print "[Update] Extracting... --- \n"; + unzip('updates_staged/master_windows_build.zip', 'updates_staged/binaries/'); + my @files; + my $start_dir = "updates_staged/binaries"; + find( + sub { push @files, $File::Find::name unless -d; }, + $start_dir + ); + for my $file (@files) { + $destination_file = $file; + $destination_file =~s/updates_staged\/binaries\///g; + print "[Update] Installing :: " . $destination_file . "\n"; + copy_file($file, $destination_file); + } + print "[Update] Done\n"; + + rmtree('updates_staged'); +} + sub fetch_latest_windows_binaries { print "[Update] Fetching Latest Windows Binaries... \n"; get_remote_file($install_repository_request_url . "master_windows_build.zip", "updates_staged/master_windows_build.zip", 1);