URI's used by roswell are configurable by user.

This commit is contained in:
SANO Masatoshi 2016-04-27 11:56:59 +09:00
parent 18abb38029
commit 18195a4f4e
3 changed files with 9 additions and 7 deletions

View file

@ -32,13 +32,13 @@ AC_CHECK_HEADERS(windows.h)
# Change master uri for sbcl-bin
AC_ARG_WITH([sbcl_bin_base],
[AC_HELP_STRING([--with-sbcl-bin-base=URI],[set URI for sbcl-bin [default=http://prdownloads.sourceforge.net/sbcl/]])],
[SBCL_BIN_URI=$withval],[SBCL_BIN_URI="http://prdownloads.sourceforge.net/sbcl/"])
[AC_HELP_STRING([--with-sbcl-bin-base=URI],[set URI for sbcl-bin [default=http://prdownloads.sourceforge.net/sbcl/platform-table.html]])],
[SBCL_BIN_URI=$withval],[SBCL_BIN_URI="http://prdownloads.sourceforge.net/sbcl/platform-table.html"])
AC_DEFINE_UNQUOTED([SBCL_BIN_URI],["${SBCL_BIN_URI}"],[uri for sbcl master])
AC_ARG_WITH([platformhtml_base],
[AC_HELP_STRING([--with-platformhtml-base=URI],[set URI for platform.html [default=http://www.sbcl.org/]])],
[PLATFORM_HTML_URI=$withval],[PLATFORM_HTML_URI="http://www.sbcl.org/"])
[PLATFORM_HTML_URI=$withval],[PLATFORM_HTML_URI="http://www.sbcl.org/platform-table.html"])
AC_DEFINE_UNQUOTED([PLATFORM_HTML_URI],["${PLATFORM_HTML_URI}"],[uri for platform.html])
AC_ARG_WITH([platformhtml_backup_base],

View file

@ -16,7 +16,7 @@
(or (ros:opt ,downcased)
,uri
(ros:roswell '("roswell-internal-use" "version" ,downcased) :string t))))
(push ,downcased *locations*))))
(push ',name *locations*))))
(defuri clisp-version-uri "http://ftp.gnu.org/pub/gnu/clisp/release/")
(defuri 7za-uri "http://sourceforge.net/projects/sevenzip/files/7-Zip/9.20/7za920.zip/download#")

View file

@ -41,10 +41,11 @@ int sbcl_version_bin(struct install_options* param) {
if(!param->version) {
int ret;
printf("No SBCL version specified. Downloading platform-table.html to see the available versions...\n");
ret=download_simple(PLATFORM_HTML_URI "platform-table.html",platforms_html,0);
char* uri=get_opt("sbcl-bin-version-uri",0);
ret=download_simple(uri?uri:PLATFORM_HTML_URI,platforms_html,0);
if(ret!=0) {
printf("Something wrong! Check the connection or sbcl.org is down. Download failed (Code=%d), tring the backup URL.\n",ret);
ret=download_simple(PLATFORM_HTML_BACKUP_URI"platform-table.html",platforms_html,0);
ret=download_simple(PLATFORM_HTML_BACKUP_URI,platforms_html,0);
}
if(ret!=0) {
printf("Download failed (Code=%d)\n",ret);
@ -65,12 +66,13 @@ int sbcl_bin_download(struct install_options* param) {
int result;
char* home=configdir();
char* arch=arch_(param);
char* uri=get_opt("sbcl-bin-uri",0);
do {
if (!(strcmp(arch, "armhf-linux")))
param->expand_path=cat(home,"src",SLASH,"sbcl","-",param->version,"-","arm-linux",SLASH,NULL);
else
param->expand_path=cat(home,"src",SLASH,"sbcl","-",param->version,"-",arch,SLASH,NULL);
impls_sbcl_bin.uri=cat(SBCL_BIN_URI "sbcl-",param->version,
impls_sbcl_bin.uri=cat(uri?uri:SBCL_BIN_URI ,"sbcl-",param->version,
"-",arch,"-binary",sbcl_bin_extention(param),NULL);
result = download(param);
if(!result) {