Commit 1efad323 authored by Kim Nguyễn's avatar Kim Nguyễn
Browse files

Move old files.

parent e724ce26
ftp://ftp.leo.org/pub/altlinux/Sisyphus/files/i586/RPMS/findlib-0.8-alt2s.i586.rpm
ftp://ftp.leo.org/pub/altlinux/Sisyphus/files/i586/RPMS/pxp-1.1.93-alt2s.i586.rpm
ftp://ftp.leo.org/pub/altlinux/Sisyphus/files/i586/RPMS/pcre-ocaml-4.28.3-alt3s.i586.rpm
<box title="Rpm packages" link="rpm">
<p>
In order to install the cduce rpm packages you will need to install
the following packages
<pre>
ocaml >= 3.06
findlib >= 0.8
pcre-ocaml>= 4.22
ocamlnet >= 0.96
pxp >= 1.1.93
expat >= 1.95.6 (just for the expat package)
<pre>
</p>
<p> All these packages can be found in the Altlinux distribution: for Asia
<a href="ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/files/i586/RPMS/">i586</a>,
<a href="ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/files/SRPMS">src</a>; European mirror <a href="ftp://ftp.leo.org/pub/altlinux/Sisyphus/files/i586/RPMS/">i586</a>, <a href="ftp://ftp.leo.org/pub/altlinux/Sisyphus/files/SRPMS/">src</a>
<p>
<p>N.B. rpm will check that you installed all these packages. If you have them installed but not via rpm then install CDuce by <code>rpm -Uvh --nodeps cduce-X.X.X-X.rpm</code>
<p>
Installation Notes for Windows XP/MinGW
=======================================
It is possible to compile CDuce under cygwin with the MinGW toolchain.
Currently, the resulting executable still depends on the cygwin1.dll.
The suspect is pcre, but the source of the "pollution" has not been
determined.
The dependencies can be checked with the "cygcheck" command under
cygwin. Note that cygcheck searches in the PATH, i.e., if a binary is
not in the path, one must give the full path. To check a binary in
the mingw directory (e.g., C:\ocamlmgw\bin\cduce), one must give the
Mingw path (C:/ocamlmgw/bin/cduce) to cygcheck, not the cygwin path
(/cygdrive/c/ocamlmgw/bin).
When compiling under the MinGW toolchain, the option -mno-cygwin must
always be passed to the C compiler and linker. It is also necessary
to ensure that one is not linking against any cygwin libraries at any
point. The MinGW libraries are located in /usr/lib/...
Steps:
----------------------------------------------------------------------
1) In Cygwin, add the packages for MinGW support to the ones already
mentioned in INSTALL.WIN32.
gcc-mingw-core
mingw-runtime
w32-api
<maybe more, which may be the cause of our problem?>
Remove the prce packages from Cygwin, to make sure that the pcre
used is the one installed under Mingw.
----------------------------------------------------------------------
2) Install tcl/tk in Windows
Install Tcl/Tk in a windows top directory, eg, C:\Tcl
binaries available as described in ocaml notes (README.win32).
----------------------------------------------------------------------
3) OCAML
Build ocaml 3.10 for the mingw toolchain as specified in README.win32,
but with the following addition from the ocaml mailing list:
From: Arnold Guillaumot <arnold.guillaumot <at> snef.ro>
Subject: Re: Compiling with Cygwin/MinGW
Newsgroups: gmane.comp.lang.ocaml.lib.gtk
Date: 2007-09-05 18:55:39 GMT
Hi,
I succeeded in the past to build ocaml and lablgtk with MinGW/MSYS
(without Cygwin), together with ocamlmklib.
In the ocaml tree, change the following files:
1) ocamlmklib
The 'trick' is to copy the Makefile part of ocamlmklib in the Makefile.nt
edit tools/Makefile.nt and change the Line 26
all: ocamldep ocamlprof ocamlcp.exe ocamlmktop.exe primreq
in
all: ocamldep ocamlprof ocamlcp.exe ocamlmktop.exe primreq
ocamlmklib.exe
append the following lines after the ocamlmktop part:
# To help building mixed-mode libraries (Caml + C)
ocamlmklib.exe: myocamlbuild_config.cmo ocamlmklib.cmo
$(CAMLC) $(LINKFLAGS) -o ocamlmklib.exe myocamlbuild_config.cmo
ocamlmklib.cmo
ocamlmklib.cmo: myocamlbuild_config.cmi
myocamlbuild_config.ml: ../config/Makefile
../build/mkmyocamlbuild_config.sh
cp ../myocamlbuild_config.ml .
install::
cp ocamlmklib.exe $(BINDIR)/ocamlmklib.exe
clean::
rm -f ocamlmklib.exe
ocamlmklib.ml: ocamlmklib.mlp ../config/Makefile
echo '(* THIS FILE IS GENERATED FROM ocamlmklib.mlp *)' >ocamlmklib.ml
sed -e "s|%%BINDIR%%|$(BINDIR)|" \
-e
"s|%%SUPPORTS_SHARED_LIBRARIES%%|$(SUPPORTS_SHARED_LIBRARIES)|" \
-e "s|%%MKSHAREDLIB%%|$(MKSHAREDLIB)|" \
-e "s|%%BYTECCRPATH%%|$(BYTECCRPATH)|" \
-e "s|%%NATIVECCRPATH%%|$(NATIVECCRPATH)|" \
-e "s|%%MKSHAREDLIBRPATH%%|$(MKSHAREDLIBRPATH)|" \
-e "s|%%RANLIB%%|$(RANLIB)|" \
ocamlmklib.mlp >> ocamlmklib.ml
beforedepend:: ocamlmklib.ml
clean::
rm -f ocamlmklib.ml
It seems that this is not in the ocaml distribution because it doesn't
work under MSVS, only under MinGW, and since there is only one
Makefile.nt...
adjust PATH:
PATH=$PATH:/cygdrive/c/ocamlmgw/bin
----------------------------------------------------------------------
4) findlib
Patch configure replacing
stdlib = `get_stdlib`
with
stdlib = /cygdrive/c/ocamlmgw/lib
./configure -bindir /cygdrive/c/ocamlmgw/bin
Patch Makefile.config replacing
OCAML_CORE_MAN = /usr/local/man
with
OCAML_CORE_MAN = /cygdrive/c/ocamlmgw/man
(since ocaml for mingw does not install the man directories, the
mandir option does not work).
make all
make opt
make install
----------------------------------------------------------------------
5) ulex
This gets stuck with the error "can't found ocamlbuildlib.cma in
ocamlbuild -where", which is not surprising, since ocamlbuild -where
returns /ocamlbuildlib/lib, which doesn't exist. See ocaml bug 4379.
This is supposedly fixed in ocaml 3.10.1, but it still doesn't seem to
work.
Until this bug is fixed, patch Makefile to use
ocamlbuild -install-lib-dir "C:\ocamlmgw\lib\ocamlbuild"
(or whereever your mingw installation is). This workaround is
suitable for cygwin, but it may not work in Mingw/MSYS.
Remember to also add -classic-display to ocamlbuild, since we are
building with ocaml 3.10.
make all
make all.opt
make install
----------------------------------------------------------------------
6) PCRE:
Since the pcre that comes with cygwin cannot be used in mingw, install
pcre before pcre-ocaml. This is simpler if pcre is not installed in
cygwin.
Go back to cygwin's setup.exe and install gcc-g++ (C++ compiler).
Download pcre-7.2 from www.pcre.org or
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre
To configure pcre-7.2:
If pcre is installed in cygwin, patch ltmain.sh so that need_relink is
always "no", that may avoid the cygwin dependency.
./configure --prefix="C:/ocamlmgw" --exec-prefix="C:/ocamlmgw" --includedir=/usr/include/mingw --disable-cpp --enable-utf8 CFLAGS="-mno-cygwin -I /usr/include/w32api -I /usr/include/mingw"
Patch the Makefile to replace cygwin with mingw everywhere it occurs
(except in -mno-cygwin).
Patch the libtool file similarly.
make
make install
This installs the libs in the ocaml mingw directory
(e.g. C:\ocamlmgw\lib, but the .h files in /usr/include/mingw. This
should be suitable for continued compilation using the mingw
toolchain, but not for a pure mingw compilation.
Check with cygcheck whether, eg, pcregrep.exe, depends on the
cygwin1.dll and cygpcre-0.dll.
----------------------------------------------------------------------
7) pcre-ocaml:
Edit Makefile.conf to contain
export STATIC = yes
export INCDIRS := /usr/include/mingw
export LIBDIRS := C:/ocamlmgw/lib
MINGW=1
CC=gcc
export GCC
export MINGW
(If cc is not set, it defaults to cc, which causes 'make' to fail
spectacularly during
ocamlc -c -cc "cc" -ccopt "-fPIC -O2 -DPIC -mno-cygwin -I /usr/include/mingw -o pcre_stubs.o" pcre_stubs.c
sometimes even to the point of crashing cygwin.)
make
make install
The file pcre_make.win32/Makefile.mingw does not seem to work, either
it is for Mingw/MSYS or it has not been updated.
The file README.win32 concerns MS Visual Studio, i.e., it is
irrelevant.
To check that pcre actually works in ocaml:
make a file foo.ml that uses Pcre, eg
open Prce;;
qreplace;;
compile it with
ocamlc -I "C:/ocamlmgw/lib/site-lib/pcre" foo.ml
----------------------------------------------------------------------
8) pxp
./configure -without-wlex -without-wlex-compat -lexlist utf8,iso88591 -without-pp
make all
make opt
make install
----------------------------------------------------------------------
9) CDuce
./configure --prefix="C:/ocamlmgw" --mliface="C:/cygwin/usr/src/ocaml-3.10.0/"
patch Makefile.conf to set FORPACK=true
(For some reason that fails in configure.ml)
Patch Makefile.distrib to set
LINK = $(CAMLOPT) -custom -linkpkg
in line 71 to statically link the library.
make all
make install
<?xml version="1.0" standalone="yes"?>
<bib>
<book>
<title>Persistent Object Systems</title>
<year>1994</year>
<author>M. Atkinson</author>
<author>V. Benzaken</author>
<author>D. Maier</author>
</book>
<book>
<title>OOP: a unified foundation</title>
<year>1997</year>
<author>G. Castagna</author>
</book>
</bib>
type Biblio = <bibliography>[Heading Paper*];;
type Heading = <heading>[ PCDATA ];;
type Paper = <paper>[Author+ Title ((Conference Series?) |(Journal Volume? Number)) Publisher? Year File Abstract?];;
type Author = <author>[ PCDATA ];;
type Title = <title>[ PCDATA ];;
type Conference = <conference>[ PCDATA ];;
type Series = <series>[ PCDATA ];;
type Journal = <journal>[ PCDATA ];;
type Publisher = <publisher>[ PCDATA ];;
type Volume = <volume>[ Int ];;
type Number = <number>[ Int ];;
type Year = <year>[ 1970--2010 ];;
type File = <file>[ PCDATA ];;
type Abstract= <abstract> Text;;
type Text = [ PCDATA ];;
type Html = <html>[Head? Body];;
type Head = <head>[ <title>[ PCDATA ] ];;
type Body = <body>[Mix*];;
type Mix = <h1>[Mix*]
| <a href=String>[Mix*]
| <p>[Mix*]
| <em>[Mix*]
| <ul>[ <li>[Mix*] +]
| Char;;
let fun do_authors ([Author+] -> [Mix*])
| [ <author>a ] -> a
| [ <author>a <author>b ] -> a @ " and, " @ b
| [ <author>a; x] -> a @ ", " @ (do_authors x);;
let fun do_paper (Paper -> <li>[Mix*])
| <paper>[ x::_* <title>t <_>c _* <year>_ <file>f _* ] ->
(* Here, type inference says: x : [Author+] ... *)
let authors = do_authors x in
<li>([ <a href=f>t ] @ authors @ "; in " @ [ <em>c ] @ "." );;
let fun do_biblio (Biblio -> Html)
<bibliography>[ <heading>h; p ] ->
let body = match p with
| [] -> "Empty bibliography"
| l -> [ <h1>h <ul>(map l with x -> do_paper x) ]
in
<html>[ <head>[ <title>h ] <body>body ];;
let bib : Biblio =
<bibliography>[
<heading>"Alain Frisch's bibliography"
<paper>[
<author>"Alain Frisch"
(* <author>"Giuseppe Castagna"
<author>"Vronique Benzaken" *)
<title>"Semantic subtyping"
<conference>"LICS 02"
<year>[2002]
<file>"semsub.ps.gz"
<abstract>[ 'In this work,...' ]
]
(*
<paper>[
<author>"Mariangiola Dezani-Ciancaglini"
<author>"Alain Frisch"
<author>"Elio Giovannetti"
<author>"Yoko Motohama"
<title>"The Relevance of Semantic Subtyping"
<conference>"ITRS'02"
<year>[2002]
<file>"itrs02.ps.gz"
]
<paper>[
<author>"Vronique Benzaken"
<author>"Giuseppe Castagna"
<author>"Alain Frisch"
<title>"CDuce: a white-paper"
<conference>"PLANX-02"
<year>[2002]
<file>"planx.ps.gz"
]
*)
];;
do_biblio bib
;;
(*
[bib]/<papr>_/<author>_;;
*)
\ No newline at end of file
To make the windows installer
==============================
To use the script, you need the Inno setup tool, which is available
from
http://www.jrsoftware.org/isinfo.php
You should get the basic package (Stable Release) and the QuickStart
Pack. To install, you first run the Inno installer (isetup-5.2.2.exe
or later) and then the QuickStart Pack installer (ispack-5.2.2.exe or
later).
The installer script uses the files
CDuce inno setup script 1.iss
cduce.exe
cygwin1.dll
cygpcre-0.dll
dtd2cduce.exe
babel-raw.bmp
cducepower.ico
gpl-3.0-standalone.html
LICENSE.win32
README.win32
You can either double-click on the setup script
"CDuce inno setup script 1.iss"
(which is located in the win32 directory) to launch Inno or launch
Inno tool first and then open the script with File->Open.
If the other files are placed correctly, you generate "CDuce
setup.exe" by selecting Project->Compile Setup or by pressing Ctrl+F9.
The installer is called CDuce setup.exe and is placed in the folder
"Output".
If you want to use different files (e.g., change the icons) or if you
have moved a file, you can either edit the setup script or use the
Inno menus.
The text presented during installation is selected in
Project->Setup Options->Application.
The installer icon and the background image are selected in
Project->Setup Options->Appearance.
Note that the files are found using relative paths, so if your cduce
is not located in /usr/src/cduce/cduce/trunk, Inno might have trouble
finding some of them, in particular the cygwin dll.
The script contains all the information, the stuff in all the other
sections, Icons, Registry, etc, just get converted to text in the
script.
One adds stuff to the sections by right-clicking.
The stuff concerning the icons shown on files with specific suffixes
and which application is launched when one double-clicks a file with a
certain suffix is in the Registry section.
It might be a good idea to exit cygwin before running the installer.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment