[mercury-users] Alternative binary distribution for Mercury on Windows

Sergey Khorev iamphet at nm.ru
Wed Feb 1 22:32:28 AEDT 2006


Long time ago I created InnoSetup-based distribution for my personal purposes and finally found some time to share it.

http://cyber.miem.edu.ru/~iamphet/mercury/mercury-0.12.2_FULL_BIG.exe
(20Mb) includes grades asm_fast.gc, asm_fast.gc.tr, asm_fast.gc.tr.debug, hlc.gc, hlc.gc for MSVC, asm_fast.gc.tr.decldebug, asm_fast.gc.memprof, GCC, UnxUtils

http://cyber.miem.edu.ru/~iamphet/mercury/mercury-0.12.2_FULL_NORMAL.exe
(13Mb) includes grades asm_fast.gc, asm_fast.gc.tr.debug, hlc.gc, hlc.gc for MSVC, GCC, UnxUtils

Excerpt from README (sorry for my poor English):

I don't like using Cygwin just for dozen of Unix utils required by mmc and 
mmake so I've tried to create relatively self-contained package to use with
MinGW and MSVC. So I took required binaries from http://unxutils.sf.net
and http://mingw.org.

mmc.bat, mdb.bat, mprof.bat and mmake.bat just invoke sh.exe to execute
corresponding (slightly tweaked) scripts. 

Documentation has been converted to CHM format. Apart from convenient browsing
it provides you with an index of chapters and full-text search.

Samples, extras, Emacs and Vim support files are included as well. 

InnoSetup provided an excellent compression ratio for the installer.


Requirements
------------

1) Microsoft Windows :) Batch files use cmd extensions, so they probably
will work only on Windows 2000 and above.
2) Microsoft Visual C++ (6.0/7.0/7.1 or free Visual C++ Toolkit) if you want
to use hlc.gc grade for MSVC.


Limitations
-----------

File paths with spaces don't work reliably now.


Quick start
-----------

Installer doesn't create or alter any environment variables or system
directories/files. It creates shortcuts for command prompt with Mercury added
to PATH (just like Visual Studio). Click shortcut, then cd to `samples`
directory and issue `mmc eliza`. Or, to test `mmake`::

mmake eliza.depend
mmake eliza

This should create `eliza.exe`.

Mercury doesn't like DOS-style end of line (CR LF), so I added `dos2unix` 
utility to convert text files to Unix format.


Customising Installation
------------------------

Installation can be fine-tuned by creating/editing `bin/user.bat` and
`bin.vc/user.bat` for MinGW and MSVC variants accordingly.
Normally installer writes there some default preferences.


Vim Support Files
-----------------

In addition to the stock Mercury files, there are other files in 
`vim` subdirectory. `ftplugin/mercury.vim` allows you to use ``:make`` command
to build Mercury files on Win32 with `mmake`. If you want to use Mercury with
MSVC, set variable `mercury_use_msvc` in your `_vimrc`.
In addition, `plugin/mercury_commands.vim` provides:
  1) ``:Mmc [arg1] ...`` invokes `mmc.bat` redirecting error messages to 
`quickfix` window. If no arguments were supplied, it passes current filename.
  2) ``:Mmake [arg1] ...`` invokes `mmake.bat` and shows errors from
current file in the `quickfix` window.
  3) ``:Mmerr`` shows last error message from Mmc or Mmake
  4) ``:Mmod name [interface_imports [implementation_imports]]`` inserts 
    module template
  5) ``:Mmain name [interface_imports [implementation_imports]]`` inserts 
    module template with the `main` predicate
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list