[Top][All Lists]

[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 (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:
along with Amol Deshpande's 'zsh' port. Since then we've made
limited use of this other Cygwin spinoff:
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:
but instead I'd like to try this alternative:
which seems simpler, so I've created this file:
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:
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:
to achieve a uniform installation across numerous boxen.

1. Uninstall any older version of Cygwin:
especially if you happen to have an ancient version and aren't
really familiar with it.

2. Choose directories. I use
for the "Root Install Directory", and
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
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
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:
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'

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
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
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'

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

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



reply via email to

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