Opened 16 years ago

Closed 3 years ago

#18 closed enhancement (outdated)

shell package

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

Description

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 16 years ago.
example shell package

Download all attachments as: .zip

Change History (22)

by maphew, 16 years ago

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

example shell package

comment:1 by maphew, 16 years ago

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 by warmerdam, 16 years ago

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 by maphew, 14 years ago

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:

mkdir "%OSGEO4W_STARTMENU%\OSGeo4W"
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 by jmckenna, 14 years ago

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.

-jeff

comment:5 by jmckenna, 14 years ago

Cc: jmckenna added

comment:6 by maphew, 14 years ago

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 by maphew, 14 years ago

Component: InstallerPackage

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

comment:8 by maphew, 14 years ago

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 by warmerdam, 14 years ago

Matt,

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 by jmckenna, 14 years ago

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 by maphew, 14 years ago

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 by jmckenna, 14 years ago

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 by maphew, 14 years ago

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 by jmckenna, 14 years ago

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

Thanks!

comment:15 by maphew, 14 years ago

Keywords: pkg-shell added

comment:16 by maphew, 13 years ago

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 by warmerdam, 13 years ago

Matt,

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 download.osgeo.org 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 by maphew, 13 years ago

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 by maphew, 12 years ago

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 by maphew, 12 years ago

#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 by jef, 3 years ago

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