[View]  [Edit]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

Change about how to treat image specified as command line argument

Problem statement

This problem is about 3.7.1 VM. (I've not tested with 3.9.2)
If "ImageFile" parameter is specified in INI, and image file is also specified in VM command line argument, VM will try to open the file in arg as project and fail.

How to reproduce it

  1. Install squeakland
  2. customize squeak.ini so that "ImageFile" is specified in INI.
  3. double click project or image, then error will occur.

Proposed Fix

(This change is about parseGenericArgs() in sqWin32Args.c)
VM will always try to open $2 in command line as image, even if it is invalid one and can't be open.
(3.7.1 checks whether $2 is really image, and open fallback in INI if $2 is invalid)

Test Cases

#ImageFile spec. in INI FILEcommand line argumentHow to invoke VMExpected behavior
1-1NONENONEsimply start itIf image is there in same folder as VM that will be used. Otherwise Selecting image in dialog
1-2NONENONEdrag image onto VMthe image dropped will be used
2-1NONE$2=imagesimply start itthe image in arg will be used
2-1ANONE$2=file, but not valid imagesimply start itselecting image in dialog
2-2NONE$2=image, $3=projectsimply start itwith the image in arg, the project will be loaded
2-2ANONE$2=file, but not valid image, $3=projectsimply start itAfter selecting image in dialog, the project will be loaded
3-1specifiedNONEsimply start itthe image specified in INI will be used
3-2specifiedNONEdrag image onto VMthe image dropped will be used
3-3specified$2=imagesimply start itthe image in arg will be used
3-3Aspecified$2=file, but not valid imagesimply start iterror abort
3-4specified$2=image,$3=projectsimply start itwith the image in arg, the project will be loaded
3-4Aspecified$2=file, but not valid image,$3=projectsimply start iterror abort
3-5specified$2=projectsimply start ittry to open $2 as image and error abort
4-1specified, but not valid imageNONEsimply start iterror abort
4-2specified, but not valid imageNONEdrag image onto VMthe image dropped will be used
4-2Aspecified, but not valid imageNONEdrag invalid file onto VMerror abort
4-3specified, but not valid image$2=imagesimply start itthe image in arg will be used
4-3Aspecified, but not valid image$2=file, but not valid imagesimply start iterror abort
4-4specified, but not valid image$2=image $3=projectsimply start itwith the image in arg, the project will be loaded


Link to this Page