<commit_before>#lang scheme/base

(require launcher)
(provide post-installer)

(define (post-installer path)
  (define variants (available-mred-variants))
  ;; add a mred-text executable that uses the -z flag (preferring a script)
  (for ([vs '((script-3m 3m) (script-cgc cgc))])
    (let ([v (findf (lambda (v) (memq v variants)) vs)])
      (when v
        (parameterize ([current-launcher-variant v])
          (make-mred-launcher
           '("-z")
           (mred-program-launcher-path "mred-text")
           '([relative? . #t] [subsystem . console] [single-instance? . #f]))))))
  ;; add a bin/mred script under OS X
  (when (eq? 'macosx (system-type))
    (for ([v variants] #:when (memq v '(script-3m script-cgc)))
      (parameterize ([current-launcher-variant v])
        (make-mred-launcher null
                            (mred-program-launcher-path "MrEd")
                            '([exe-name . "MrEd"] [relative? . #t]))))))<commit_msg>avoid full paths to dlls<commit_after>#lang scheme/base

(require launcher)
(provide post-installer)

(define (post-installer path)
  (define variants (available-mred-variants))
  ;; add a mred-text executable that uses the -z flag (preferring a script)
  (for ([vs '((script-3m 3m) (script-cgc cgc))])
    (let ([v (findf (lambda (v) (memq v variants)) vs)])
      (when v
        (parameterize ([current-launcher-variant v])
          (make-mred-launcher
           '("-z")
           (mred-program-launcher-path "mred-text")
           '([relative? . #t] [subsystem . console] [single-instance? . #f]
             ;; the following two are required to avoid using a full path,
             ;; should be removed when `relative?' will imply this
             [framework-root . #f] [dll-dir . #f]))))))
  ;; add a bin/mred script under OS X
  (when (eq? 'macosx (system-type))
    (for ([v variants] #:when (memq v '(script-3m script-cgc)))
      (parameterize ([current-launcher-variant v])
        (make-mred-launcher null
                            (mred-program-launcher-path "MrEd")
                            '([exe-name . "MrEd"] [relative? . #t]
                              [framework-root . #f] [dll-dir . #f]))))))
{'fraction_non_alphanumeric': 0.16025641025641027, 'fraction_numerical': 0.0027472527472527475, 'mean_word_length': 2.3055975794251133, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4792379', 'n_tokens_mistral': 757, 'n_tokens_neox': 715, 'n_words': 198}