Opened 10 years ago

Closed 10 years ago

#986 closed enhancement (fixed)

WinGrass-Installer - Enhancement

Reported by: hellik Owned by: grass-dev@…
Priority: normal Milestone: 6.4.0
Component: Installation Version: svn-develbranch6
Keywords: wingrass Cc:
CPU: Unspecified Platform: MSWindows Vista

Description

Hi,

i would suggest some enhancements for the WinGrass-Installer (based on a whish from MarkusN). Patch is against Grass65 for testing.

Helmut

Attachments (12)

functions_06032010_095517.png (29.6 KB) - added by hellik 10 years ago.
Screenshot WinInstaller?
WinGrassInstaller_06032010_204605.jpg (107.4 KB) - added by hellik 10 years ago.
WinInstaller? Step1
WinGrassInstaller_06032010_204611.jpg (112.3 KB) - added by hellik 10 years ago.
WInInstaller Step2
WinGrassInstaller_06032010_204620.jpg (104.6 KB) - added by hellik 10 years ago.
WInInstaller Step3
WinGrassInstaller_06032010_204626.jpg (105.7 KB) - added by hellik 10 years ago.
WInInstaller Step4
WinGrassInstaller_06032010_204632.jpg (106.4 KB) - added by hellik 10 years ago.
WInInstaller Step5
WinGrassInstaller_06032010_204833.jpg (92.7 KB) - added by hellik 10 years ago.
WInInstaller Step6
WinGrassInstaller_06032010_204859.jpg (117.5 KB) - added by hellik 10 years ago.
WInInstaller Step7
WinGrassInstaller_06032010_204918.jpg (106.2 KB) - added by hellik 10 years ago.
WInInstaller Step8
WinGrassInstaller_06032010_204925.jpg (108.9 KB) - added by hellik 10 years ago.
WInInstaller Step9
WinGrassInstaller_06032010_204935.jpg (109.9 KB) - added by hellik 10 years ago.
WInInstaller Step10
Grass65_WinGrassInstaller_enhancement.patch (5.3 KB) - added by hellik 10 years ago.
Patch for GRASS-Installer.nsi

Download all attachments as: .zip

Change History (37)

comment:1 in reply to:  description Changed 10 years ago by hellik

Replying to hellik:

Hi,

i would suggest some enhancements for the WinGrass-Installer (based on a whish from MarkusN). Patch is against Grass65 for testing.

Helmut

(1) RequestExecutionLevel? user => RequestExecutionLevel? admin

see http://nsis.sourceforge.net/Docs/Chapter4.html

4.8.1.32 RequestExecutionLevel?:

Specifies the requested execution level for Windows Vista and Windows 7. The value is embedded in the installer and uninstaller's XML manifest and tells Vista/7, and probably future versions of Windows, what privileges level the installer requires. user requests the a normal user's level with no administrative privileges. highest will request the highest execution level available for the current user and will cause Windows to prompt the user to verify privilege escalation. The prompt might request for the user's password. admin  requests administrator level and will cause Windows to prompt the user as well.[...]

(2) a message box popping up before starting the installer to be sure to have the right to install in the default system program folder

Function .onInit

MessageBox MB_YESNO "This will install GRASS ${DEV65_VERSION_NUMBER}.Be sure to have rights to install the software. Right click on the installation file and RUN AS ADMINISTRATOR can help. Otherwise installation may fail. Continue?" IDYES NoAbort
Abort ; causes installer to quit.
NoAbort:

(3) ExecWait? from the NSIS allows to finish run_gmkfontcap.bat and then the win-installer continues to install

        ;Run g.mkfontcap outside a grass session during installation to catch al fonts 
ExecWait '"$INSTALL_DIR\etc\run_gmkfontcap.bat"' 

(4) ask about starting the readme/reference manual after successfull install

;README after successfull install

Function .onInstSuccess

    MessageBox MB_YESNO "Installation was sucessfull. Do you want to see the GRASS ${DEV65_VERSION_NUMBER} Reference Manual" IDNO NoReadme
      ExecShell "open" "$INSTALL_DIR\docs\html\index.html"
    NoReadme:

FunctionEnd

(5) ask about starting Grass after finishing the installer

;start Grass Gis after closing installation wizard

Function .onGUIEnd

    MessageBox MB_YESNO "Do you want to start GRASS ${DEV65_VERSION_NUMBER}?" IDNO NoGrassStart
      Exec '"$INSTALL_DIR\${GRASS_COMMAND}.bat" "-wxpython"'
    NoGrassStart:

FunctionEnd

any suggestions?

best regards Helmut

comment:2 Changed 10 years ago by hamish

Keywords: wingrass added

"Be sure to have rights to install the software."

whoa, don't use those words. You'll make people question if the software they just downloaded is illegal.

Why not just throw the usual error if mkdir C:\Program Files\GRASS-6.4.0 fails? And in the error message suggest a (possible) cause/remedy. (try running as Admin)

I'm bit confused about where g.mkfontcap is now, is the idea to let it run in the background but stall the -Finished- page until that is done? I know when installing software on windows in the computer lab as soon as it says "finished" I'll shut down the machine and move on to the next one. Any backgrounded jobs would get clobbered..

at finish it would seem more appropriate to open release notes (static copy shipped with the pkg pls) than the help pages?

minor; AFAIU users don't actually have to "I Agree" to the GPL to use it (only to distribute it). Change "Agree/Disagree?" to "Ok"? (I understand the installer software may not have considered the concept)

Hamish

comment:3 in reply to:  2 ; Changed 10 years ago by hellik

Replying to hamish:

"Be sure to have rights to install the software."

whoa, don't use those words. You'll make people question if the software they just downloaded is illegal.

Why not just throw the usual error if mkdir C:\Program Files\GRASS-6.4.0 fails? And in the error message suggest a (possible) cause/remedy. (try running as Admin)

i would change RequestExecutionLevel? user to RequestExecutionLevel? admin for the installer set by the NSIS-script.

I'm bit confused about where g.mkfontcap is now, is the idea to let it run in the background but stall the -Finished- page until that is done? I know when installing software on windows in the computer lab as soon as it says "finished" I'll shut down the machine and move on to the next one. Any backgrounded jobs would get clobbered..

when the installer is finished, also all backgrounded jobs (like running g.mkfontcap) invoked by the installer are finished.

at finish it would seem more appropriate to open release notes (static copy shipped with the pkg pls) than the help pages?

these are the options supported by the NSIS-script, in general there can be shown whatever wanted

 MUI_FINISHPAGE_SHOWREADME  file/url
File or website which the user can select to view using a checkbox. You don't need to put quotes around the filename when it contains spaces.

MUI_FINISHPAGE_SHOWREADME_TEXT text
Texts to display next to the 'Show Readme' checkbox.

MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
Do not check the 'Show Readme' checkbox by default

MUI_FINISHPAGE_SHOWREADME_FUNCTION function
Call a function instead of showing a file (define MUI_FINISHPAGE_SHOWREADME without parameters). You can use the function to show multiple files or you can change the checkbox name and use it for other things.

MUI_FINISHPAGE_LINK link_text
Text for a link on the which the user can click to view a website or file.

MUI_FINISHPAGE_LINK_LOCATION file/url
Website or file which the user can select to view using the link. You don't need to put quotes around the filename when it contains spaces.

minor; AFAIU users don't actually have to "I Agree" to the GPL to use it (only to distribute it). Change "Agree/Disagree?" to "Ok"? (I understand the installer software may not have considered the concept)

these are the options for the license-page of the installer supported by the NSIS-script

{{ MUI_LICENSEPAGE_TEXT_TOP text Text to display on the top of the page.

MUI_LICENSEPAGE_TEXT_BOTTOM text Text to display on the bottom of the page.

MUI_LICENSEPAGE_BUTTON button_text Text to display on the 'I Agree' button.

MUI_LICENSEPAGE_CHECKBOX Display a checkbox the user has to check to agree with the license terms.

MUI_LICENSEPAGE_CHECKBOX_TEXT text Text to display next to the checkbox to agree with the license terms.

MUI_LICENSEPAGE_RADIOBUTTONS Display two radio buttons to allow the user to choose between accepting the license terms or not.

MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT text Text to display next to the checkbox to accept the license terms.

MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE text Text to display next to the checkbox to decline the license terms. }}}

Helmut

comment:4 in reply to:  3 ; Changed 10 years ago by hamish

Replying to hellik:

i would change RequestExecutionLevel? user to RequestExecutionLevel? admin for the installer set by the NSIS-script.

would it still be possible to install to your home directory in that case? ie can you say no to the request and still manage to install it?

thanks, Hamish

comment:5 in reply to:  4 Changed 10 years ago by hellik

Replying to hamish:

Replying to hellik:

i would change RequestExecutionLevel? user to RequestExecutionLevel? admin for the installer set by the NSIS-script.

would it still be possible to install to your home directory in that case? ie can you say no to the request and still manage to install it?

thanks, Hamish

with RequestExecutionLevel? admin by double click (no right click) on the Win-installer a Windows-message-box asks you if you want continue or not and, if you continue, you are granted admin rights to install in c:\Program Files\ or whereever you want.

with RequestExecutionLevel? user you have to right click and run as admin, then the same Windows-message-box described above pops up and, if you continue, you are granted admin rights to install in c:\Program Files\ or whereever you want.

with RequestExecutionLevel? user and only double click, you can continue with the installer, but installing and extracting files in c:\Program Files\ fails on the most WinVista?/Win7-boxes, also creating desktop shortcuts etc may fail. installing in c:\ may be possible, depends on what rights the sysadmin gives to you. installing in other drives like d:\ etc may be possible. installing in your windows-home-directory should be possible.

so there are a lot of different options of granting installations rights in the windows world, AFAIK there have to be at least one user interaction to get installation rights in c:\Program Files\.

IMHO interaction with RequestExecutionLevel? admin and double click for starting the installer should be the easiest one.

with RequestExecutionLevel? user and right click, there should be anywhere an information about this (installation-README, installer-pop up with a message about this, ...).

Helmut

Changed 10 years ago by hellik

Screenshot WinInstaller?

comment:6 in reply to:  description ; Changed 10 years ago by hellik

Replying to hellik:

Hi,

i would suggest some enhancements for the WinGrass-Installer (based on a whish from MarkusN). Patch is against Grass65 for testing.

Helmut

the attached patch would pop up message boxes asking to view Readme-text (or whatever) and to launch Grass. both are working at least at my WinVista?-box.

a more elegant way would be a integration of this two options in the finish-page of the wininstaller (see attached screenshot). I've tested this a litte bit, but I've not managed yet to run Grass or view Readme.

Helmut

comment:7 in reply to:  3 Changed 10 years ago by glynn

Replying to hellik:

these are the options for the license-page of the installer supported by the NSIS-script

MUI_LICENSEPAGE_BUTTON button_text Text to display on the 'I Agree' button.

"Next"

MUI_LICENSEPAGE_CHECKBOX Display a checkbox the user has to check to agree with the license terms.

No.

MUI_LICENSEPAGE_RADIOBUTTONS Display two radio buttons to allow the user to choose between accepting the license terms or not.

No.

comment:8 in reply to:  6 ; Changed 10 years ago by hellik

Replying to hellik:

Replying to hellik:

Hi,

i would suggest some enhancements for the WinGrass-Installer (based on a whish from MarkusN). Patch is against Grass65 for testing.

Helmut

the attached patch would pop up message boxes asking to view Readme-text (or whatever) and to launch Grass. both are working at least at my WinVista?-box.

a more elegant way would be a integration of this two options in the finish-page of the wininstaller (see attached screenshot). I've tested this a litte bit, but I've not managed yet to run Grass or view Readme.

Helmut

I've managed now following:

(1) running g.mkfontcap invoked by the installer. a console window pops up with a little info message and closes automatically and the installer continues. at the moment no idea to do this in the background, but better than nothing.

(2) in the last installer-windows there are now the options to launch grass and view the reference manual in the system default browser. both options are working now.

(3) and the button text "next" on the license window

I'll add screenshots of the different steps and a patch for Grass65.

I think something like that should go into Grass64(RC6).

Helmut

Changed 10 years ago by hellik

Changed 10 years ago by hellik

WInInstaller Step2

Changed 10 years ago by hellik

WInInstaller Step3

Changed 10 years ago by hellik

WInInstaller Step4

Changed 10 years ago by hellik

WInInstaller Step5

Changed 10 years ago by hellik

WInInstaller Step6

Changed 10 years ago by hellik

WInInstaller Step7

Changed 10 years ago by hellik

WInInstaller Step8

Changed 10 years ago by hellik

WInInstaller Step9

Changed 10 years ago by hellik

WInInstaller Step10

Changed 10 years ago by hellik

Patch for GRASS-Installer.nsi

comment:9 in reply to:  8 Changed 10 years ago by hellik

Replying to hellik:

[...] and a patch for Grass65.

