OneClick for 2.0 available again

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

OneClick for 2.0 available again

Torsten Bergmann
Hannes wrote:

>If I open the Pharo one click 2.0 on Windows by double-clicking on
>'NBCog' I get a 'Choose file' dialog

Yes, this is a problem with the (current) double-click build.
See my post here:

   http://lists.gforge.inria.fr/pipermail/pharo-project/2013-February/074358.html

Quick fix is to just rename CogVM.ini into NBCog.ini and it works.
We should make sure the INI file is always named like the VM.

Background:
===========

The (Windows) VM executable (if I remember the code correctly) looks
for the image file like this:

  1. If there is an *.ini file that is named like the VM executable
     (for instance NBCog.exe -> NBCog.ini or Pharo.exe -> Pharo.ini)
     then this INI-File is processed to initialize the VM.

     If this ini File contains an entry called "ImageFile"
     then it searches for the location given there.

     This is from old Squeak times and described here:
      http://squeakvm.org/win32/settings.html

  2. If there is no ini File it looks in the current directory
     (usually the directory where the VM executable is placed when you double click in explorer)
     for a file with an *.image extension.

     If it finds exactly one then this is started. You can try this
     if you extract a VM and an image in the same directory.

     If the Windows VM does not find an image file or more than one files with the
     *.image extension (after multiple saves) then a file dialog is
     opened.

     This is absolut correct - but in the Pharo one-click the image
     is unfortunately not in the same folder as the VM.
     
The directory layout for Pharo one-click uses a special "Contents\Resources\"
subfolder for the image - maybe to have a cleaner root folder.
This conflicts with this default searches...

So if there is no ini file found and no image then it opens the file dialog.

Bye
T.  
     

Reply | Threaded
Open this post in threaded view
|

Re: OneClick for 2.0 available again

Hannes Hirzel
Thorsten,

reading what you have written, am I right that we just need a
   NBCog.ini

file for MSwindows?

I'll have a look how it is done in the Squeak 4.3-All-in-one and try
to do it accordingly.
http://ftp.squeak.org/4.3/Squeak-4.3-All-in-One.zip

--Hannes

On 2/11/13, Torsten Bergmann <[hidden email]> wrote:

> Hannes wrote:
>
>>If I open the Pharo one click 2.0 on Windows by double-clicking on
>>'NBCog' I get a 'Choose file' dialog
>
> Yes, this is a problem with the (current) double-click build.
> See my post here:
>
>
> http://lists.gforge.inria.fr/pipermail/pharo-project/2013-February/074358.html
>
> Quick fix is to just rename CogVM.ini into NBCog.ini and it works.
> We should make sure the INI file is always named like the VM.
>
> Background:
> ===========
>
> The (Windows) VM executable (if I remember the code correctly) looks
> for the image file like this:
>
>   1. If there is an *.ini file that is named like the VM executable
>      (for instance NBCog.exe -> NBCog.ini or Pharo.exe -> Pharo.ini)
>      then this INI-File is processed to initialize the VM.
>
>      If this ini File contains an entry called "ImageFile"
>      then it searches for the location given there.
>
>      This is from old Squeak times and described here:
>       http://squeakvm.org/win32/settings.html
>
>   2. If there is no ini File it looks in the current directory
>      (usually the directory where the VM executable is placed when you
> double click in explorer)
>      for a file with an *.image extension.
>
>      If it finds exactly one then this is started. You can try this
>      if you extract a VM and an image in the same directory.
>
>      If the Windows VM does not find an image file or more than one files
> with the
>      *.image extension (after multiple saves) then a file dialog is
>      opened.
>
>      This is absolut correct - but in the Pharo one-click the image
>      is unfortunately not in the same folder as the VM.
>
> The directory layout for Pharo one-click uses a special
> "Contents\Resources\"
> subfolder for the image - maybe to have a cleaner root folder.
> This conflicts with this default searches...
>
> So if there is no ini file found and no image then it opens the file
> dialog.
>
> Bye
> T.
>
>
>