File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737 (and (system "nasm -v " )
3838 (get-output-string (current-output-port)))))
3939
40- (define (nasm-version-2.15+?)
41- (match (nasm-version)
42- [(list maj min) (and (>= maj 2 ) (>= min 15 ))]
40+ ;; 'low => [0.00, 2.15)
41+ ;; 'ok => [2.15, 3.00)
42+ ;; 'high => [3.00, ----)
43+ ;; #f => no nasm found
44+ (define (nasm-version-acceptability ver)
45+ (match ver
46+ [(list maj min)
47+ (cond
48+ [(and (= maj 2 )
49+ (>= min 15 )) 'ok ]
50+ [(> maj 2 ) 'high ]
51+ [(or (< maj 2 )
52+ (< min 15 )) 'low ])]
4353 [_ #f ]))
4454
55+ (define (nasm-version-2.15+?)
56+ (case (nasm-version-acceptability (nasm-version))
57+ [(ok high) #t ]
58+ [else #f ]))
59+
4560;; -> [Maybe (list Natural Natural)]
4661(define (nasm-version)
4762 (match (nasm-version-string)
5772 (unless v
5873 (error (format nasm-msg
5974 (getenv "PATH " )
60- (if (and (drracket?) (macos?) (launched-with-finder?)) macosx-msg "" ))))
61- (unless (nasm-version-2.15+?)
62- (eprintf "nasm 2.15 or later is recommended; some faatures may not work as expected.\n " )))
75+ (if (and (drracket?) (macos?) (launched-with-finder?)) macosx-msg "" ))))
76+ (case (nasm-version-acceptability v)
77+ [(high) (when (macos?) (eprintf "nasm 3.x is not recommended on macOS; please install nasm 2.15+\n " ))]
78+ [(low) (eprintf "nasm 2.15 or later is recommended; some features may not work as expected.\n " )]))
You can’t perform that action at this time.
0 commit comments