Loris  Check-in [a57ef3a1be]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Recognise running from csi with an absolute path.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a57ef3a1be5a4563a34e78e5c2e3437fcf2f8134
User & Date: jesper 2016-04-18 18:18:14
Context
2016-04-18
18:27
Some fixes for getting a program-internal-name. check-in: 62e183d81d user: jesper tags: trunk
18:18
Recognise running from csi with an absolute path. check-in: a57ef3a1be user: jesper tags: trunk
18:15
unbreak alist-ref check-in: 4fa5bfe6f1 user: jesper tags: trunk
Changes

Changes to platform.scm.

17
18
19
20
21
22
23

24
25
26
27
28
29
30
...
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
(define-library (loris platform)
  (import (scheme base)
          (scheme char)		; XXX: "not unicode-aware" / r7rs egg ref
          (scheme process-context)
          (scheme file)
          (scheme process-context)
          (srfi 1)

          (loris convenience)
          (loris output)
          (prefix (loris version) version:)

          ;; XXX: Chicken-specific
          (only (posix) process process-wait ; used here, not exported
                file-modification-time file-link current-directory) ; reexported only
................................................................................

    (define (make-platform program-internal-name)
      (let* ((nix/win (lambda (nix win)
                        (if (eq? (software-type) 'windows)
                            win
                            nix)))
             (program-filename (let ((actual (program-name)))
                                 (if (equal? "csi" actual) program-internal-name actual)))
             (program-env-var-name (string-map (lambda (c) (if (char=? #\- c) #\_ (char-upcase c)))
                                               program-filename))
             (home-dir (nix/win (get-environment-variable "HOME")
                                (get-environment-variable "HOMEPATH")))
             (user-conf-dir (nix/win (get-environment-variable "HOME")
                                     (get-environment-variable "APPDATA")))
             (user-data-dir (platform-dir-slashes (conc user-conf-dir "/" (nix/win







>







 







|







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
...
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
(define-library (loris platform)
  (import (scheme base)
          (scheme char)		; XXX: "not unicode-aware" / r7rs egg ref
          (scheme process-context)
          (scheme file)
          (scheme process-context)
          (srfi 1)
          (srfi 13)
          (loris convenience)
          (loris output)
          (prefix (loris version) version:)

          ;; XXX: Chicken-specific
          (only (posix) process process-wait ; used here, not exported
                file-modification-time file-link current-directory) ; reexported only
................................................................................

    (define (make-platform program-internal-name)
      (let* ((nix/win (lambda (nix win)
                        (if (eq? (software-type) 'windows)
                            win
                            nix)))
             (program-filename (let ((actual (program-name)))
                                 (if (string-suffix? "/csi" actual) program-internal-name actual)))
             (program-env-var-name (string-map (lambda (c) (if (char=? #\- c) #\_ (char-upcase c)))
                                               program-filename))
             (home-dir (nix/win (get-environment-variable "HOME")
                                (get-environment-variable "HOMEPATH")))
             (user-conf-dir (nix/win (get-environment-variable "HOME")
                                     (get-environment-variable "APPDATA")))
             (user-data-dir (platform-dir-slashes (conc user-conf-dir "/" (nix/win