Experiment: New Download page based on Pharo Launcher

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

Re: Experiment: New Download page based on Pharo Launcher

cedreek
Hi,

I just saw students and they still have some problem on windows with the launcher.

First, the launcher has to be run in admin mode.

Then, the image download starts but there is an error when uncompressing. Here is the stack.

Any idea on how to fix that ?



FileHandle>>streamError
FileHandle>>writeStream
FileSystem>>writeStreamOn:
FileReference>>writeStream
FileReference(AbstractFileReference)>>writeStreamDo:
ZipFileMember(ZipArchiveMember)>>extractInDirectory:overwrite:
[ :entry | 
| response |
entry isDirectory
ifFalse: [ bar ifNotNil: [ bar label: 'Extracting ' , entry fileName ].
response := entry
extractInDirectory: aDirectory
overwrite: overwriteAll.
response == #retryWithOverwrite
ifTrue: [ overwriteAll := true.
response := entry
extractInDirectory: aDirectory
overwrite: overwriteAll ].
response == #abort
ifTrue: [ ^ self ].
response == #failed
ifTrue: [ (self confirm: 'Failed to extract ' , entry fileName , '. Proceed?')
ifFalse: [ ^ self ] ] ] ] in ZipArchive>>extractAllTo:informing:overwrite: in Block: [ :entry | ...
OrderedCollection>>do:
ZipArchive>>extractAllTo:informing:overwrite:
ZipArchive>>extractAllTo:informing:
[ :bar | self extractAllTo: aDirectory informing: bar ] in ZipArchive>>extractAllTo: in Block: [ :bar | self extractAllTo: aDirectory informing: ...etc...
[ :bar | aBlock value: bar ] in MorphicUIManager>>informUserDuring: in Block: [ :bar | aBlock value: bar ]
BlockClosure>>cull:
[ ^ block cull: self ] in [ self prepareForRunning.
CurrentJob value: self during: [ ^ block cull: self ] ] in Job>>run in Block: [ ^ block cull: self ]
[ activeProcess psValueAt: index put: anObject.
aBlock value ] in CurrentJob(DynamicVariable)>>value:during: in Block: [ activeProcess psValueAt: index put: anObject....
BlockClosure>>ensure:
CurrentJob(DynamicVariable)>>value:during:
CurrentJob class(DynamicVariable class)>>value:during:
[ self prepareForRunning.
CurrentJob value: self during: [ ^ block cull: self ] ] in Job>>run in Block: [ self prepareForRunning....
BlockClosure>>ensure:
Job>>run
MorphicUIManager(UIManager)>>displayProgress:from:to:during:
MorphicUIManager>>informUserDuring:
ZipArchive>>extractAllTo:
PhLRemoteTemplate(PhLAbstractTemplate)>>extractZipArchive:to:
PhLRemoteTemplate(PhLAbstractTemplate)>>extractTo:named:
PhLDirectoryBasedImageRepository>>extractTemplate:to:
PhLCreateImageFromTemplateCommand>>execute
PhLCreateImageFromTemplateCommand(PhLCommand)>>executeIfApplicable
PhLCommandButton>>performAction



Thanks 

Cédrick
Reply | Threaded
Open this post in threaded view
|

Re: Experiment: New Download page based on Pharo Launcher

Ben Coman


On 23 March 2018 at 05:14, Cédrick Béler <[hidden email]> wrote:
Hi,

I just saw students and they still have some problem on windows with the launcher.

First, the launcher has to be run in admin mode.

Then, the image download starts but there is an error when uncompressing. Here is the stack.

Any idea on how to fix that ?



FileHandle>>streamError
FileHandle>>writeStream
FileSystem>>writeStreamOn:
FileReference>>writeStream
FileReference(AbstractFileReference)>>writeStreamDo:
ZipFileMember(ZipArchiveMember)>>extractInDirectory:overwrite:

btw, what is the directory here that its trying to write to?


Now I notice... 
the Linux PharoLauncher download is a ZIP file
and the Mac PharoLauncher download is a ZIP file
so... can we make the Windows PharoLauncher download a ZIP file?

Doing that, at least as an interim measure, would *immediately* make PharoLauncher 
usable to students on locked-down Windows machines in University student labs.
I'd expect this will improve the success with this experiment 
to use PharoLauncher as the main user entry point.

The problem with using an "Installer" for the Windows PharoLauncher is the large amount 
of testing required to work *reliably* with *all* the "different ways people work"
under several different versions of Windows introduced different layers of user security intricacies. 
Lets move forward in small steps.  A ZIP download/extract is simple, and consistent with other platforms.


In the meantime while waiting for that to happen, you can...


2. Rename  Pharo6.1    folder to  PharoLauncher
    Rename  Pharo6.1.*  files to    PharoLauncher1.1.*

3. Metacello new
       smalltalkhubUser: 'Pharo'
       project: 'PharoLauncher';
       configuration: 'PharoLauncher';
       load.
    PhLDeploymentScript doAll.
    PharoLauncher open.
    Smalltalk snapshot: true  andQuit: true.

4. Zip up the parent folder, test on another machine and provide a link to your students.

cheers -ben


P.S.  I was going to suggest also renaming  Pharo.exe  to  PharoLauncher.exe
but with an empty Documents\Pharo\vms
I get... "Error: Cannot detect Pharo executable in C:\Temp\MyPharoLauncher\PharoLauncher"
in PhLVirtualMachine>>initializeOn: "File @ C:\Temp\MyPharoLauncher\PharoLauncher"
since "executables := aFolder allChildrenMatching: self class executableName."
is empty since "self class executableName" ==> "Pharo.exe"

It would be nice for that to not be hard coded.  I tried digging further but ran out of time.
I am curious it mattered since using "Pharo.exe" the Launcher went on to download a VM anyway.


P.S.2.
I believe the best path forward for system-wide PharoLauncher installed under "C:\Program Files"
would be to install there only...
* the VM 
* PharoLauncher.ZIP 
* a tiny non-Pharo wrapper program as the shortcut linked from AllUsers > Start Menu > PharoLauncher 
that extracts PharoLauncher.ZIP to the user's data area and then starts that user specific PharoLauncher.  

Then regardless whether:
* they individually download/extract  PharoLauncher.ZIP
* the system-wide-wrapper extracts  PharoLauncher.ZIP
its a similar experience for users which should aid reliability by reducing the number of "different " use cases.
Reply | Threaded
Open this post in threaded view
|

Re: Experiment: New Download page based on Pharo Launcher

cedreek
Thx Ben for all.

I will investigate further as most of the students use windows (still I ask them top bring their computer cause here it’s all virtualized windows with network user files mounted on the virtual system launch).


btw, what is the directory here that its trying to write to?

I don’t know… I ask the student to send me the stack.

I won’t see them until 2 weeks. But I will then try with some to make this stuff work more reliably and give/ask feedback here.

Anyway, I still have the solution to launch the old way. So there is an alternative.

But I really like the launcher. It really helps organizing (for me :)). For students, in a first approcach it’s not that important.



Now I notice... 
the Linux PharoLauncher download is a ZIP file
and the Mac PharoLauncher download is a ZIP file
so... can we make the Windows PharoLauncher download a ZIP file?

Doing that, at least as an interim measure, would *immediately* make PharoLauncher 
usable to students on locked-down Windows machines in University student labs.
I'd expect this will improve the success with this experiment 
to use PharoLauncher as the main user entry point.

The problem with using an "Installer" for the Windows PharoLauncher is the large amount 
of testing required to work *reliably* with *all* the "different ways people work"
under several different versions of Windows introduced different layers of user security intricacies. 

Oh yeah… I can see that… and since I don’t use windows since XP, I can tell you it’s a pain to just use it again. I (sadly) need a windows box to test.
I’m thinking also to prepare a linux virtual box image which is also interesting. But still, to get adoption (even for A or 2 student), its important that it works well on windows.

I’ll give feedback (but in 2/3 weeks).

Cheers,

Cédrick




Lets move forward in small steps.  A ZIP download/extract is simple, and consistent with other platforms.


In the meantime while waiting for that to happen, you can...


2. Rename  Pharo6.1    folder to  PharoLauncher
    Rename  Pharo6.1.*  files to    PharoLauncher1.1.* 

3. Metacello new
       smalltalkhubUser: 'Pharo'
       project: 'PharoLauncher';
       configuration: 'PharoLauncher';
       load.
    PhLDeploymentScript doAll.
    PharoLauncher open.
    Smalltalk snapshot: true  andQuit: true.

4. Zip up the parent folder, test on another machine and provide a link to your students.

cheers -ben


P.S.  I was going to suggest also renaming  Pharo.exe  to  PharoLauncher.exe
but with an empty Documents\Pharo\vms
I get... "Error: Cannot detect Pharo executable in C:\Temp\MyPharoLauncher\PharoLauncher"
in PhLVirtualMachine>>initializeOn: "File @ C:\Temp\MyPharoLauncher\PharoLauncher"
since "executables := aFolder allChildrenMatching: self class executableName."
is empty since "self class executableName" ==> "Pharo.exe"

It would be nice for that to not be hard coded.  I tried digging further but ran out of time.
I am curious it mattered since using "Pharo.exe" the Launcher went on to download a VM anyway.


P.S.2.
I believe the best path forward for system-wide PharoLauncher installed under "C:\Program Files"
would be to install there only...
* the VM 
* PharoLauncher.ZIP 
* a tiny non-Pharo wrapper program as the shortcut linked from AllUsers > Start Menu > PharoLauncher 
that extracts PharoLauncher.ZIP to the user's data area and then starts that user specific PharoLauncher.  

Then regardless whether:
* they individually download/extract  PharoLauncher.ZIP
* the system-wide-wrapper extracts  PharoLauncher.ZIP
its a similar experience for users which should aid reliability by reducing the number of "different " use cases.

Reply | Threaded
Open this post in threaded view
|

Re: Experiment: New Download page based on Pharo Launcher

Ben Coman
In reply to this post by Ben Coman


On 23 March 2018 at 11:31, Ben Coman <[hidden email]> wrote:


On 23 March 2018 at 05:14, Cédrick Béler <[hidden email]> wrote:
Hi,

I just saw students and they still have some problem on windows with the launcher.

First, the launcher has to be run in admin mode.

Then, the image download starts but there is an error when uncompressing. Here is the stack.

Any idea on how to fix that ?

Now I notice... 
the Linux PharoLauncher download is a ZIP file
and the Mac PharoLauncher download is a ZIP file
so... can we make the Windows PharoLauncher download a ZIP file?

Doing that, at least as an interim measure, would *immediately* make PharoLauncher 
usable to students on locked-down Windows machines in University student labs.
I'd expect this will improve the success with this experiment 
to use PharoLauncher as the main user entry point.

The problem with using an "Installer" for the Windows PharoLauncher is the large amount 
of testing required to work *reliably* with *all* the "different ways people work"
under several different versions of Windows introduced different layers of user security intricacies. 
Lets move forward in small steps.  A ZIP download/extract is simple, and consistent with other platforms.

In the meantime while waiting for that to happen, you can...


2. Rename  Pharo6.1    folder to  PharoLauncher
    Rename  Pharo6.1.*  files to    PharoLauncher1.1.*

3. Metacello new
       smalltalkhubUser: 'Pharo'
       project: 'PharoLauncher';
       configuration: 'PharoLauncher';
       load.
    PhLDeploymentScript doAll.
    PharoLauncher open.
    Smalltalk snapshot: true  andQuit: true.

4. Zip up the parent folder, test on another machine and provide a link to your students.

cheers -ben


P.S.  I was going to suggest also renaming  Pharo.exe  to  PharoLauncher.exe
but with an empty Documents\Pharo\vms
I get... "Error: Cannot detect Pharo executable in C:\Temp\MyPharoLauncher\PharoLauncher"
in PhLVirtualMachine>>initializeOn: "File @ C:\Temp\MyPharoLauncher\PharoLauncher"
since "executables := aFolder allChildrenMatching: self class executableName."
is empty since "self class executableName" ==> "Pharo.exe"

It would be nice for that to not be hard coded.  I tried digging further but ran out of time.
I am curious it mattered since using "Pharo.exe" the Launcher went on to download a VM anyway.


P.S.2.
I believe the best path forward for system-wide PharoLauncher installed under "C:\Program Files"
would be to install there only...
* the VM 
* PharoLauncher.ZIP 
* a tiny non-Pharo wrapper program as the shortcut linked from AllUsers > Start Menu > PharoLauncher 
that extracts PharoLauncher.ZIP to the user's data area and then starts that user specific PharoLauncher.  

Then regardless whether:
* they individually download/extract  PharoLauncher.ZIP
* the system-wide-wrapper extracts  PharoLauncher.ZIP
its a similar experience for users which should aid reliability by reducing the number of "different " use cases.

Coincidentally I have returned to Windows for a short while so thought I should 
put my money where my mouth is and have a stab at this.  After a few hours trying with NSIS, 
I went searching for an alternative and Advanced Installer looked like a good chance.
The important part of  (free) Basic Features  is "Windows 10/8/7/Vista and UAC installs"
Also further down are some CI options. 

After just the "Simple Installation" tutorial and experimenting a few hours I ironed out 
a potential solution uploaded for testing to http://www.mediafire.com/file/3g579bmzqspt8e1/BCPharoLauncher.msi
Links should be live for 30 days.
I've directly attached the much smaller installer-configuration file "PharoLauncher.aip". 


PharoLauncher was built with some minor changes from above... 

2. Renamed  Pharo6.1    folder to  BCPharoLauncher
    Renamed  Pharo6.1.*  files to    PharoLauncher1.1.* 

3. Metacello new
       smalltalkhubUser: 'Pharo'
       project: 'PharoLauncher';
       configuration: 'PharoLauncher';
        load.  
     PharoLauncher hardResetPersistanceState: true.
     PhLDeploymentScript doAll. 
     PhLDeploymentScript  closeWindowsAndOpenLauncher.
     Smalltalk snapshot: true  andQuit: true. 

4. Moved the  image & changes  files into a subfolder "PerUserFiles"

5. Built  BCPharoLauncher.msi

I prefixed my initials to distinguish it from the current official PharoLauncher installer.
Hopefully this can be adopted as the official installer and they can be dropped off.


Key features:
a.  Provides a choice to install for "Everybody" (i.e. C:\Program Files (x86)\Pharo\BCPharoLauncher\)
     or "Only for me" (i.e. C:\Users\Ben\AppData\Local\Programs\Pharo\BCPharoLauncher\)
     per attached screen snapshot.

b.  Start the install as a Standard User and it escalates only as needed.

c.  The Desktop and Start Menu shortcuts run the following script...       
          // File: PharoLauncher.js
          // Author: Ben Coman 2018.03.24
          // Purpose: Facilitate each user to run a personal copy of PharoLauncher.image in their own data area.
          
          // Locations
          basename = "\\PharoLauncher1.1";
          WshShell = WScript.CreateObject("WScript.Shell");
          fso = WScript.CreateObject("Scripting.FileSystemObject");
          systemFolder = fso.GetAbsolutePathName(".");
          vmFilename = systemFolder + "\\Pharo.exe"
          systemBasename = systemFolder + "\\PerUserFiles" + basename;
          userFolder = WshShell.ExpandEnvironmentStrings("%LOCALAPPDATA%\\Pharo");
          userFolder2 = userFolder + "\\PharoLauncher";
          userBasename = userFolder2 + basename;
          
          // Ensure user data folder exists for PharoLauncher
          if( ! fso.FolderExists(userFolder))
          { fso.CreateFolder(userFolder);
          fso.CreateFolder(userFolder2)
          }
          
          // If either  image or changes  files missing from user folder,  copy from system folder.  
          if( ! fso.FileExists(userBasename + ".image") || ! fso.FileExists(userBasename + ".changes")) 
          {
          //WScript.Echo("Setting up user environment");
          fso.CopyFile(systemBasename + ".image",    userBasename + ".image", true);
          fso.CopyFile(systemBasename + ".changes",  userBasename + ".changes", true);
          }
          
          // Start personal copy of PharoLauncher
          WshShell.Exec(vmFilename + " " + userBasename + ".image")


cheers -ben


PharoLauncher.aip (32K) Download Attachment
BCPharoLauncher.png (39K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Experiment: New Download page based on Pharo Launcher

Guillermo Polito


On Fri, Mar 23, 2018 at 7:53 PM, Ben Coman <[hidden email]> wrote:


On 23 March 2018 at 11:31, Ben Coman <[hidden email]> wrote:


On 23 March 2018 at 05:14, Cédrick Béler <[hidden email]> wrote:
Hi,

I just saw students and they still have some problem on windows with the launcher.

First, the launcher has to be run in admin mode.

Then, the image download starts but there is an error when uncompressing. Here is the stack.

Any idea on how to fix that ?

Now I notice... 
the Linux PharoLauncher download is a ZIP file
and the Mac PharoLauncher download is a ZIP file
so... can we make the Windows PharoLauncher download a ZIP file?

Doing that, at least as an interim measure, would *immediately* make PharoLauncher 
usable to students on locked-down Windows machines in University student labs.
I'd expect this will improve the success with this experiment 
to use PharoLauncher as the main user entry point.

The problem with using an "Installer" for the Windows PharoLauncher is the large amount 
of testing required to work *reliably* with *all* the "different ways people work"
under several different versions of Windows introduced different layers of user security intricacies. 
Lets move forward in small steps.  A ZIP download/extract is simple, and consistent with other platforms.

In the meantime while waiting for that to happen, you can...


2. Rename  Pharo6.1    folder to  PharoLauncher
    Rename  Pharo6.1.*  files to    PharoLauncher1.1.*

3. Metacello new
       smalltalkhubUser: 'Pharo'
       project: 'PharoLauncher';
       configuration: 'PharoLauncher';
       load.
    PhLDeploymentScript doAll.
    PharoLauncher open.
    Smalltalk snapshot: true  andQuit: true.

4. Zip up the parent folder, test on another machine and provide a link to your students.

cheers -ben


P.S.  I was going to suggest also renaming  Pharo.exe  to  PharoLauncher.exe
but with an empty Documents\Pharo\vms
I get... "Error: Cannot detect Pharo executable in C:\Temp\MyPharoLauncher\PharoLauncher"
in PhLVirtualMachine>>initializeOn: "File @ C:\Temp\MyPharoLauncher\PharoLauncher"
since "executables := aFolder allChildrenMatching: self class executableName."
is empty since "self class executableName" ==> "Pharo.exe"

It would be nice for that to not be hard coded.  I tried digging further but ran out of time.
I am curious it mattered since using "Pharo.exe" the Launcher went on to download a VM anyway.


P.S.2.
I believe the best path forward for system-wide PharoLauncher installed under "C:\Program Files"
would be to install there only...
* the VM 
* PharoLauncher.ZIP 
* a tiny non-Pharo wrapper program as the shortcut linked from AllUsers > Start Menu > PharoLauncher 
that extracts PharoLauncher.ZIP to the user's data area and then starts that user specific PharoLauncher.  

Then regardless whether:
* they individually download/extract  PharoLauncher.ZIP
* the system-wide-wrapper extracts  PharoLauncher.ZIP
its a similar experience for users which should aid reliability by reducing the number of "different " use cases.

Coincidentally I have returned to Windows for a short while so thought I should 
put my money where my mouth is and have a stab at this.  After a few hours trying with NSIS, 
I went searching for an alternative and Advanced Installer looked like a good chance.
The important part of  (free) Basic Features  is "Windows 10/8/7/Vista and UAC installs"
Also further down are some CI options. 

After just the "Simple Installation" tutorial and experimenting a few hours I ironed out 
a potential solution uploaded for testing to http://www.mediafire.com/file/3g579bmzqspt8e1/BCPharoLauncher.msi
Links should be live for 30 days.
I've directly attached the much smaller installer-configuration file "PharoLauncher.aip". 


PharoLauncher was built with some minor changes from above... 

2. Renamed  Pharo6.1    folder to  BCPharoLauncher
    Renamed  Pharo6.1.*  files to    PharoLauncher1.1.* 

3. Metacello new
       smalltalkhubUser: 'Pharo'
       project: 'PharoLauncher';
       configuration: 'PharoLauncher';
        load.  
     PharoLauncher hardResetPersistanceState: true.
     PhLDeploymentScript doAll. 
     PhLDeploymentScript  closeWindowsAndOpenLauncher.
     Smalltalk snapshot: true  andQuit: true. 

4. Moved the  image & changes  files into a subfolder "PerUserFiles"

5. Built  BCPharoLauncher.msi

I prefixed my initials to distinguish it from the current official PharoLauncher installer.
Hopefully this can be adopted as the official installer and they can be dropped off.


Key features:
a.  Provides a choice to install for "Everybody" (i.e. C:\Program Files (x86)\Pharo\BCPharoLauncher\)
     or "Only for me" (i.e. C:\Users\Ben\AppData\Local\Programs\Pharo\BCPharoLauncher\)
     per attached screen snapshot.

b.  Start the install as a Standard User and it escalates only as needed.

WOW, YES. I want this, thanks Ben :)
 

c.  The Desktop and Start Menu shortcuts run the following script...       
          // File: PharoLauncher.js
          // Author: Ben Coman 2018.03.24
          // Purpose: Facilitate each user to run a personal copy of PharoLauncher.image in their own data area.
          
          // Locations
          basename = "\\PharoLauncher1.1";
          WshShell = WScript.CreateObject("WScript.Shell");
          fso = WScript.CreateObject("Scripting.FileSystemObject");
          systemFolder = fso.GetAbsolutePathName(".");
          vmFilename = systemFolder + "\\Pharo.exe"
          systemBasename = systemFolder + "\\PerUserFiles" + basename;
          userFolder = WshShell.ExpandEnvironmentStrings("%LOCALAPPDATA%\\Pharo");
          userFolder2 = userFolder + "\\PharoLauncher";
          userBasename = userFolder2 + basename;
          
          // Ensure user data folder exists for PharoLauncher
          if( ! fso.FolderExists(userFolder))
          { fso.CreateFolder(userFolder);
          fso.CreateFolder(userFolder2)
          }
          
          // If either  image or changes  files missing from user folder,  copy from system folder.  
          if( ! fso.FileExists(userBasename + ".image") || ! fso.FileExists(userBasename + ".changes")) 
          {
          //WScript.Echo("Setting up user environment");
          fso.CopyFile(systemBasename + ".image",    userBasename + ".image", true);
          fso.CopyFile(systemBasename + ".changes",  userBasename + ".changes", true);
          }
          
          // Start personal copy of PharoLauncher
          WshShell.Exec(vmFilename + " " + userBasename + ".image")


cheers -ben




--

   

Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - http://www.cnrs.fr


Web: http://guillep.github.io

Phone: +33 06 52 70 66 13

Reply | Threaded
Open this post in threaded view
|

Re: Experiment: New Download page based on Pharo Launcher

demarey
In reply to this post by Tudor Girba-2
Hi Milton,

Thanks for the report.
It is important that Pharo Launcher works out of the box.

For Windows, I did some fixes:
- launch images from the shell in background to avoid to have the process killed,
- installation directory is now LOCALAPPDATA folder where user always have write permissions.
- new icon

Could you try it and tell me if it solves problems you had? https://ci.inria.fr/pharo-ci-jenkins2/job/PharoLauncher/lastSuccessfulBuild/artifact/pharo-launcher-installer-bleedingEdge-2018.03.23-x86.exe
I still need to investigate the problem on OS X.

Thanks,
Christophe.

> Le 18 mars 2018 à 11:47, Tudor Girba <[hidden email]> a écrit :
>
> +1
>
> Doru
>
>
>> On Mar 18, 2018, at 10:30 AM, Stephane Ducasse <[hidden email]> wrote:
>>
>> Thanks Milton!!!!!!!!!!!
>>
>> Can you open issue on the bug tracker?
>>
>> https://github.com/pharo-project/pharo-launcher/issues
>>
>> This way we are sure that it is not lost.
>>
>> Stef
>>
>> On Sat, Mar 17, 2018 at 11:17 PM, milton mamani <[hidden email]> wrote:
>>> I have issues with Pharo Launcher.
>>>
>>> Pharo Launcher version
>>> version 1.1.1
>>> http://files.pharo.org/pharo-launcher/tmp-1.1.1/
>>>
>>> version 1.1
>>> http://files.pharo.org/pharo-launcher/1.1/
>>>
>>> You can get these links in https://github.com/pharo-project/pharo-launcher/
>>>
>>> OS Version
>>> Mac OS - 10.13.3
>>>
>>> Issues
>>>
>>> Issue #1, version 1.1 does not run in Mac OS - 10.13.3
>>> * Load P.L version 1.1
>>> * Copy the application in `Applications` folder
>>> * Try to open the program, with right-click, open
>>> * Current result the program P.L. does not run.
>>>
>>> Issue #2 Can not open/run downloaded images
>>> * Load P.L version 1.1.1
>>> * Copy the application in `Applications` folder
>>> * Open the program, first time the program does not run
>>> * Open again the program, now the program shows a window
>>> * Try to load a pharo image, In `Templates` >> `Official distributions`>>
>>> `Pharo 6.1 stable`.
>>> * Right-click in the pharo image, then select option `Create Image`
>>> * A popup ask for a name
>>> * Introduce one name, eg: `PImage`
>>> * A loading process appears
>>> * Try to run the image with button `Launch`
>>> * Current result the image `PImage` does not run, and P.L. 1.1.1 quit on
>>> that launch.
>>>
>>> Issue #3 Pharo debugger error appear when navigating in templates
>>> * load P.L version 1.1.1
>>> * Open the P.L
>>> * In templates area, try to load some templates
>>> * Then select one template
>>> * A debugger error window appears with the message  #selectMorphList was
>>> sent to nil
>>> * Current result: Sometimes when you try to load and select some templates
>>> an error window appear
>>>
>>> Please tell me If you need more details about these issues
>>>
>>>
>>>
>>> 2018-03-17 16:42 GMT-03:00 Stephane Ducasse <[hidden email]>:
>>>>
>>>> On Sat, Mar 17, 2018 at 12:59 PM, Alexandre Bergel
>>>> <[hidden email]> wrote:
>>>>> Yesterday we also experienced many problem when using Launcher on OSX
>>>>> :-(
>>>>
>>>> Which version of Launcher?
>>>> Which version of your OS?
>>>> What problems?
>>>> Can we reproduce it?
>>>>
>>>> Could we get pro in reporting problems?
>>>>
>>>>
>>>>> Is the Launcher still maintained?
>>>>
>>>> Alexandre
>>>>
>>>> Christophe spent two months fixing tons of issues.
>>>> So could you report problems in a nicer way?
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>> Alexandre
>>>>>
>>>>>
>>>>>> On Mar 17, 2018, at 8:57 AM, kmo <[hidden email]> wrote:
>>>>>>
>>>>>> I tried the default download of Pharo Launcher on my Windows 7 (32 bit)
>>>>>> PC at
>>>>>> work. It installs. Runs fine - creates images and vms  but when you try
>>>>>> to
>>>>>> run them nothing happens. It fails to start the selected image. It just
>>>>>> fails to run the vm at all as far as I can see.
>>>>>>
>>>>>> I tried it on my Windows 10 (32 bit) laptop and got exactly the same
>>>>>> result.
>>>>>>
>>>>>> This is not important for me as I use pharo on Linux - but I thought
>>>>>> I'd
>>>>>> point it out. If having the launcher as the default download causes
>>>>>> more
>>>>>> problems than the traditional vm and image download then perhaps it
>>>>>> should
>>>>>> be reconsidered. A pity since I love the launcher.
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sent from:
>>>>>> http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "Every now and then stop and ask yourself if the war you're fighting is the right one."
>
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Experiment: New Download page based on Pharo Launcher

demarey
In reply to this post by kmo
Hi,

> Le 17 mars 2018 à 12:57, kmo <[hidden email]> a écrit :
>
> I tried the default download of Pharo Launcher on my Windows 7 (32 bit) PC at
> work. It installs. Runs fine - creates images and vms  but when you try to
> run them nothing happens. It fails to start the selected image. It just
> fails to run the vm at all as far as I can see.
>
> I tried it on my Windows 10 (32 bit) laptop and got exactly the same result.

Thanks for the report.
Could you tell me if this version works better? https://ci.inria.fr/pharo-ci-jenkins2/job/PharoLauncher/lastSuccessfulBuild/artifact/pharo-launcher-installer-bleedingEdge-2018.03.23-x86.exe

>
> This is not important for me as I use pharo on Linux - but I thought I'd
> point it out. If having the launcher as the default download causes more
> problems than the traditional vm and image download then perhaps it should
> be reconsidered. A pity since I love the launcher.

True. We need the launcher to run in all cases if it is the first thing a newbie will see from Pharo.

Christophe
Reply | Threaded
Open this post in threaded view
|

Re: Experiment: New Download page based on Pharo Launcher

demarey
In reply to this post by Ben Coman
Hi Ben,

Le 17 mars 2018 à 14:26, Ben Coman <[hidden email]> a écrit :



On 17 March 2018 at 19:57, kmo <[hidden email]> wrote:
I tried the default download of Pharo Launcher on my Windows 7 (32 bit) PC at
work. It installs. Runs fine - creates images and vms  but when you try to
run them nothing happens. It fails to start the selected image. It just
fails to run the vm at all as far as I can see.

I tried it on my Windows 10 (32 bit) laptop and got exactly the same result.

This is not important for me as I use pharo on Linux - but I thought I'd
point it out. If having the launcher as the default download causes more
problems than the traditional vm and image download then perhaps it should
be reconsidered. A pity since I love the launcher.

We've seen before when features are promoted in visibility (e.g. each GT tool)
they come under more scrutiny and bump a wider set of environments 
that cause hiccups.  Ultimately this feedback is beneficial to the tool.
So I don't think there is any need to panic into a reversal.
Lets give a chance to work through the issues.

Yes, that is the idea.
Testing on all OS, different versions is just not possible.
Nevertheless, it looks that there are some common bugs that I did not encountered when testing.
So, please test PharoLauncher and if you have issues, report them with the maximum information because it is hard to reproduce: https://github.com/pharo-project/pharo-launcher/issues

(but it might be good for the older links to be also available further down the page
while Launcher issues are sorted out)

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: Experiment: New Download page based on Pharo Launcher

demarey
In reply to this post by Sean P. DeNigris
Hi Alexandre,

Yes, Pharo Launcher is maintained.
But if maintainer(s) is not aware that there are issues, they will never be fixed.
So please, open issues at https://github.com/pharo-project/pharo-launcher/issues with details as mentioned by Sean.

Thanks,
Christophe

> Le 17 mars 2018 à 17:42, Sean P. DeNigris <[hidden email]> a écrit :
>
> abergel wrote
>> Yesterday we also experienced many problem when using Launcher on OSX :-(
>
> Hmm, I've been using exclusively daily for many months with minimal
> glitches. Please post OS, Pharo system report, download method and any other
> relevant details. The major "gotchas" of the past were: 1) The app has to be
> in the "Applications" folder 2) the first time it was started you needed to
> work around a signing issue e.g. via [right click]->Open->[Confirm dialog].
> The app will not open, but from now on you can just open in the normal way
> (e.g. double clicking the .app). HTH
>
>
>
> -----
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
>


Reply | Threaded
Open this post in threaded view
|

Re: Experiment: New Download page based on Pharo Launcher

demarey
In reply to this post by Peter Uhnak
Hi Peter,

Le 17 mars 2018 à 19:00, Peter Uhnák <[hidden email]> a écrit :

Runs fine - creates images and vms  but when you try to
> run them nothing happens. It fails to start the selected image. It just
> fails to run the vm at all as far as I can see.

I am also experiencing this...

With ProcessWrapper the image launches maybe 1 out of 10 times...
So I hacked for myself a solution based on Torsten's OS-Window (which uses WinAPI) ... but even then the launch success rate is below 90%...

I guess Pharo really doesn't like talking to Windows…

It looks like Windows OS integration is not the top priority of the community. We have to do with the current situation before hoping a better support.

Thanks, 
Christophe
Reply | Threaded
Open this post in threaded view
|

Re: Experiment: New Download page based on Pharo Launcher

demarey
In reply to this post by cedreek
Hi Cédrick,

It does not require anymore admin mode. I think the error below comes from missing write permissions on the file system.

Thanks for the feedback,
Christophe


Le 22 mars 2018 à 22:14, Cédrick Béler <[hidden email]> a écrit :

Hi,

I just saw students and they still have some problem on windows with the launcher.

First, the launcher has to be run in admin mode.

Then, the image download starts but there is an error when uncompressing. Here is the stack.

Any idea on how to fix that ?



FileHandle>>streamError
FileHandle>>writeStream
FileSystem>>writeStreamOn:
FileReference>>writeStream
FileReference(AbstractFileReference)>>writeStreamDo:
ZipFileMember(ZipArchiveMember)>>extractInDirectory:overwrite:
[ :entry | 
| response |
entry isDirectory
ifFalse: [ bar ifNotNil: [ bar label: 'Extracting ' , entry fileName ].
response := entry
extractInDirectory: aDirectory
overwrite: overwriteAll.
response == #retryWithOverwrite
ifTrue: [ overwriteAll := true.
response := entry
extractInDirectory: aDirectory
overwrite: overwriteAll ].
response == #abort
ifTrue: [ ^ self ].
response == #failed
ifTrue: [ (self confirm: 'Failed to extract ' , entry fileName , '. Proceed?')
ifFalse: [ ^ self ] ] ] ] in ZipArchive>>extractAllTo:informing:overwrite: in Block: [ :entry | ...
OrderedCollection>>do:
ZipArchive>>extractAllTo:informing:overwrite:
ZipArchive>>extractAllTo:informing:
[ :bar | self extractAllTo: aDirectory informing: bar ] in ZipArchive>>extractAllTo: in Block: [ :bar | self extractAllTo: aDirectory informing: ...etc...
[ :bar | aBlock value: bar ] in MorphicUIManager>>informUserDuring: in Block: [ :bar | aBlock value: bar ]
BlockClosure>>cull:
[ ^ block cull: self ] in [ self prepareForRunning.
CurrentJob value: self during: [ ^ block cull: self ] ] in Job>>run in Block: [ ^ block cull: self ]
[ activeProcess psValueAt: index put: anObject.
aBlock value ] in CurrentJob(DynamicVariable)>>value:during: in Block: [ activeProcess psValueAt: index put: anObject....
BlockClosure>>ensure:
CurrentJob(DynamicVariable)>>value:during:
CurrentJob class(DynamicVariable class)>>value:during:
[ self prepareForRunning.
CurrentJob value: self during: [ ^ block cull: self ] ] in Job>>run in Block: [ self prepareForRunning....
BlockClosure>>ensure:
Job>>run
MorphicUIManager(UIManager)>>displayProgress:from:to:during:
MorphicUIManager>>informUserDuring:
ZipArchive>>extractAllTo:
PhLRemoteTemplate(PhLAbstractTemplate)>>extractZipArchive:to:
PhLRemoteTemplate(PhLAbstractTemplate)>>extractTo:named:
PhLDirectoryBasedImageRepository>>extractTemplate:to:
PhLCreateImageFromTemplateCommand>>execute
PhLCreateImageFromTemplateCommand(PhLCommand)>>executeIfApplicable
PhLCommandButton>>performAction



Thanks 

Cédrick

Reply | Threaded
Open this post in threaded view
|

Re: Experiment: New Download page based on Pharo Launcher

demarey
In reply to this post by Ben Coman
Hi Ben,

Le 23 mars 2018 à 04:31, Ben Coman <[hidden email]> a écrit :

P.S.  I was going to suggest also renaming  Pharo.exe  to  PharoLauncher.exe
but with an empty Documents\Pharo\vms
I get... "Error: Cannot detect Pharo executable in C:\Temp\MyPharoLauncher\PharoLauncher"
in PhLVirtualMachine>>initializeOn: "File @ C:\Temp\MyPharoLauncher\PharoLauncher"
since "executables := aFolder allChildrenMatching: self class executableName."
is empty since "self class executableName" ==> "Pharo.exe"

It would be nice for that to not be hard coded.

Where would you put this information?

  I tried digging further but ran out of time.
I am curious it mattered since using "Pharo.exe" the Launcher went on to download a VM anyway.

I use the vm shipped with the launcher when possible (e.g. to determine pharo images version format or run current stable images.
If I cannot find the proper vm, then I download it from files.pharo.org.

P.S.2.
I believe the best path forward for system-wide PharoLauncher installed under "C:\Program Files"
would be to install there only...
* the VM 
* PharoLauncher.ZIP 
* a tiny non-Pharo wrapper program as the shortcut linked from AllUsers > Start Menu > PharoLauncher 
that extracts PharoLauncher.ZIP to the user's data area and then starts that user specific PharoLauncher.  

Then regardless whether:
* they individually download/extract  PharoLauncher.ZIP
* the system-wide-wrapper extracts  PharoLauncher.ZIP
its a similar experience for users which should aid reliability by reducing the number of "different " use cases.

I now install PharoLauncher in user LOCALAPPDATA folder on windows.
Does it solve the issue for you?

Christophe
Reply | Threaded
Open this post in threaded view
|

Re: Experiment: New Download page based on Pharo Launcher

demarey
In reply to this post by Ben Coman
Hi Ben,

Le 23 mars 2018 à 19:53, Ben Coman <[hidden email]> a écrit :

Coincidentally I have returned to Windows for a short while so thought I should 
put my money where my mouth is and have a stab at this.  After a few hours trying with NSIS, 
I went searching for an alternative and Advanced Installer looked like a good chance.
The important part of  (free) Basic Features  is "Windows 10/8/7/Vista and UAC installs"
Also further down are some CI options. 

What bothers me is that it is not a free tool.
I can see the list of features here: https://www.advancedinstaller.com/feats-list.html


After just the "Simple Installation" tutorial and experimenting a few hours I ironed out 
a potential solution uploaded for testing to http://www.mediafire.com/file/3g579bmzqspt8e1/BCPharoLauncher.msi
Links should be live for 30 days.
I've directly attached the much smaller installer-configuration file "PharoLauncher.aip". 


PharoLauncher was built with some minor changes from above... 

2. Renamed  Pharo6.1    folder to  BCPharoLauncher
    Renamed  Pharo6.1.*  files to    PharoLauncher1.1.* 

3. Metacello new
       smalltalkhubUser: 'Pharo'
       project: 'PharoLauncher';
       configuration: 'PharoLauncher';
        load.  
     PharoLauncher hardResetPersistanceState: true.
     PhLDeploymentScript doAll. 
     PhLDeploymentScript  closeWindowsAndOpenLauncher.
     Smalltalk snapshot: true  andQuit: true. 

4. Moved the  image & changes  files into a subfolder "PerUserFiles"

5. Built  BCPharoLauncher.msi

I prefixed my initials to distinguish it from the current official PharoLauncher installer.
Hopefully this can be adopted as the official installer and they can be dropped off.


Key features:
a.  Provides a choice to install for "Everybody" (i.e. C:\Program Files (x86)\Pharo\BCPharoLauncher\)
     or "Only for me" (i.e. C:\Users\Ben\AppData\Local\Programs\Pharo\BCPharoLauncher\)
     per attached screen snapshot.

b.  Start the install as a Standard User and it escalates only as needed.

c.  The Desktop and Start Menu shortcuts run the following script...       
          // File: PharoLauncher.js
          // Author: Ben Coman 2018.03.24
          // Purpose: Facilitate each user to run a personal copy of PharoLauncher.image in their own data area.
          
          // Locations
          basename = "<a href="smb://PharoLauncher1.1" class="">\\PharoLauncher1.1";
          WshShell = WScript.CreateObject("WScript.Shell");
          fso = WScript.CreateObject("Scripting.FileSystemObject");
          systemFolder = fso.GetAbsolutePathName(".");
          vmFilename = systemFolder + "<a href="smb://Pharo.exe" class="">\\Pharo.exe"
          systemBasename = systemFolder + "<a href="smb://PerUserFiles" class="">\\PerUserFiles" + basename;
          userFolder = WshShell.ExpandEnvironmentStrings("%LOCALAPPDATA%\\Pharo");
          userFolder2 = userFolder + "<a href="smb://PharoLauncher" class="">\\PharoLauncher";
          userBasename = userFolder2 + basename;
          
          // Ensure user data folder exists for PharoLauncher
          if( ! fso.FolderExists(userFolder))
          { fso.CreateFolder(userFolder);
           fso.CreateFolder(userFolder2)
          }
          
          // If either  image or changes  files missing from user folder,  copy from system folder.  
          if( ! fso.FileExists(userBasename + ".image") || ! fso.FileExists(userBasename + ".changes")) 
          {
           //WScript.Echo("Setting up user environment");
           fso.CopyFile(systemBasename + ".image",    userBasename + ".image", true);
           fso.CopyFile(systemBasename + ".changes",  userBasename + ".changes", true);
          }
          
          // Start personal copy of PharoLauncher
          WshShell.Exec(vmFilename + " " + userBasename + ".image »)

UAC support is really nice.
I would like to have the community opinion on using a non-free tool like advancedinstaller.
If there is no objection, I would consider it seriously for a next Pharo Launcher version.

Thanks for this work Ben!
Reply | Threaded
Open this post in threaded view
|

Re: Experiment: New Download page based on Pharo Launcher

Ben Coman
In reply to this post by demarey


On 26 March 2018 at 21:56, Christophe Demarey <[hidden email]> wrote:
Hi Ben,

Le 23 mars 2018 à 04:31, Ben Coman <[hidden email]> a écrit :

P.S.  I was going to suggest also renaming  Pharo.exe  to  PharoLauncher.exe
but with an empty Documents\Pharo\vms
I get... "Error: Cannot detect Pharo executable in C:\Temp\MyPharoLauncher\PharoLauncher"
in PhLVirtualMachine>>initializeOn: "File @ C:\Temp\MyPharoLauncher\PharoLauncher"
since "executables := aFolder allChildrenMatching: self class executableName."
is empty since "self class executableName" ==> "Pharo.exe"

It would be nice for that to not be hard coded.

Where would you put this information?

I was thinking the filter could be broader with a wildcard match " *.exe ".
There shouldn't be too many exe files in the folder, 
and any non-Pharo-exe should just fail to match the VM magic numbers
and not affect anything anyway.

On the other hand, perhaps this would cause the user's Image to show up in Task Manager
as being run by PharoLauncher rather than Pharo, which again blurs the line between
the two that I'd like to avoid.  So I'll back away from that idea.

 

  I tried digging further but ran out of time.
I am curious it mattered since using "Pharo.exe" the Launcher went on to download a VM anyway.

I use the vm shipped with the launcher when possible (e.g. to determine pharo images version format or run current stable images.
If I cannot find the proper vm, then I download it from files.pharo.org.

P.S.2.
I believe the best path forward for system-wide PharoLauncher installed under "C:\Program Files"
would be to install there only...
* the VM 
* PharoLauncher.ZIP 
* a tiny non-Pharo wrapper program as the shortcut linked from AllUsers > Start Menu > PharoLauncher 
that extracts PharoLauncher.ZIP to the user's data area and then starts that user specific PharoLauncher.  

Then regardless whether:
* they individually download/extract  PharoLauncher.ZIP
* the system-wide-wrapper extracts  PharoLauncher.ZIP
its a similar experience for users which should aid reliability by reducing the number of "different " use cases.

I now install PharoLauncher in user LOCALAPPDATA folder on windows.
Does it solve the issue for you?

Christophe

Using my day-to-day account "Ben" which is a Standard User account, I did the following...

1. Downloaded  "pharo-launcher-installer-bleedingEdge-2018.03.23-x86.exe"

2. Double-clicked it and got "Windows Defender SmartScreen prevented an unrecognized app from starting." [1]
(btw, I didn't get this with the msi-installer generated from Advanced Installer which I linked above.  But maybe that was because the msi-installer was created and installed on the same PC, so it was just trusting itself by default.  The msi wasn't signed, so is the experience different on other people's machine?)

3. Clicked "More Info" which allowed me to click "Run Anyway" and got...
    "To continue, enter admin user name and password" [2]
so this is not really suited to students doing a user-level install on locked down lab machines.

4. After entering the password for user "Admin" (i.e. not Administrator, just another account in Administrators group)
the install location was (as expected) given as.... 
     "C:\Users\Admin\AppData\Local\PharoLauncher" [3]
which again is not friendly to non-admin users. 
But just for kicks, I changed the install location to...  
      "C:\Users\Ben\AppData\Local\PharoLauncher"
and clicking on the PharoLauncher icon in the Start Menu
it opened okay, and downloaded a 60539 image and associated VM
and that image ran okay.

So its a step in the right direction, however...
the Start Menu shortcut entry is for All User per its location here...
   C:\ProgramData\Microsoft\Windows\Start Menu\Programs\PharoLauncher
and the target of the shortcut is... 
   C:\Users\Ben\AppData\Local\PharoLauncher\Pharo.exe
so it only worked coincidentally because I'm clicking the Start Menu icon as user "Ben"
and it would be broken for a second Standard User.

From my reading it will be a struggle to get NSIS working smoothly
for multiple use cases at different privilege levels. i.e. both non-admin and admin users.

cheers -ben

[1] PharoLauncher-v-Defender1.png (33K) Download Attachment
[2] Installer-escalates-privilege.png (4M) Download Attachment
[3] DestinationFolder.png (52K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Experiment: New Download page based on Pharo Launcher

Ben Coman
In reply to this post by demarey


On 26 March 2018 at 22:08, Christophe Demarey <[hidden email]> wrote:
Hi Ben,

Le 23 mars 2018 à 19:53, Ben Coman <[hidden email]> a écrit :

Coincidentally I have returned to Windows for a short while so thought I should 
put my money where my mouth is and have a stab at this.  After a few hours trying with NSIS, 
I went searching for an alternative and Advanced Installer looked like a good chance.
The important part of  (free) Basic Features  is "Windows 10/8/7/Vista and UAC installs"
Also further down are some CI options. 

What bothers me is that it is not a free tool.

Its not open source, but its (beer) free for the basic features we need.
The msi-installer I created was a 'Simple' project.
   "The 'Simple' projects use only freeware features ... No license is necessary when using only freeware features in "Simple" projects. Install packages created using these features can be freely redistributed and used both in commercial and non-commercial purpose (subject to EULA)."

  "2.1 Freeware Features License. Caphyon grants you an unlimited license to use the Freeware Features of the Software. The install packages created using only the Freeware Features can be freely redistributed and used both in commercial and non-commercial purpose.
and except for Part 11 the rest seems fairly innocuous.


 
I can see the list of features here: https://www.advancedinstaller.com/feats-list.html


After just the "Simple Installation" tutorial and experimenting a few hours I ironed out 
a potential solution uploaded for testing to http://www.mediafire.com/file/3g579bmzqspt8e1/BCPharoLauncher.msi
Links should be live for 30 days.
I've directly attached the much smaller installer-configuration file "PharoLauncher.aip". 


PharoLauncher was built with some minor changes from above... 

2. Renamed  Pharo6.1    folder to  BCPharoLauncher
    Renamed  Pharo6.1.*  files to    PharoLauncher1.1.* 

3. Metacello new
       smalltalkhubUser: 'Pharo'
       project: 'PharoLauncher';
       configuration: 'PharoLauncher';
        load.  
     PharoLauncher hardResetPersistanceState: true.
     PhLDeploymentScript doAll. 
     PhLDeploymentScript  closeWindowsAndOpenLauncher.
     Smalltalk snapshot: true  andQuit: true. 

4. Moved the  image & changes  files into a subfolder "PerUserFiles"

5. Built  BCPharoLauncher.msi

I prefixed my initials to distinguish it from the current official PharoLauncher installer.
Hopefully this can be adopted as the official installer and they can be dropped off.


Key features:
a.  Provides a choice to install for "Everybody" (i.e. C:\Program Files (x86)\Pharo\BCPharoLauncher\)
     or "Only for me" (i.e. C:\Users\Ben\AppData\Local\Programs\Pharo\BCPharoLauncher\)
     per attached screen snapshot.

b.  Start the install as a Standard User and it escalates only as needed.

c.  The Desktop and Start Menu shortcuts run the following script...       
          // File: PharoLauncher.js
          // Author: Ben Coman 2018.03.24
          // Purpose: Facilitate each user to run a personal copy of PharoLauncher.image in their own data area.
          
          // Locations
          basename = "\\PharoLauncher1.1";
          WshShell = WScript.CreateObject("WScript.Shell");
          fso = WScript.CreateObject("Scripting.FileSystemObject");
          systemFolder = fso.GetAbsolutePathName(".");
          vmFilename = systemFolder + "\\Pharo.exe"
          systemBasename = systemFolder + "\\PerUserFiles" + basename;
          userFolder = WshShell.ExpandEnvironmentStrings("%LOCALAPPDATA%\\Pharo");
          userFolder2 = userFolder + "\\PharoLauncher";
          userBasename = userFolder2 + basename;
          
          // Ensure user data folder exists for PharoLauncher
          if( ! fso.FolderExists(userFolder))
          { fso.CreateFolder(userFolder);
           fso.CreateFolder(userFolder2)
          }
          
          // If either  image or changes  files missing from user folder,  copy from system folder.  
          if( ! fso.FileExists(userBasename + ".image") || ! fso.FileExists(userBasename + ".changes")) 
          {
           //WScript.Echo("Setting up user environment");
           fso.CopyFile(systemBasename + ".image",    userBasename + ".image", true);
           fso.CopyFile(systemBasename + ".changes",  userBasename + ".changes", true);
          }
          
          // Start personal copy of PharoLauncher
          WshShell.Exec(vmFilename + " " + userBasename + ".image »)

UAC support is really nice.
I would like to have the community opinion on using a non-free tool like advancedinstaller.
If there is no objection, I would consider it seriously for a next Pharo Launcher version.

Another alternative or subsequent step might be to decompile the msi-installer I supplied
into Wix configuration files using dark.exe (https://support.smartbear.com/viewarticle/10196/)
and build the installer using Wix, which is open source (http://wixtoolset.org/about/license/)


Thanks for this work Ben!

Your welcome.  
Just an itch I had to scratch.... if you can't solve the problem, change the problem ;)

cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: Experiment: New Download page based on Pharo Launcher

demarey
In reply to this post by Ben Coman
Hi Ben,

Le 26 mars 2018 à 17:21, Ben Coman <[hidden email]> a écrit :

2. Double-clicked it and got "Windows Defender SmartScreen prevented an unrecognized app from starting." [1]
(btw, I didn't get this with the msi-installer generated from Advanced Installer which I linked above.  But maybe that was because the msi-installer was created and installed on the same PC, so it was just trusting itself by default.  The msi wasn't signed, so is the experience different on other people's machine?)

For this, I can get a signed version with Inria. It just requires manual signing by some Inria security unit.
So I will only do this for release versions

3. Clicked "More Info" which allowed me to click "Run Anyway" and got...
    "To continue, enter admin user name and password" [2]
so this is not really suited to students doing a user-level install on locked down lab machines.

agree but with app signed, the problem should be solved

4. After entering the password for user "Admin" (i.e. not Administrator, just another account in Administrators group)
the install location was (as expected) given as.... 
     "C:\Users\Admin\AppData\Local\PharoLauncher" [3]

Ah, I missed that. Not what I expected.

which again is not friendly to non-admin users. 
But just for kicks, I changed the install location to...  
      "C:\Users\Ben\AppData\Local\PharoLauncher"
and clicking on the PharoLauncher icon in the Start Menu
it opened okay, and downloaded a 60539 image and associated VM
and that image ran okay.

So its a step in the right direction, however...
the Start Menu shortcut entry is for All User per its location here...
   C:\ProgramData\Microsoft\Windows\Start Menu\Programs\PharoLauncher
and the target of the shortcut is... 
   C:\Users\Ben\AppData\Local\PharoLauncher\Pharo.exe
so it only worked coincidentally because I'm clicking the Start Menu icon as user "Ben"
and it would be broken for a second Standard User.

From my reading it will be a struggle to get NSIS working smoothly
for multiple use cases at different privilege levels. i.e. both non-admin and admin users.

I will probably give a change to AdvancedInstaller.

Thanks for the feedback.
Christophe
123