From b585d9b062e4c6569432da75d1cb97b2f502697f Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 23 May 2020 16:29:04 -0500 Subject: [PATCH] Use wget again for windows [skip ci] --- utils/scripts/eqemu_server.pl | 48 ++++++++++------------------------- 1 file changed, 14 insertions(+), 34 deletions(-) diff --git a/utils/scripts/eqemu_server.pl b/utils/scripts/eqemu_server.pl index d3081d580..86b108ecc 100755 --- a/utils/scripts/eqemu_server.pl +++ b/utils/scripts/eqemu_server.pl @@ -84,6 +84,7 @@ if (-d "bin") { ############################################# # run routines ############################################# +get_windows_wget(); check_xml_to_json_conversion() if $ARGV[0] eq "convert_xml"; do_self_update_check_routine() if !$skip_self_update_check; get_perl_version(); @@ -699,6 +700,16 @@ sub get_perl_version no warnings; } +sub get_windows_wget { + if (!-e "wget.exe" && $OS eq "Windows") { + eval "use LWP::Simple qw(getstore);"; + if (!-d "bin") { + mkdir("bin"); + } + getstore("https://raw.githubusercontent.com/Akkadius/eqemu-install-v2/master/windows/wget.exe", "bin/wget.exe"); + } +} + sub do_self_update_check_routine { @@ -1048,10 +1059,6 @@ sub show_menu_prompt fetch_latest_windows_appveyor(); $dc = 1; } - elsif ($input eq "windows_server_download_bots") { - fetch_latest_windows_binaries_bots(); - $dc = 1; - } elsif ($input eq "windows_server_latest_bots") { fetch_latest_windows_appveyor_bots(); $dc = 1; @@ -1626,13 +1633,13 @@ sub fetch_latest_windows_binaries 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", + get_remote_file("https://ci.appveyor.com/api/projects/KimLS/server-87crp/artifacts/build_x64.zip", + "updates_staged/eqemu-x64-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/'); + unzip('updates_staged/eqemu-x64-bots.zip', 'updates_staged/binaries/'); my @files; my $start_dir = "updates_staged/binaries"; find( @@ -1650,33 +1657,6 @@ sub fetch_latest_windows_appveyor_bots 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/master_windows_build_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 "[Install] Installing [" . $bin_dir . $destination_file . "]\n"; - copy_file($file, $bin_dir . $destination_file); - } - print "[Update] Done...\n"; - - rmtree('updates_staged'); -} - sub do_windows_login_server_setup { print "[Install] Pulling down Loginserver database tables...\n";