[squeak-dev] Startup scripts on Windows - how?
Bob Arning
arning315 at comcast.net
Fri Mar 22 12:59:10 UTC 2013
seems like URL is only one option...
scriptName isEmpty ifFalse:[
"figure out if script name is a URL by itself"
isUrl := (scriptName asLowercase beginsWith:'http://') or:[
(scriptName asLowercase beginsWith:'file://') or:[
(scriptName asLowercase beginsWith:'ftp://')]].
isUrl ifFalse:[ | encodedPath pathTokens |
"Allow for ../dir/scriptName arguments"
pathTokens := scriptName splitBy: FileDirectory slash.
pathTokens := pathTokens collect: [:s | s
encodeForHTTP].
encodedPath := pathTokens reduce: [:acc :each | acc
, FileDirectory slash , each].
scriptName := (FileDirectory default uri
resolveRelativeURI: encodedPath) asString]].
]. ]
did you try a plain old file path?
On 3/22/13 7:53 AM, Frank Shearar wrote:
> On a Linux machine, you can run a script from the command line thusly:
> my/path/to/vm/squeak MyImage.image path/to/my/script.st. On Windows,
> the analogous operation fails because (I think) CodeLoader doesn't
> know how to handle file URIs like
> 'file:///C%3A/Users/frank/squeak-ci/target/update-image.st'.
>
> Is this a known problem? How else can I run a startup script on
> Windows? (Surely I'm not the only person in the world who wants to do
> this?)
>
> frank
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130322/7c15a3f6/attachment.htm
More information about the Squeak-dev
mailing list
|