lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] MIDI command line option


From: Han-Wen Nienhuys
Subject: Re: [PATCH] MIDI command line option
Date: Thu, 28 Aug 2008 09:55:00 -0300

actuallly the code that does the windows specific stuff right now sits in GUB.



On Wed, Aug 27, 2008 at 9:08 PM, Neil Puttock <address@hidden> wrote:
> 2008/8/6 Neil Puttock <address@hidden>:
>> 2008/8/5 Han-Wen Nienhuys <address@hidden>:
>>> There is also some code in lily.scm that checks for a windows system.
>>> It's easier to add to there rather than the .nsh
>>
>> I've tried setting 'midi-extension here:
>>
>> (case PLATFORM
>>  ((windows)
>>   ;; change midi default for Windows
>>   (ly:set-option 'midi-extension "mid")
>>   (define native-getcwd getcwd)
>>   (define (slashify x)
>>     (if (string-index x #\\)
>>         x
>>         (string-regexp-substitute
>>          "//*" "/"
>>          (string-regexp-substitute "\\\\" "/" x))))
>>   ;; FIXME: this prints a warning.
>>   (define-public (ly-getcwd)
>>     (slashify (native-getcwd))))
>>  (else (define-public ly-getcwd getcwd)))
>>
>> Since I can't check whether this works on Windows, I temporarily moved
>> the option setting to the else clause. Unfortunately, though this
>> overrides the default, setting midi-extension via the command line no
>> longer works.
>
> OK, I've had another look at this.
>
> The command line options using -d are set near the top of the file,
>
>  96 (for-each
>  97  (lambda (x)
>  98    (ly:set-option (car x) (cdr x)))
>  99  (eval-string (ly:command-line-options)))
>
> whereas the entry point code evaluates a Scheme expression using -e.
>
> Can the code which checks for a windows system be moved above the
> command line setting?

Can you change the option init ,


 `(...
    ("midi-extension" ,(if windows "mid" "midi") "the extension of midi files")
    ...
   )


-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]