[plt-scheme] Generating standalone GUI programs

From: Geza Lakner MD (geza67 at freestart.hu)
Date: Fri Feb 3 15:46:17 EST 2006

Dear Schemers,

I am new to PLT Scheme, with Python and REBOL background.
Cross-platform application delivery is a paramount issue for me, thus
the first thing I tried with PLT Scheme, was to make a simplistic GUI
program (it merely displays an alert box) and to pack it into a single
distributable binary. Unfortunately, I haven't succeeded... The
generated executable does nothing (for now, I tried it under Linux
only).

Here is the source:

(module test mzscheme
  (require (lib "mred.ss" "mred"))
  (message-box "title" "this is a little message" #f '(yes-no caution))) 


In the DrScheme interaction box, by typing in '(require test)', the
program executes. If I append to the test.scm file this '(require
test)' row, the program becomes even runnable via the "Run" menu
command or toolbox icon - but this source file change conflicts with
the "mzc --gui-exe" standalone code generation, because the source
contains more than one expression beyond the compulsory (module)
construct.

My question is, how to instruct to code generator mzc that it not only
loads the module but also executes it - like having set a "main"
procedure for C prgrams or Java JARs. (It seems that "loading" a
module and executing a (require) statement don't have the same end
effect).


Thank you in advance for your kind help,
Geza



Posted on the users mailing list.