On 26 March 2018 at 22:08, Christophe Demarey <[email protected]> wrote:
> Hi Ben, > > Le 23 mars 2018 à 19:53, Ben Coman <[email protected]> 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. > https://www.advancedinstaller.com/feats-list.html > 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. https://www.advancedinstaller.com/licenses.html says... "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)." The EULA (https://www.advancedinstaller.com/eula.html) says... "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 > with the full build tree at http://www.mediafire.com/ > file/5ijiww848lbkk7m/PharoLauncher%20Advanced%20Installer.zip > 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... > 1. Download/extracted http://files.pharo.org/platform/Pharo6.1-win.zip > > 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
