From 0d2f3b2e2974e49908e8212816da99a7347c8b0d Mon Sep 17 00:00:00 2001 From: Mustafa Alperen Seki Date: Thu, 26 Mar 2020 20:09:07 +0300 Subject: [PATCH] Remove GeoIP stuff. --- Makefile | 13 ++++--------- make.ps1 | 1 - packaging/windows/OpenRA.nsi | 2 -- thirdparty/fetch-geoip-db.sh | 22 ---------------------- thirdparty/fetch-thirdparty-deps-osx.sh | 2 +- thirdparty/fetch-thirdparty-deps.ps1 | 7 ------- 6 files changed, 5 insertions(+), 42 deletions(-) delete mode 100755 thirdparty/fetch-geoip-db.sh diff --git a/Makefile b/Makefile index e4211ba49460..8276cd2d0c9d 100644 --- a/Makefile +++ b/Makefile @@ -302,26 +302,22 @@ cli-dependencies: @ $(CP_R) thirdparty/download/*.dll . @ $(CP_R) thirdparty/download/*.dll.config . -linux-dependencies: cli-dependencies geoip-dependencies linux-native-dependencies +linux-dependencies: cli-dependencies linux-native-dependencies linux-native-dependencies: @./thirdparty/configure-native-deps.sh -windows-dependencies: cli-dependencies geoip-dependencies +windows-dependencies: cli-dependencies @./thirdparty/fetch-thirdparty-deps-windows.sh -osx-dependencies: cli-dependencies geoip-dependencies +osx-dependencies: cli-dependencies @./thirdparty/fetch-thirdparty-deps-osx.sh @ $(CP_R) thirdparty/download/osx/*.dylib . @ $(CP_R) thirdparty/download/osx/*.dll.config . -geoip-dependencies: - @./thirdparty/fetch-geoip-db.sh - @ $(CP) thirdparty/download/GeoLite2-Country.mmdb.gz . - dependencies: $(os-dependencies) -all-dependencies: cli-dependencies windows-dependencies osx-dependencies geoip-dependencies +all-dependencies: cli-dependencies windows-dependencies osx-dependencies version: VERSION mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/ts/mod.yaml mods/modcontent/mod.yaml mods/all/mod.yaml @echo "$(VERSION)" > VERSION @@ -343,7 +339,6 @@ install-engine: @$(INSTALL_DIR) "$(DATA_INSTALL_DIR)" @$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) "$(DATA_INSTALL_DIR)" - @$(INSTALL_DATA) "GeoLite2-Country.mmdb.gz" "$(DATA_INSTALL_DIR)/GeoLite2-Country.mmdb.gz" @$(INSTALL_DATA) VERSION "$(DATA_INSTALL_DIR)/VERSION" @$(INSTALL_DATA) AUTHORS "$(DATA_INSTALL_DIR)/AUTHORS" @$(INSTALL_DATA) COPYING "$(DATA_INSTALL_DIR)/COPYING" diff --git a/make.ps1 b/make.ps1 index 62e0d0427b90..ca52c5fbf0d4 100644 --- a/make.ps1 +++ b/make.ps1 @@ -106,7 +106,6 @@ function Dependencies-Command cd thirdparty ./fetch-thirdparty-deps.ps1 cp download/*.dll .. - cp download/GeoLite2-Country.mmdb.gz .. cp download/windows/*.dll .. cd .. echo "Dependencies copied." diff --git a/packaging/windows/OpenRA.nsi b/packaging/windows/OpenRA.nsi index b006e9b73fdf..e9e8fcf7f451 100644 --- a/packaging/windows/OpenRA.nsi +++ b/packaging/windows/OpenRA.nsi @@ -120,7 +120,6 @@ Section "Game" GAME File "${SRCDIR}\OpenAL-CS.dll" File "${SRCDIR}\global mix database.dat" File "${SRCDIR}\MaxMind.Db.dll" - File "${SRCDIR}\GeoLite2-Country.mmdb.gz" File "${SRCDIR}\eluant.dll" File "${SRCDIR}\rix0rrr.BeaconLib.dll" File "${DEPSDIR}\soft_oal.dll" @@ -242,7 +241,6 @@ Function ${UN}Clean Delete $INSTDIR\Dune2000.ico Delete "$INSTDIR\global mix database.dat" Delete $INSTDIR\MaxMind.Db.dll - Delete $INSTDIR\GeoLite2-Country.mmdb.gz Delete $INSTDIR\KopiLua.dll Delete $INSTDIR\soft_oal.dll Delete $INSTDIR\SDL2.dll diff --git a/thirdparty/fetch-geoip-db.sh b/thirdparty/fetch-geoip-db.sh deleted file mode 100755 index 9166daa7124b..000000000000 --- a/thirdparty/fetch-geoip-db.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# Die on any error for Travis CI to automatically retry: -set -e - -download_dir="${0%/*}/download" -mkdir -p "${download_dir}" -cd "${download_dir}" || exit 1 - -filename="GeoLite2-Country.mmdb.gz" - -# Database does not exist or is older than 30 days. -if [ ! -e $filename ] || [ -n "$(find . -name $filename -mtime +30 -print)" ]; then - rm -f $filename - echo "Updating GeoIP country database from MaxMind." - if command -v curl >/dev/null 2>&1; then - curl -s -L -O http://geolite.maxmind.com/download/geoip/database/$filename - else - wget -cq http://geolite.maxmind.com/download/geoip/database/$filename - fi -fi - diff --git a/thirdparty/fetch-thirdparty-deps-osx.sh b/thirdparty/fetch-thirdparty-deps-osx.sh index 9c5f9e7eac8a..b5e8dce27e71 100755 --- a/thirdparty/fetch-thirdparty-deps-osx.sh +++ b/thirdparty/fetch-thirdparty-deps-osx.sh @@ -1,6 +1,6 @@ #!/bin/bash -LAUNCHER_TAG="osx-launcher-20171118" +LAUNCHER_TAG="osx-launcher-20181118" download_dir="${0%/*}/download/osx" mkdir -p "$download_dir" diff --git a/thirdparty/fetch-thirdparty-deps.ps1 b/thirdparty/fetch-thirdparty-deps.ps1 index 50beafce6266..d884a8cf411f 100644 --- a/thirdparty/fetch-thirdparty-deps.ps1 +++ b/thirdparty/fetch-thirdparty-deps.ps1 @@ -130,13 +130,6 @@ if (!(Test-Path "rix0rrr.BeaconLib.dll")) rmdir rix0rrr.BeaconLib -Recurse } -if (!(Test-Path "GeoLite2-Country.mmdb.gz") -Or (((get-date) - (get-item "GeoLite2-Country.mmdb.gz").LastWriteTime) -gt (new-timespan -days 30))) -{ - echo "Updating GeoIP country database from MaxMind." - $target = Join-Path $pwd.ToString() "GeoLite2-Country.mmdb.gz" - (New-Object System.Net.WebClient).DownloadFile("http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz", $target) -} - [Net.ServicePointManager]::SecurityProtocol = 'Tls12' if (!(Test-Path "SDL2-CS.dll"))