From 7fa6c4fe89803ce95895898f0d4441805bbd9100 Mon Sep 17 00:00:00 2001 From: Arlett Grygar Date: Mon, 30 Dec 2024 23:47:13 +0100 Subject: [PATCH] windows includes angepasst --- all_base_includes.ly | 8 +++++++- scm/yaml_parser.scm | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/all_base_includes.ly b/all_base_includes.ly index b71665d..0e5db7d 100644 --- a/all_base_includes.ly +++ b/all_base_includes.ly @@ -1,7 +1,13 @@ #(define noStandaloneOutput (if (defined? 'noStandaloneOutput) noStandaloneOutput #f)) +#(define windows? (string-prefix-ci? "windows" (utsname:sysname (uname)))) + #(if (defined? 'LAYOUT) #f - (let ((scmdir (string-append (dirname (current-filename)) file-name-separator-string "scm" file-name-separator-string))) + (let ((scmdir + (if windows? + (string-append "scm" file-name-separator-string) + (string-append (dirname (current-filename)) file-name-separator-string "scm" file-name-separator-string) + ))) (load (string-append scmdir "json_parser.scm")) (load (string-append scmdir "resolve_inherits.scm")) (load (string-append scmdir "yaml_parser.scm")))) diff --git a/scm/yaml_parser.scm b/scm/yaml_parser.scm index 6ecae50..432ba04 100644 --- a/scm/yaml_parser.scm +++ b/scm/yaml_parser.scm @@ -2,7 +2,7 @@ (define (yml-file->scm filename) (let* ((python_cmd (string-append "import sys, yaml, json; print(json.dumps(yaml.safe_load(open('" filename "'))))")) - (pipe (open-pipe* OPEN_READ "python3" "-c" python_cmd)) + (pipe (open-pipe* OPEN_READ (if windows? "py" "python3") "-X" "utf8" "-c" python_cmd)) (json (get-string-all pipe))) (close-pipe pipe) (json-string->scm json)))