lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Cygwin installation


From: Greg Chicares
Subject: [lmi] Cygwin installation
Date: Tue, 24 Jul 2007 15:41:10 +0000
User-agent: Thunderbird 1.5.0.10 (Windows/20070221)

It's time to overhaul the msw programming environment we use
for production (corporate bureaucracy still forbids developers
to use GNU/Linux). A decade ago we were using COMMAND.COM and a
variety of ported gnu utilities. By the turn of the century we
had standardized on this Cygwin spinoff:
  http://www.cygwin.com/ml/cygwin/1999-12/msg00359.html
along with Amol Deshpande's 'zsh' port. Since then we've made
limited use of this other Cygwin spinoff:
  http://www.mingw.org/msys.shtml
All those tools have shortcomings; all are now unmaintained.
This brings us by a commodious vicus of recirculation back to...

Cygwin. When a 1 GB disk was large, a 70 MB Cygwin package was
enormous; now a 350 MB Cygwin distro is comparatively smaller,
and these days the overhead of posix virtualization means less.
Speed and size were two issues that kept us wary of Cygwin, its
relative difficulty of installation being a third. However,
Cygwin is still actively maintained while other toolsets have
fallen by the wayside, and apparently we can make it easier to
install. Here's one idea:
  http://www.cygwin.com/ml/cygwin/2004-01/msg00056.html
but instead I'd like to try this alternative:
  http://www.cygwin.com/ml/cygwin/2007-07/msg00134.html
which seems simpler, so I've created this file:
  http://download.savannah.gnu.org/releases/lmi/setup.ini
to hold a set of requirements that seems reasonable for lmi.
(We can update it if it turns out to be inadequate.)

Here are detailed instructions that work fine for me; I'd like
to ask others to test them. Ultimately we'll write instructions
on webpages, but let's discuss them here first. You can skip all
of this if you're already comfortable with maintaining your own
Cygwin installation and can fix your own problems, though you're
still welcome to comment on these instructions.

0. Read this guide:
  http://sources.redhat.com/cygwin/cygwin-ug-net/setup-net.html
and refer to it again if anything goes wrong. Here I'll document
one particular two-step method, chosen in the hope that we can
someday use this idea:
  http://www.cygwin.com/faq/faq.setup.html#faq.setup.automated
to achieve a uniform installation across numerous boxen.

1. Uninstall any older version of Cygwin:
  http://www.cygwin.com/faq/faq.setup.html#faq.setup.uninstall-all
especially if you happen to have an ancient version and aren't
really familiar with it.

2. Choose directories. I use
  C:\cygwin
for the "Root Install Directory", and
  C:\cygwin-cache
for the "Local Package Directory". You can change them, heeding
the warnings in step 0, but in the following steps I'll assume
you're using exactly those directories.

3. Get this file
  http://cygwin.com/setup.exe
and save it to 'C:\cygwin-cache'; run it from there.

4. Skip past the startup page, which offers no options.

5. "Choose A Download Source": "Download Without Installing" is
the first step we'll take here.

6. "Select Local Package Directory": Use
  C:\cygwin-cache
as specified in step 2.

7. "Select Your Internet Connection": I use "Direct Connection",
but see the guide mentioned in step 0 if that doesn't work for
you; please mention any problems in a reply to this message.

8. "Choose A Download Site": Select any mirror; copy this:
  http://download.savannah.gnu.org/releases/lmi/
and paste it into "User URL", then click "Add". As a result, two
lines in the listbox should be selected, though they aren't
necessarily both visible on the same screen.

9. "Select Packages" appears after a progress page. Make sure
lmi is selected in the "Base" category; that's the only thing
you need to do on this page. After another progress page, you
should see "Download Complete"; click "Finish", and 'setup.exe'
terminates.

10. Now run 'setup.exe' again. Skip the startup page as in
step 4 above.

11. "Choose A Download Source": "Install from Local Directory"
is the option you want this time.

12. "Select Root Install Directory": Use
  C:\cygwin
as specified in step 2. Change "Install For" if you must due to
lack of admin rights. Do not select "DOS / text" mode, even if
you think it sounds like a good idea, because it's not.

13. "Select Local Package Directory": Use
  C:\cygwin-cache
as specified in step 2.

14. "Select Packages" appears after a progress page. Make sure
lmi is selected in the "Base" category; that's the only thing
you need to do on this page. It's possible for lmi to appear in
a different place within the "Base" list than it did in step 9.

15. After another progress page, you should see "Create Icons".
I check neither checkbox: these icons would be for 'bash', but
for uniformity let's use 'zsh' instead (see the instructions for
customizing 'zsh' below). Click "Finish", and 'setup.exe'
terminates.

That's it: you've installed Cygwin. Make sure you've built wx,
libxml2, and libxslt, and got their dlls on your $PATH (my old
MSYS and MinGW builds seem to work just fine); then you should
have all the tools you need for building lmi yourself in the
Cygwin environment. Here's my 'local_options.make':

  local_options += wx_dir='$(system_root)/wx20061204/wxWidgets-2006-12-04/'
  local_options += platform_boost_libraries=''

Don't forget to copy static data files such as SOA mortality
tables to 'C:\cygwin\opt\lmi\data'.

After deleting old build directories, I measured
  make check_physical_closure install >../log 2>&1
and found that it took
  seventeen minutes with Cygwin, versus
  fourteen minutes with an all-native toolset
and I consider the twenty-percent overhead an acceptable price
to pay for a modern toolset. Only builds should be slower; lmi
should run just as fast as always: technically speaking, we're
running a cross-compiler to produce native binaries.

As for 'zsh'--the first time you run it, you're confronted with
a setup script. I just dismiss it and use this startup file:

$cat ~/.zshrc
PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH"

bindkey "\e[3~" delete-char
bindkey "\e[1~" beginning-of-line
bindkey "\e[4~" end-of-line

prompt=%d[%?]$

HISTSIZE=1000
SAVEHIST=1000
HISTFILE=~/.history
setopt HIST_IGNORE_DUPS




reply via email to

[Prev in Thread] Current Thread [Next in Thread]