comparison R/scratch/installation.R @ 0:0cfcc391201f

initial from svn dyncall-1745
author Daniel Adler
date Thu, 19 Mar 2015 22:26:28 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:0cfcc391201f
1
2 # -----------------------------------------------------------------------------
3 # dynport configuration
4 .installdir <- "c:\\dynports"
5 # -----------------------------------------------------------------------------
6
7 # installation:
8 .libname <- "SDL"
9 .sysname <- Sys.info()[["sysname"]]
10 if (.sysname == "Windows") {
11
12 dynports.ui.init <- function()
13 {
14 winMenuAdd("Dynports")
15 winMenuAdd("Dynports/Install dynport(s) ...")
16 }
17
18
19 dynport.sdl.is.installed <- function() {
20 x <- .dynload(.libname)
21 if (is.null(x)) return(FALSE)
22 return(TRUE)
23 }
24
25 dynport.sdl.install <- function() {
26
27 sysname <- Sys.info()[["sysname"]]
28
29 .prebuilt <- c(
30 Windows.zip="http://www.libsdl.org/release/SDL-1.2.13-win32.zip",
31 Linux.rpm.x86="http://www.libsdl.org/release/SDL-1.2.13-1.i386.rpm",
32 Linux.rpm.x86_64="http://www.libsdl.org/release/SDL-1.2.13-1.x86_64.rpm",
33 MacOSX="http://www.libsdl.org/release/SDL-1.2.13.dmg"
34 )
35
36 if (sysname == "Windows") {
37
38 # install.windows.zip to .dyncall.bindir
39
40 package <- "SDL"
41 version <- "1.2.13"
42 arch <- "win32"
43 rooturl <- "http://www.libsdl.org/release/"
44 zipname <- "SDL-1.2.13-win32.zip"
45 tempdir <- tempdir()
46 zipfile <- file.path( tempdir, zipname )
47 url <- paste( rooturl , zipname, sep="/" )
48 method <- "internal"
49 download.file(url, zipfile, method)
50 zip.unpack( zipfile, tempdir )
51 dllname <- "SDL.dll"
52 dllfile <- file.path( tempdir, dllname )
53 file.copy(dllfile, .installdir)
54
55 } else if (sysname == "Linux") {
56
57
58
59 } else if (sysname == "Darwin") {
60
61
62
63 }
64
65 }
66
67
68