Opened 13 years ago

Closed 8 months ago

#18 closed enhancement (outdated)

shell package

Reported by: maphew Owned by: maphew
Priority: major Component: Package
Version: Keywords: pkg-shell
Cc: hhayashi, jmckenna


I would like to shift that action to the msvcrt (base) package at some point, or alternatively to create a "shell" package that creates it and that is a dependency of anything with a commandline commands like GDAL, PROJ and GRASS.

-- Frank W., osgeo4w mailing list

Attachments (1)

shell-0.0-1.tar.bz2 (3.1 KB) - added by maphew 13 years ago.
example shell package

Download all attachments as: .zip

Change History (22)

Changed 13 years ago by maphew

Attachment: shell-0.0-1.tar.bz2 added

example shell package

comment:1 Changed 13 years ago by maphew

Proof of concept - I've never made a package before; I've no idea if this is correct. I just copied the structure I could see in the other packages. The md5sum is made up.

  1. put the attached shell*.bz2 into var/cache/...../release/shell/,
  2. Insert the following into etc/setup/setup.ini:
    @ shell
    sdesc: "setup OSGeo4W command shell environment and shortcut"
    ldesc: "setup OSGeo4W command shell environment and shortcut"
    category: Commandline_Utilities
    requires: msvcrt
    version: 0.0-1
    install: ./release/shell/shell-0.0-1.tar.bz2 3145 8ef010bafbb234ed1f9372e9b50767f6
  1. and run "apt install shell"

comment:2 Changed 13 years ago by warmerdam

I have uploaded this package with a small change to use %OSGEO4W_STARTMENU% in place of "start menu" in the postinstall script per #21.

I have not yet modified the installer to stop doing the actions done by the shell package, nor to make all the packages that ought to depend on shell do so (ie. proj, gdal, grass, etc).

I think we need to deploy these steps in a single step with some testing.

comment:3 Changed 12 years ago by maphew

windows7 brought to light a problem with the variables in the postinstall.bat (#122)

Windows7 (and I think Vista) defaults:

%ALLUSERSPROFILE% expands to C:\ProgramData %ALLUSERSPROFILE%\Desktop expands to C:\Users\Public\Desktop While all users start menu is C:\ProgramData\Microsoft\Windows\Start Menu

Lightly tested fix:

xxmklink "%OSGEO4W_STARTMENU%\OSGeo4W\OSGeo4W Shell.lnk" "%OSGEO4W_ROOT%\OSGeo4W.bat" " " \ "OSGeo for Windows command shell" 1 "%OSGEO4W_ROOT%\OSGeo4W.ico
xxmklink "%ALLUSERSPROFILE%\Desktop\OSGeo4W Shell.lnk" "%OSGEO4W_ROOT%\OSGeo4W.bat" " " \ "OSGeo for Windows command shell" 1 "%OSGEO4W_ROOT%\OSGeo4W.ico

comment:4 Changed 12 years ago by jmckenna

Cc: hhayashi added

Hi Matt,

I have a Window7 VM and can test this for you, if you wish. If so, just point me to where to edit these lines. Thanks.


comment:5 Changed 12 years ago by jmckenna

Cc: jmckenna added

comment:6 Changed 12 years ago by maphew

Owner: changed from osgeo4w-dev@… to maphew
Status: newassigned

Jeff, it's a wholesale replacement of ./etc/postinstall/shell.bat (strips %allusersprofile% from first two lines). It's not specific to Win7 after all. I'll upload a new shell package in a little bit.

comment:7 Changed 12 years ago by maphew

Component: InstallerPackage

New shell package uploaded and promoted to live. Created [pkg-shell] with brief description and changelog.

comment:8 Changed 12 years ago by maphew

Frank could you please clarify what "I think we need to deploy these steps in a single step with some testing." means? I'm thinking I just jumped the gun...

comment:9 Changed 12 years ago by warmerdam


I meant the steps of:

  1. Modifying OSGeo4W's setup.exe to stop setting up the shell icon itself.
  2. Modifying appropriate packages to add a dependency on the shell package.

comment:10 Changed 12 years ago by jmckenna

Ok here are my testing results:

  • existing WindowsVM install of OSGeo4W used
  • clicked on setup.exe, then Advanced, noticed that Commandline-Utilities/Shell? was not installed
  • installed Shell 1.0.0-3
  • went to desktop
  • before installing Shell, there was one OSGeo4W shortcut on desktop, which opens a shell windows with osgeo4w.bat executed
  • now after installing Shell, there are 2 OSGeo4W shortcuts on desktop (one named "OSGeo4W" and another named "OSGeo4W Shell")
  • both shortcuts seem to execute this new shell package (available exe commands are displayed in both windows)

Is this the expected behaviour?

comment:11 Changed 12 years ago by maphew

yes that's expected, thanks for the feedback Jeff. Two different link names is inadvertent though. The long form, 'Osgeo4w shell', is from the shell package. I'd leave it that way as it's more descriptive, though perhaps for simplicity's sake it should match osgeo-setup's link until the changeover is complete.

Frank: is #2 as straightforward as adding 'shell' as a dependency for any setup.hint in the Commandline_Utilities category? If so I'm happy to do that. I can't change setup.exe though.

comment:12 Changed 12 years ago by jmckenna

Ah ok, so if I understand your response, your shell package will replace the default installer desktop shortcut in the near future, but until then users will have 2 shortcuts on the desktop if they install this additional shell package, correct?

comment:13 Changed 12 years ago by maphew

I've uploaded shell-1.0.0-4 which uses the same shortcut name as setup, Osgeo4w.lnk, so there will not be duplicate links.

Anybody who currently has shell 1.0.0-2 or earlier and upgrades will get duplicate links however, as prior to .0-3 the link was in CurrentUser? and now it is in AllUsers?.

comment:14 Changed 12 years ago by jmckenna

I have tested shell 1.0.0-4, and on Windows7 there is now only one OSGeo4W.lnk


comment:15 Changed 11 years ago by maphew

Keywords: pkg-shell added

comment:16 Changed 10 years ago by maphew

In reviewing this ticket, it looks like the only thing left to do is update the setup.hint for each package to include shell as a required package. I think this can be done by the simple expedient of searching and replacing msvcrt with shell (excepting shell itself of course). Is this correct?

comment:17 Changed 10 years ago by warmerdam


Did the shell creation logic in the installer get removed? I didn't think it had yet. Or was your point that the shell package is now using the same name as the installer so they don't really conflict?

As I'm at the conference this week it is quite hard to do OSGeo4W stuff. I'd also note that is currently frozen while we wait for the server to come back (we are using the backup) so this is a bad time for OSGeo4W changes (IMHO).

Perhaps next week?

comment:18 Changed 10 years ago by maphew

yes my point was that there is no conflict in moving this ticket forward because the link name is the same. It would be better to remove the installer logic but doing so is outside what I can do (perhaps that should be another ticker). And yes I can certainly wait a week.

comment:19 Changed 10 years ago by maphew

I'd like to go ahead with the last two steps of making pkg-shell the primary requisite of all command line packages in place of pkg-msvcrt.

  1. in */setup.hint replace msvcrt with shell, excepting shell/setup.hint which will remain a dependent on msvcrt.
  1. After a period of successful testing, the shell and desktop link creation duties can be removed from setup.exe

If there are no objections I'll do #1 in a few days. #2 will have to be by someone else as I don't know how, and then we can close this ticket. :-)

comment:20 Changed 10 years ago by maphew

#1 is mostly done, there are 41 packages not updated as I don't have write access to the directories. They're recorded in setup_hints_still_msvcrt.txt at /osgeo/download/osgeo4w/release

comment:21 Changed 8 months ago by jef

Resolution: outdated
Status: assignedclosed
Note: See TracTickets for help on using tickets.