File tree Expand file tree Collapse file tree 1 file changed +21
-7
lines changed
Expand file tree Collapse file tree 1 file changed +21
-7
lines changed 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)
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
4246 [(list maj min)
43- (or (and (= maj 2 ) (>= min 15 ))
44- (> maj 2 ))]
47+ (cond
48+ [(and (= maj 2 )
49+ (>= min 15 )) 'ok ]
50+ [(> maj 2 ) 'high ]
51+ [(or (< maj 2 )
52+ (< min 15 )) 'low ])]
4553 [_ #f ]))
4654
55+ (define (nasm-version-2.15+?)
56+ (case (nasm-version-acceptability (nasm-version))
57+ [(ok high) #t ]
58+ [else #f ]))
59+
4760;; -> [Maybe (list Natural Natural)]
4861(define (nasm-version)
4962 (match (nasm-version-string)
5972 (unless v
6073 (error (format nasm-msg
6174 (getenv "PATH " )
62- (if (and (drracket?) (macos?) (launched-with-finder?)) macosx-msg "" ))))
63- (unless (nasm-version-2.15+?)
64- (eprintf "nasm 2.15 or later is recommended; some features 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