Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

application-file-handler no longer works on Windows #245

Closed
default-kramer opened this issue Oct 2, 2021 · 1 comment
Closed

application-file-handler no longer works on Windows #245

default-kramer opened this issue Oct 2, 2021 · 1 comment

Comments

@default-kramer
Copy link

On Windows, the following functionality worked with 7.7 but has since been broken. To reproduce:

Save the following file as afh.rkt

#lang racket/gui

(application-file-handler
 (lambda args
   (println (list "afh was called!" args))))

(println (list "entered afh.rkt" (current-command-line-arguments)))

(module+ main
  (define frame (new frame% [label "afh test"]))
  (send frame show #t))

Now run the following script to create test.exe

#lang racket/base

(require launcher)

(make-gracket-launcher
 (list "full-path-to\\afh.rkt") ; !!! put your path here !!!
 "test.exe"
 '((single-instance? . #t)))

Now from cmd.exe run the following two commands

> test.exe one two
> test.exe three four

On Racket 7.7, a single application is run and produced the following console output:

'("entered afh.rkt" #("one" "two"))
'("afh was called!" (#<path:three>))
'("afh was called!" (#<path:four>))

But on Racket 8.2, the second execution of test.exe seemingly does nothing. The output is only

'("entered afh.rkt" #("one" "two"))

It's very likely that this was broken with 7.8 based on comments of racket/drracket#456

@mflatt
Copy link
Member

mflatt commented Oct 2, 2021

Thanks for helping tracking this down with that example!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants