Opened 15 years ago

Closed 15 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 15 years ago.
Screenshot WinInstaller
WinGrassInstaller_06032010_204605.jpg (107.4 KB ) - added by hellik 15 years ago.
WinInstaller Step1
WinGrassInstaller_06032010_204611.jpg (112.3 KB ) - added by hellik 15 years ago.
WInInstaller Step2
WinGrassInstaller_06032010_204620.jpg (104.6 KB ) - added by hellik 15 years ago.
WInInstaller Step3
WinGrassInstaller_06032010_204626.jpg (105.7 KB ) - added by hellik 15 years ago.
WInInstaller Step4
WinGrassInstaller_06032010_204632.jpg (106.4 KB ) - added by hellik 15 years ago.
WInInstaller Step5
WinGrassInstaller_06032010_204833.jpg (92.7 KB ) - added by hellik 15 years ago.
WInInstaller Step6
WinGrassInstaller_06032010_204859.jpg (117.5 KB ) - added by hellik 15 years ago.
WInInstaller Step7
WinGrassInstaller_06032010_204918.jpg (106.2 KB ) - added by hellik 15 years ago.
WInInstaller Step8
WinGrassInstaller_06032010_204925.jpg (108.9 KB ) - added by hellik 15 years ago.
WInInstaller Step9
WinGrassInstaller_06032010_204935.jpg (109.9 KB ) - added by hellik 15 years ago.
WInInstaller Step10
Grass65_WinGrassInstaller_enhancement.patch (5.3 KB ) - added by hellik 15 years ago.
Patch for GRASS-Installer.nsi

Download all attachments as: .zip

Change History (37)

in reply to:  description comment:1 by hellik, 15 years ago

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 by hamish, 15 years ago

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

in reply to:  2 ; comment:3 by hellik, 15 years ago

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

in reply to:  3 ; comment:4 by hamish, 15 years ago

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

in reply to:  4 comment:5 by hellik, 15 years ago

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

by hellik, 15 years ago

Screenshot WinInstaller

in reply to:  description ; comment:6 by hellik, 15 years ago

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

in reply to:  3 comment:7 by glynn, 15 years ago

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.

in reply to:  6 ; comment:8 by hellik, 15 years ago

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

by hellik, 15 years ago

WInInstaller Step2

by hellik, 15 years ago

WInInstaller Step3

by hellik, 15 years ago

WInInstaller Step4

by hellik, 15 years ago

WInInstaller Step5

by hellik, 15 years ago

WInInstaller Step6

by hellik, 15 years ago

WInInstaller Step7

by hellik, 15 years ago

WInInstaller Step8

by hellik, 15 years ago

WInInstaller Step9

by hellik, 15 years ago

WInInstaller Step10

by hellik, 15 years ago

Patch for GRASS-Installer.nsi

in reply to:  8 comment:9 by hellik, 15 years ago

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 by hamish, 15 years ago

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

in reply to:  10 comment:11 by hellik, 15 years ago

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

in reply to:  6 ; comment:12 by neteler, 15 years ago

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

in reply to:  12 comment:13 by hellik, 15 years ago

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

in reply to:  8 ; comment:14 by glynn, 15 years ago

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".

in reply to:  14 comment:15 by hellik, 15 years ago

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 by neteler, 15 years ago

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

Markus

in reply to:  16 ; comment:17 by martinl, 15 years ago

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

in reply to:  17 ; comment:18 by hamish, 15 years ago

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

in reply to:  18 ; comment:19 by hellik, 15 years ago

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

in reply to:  19 comment:20 by hellik, 15 years ago

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

in reply to:  19 comment:21 by martinl, 15 years ago

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

in reply to:  16 comment:22 by hellik, 15 years ago

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

in reply to:  18 comment:23 by hellik, 15 years ago

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

in reply to:  18 comment:24 by hellik, 15 years ago

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 by hellik, 15 years ago

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