[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cannot generate a stand-alone program + other questions
Quoting "Maurizio Ferreira":
> 1 ) I tried to generate a stand-alone program issuing the following
> commands:
>
> mzc --gui-exe test.scm
>
> but received the following error message
>
> MzScheme compiler (mzc) version 103, Copyright (c) 1996-2000 PLT
> mzc: expects <file or collection> [<file or sub-collection>] ... on the
> command
> line, given 0 arguments
test.scm was used as the argument to --gui-exe, which is a target
executable name. I think you wanted
mzc --gui-exe test.exe test.scm
> 2) The manual is not clear if I need or not a c compiler to generate a
> stand-alone application
> do I have to ?
Not with --exe or --gui-exe.
> 3) I see that the program 'games.exe' is very small.
> I suppose it would run only in presence of the full installed environment,
Yes.
> anyway, what are the steps to build a similar program ?
"games.exe" is a launcher. The "launcher" collection provides Scheme
functions like `make-mred-launcher' to create launchers.
But a launcher generally works best when the program files are in a
collection, such as plt/collects/games. Then, if you're using a
collection, you can provide an "info.ss" file that tells Setup PLT to
make a launcher.
For example, here is the "info.ss" from the plt/collects/games collection:
(lambda (request failure)
(case request
[(name) "Games"]
[(mred-launcher-libraries) (list "games.ss")]
[(mred-launcher-names) (list "Games")]
[else (failure)]))
Together, then `mred-launcher-libraries' and `mred-launcher-names' tags
cause Setup PLT to create a launcher named "Games".exe that loads the
local file "games.ss".
Matthew