diff --git a/words/app.icns b/words/app.icns new file mode 100644 index 0000000..1e73b62 Binary files /dev/null and b/words/app.icns differ diff --git a/words/app.ico b/words/app.ico new file mode 100644 index 0000000..65362b3 Binary files /dev/null and b/words/app.ico differ diff --git a/words/app.png b/words/app.png new file mode 100644 index 0000000..b784aef Binary files /dev/null and b/words/app.png differ diff --git a/words/info.rkt b/words/info.rkt index 39946a9..29f77b8 100644 --- a/words/info.rkt +++ b/words/info.rkt @@ -2,6 +2,7 @@ (define post-install-collection "index.rkt") (define raco-commands '(("words" (submod words/command raco) "issue words command" #f))) +(define compile-omit-paths '("make-icons.rkt")) (define gracket-launcher-names '("Words")) (define gracket-launcher-libraries '("app.rkt")) \ No newline at end of file diff --git a/words/make-icons.rkt b/words/make-icons.rkt new file mode 100644 index 0000000..e5ff1c9 --- /dev/null +++ b/words/make-icons.rkt @@ -0,0 +1,21 @@ +#lang br +(require pict pict/convert racket/draw icns file/ico) + +(define (make-icon-pict size) + (unsafe-dc (λ (dc dx dy) + (send dc set-text-foreground "slategray") + (send dc set-text-background "darkslategray") + (send dc set-font (make-font #:size size + #:face "Equity Text A")) + (send dc draw-text "W" (/ size 40) (- (/ size 10)))) + size size)) + +(send (pict->bitmap (make-icon-pict 96)) save-file "app.png" 'png) + +(with-output-to-file "app.icns" + (λ () (void (write-bytes (pict->icns-bytes (make-icon-pict 1024))))) + #:exists 'replace) + +(write-icos (for/list ([size '(16 32 48 256)]) + (argb->ico size size (pict->argb-pixels (make-icon-pict size)))) "app.ico" + #:exists 'replace) \ No newline at end of file