Re: [racket-users] raco distribute help

2018-02-05 Thread Dmitry Pavlov
Deren,

In addition to what Matthew has said, I guess you need to have a 'main' module 
in your language, and provide it to raco exe, too. It can be a dummy module or 
not. The requirement of such a module is unclear to me, but it exists.

Here is my working script to pack a standalone interpreter of a language 'slon' 
on Windows:

raco exe -o slon-racket ++lib slon/slon-language ++lib slon/lang/reader ++lib 
slon/main slon-interpreter.rkt
raco distribute slon-racket slon-racket.exe 

Regards,

Dmitry

On February 1, 2018 8:53:50 PM EET, Deren Dohoda  wrote:
>Hi everyone,
>
>I'm having a hard time understanding the docs for raco exe and raco
>distribute.
>
>tl;dr main.rkt has to (dynamic-require user-selected.rkt) and
>user-selected.rkt is written in a different #lang and requires a file
>from
>this program. How do I glue these pieces together for raco exe / raco
>distribute?
>
>My program has two things which seem to be hanging me up. The first is
>that
>a file is grabbed with (dynamic-require) based on a path obtained by
>the
>user with (get-file ...). This file is written in a different #lang and
>uses (require ...) for some syntax transformers.
>
>The exe builds alright but chokes when used because it can't find the
>#lang
>and can't find the (require ...).
>
>Ideally the file which is given to (dynamic-require ...) could be in
>any
>folder the user chooses, but then the (require ...) statement would be
>all
>over the map and I don't understand what I'm supposed to do to resolve
>this. If it helps, the file is already required by the program and
>isn't
>used only by the user-selected file. ++copy-collects doesn't seem to
>grab
>#lang folders correctly or I don't understand how to use it.
>
>Can someone give me some guidance here?
>
>Thanks,
>Deren
>
>-- 
>You received this message because you are subscribed to the Google
>Groups "Racket Users" group.
>To unsubscribe from this group and stop receiving emails from it, send
>an email to racket-users+unsubscr...@googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] raco distribute help

2018-02-02 Thread Matthew Flatt
At Thu, 1 Feb 2018 12:53:50 -0500, Deren Dohoda wrote:
> tl;dr main.rkt has to (dynamic-require user-selected.rkt) and
> user-selected.rkt is written in a different #lang and requires a file from
> this program. How do I glue these pieces together for raco exe / raco
> distribute?

You'll need to tell `raco exe` that you plan to use the `#lang` modules
at run time. Use `++lib` to add the language's module, but note that
you may need to specify the language's reader module specifically.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] raco distribute help

2018-02-01 Thread Deren Dohoda
Hi everyone,

I'm having a hard time understanding the docs for raco exe and raco
distribute.

tl;dr main.rkt has to (dynamic-require user-selected.rkt) and
user-selected.rkt is written in a different #lang and requires a file from
this program. How do I glue these pieces together for raco exe / raco
distribute?

My program has two things which seem to be hanging me up. The first is that
a file is grabbed with (dynamic-require) based on a path obtained by the
user with (get-file ...). This file is written in a different #lang and
uses (require ...) for some syntax transformers.

The exe builds alright but chokes when used because it can't find the #lang
and can't find the (require ...).

Ideally the file which is given to (dynamic-require ...) could be in any
folder the user chooses, but then the (require ...) statement would be all
over the map and I don't understand what I'm supposed to do to resolve
this. If it helps, the file is already required by the program and isn't
used only by the user-selected file. ++copy-collects doesn't seem to grab
#lang folders correctly or I don't understand how to use it.

Can someone give me some guidance here?

Thanks,
Deren

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.