Expanded mirroring script to all dependencies, added new mirror (mirumu.jp) and updated download scripts.
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
|
||||
install_ra_packages() {
|
||||
wget http://open-ra.org/packages/ra-packages.php
|
||||
wget "http://open-ra.org/get-dependency.php?file=ra"
|
||||
mkdir -p $pkgdir/usr/share/openra/mods/ra/packages
|
||||
unzip ra-packages.zip -d $pkgdir/usr/share/openra/mods/ra/packages
|
||||
rm ra-packages.zip
|
||||
}
|
||||
|
||||
install_cnc_packages() {
|
||||
wget http://open-ra.org/packages/cnc-packages.php
|
||||
wget "http://open-ra.org/get-dependency.php?file=cnc"
|
||||
mkdir -p $pkgdir/usr/share/openra/mods/cnc/packages
|
||||
unzip cnc-packages.zip -d $pkgdir/usr/share/openra/mods/cnc/packages
|
||||
rm cnc-packages.zip
|
||||
|
||||
@@ -35,7 +35,7 @@ do
|
||||
case $REPLY in
|
||||
y|Y|"")
|
||||
pushd /tmp/
|
||||
wget http://open-ra.org/packages/ra-packages.php
|
||||
wget "http://open-ra.org/get-dependency.php?file=ra"
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/openra/mods/ra/packages
|
||||
unzip ra-packages.zip -d $RPM_BUILD_ROOT/usr/share/openra/mods/ra/packages
|
||||
rm ra-packages.zip
|
||||
@@ -52,7 +52,7 @@ do
|
||||
case $REPLY in
|
||||
y|Y|"")
|
||||
pushd /tmp/
|
||||
wget http://open-ra.org/packages/cnc-packages.php
|
||||
wget "http://open-ra.org/get-dependency.php?file=cnc"
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/openra/mods/cnc/packages
|
||||
unzip ra-packages.zip -d $RPM_BUILD_ROOT/usr/share/openra/mods/cnc/packages
|
||||
rm ra-packages.zip
|
||||
|
||||
@@ -19,11 +19,11 @@ SUPPORT_PATH=~/Library/"Application Support"/OpenRA
|
||||
|
||||
# Downloadable content
|
||||
DEPS_PACKAGE="osx-deps-v2.zip"
|
||||
DEPS_URL="http://open-ra.org/releases/mac/osx-deps-v2.zip"
|
||||
DEPS_URL="http://open-ra.org/get-dependency.php?file=osx"
|
||||
RA_PACKAGE="ra-packages.zip"
|
||||
RA_URL="http://open-ra.org/packages/ra-packages.php"
|
||||
RA_URL="http://open-ra.org/get-dependency.php?file=ra"
|
||||
CNC_PACKAGE="cnc-packages.zip"
|
||||
CNC_URL="http://open-ra.org/packages/cnc-packages.php"
|
||||
CNC_URL="http://open-ra.org/get-dependency.php?file=cnc"
|
||||
|
||||
cd "$EXE_PATH"
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ SectionGroup /e "Mods"
|
||||
IfFileExists "$INSTDIR\mods\ra\packages\redalert.mix" done dlcontent
|
||||
dlcontent:
|
||||
SetOutPath "$OUTDIR\packages"
|
||||
NSISdl::download http://open-ra.org/packages/ra-packages.php ra-packages.zip
|
||||
NSISdl::download "http://open-ra.org/get-dependency.php?file=ra" ra-packages.zip
|
||||
Pop $R0
|
||||
StrCmp $R0 "success" +2
|
||||
Abort
|
||||
@@ -126,7 +126,7 @@ SectionGroup /e "Mods"
|
||||
IfFileExists "$INSTDIR\mods\cnc\packages\conquer.mix" done dlcontent
|
||||
dlcontent:
|
||||
SetOutPath "$OUTDIR\packages"
|
||||
NSISdl::download http://open-ra.org/packages/cnc-packages.php cnc-packages.zip
|
||||
NSISdl::download "http://open-ra.org/get-dependency.php?file=cnc" cnc-packages.zip
|
||||
Pop $R0
|
||||
StrCmp $R0 "success" +2
|
||||
Abort
|
||||
@@ -169,7 +169,7 @@ Section "-Freetype" Freetype
|
||||
SetOutPath "$TEMP"
|
||||
IfFileExists $INSTDIR\zlib1.dll done installfreetype
|
||||
installfreetype:
|
||||
NSISdl::download http://www.open-ra.org/releases/windows/freetype-zlib.zip freetype-zlib.zip
|
||||
NSISdl::download "http://open-ra.org/get-dependency.php?file=freetype" freetype-zlib.zip
|
||||
Pop $R0
|
||||
StrCmp $R0 "success" +2
|
||||
Abort
|
||||
@@ -182,7 +182,7 @@ Section "-Cg" Cg
|
||||
SetOutPath "$TEMP"
|
||||
IfFileExists $INSTDIR\cg.dll done installcg
|
||||
installcg:
|
||||
NSISdl::download http://www.open-ra.org/releases/windows/cg-win32.zip cg-win32.zip
|
||||
NSISdl::download "http://open-ra.org/get-dependency.php?file=cg" cg-win32.zip
|
||||
Pop $R0
|
||||
StrCmp $R0 "success" +2
|
||||
Abort
|
||||
|
||||
30
web/get-dependency.php
Normal file
30
web/get-dependency.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
$mirrors_file = "";
|
||||
switch ($_GET["file"])
|
||||
{
|
||||
case "ra":
|
||||
$mirrors_file = "packages/ra-mirrors.txt";
|
||||
break;
|
||||
case "cnc":
|
||||
$mirrors_file = "packages/cnc-mirrors.txt";
|
||||
break;
|
||||
case "osx":
|
||||
$mirrors_file = "releases/mac/osx-dependencies-mirrors.txt";
|
||||
break;
|
||||
case "freetype":
|
||||
$mirrors_file = "releases/windows/freetype-mirrors.txt";
|
||||
break;
|
||||
case "cg":
|
||||
$mirrors_file = "releases/windows/cg-mirrors.txt";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
$mirrors = file_get_contents($mirrors_file);
|
||||
$mirrors_array = explode("\n", $mirrors);
|
||||
|
||||
$mirror = $mirrors_array[array_rand($mirrors_array, 1)];
|
||||
|
||||
header('Location: '. $mirror);
|
||||
?>
|
||||
@@ -1,3 +1,4 @@
|
||||
http://metahash.com/packages/cnc-packages.zip
|
||||
http://openra.res0l.net/packages/cnc-packages.zip
|
||||
http://open-ra.org/packages/cnc-packages.zip
|
||||
http://mirumu.jp/pub/packages/cnc-packages.zip
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<?php
|
||||
$mirrors = file_get_contents("cnc-mirrors.txt");
|
||||
$mirrors_array = explode("\n", $mirrors);
|
||||
|
||||
$mirror = $mirrors_array[array_rand($mirrors_array, 1)];
|
||||
|
||||
header('Location: '. $mirror);
|
||||
?>
|
||||
@@ -1,3 +1,4 @@
|
||||
http://metahash.com/packages/ra-packages.zip
|
||||
http://openra.res0l.net/packages/ra-packages.zip
|
||||
http://open-ra.org/packages/ra-packages.zip
|
||||
http://mirumu.jp/pub/packages/ra-packages.zip
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<?php
|
||||
$mirrors = file_get_contents("ra-mirrors.txt");
|
||||
$mirrors_array = explode("\n", $mirrors);
|
||||
|
||||
$mirror = $mirrors_array[array_rand($mirrors_array, 1)];
|
||||
|
||||
header('Location: '. $mirror);
|
||||
?>
|
||||
4
web/releases/mac/osx-dependencies-mirrors.txt
Normal file
4
web/releases/mac/osx-dependencies-mirrors.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
http://open-ra.org/releases/mac/osx-deps-v2.zip
|
||||
http://openra.res0l.net/releases/mac/osx-deps-v2.zip
|
||||
http://metahash.com/releases/mac/osx-deps-v2.zip
|
||||
http://mirumu.jp/pub/releases/mac/osx-deps-v2.zip
|
||||
4
web/releases/windows/cg-mirrors.txt
Normal file
4
web/releases/windows/cg-mirrors.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
http://open-ra.org/releases/windows/cg-win32.zip
|
||||
http://openra.res0l.net/releases/windows/cg-win32.zip
|
||||
http://metahash.com/releases/windows/cg-win32.zip
|
||||
http://mirumu.jp/pub/releases/windows/cg-win32.zip
|
||||
4
web/releases/windows/freetype-mirrors.txt
Normal file
4
web/releases/windows/freetype-mirrors.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
http://open-ra.org/releases/windows/freetype-zlib.zip
|
||||
http://openra.res0l.net/releases/windows/freetype-zlib.zip
|
||||
http://metahash.com/releases/windows/freetype-zlib.zip
|
||||
http://mirumu.jp/pub/releases/windows/freetype-zlib.zip
|
||||
Reference in New Issue
Block a user