OCamlInstall

From Baka-Tsuki
Jump to: navigation, search

This page describes how to build RLDev on a Windows machine. Last updated 2011-05-22. (Old instructions are in the archive)

These instructions have been tested on Windows XP Mode (VirtualPC), 32-bit. Based on the modified version of RLDev from the Clannad project. Anecdotal evidence suggests that RLDev won't work on a 64-bit OS.

== DOWNLOAD TOOLS ==
  1) Get 7-zip, to extract .tar.gz archives (search www.7-zip.org)
  2) Get TortoiseSVN, to download RLDev source code (http://tortoisesvn.net/downloads.html)
  3) Get Cygwin's setup file, to install Cygwin to use RLDev (http://cygwin.com/setup.exe)

== DOWNLOAD FILES ==
  OCAML AND LIBRARIES (Note: Newer versions of OCaml and Ulex won't work)
  1) Get OCaml 3.09:    http://caml.inria.fr/pub/distrib/ocaml-3.09/ocaml-3.09.3.tar.gz
  2) Get Findlib 1.2.1: http://download.camlcity.org/download/findlib-1.2.1.tar.gz
  3) Get OMake 0.9.6.8: http://web.archive.org/web/20070623190729/mojave.metaprl.org/download/omake/omake-0.9.6.8-1.tar.gz
  4) Get ExtLib 1.4:    http://sourceforge.net/projects/ocaml-lib/files/extlib/extlib-1.4/extlib-1.4.tgz/download
  5) Get Ulex 0.8:      http://www.cduce.org/download/old/ulex-0.8.tar.gz
  6) Get XML Light 2.2: http://tech.motion-twin.com/zip/xml-light-2.2.zip

  RLDEV
  1) Install TortoiseSVN and restart your computer.
  2) Right-click on your desktop and select "TortoiseSVN" -> "Repo-browser"
  3) Enter the RLDev repository URL: http://subversion.assembla.com/svn/clannad/rldev/trunk
  4) Right-click on the trunk "trunk" on the left, and select "Export"
  5) Enter "C:\RLDevSetup\rldev\" as the Export directort, and click "OK"

== PREPARE FILES == 
  1) Check C:\RLDevSetup\ -- It should alread contain an "rldev" folder
  2) Put Cygwin's setup.exe in C:\RLDevSetup
  3) Extract all the OCaml library files into C:\RLDevSetup\ocaml-3.09.3\, C:\RLDevSetup\findlib-1.2.1\, etc. (make sure you extract folders with many files inside, not individual .tar files!)

== INSTALL CYGWIN + PACKAGES ==
  1) Run setup.exe
  2) Click "Next"
  3) Choose "Install From Internet"
  4) Keep clicking "Next" until you're asked to choose a download site
  5) Pick any site; it doesn't really matter (some sites are faster, depending on where you are, but it's hard to tell)
  6) You might get an alert telling you that "This is the first time you're installing Cygwin 1.7.x.". Click "OK"
  7) Select the following additional packages (click on "skip" to make it display a version number):
        All/Devel/binutils
        All/Devel/gcc-core
        All/Devel/gcc-g++
        All/Devel/gcc-mingw-core
        All/Devel/libpng14-devel
        All/Devel/make
        All/Devel/mingw-runtime
        All/Interpreters/m4
        All/Libs/w32api

  8) Click "Next" to download and install the packages.
  9) You might encounter an error message; they're likely harmless.
  10)Click "Finish"

== INSTALL OCAML + LIBRARIES ==
  1) Go to C:\cygwin and run Cygwin.bat
  2) Call "cd c:" (without quotation marks)
  3) Follow the instructions below in the given order, checking the last few lines of each "make" output (it should often say something like "make[1]: Leaving directory XYZ", with no "Error"s.

  OCAML
  1) Call "cd ocaml-3.09.3"
  2) Call "./configure"
  3) Wait for the configuration to finish. Check that the last line says "** Objective Caml configuration completed successfully **"
  4) Call "make world.opt" (go make a cup of coffee; this takes a long time)
  5) Call "make install"
  6) Call "make clean"

  FINDLIB
  1) Call "cd ../findlib-1.2.1/" (to change directory)
  2) Call "./configure"
  3) Check that the 2nd-last line says "Configuration has been written to Makefile.config"
  4) Call "make all"
  5) Call "make opt"
  6) Call "make install"
  7) Call "make clean"

  OMAKE
  1) Call "cd ../omake-0.9.6.8/"
  2) Call "make install"

  EXTLIB
  1) Call "cd ../extlib-1.4/"
  2) Call "ocaml install.ml" (to start installation)
  3) Enter "2" (Choose native installation)
  4) Enter "N" (Choose no documentation)

  ULEX
  1) Call "cd ../ulex-0.8/"
  2) Call "make all.opt"
  3) Call "make install"
  4) Call "make clean"

  XML-LIGHT
  1) Call "cd ../xml-light/"
  2) Call "make install". You might see an error, "No rule to make target `xml_parser.cmi', needed by `xml parser.cmo'.", but...
  3) Just keep calling "make install" until it only displays a line that starts with "cp xml-light.cmxa [...]"
  4) Call "make clean"

== INSTALL RLDEV ==
  1) Call "cd ../rldev/src/"
  2) Call "omake"
  3) Call "omake install"

== USING RLDEV ==
  1) Launch Cygwin.bat
  2) Call "cd c:" to access your C:\ drive
  3) Navigate (using "cd") to your game files, and call "kprl", "rlc", "vaconv", etc.