From d7c110041a82dfead51c2e781d6a3650670bc278 Mon Sep 17 00:00:00 2001 From: Uleat Date: Thu, 27 Jun 2019 21:08:08 -0400 Subject: [PATCH] Added full support in eqemu_server.pl for downloading both stable and unstable bots binaries --- utils/scripts/eqemu_server.pl | 40 +++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/utils/scripts/eqemu_server.pl b/utils/scripts/eqemu_server.pl index bd17ad435..576c90397 100644 --- a/utils/scripts/eqemu_server.pl +++ b/utils/scripts/eqemu_server.pl @@ -812,7 +812,8 @@ sub show_menu_prompt { print ">>> Windows\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 " [windows_server_download_bots] Updates server (bots) via latest 'stable'\n"; + print " [windows_server_latest_bots] Updates server (bots) via latest commit 'unstable'\n"; print " [fetch_dlls] Grabs dll's needed to run windows binaries\n"; print " [setup_loginserver] Sets up loginserver for Windows\n"; } @@ -876,6 +877,10 @@ sub show_menu_prompt { fetch_latest_windows_binaries_bots(); $dc = 1; } + elsif ($input eq "windows_server_latest_bots") { + fetch_latest_windows_appveyor_bots(); + $dc = 1; + } elsif ($input eq "fetch_dlls") { fetch_server_dlls(); $dc = 1; @@ -1400,14 +1405,37 @@ sub fetch_latest_windows_binaries { rmtree('updates_staged'); } -sub fetch_latest_windows_binaries_bots { - print "[Update] Fetching Latest Windows Binaries (unstable) with Bots...\n"; +sub fetch_latest_windows_appveyor_bots { + print "[Update] Fetching Latest Windows Binaries with Bots (unstable) from Appveyor... \n"; get_remote_file("https://ci.appveyor.com/api/projects/KimLS/server/artifacts/eqemu-x86-bots.zip", "updates_staged/eqemu-x86-bots.zip", 1); - #::: old repository kept for reference until no issues reported - #::: get_remote_file($install_repository_request_url . "master_windows_build_bots.zip", "updates_staged/master_windows_build_bots.zip", 1); + + print "[Update] Fetched Latest Windows Binaries (unstable) from Appveyor... \n"; + print "[Update] Extracting... --- \n"; + unzip('updates_staged/eqemu-x86-bots.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_bots { + print "[Update] Fetching Latest Windows Binaries with Bots...\n"; + get_remote_file($install_repository_request_url . "master_windows_build_bots.zip", "updates_staged/master_windows_build_bots.zip", 1); + print "[Update] Fetched Latest Windows Binaries with Bots...\n"; print "[Update] Extracting...\n"; - unzip('updates_staged/eqemu-x86-bots.zip', 'updates_staged/binaries/'); + unzip('updates_staged/master_windows_build_bots.zip', 'updates_staged/binaries/'); my @files; my $start_dir = "updates_staged/binaries"; find(