[plt-scheme] Creating executable from DrScheme ...

From: kumar (kumar_lista at mac.com)
Date: Mon Jan 5 09:35:50 EST 2009

Figured it out.

The problem is with the "html" module. The following
program will demonstrate the "Create executable.."
problem I mentioned -

         #lang scheme
         (require html)

as simple as that :)

The html module, when loaded, tries to read the "html-spec"
file from the collection path, which is undefined (i.e. #f)
when packaged as a standalone executable.

If I turn the html-spec file into a html-spec.ss module
which exports the contents as a constant *html-may-contain*
and use that constant in the html-unit.ss module, replacing
lines 121-122 with

       (define may-contain
	(sgml:gen-may-contain *html-may-contain*))

I'm able to use the html module in a standalone executable.

Is there any rationale behind not doing it like that in the first place?
If not, I think it is worth modifying the html module to not need
find-library at (require) time.

-Kumar


On 05 Jan 2009, at 7:29 PM, Matthew Flatt wrote:

> At Mon, 05 Jan 2009 11:31:44 +0800, kumar_lista at mac.com wrote:
>> I'm trying to create a gui executable using "Scheme->Create
>> executable..." in v4.1.3.
>>
>> As recommended, my language is "Module" and my source file starts  
>> with
>> "#lang scheme/gui". My app runs fine when launched from within  
>> DrScheme
>> (my module creates a single frame upon load).
>>
>> However, the created MrEd executable fails to run with the following
>> error
>> message in standard output window -
>>>>>>>
>> call-with-input-file: expects type <path or string> as 1st
>> argument, given: #f; other arguments were #<procedure:read>
>>
>> === context ===
>> loop
>> <<<<<
>
> Since "Create Executable..." works on the examples I tried, can you
> provide an example (ideally a small variant of your actual program)
> that shows the problem?
>
>
> Matthew
>



Posted on the users mailing list.