Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Win32 commandline Squeak start-up script ignored #655

Closed
alandao opened this issue Oct 1, 2022 · 8 comments
Closed

Win32 commandline Squeak start-up script ignored #655

alandao opened this issue Oct 1, 2022 · 8 comments

Comments

@alandao
Copy link

alandao commented Oct 1, 2022

I'm trying to run a Smalltalk script on VM start-up on Windows. It looks like GNU/Linux is able to do it with this command:
../cogspur/squeak Cuis5.0-4426 -s ../scripts/setUpEnvironment.st

However, the start-up script is ignored when I try this equivalent command on Windows:
cogspur\Squeak.exe Cuis5.0-4426.image -s ../scripts/setUpEnvironment.st

Is there a Windows equivalent way to run a script on VM start-up?

@OpenSmalltalk-Bot
Copy link

OpenSmalltalk-Bot commented Oct 2, 2022 via email

@alandao
Copy link
Author

alandao commented Oct 3, 2022

I’ve also tried without the -s flag and it didn’t work either :(

@krono
Copy link
Member

krono commented Oct 3, 2022

So you used cogspur\Squeak.exe Cuis5.0-4426.image -s ../scripts/setUpEnvironment.st on Windows.
I don't know where path normalization kicks in, but what about
cogspur\Squeak.exe Cuis5.0-4426.image -s ..\scripts\setUpEnvironment.st?

Also, in the past, the script sometimes needed to be an absolute path, maybe try that too?

@eliotmiranda
Copy link
Contributor

You must use SqueakConsole.exe; Windows is badly broken like that. Command line arguments are not passed along for Squeak.exe.

When the system is running you can check that the arguments are available via getSystemAttribute: and senders (eg Squeak has SmalltalkImage>>rawArguments and SmalltalkImage>>arguments; not sure what Cuis provides).

@OpenSmalltalk-Bot
Copy link

OpenSmalltalk-Bot commented Oct 5, 2022 via email

@OpenSmalltalk-Bot
Copy link

OpenSmalltalk-Bot commented Oct 5, 2022 via email

@alandao
Copy link
Author

alandao commented Oct 5, 2022

You must use SqueakConsole.exe; Windows is badly broken like that. Command line arguments are not passed along for Squeak.exe.

When the system is running you can check that the arguments are available via getSystemAttribute: and senders (eg Squeak has SmalltalkImage>>rawArguments and SmalltalkImage>>arguments; not sure what Cuis provides).

So, I checked the available system attributes w/ getSystemAttribute: in Cuis and saw that all my Windows command line args are passed into the image as system attributes properly on SqueakConsole.exe and Squeak.exe. After I did a few changes to my Cuis image, I was able to get my start-up script running! I'm confident the issue here is actually related to the Cuis image and has nothing to do with OpenSmalltalk. I'll go ahead and close this issue and let the Cuis maintainers know.

Thanks for the help!

@alandao alandao closed this as completed Oct 5, 2022
@alandao

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants