Remove automatic GeoIP download from the build scripts.
The database file is now locked behind an account login. https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/
This commit is contained in:
14
Makefile
14
Makefile
@@ -173,30 +173,26 @@ cli-dependencies:
|
||||
@ $(CP_R) thirdparty/download/*.dll.config .
|
||||
@ test -f OpenRA.Game/obj/project.assets.json || $(MSBUILD) -t:restore
|
||||
|
||||
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
|
||||
ifeq ($(WIN32), $(filter $(WIN32),true yes y on 1))
|
||||
@./thirdparty/fetch-thirdparty-deps-windows.sh x86
|
||||
else
|
||||
@./thirdparty/fetch-thirdparty-deps-windows.sh x64
|
||||
endif
|
||||
|
||||
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
|
||||
@@ -387,4 +383,4 @@ help:
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
.PHONY: check-scripts check nunit test all core clean distclean cli-dependencies linux-dependencies linux-native-dependencies windows-dependencies osx-dependencies geoip-dependencies dependencies all-dependencies version install install-linux-shortcuts install-engine install-common-mod-files install-default-mods install-core install-linux-icons install-linux-desktop install-linux-mime install-linux-appdata install-man-page install-linux-scripts uninstall help
|
||||
.PHONY: check-scripts check nunit test all core clean distclean cli-dependencies linux-dependencies linux-native-dependencies windows-dependencies osx-dependencies dependencies all-dependencies version install install-linux-shortcuts install-engine install-common-mod-files install-default-mods install-core install-linux-icons install-linux-desktop install-linux-mime install-linux-appdata install-man-page install-linux-scripts uninstall help
|
||||
|
||||
1
make.ps1
1
make.ps1
@@ -99,7 +99,6 @@ function Dependencies-Command
|
||||
cd thirdparty
|
||||
./fetch-thirdparty-deps.ps1
|
||||
cp download/*.dll ..
|
||||
cp download/GeoLite2-Country.mmdb.gz ..
|
||||
cp download/windows/*.dll ..
|
||||
cd ..
|
||||
Write-Host "Dependencies copied." -ForegroundColor Cyan
|
||||
|
||||
22
thirdparty/fetch-geoip-db.sh
vendored
22
thirdparty/fetch-geoip-db.sh
vendored
@@ -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
|
||||
|
||||
7
thirdparty/fetch-thirdparty-deps.ps1
vendored
7
thirdparty/fetch-thirdparty-deps.ps1
vendored
@@ -104,13 +104,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"))
|
||||
|
||||
Reference in New Issue
Block a user