patch for Grass65 added.

I think something like that should go into Grass64(RC6).

any suggestions?

Helmut

comment:10 Changed 10 years ago by hamish

for view readme/launch grass I think it is better to have check boxes than popup nags.

IMO we should include a "." in the install dir (eg C:\Program Files\GRASS-6.4.0) as GRASS-64-SVN can be confused with 64bit version.

Hamish

comment:11 in reply to:  10 Changed 10 years ago by hellik

Replying to hamish:

for view readme/launch grass I think it is better to have check boxes than popup nags.

the check-box for view readme/launch grass is there in the finish page of the windows installer.

(see https://trac.osgeo.org/grass/attachment/ticket/986/WinGrassInstaller_06032010_204918.jpg)

the behaviour after finishing the installer can be changed. so view readme/launch grass can be invoked directly without a popup. but i think starting Grass and the browser with the reference manual at the same time could be confusing for a first time user, so I've chosen the way with the popup. but that's a personal point of view ...

IMO we should include a "." in the install dir (eg C:\Program Files\GRASS-6.4.0) as GRASS-64-SVN can be confused with 64bit version.

at the moment we have not a Grass6.4.0, only Grass64-svn, Grass65-svn and Grass7-svn, and all the nightly win-builds are from Grass64-svn. so IMO this would be only an option for the tag of Grass6.4.x.

Helmut

comment:12 in reply to:  6 ; Changed 10 years ago by neteler

Replying to hellik:

Replying to hellik:

Hi,

i would suggest some enhancements for the WinGrass-Installer (based on a whish from MarkusN). Patch is against Grass65 for testing.

Helmut

the attached patch would pop up message boxes asking to view Readme-text (or whatever) and to launch Grass. both are working at least at my WinVista?-box.

a more elegant way would be a integration of this two options in the finish-page of the wininstaller (see attached screenshot). I've tested this a litte bit, but I've not managed yet to run Grass or view Readme.

Looks good to me. Perhaps a message modification would be needed for "WInInstaller Step 8": The verb is missing for "Reference manual" - launch or install?

Markus

comment:13 in reply to:  12 Changed 10 years ago by hellik

Replying to neteler:

Replying to hellik:

Replying to hellik:

Hi,

i would suggest some enhancements for the WinGrass-Installer (based on a whish from MarkusN). Patch is against Grass65 for testing.

Helmut

the attached patch would pop up message boxes asking to view Readme-text (or whatever) and to launch Grass. both are working at least at my WinVista?-box.

a more elegant way would be a integration of this two options in the finish-page of the wininstaller (see attached screenshot). I've tested this a litte bit, but I've not managed yet to run Grass or view Readme.

Looks good to me. Perhaps a message modification would be needed for "WInInstaller Step 8": The verb is missing for "Reference manual" - launch or install?

Markus

submitted in a a little adapted way to 6.4 r41331 r41332 r41333 r41334 6.5 r41319 r41320 r41321 r41325 7.0 r41326 r41328 r41329 r41330

comment:14 in reply to:  8 ; Changed 10 years ago by glynn

Replying to hellik:

(3) and the button text "next" on the license window

I'll add screenshots of the different steps and a patch for Grass65.

The step 2 screen-shot shows "I Agree".

comment:15 in reply to:  14 Changed 10 years ago by hellik

Replying to glynn:

Replying to hellik:

(3) and the button text "next" on the license window

I'll add screenshots of the different steps and a patch for Grass65.

The step 2 screen-shot shows "I Agree".

sorry, it was the wrong old screenshot, in svn this is changed to "next"

see r41332

[...]
+    !define MUI_LICENSEPAGE_BUTTON "Next >"
[...]

Helmut

comment:16 Changed 10 years ago by neteler

Tested on Windows7, all runs well. The only problem: it starts the old tcl GUI when selecting "Launch GRASS". Is that intentional?

Markus

comment:17 in reply to:  16 ; Changed 10 years ago by martinl

Replying to neteler:

Tested on Windows7, all runs well. The only problem: it starts the old tcl GUI when selecting "Launch GRASS". Is that intentional?

AFAIR, the default was wxGUI. Is it planned change? Another issues:

  • Licence agreement - "If you accept the terms of the agreement, click I agree to continue" - there is no "agree" button, but "next"
  • When installation is completed, I need to press "Next" - probably "Completing" page could be entered automatically?

Martin

comment:18 in reply to:  17 ; Changed 10 years ago by hamish

Replying to neteler:

Tested on Windows7, all runs well. The only problem: it starts the old tcl GUI when selecting "Launch GRASS". Is that intentional?

well, it's still the default. the main icon in WinGrass runs "grass65 -wx" though, so you get it every time, unless you pick the "GRASS (old GUI)" icon. (this overwrites your chosen default btw, if that matters)

so changing the launcher to grass64 -wx should solve that.

Replying to martinl:

  • Licence agreement - "If you accept the terms of the agreement,

click I agree to continue" - there is no "agree" button, but "next"

set MUI_LICENSEPAGE_TEXT_TOP to "We hope you enjoy using GRASS" ?

or borrowing from an Ubuntu disc:

"GRASS is software libre. You are encouraged and legally
entitled to copy, reinstall, modify, and redistribute this program
for yourself and your friends under the terms of the GPL. Happy
mapping!"
  • When installation is completed, I need to press "Next" -

probably "Completing" page could be entered automatically?

I don't know if we can control that.

Instead of "launch release notes" perhaps call it "open, read, or browse" rel.notes ?

Hamish

comment:19 in reply to:  18 ; Changed 10 years ago by hellik

Replying to hamish:

Replying to neteler:

Tested on Windows7, all runs well. The only problem: it starts the old tcl GUI when selecting "Launch GRASS". Is that intentional?

well, it's still the default. the main icon in WinGrass runs "grass65 -wx" though, so you get it every time, unless you pick the "GRASS (old GUI)" icon. (this overwrites your chosen default btw, if that matters)

so changing the launcher to grass64 -wx should solve that.

see http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_6_4/mswindows/GRASS-Installer.nsi#L398

;launch Grass Gis by exit the installation wizard
Function LaunchGrass
Exec '"$INSTDIR\${GRASS_COMMAND}.bat" "-wxpython"'
FunctionEnd

there is the parameter "-wxpython" for launching grass by the installer. should this be "-wx"? or should the default be changed to starting the wx-gui?

Helmut

comment:20 in reply to:  19 Changed 10 years ago by hellik

Replying to hellik:

Replying to hamish:

Replying to neteler:

Tested on Windows7, all runs well. The only problem: it starts the old tcl GUI when selecting "Launch GRASS". Is that intentional?

well, it's still the default. the main icon in WinGrass runs "grass65 -wx" though, so you get it every time, unless you pick the "GRASS (old GUI)" icon. (this overwrites your chosen default btw, if that matters)

so changing the launcher to grass64 -wx should solve that.

see http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_6_4/mswindows/GRASS-Installer.nsi#L398

;launch Grass Gis by exit the installation wizard
Function LaunchGrass
Exec '"$INSTDIR\${GRASS_COMMAND}.bat" "-wxpython"'
FunctionEnd

this is borrowed from http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_6_4/mswindows/GRASS-Installer.nsi#L582

Helmut

comment:21 in reply to:  19 Changed 10 years ago by martinl

Replying to hellik:

> ;launch Grass Gis by exit the installation wizard
> Function LaunchGrass
> Exec '"$INSTDIR\${GRASS_COMMAND}.bat" "-wxpython"'
> FunctionEnd

there is the parameter "-wxpython" for launching grass by the installer. should this be "-wx"?

-wx is just shortcut for -wxpython. Martin

comment:22 in reply to:  16 Changed 10 years ago by hellik

Replying to neteler:

Tested on Windows7, all runs well. The only problem: it starts the old tcl GUI when selecting "Launch GRASS". Is that intentional?

Markus

fixed with launching the desktop shortcut "Launch GRASS with the new wxPython GUI" by the wininstaller: r41355, r41356, r41357

Helmut

comment:23 in reply to:  18 Changed 10 years ago by hellik

Replying to hamish: [...]

or borrowing from an Ubuntu disc:

"GRASS is software libre. You are encouraged and legally
entitled to copy, reinstall, modify, and redistribute this program
for yourself and your friends under the terms of the GPL. Happy
mapping!"

done r41361 r41362 r41363

Helmut

comment:24 in reply to:  18 Changed 10 years ago by hellik

Replying to hamish:

  • When installation is completed, I need to press "Next" -

probably "Completing" page could be entered automatically?

I don't know if we can control that.

no idea at the moment.

Helmut

comment:25 Changed 10 years ago by hellik

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.