Le 23 mars 2018 �� 19:53, Ben Coman <btc@openinworld.com> a ��crit :Coincidentally I have returned to Windows for a short while so thought I shouldput 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 outa potential solution uploaded for testing to http://www.mediafire.com/file/3g579bmzqspt8e1/BCPharoLauncher.msiwith the full build tree at http://www.mediafire.com/file/5ijiww848lbkk7m/PharoLauncher%20Advanced%20Installer.zipLinks 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...1. Download/extracted http://files.pharo.org/platform/Pharo6.1-win.zip 2. Renamed Pharo6.1 folder to BCPharoLauncherRenamed Pharo6.1.* files to PharoLauncher1.1.*3. Metacello newsmalltalkhubUser: '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.msiI 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.// Locationsbasename = "\\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 PharoLauncherif( ! 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 PharoLauncherWshShell.Exec(vmFilename + " " + userBasename + ".image ��)