Giter Club home page Giter Club logo

ocamhaxe's Introduction

ocamhaxe

OCaml distribution for Haxe compilation

Install

Download the Latest Release then simply run config.bat to have it setup on your system.

Build

If you have cloned the repository, you need to run the Build.exe script in /build to rebuild the ocamhaxe distribution. This requires Cygwin 64 bits + Dumpbin.exe windows utility (part of Visual Studio)

Required Cygwin64 packages are:

  • wget
  • m4
  • patch
  • unzip
  • mingw64-x86_64-gcc-core
  • mingw64-x86_64-zlib
  • mingw64-x86_64-pcre

(or for 32 bits):

  • mingw[64]-i686-gcc-core
  • mingw[64]-i686-zlib
  • mingw[64]-i686-pcre

Troubleshoot:

  • You need to run Build.exe from the command line (cmd) to watch for errors
  • In some cases there is an error about prims.c not compiling when building the ocaml compiler. It requires having git for Cygwin installed (prevents windows newline issues). Also make sure that your system PATH has Cygwin at the highest priority to prevent clashes.

About

There are two distinct scripts:

  • haxe/Build.hx will build an ocamhaxe repo from scratch, that can be zip'ed and distributed to users as-it. It should contain everything needed to compile & run haxe and its libraries, without any additional requirement

  • haxe/Config.hx will setup the computer (env vars etc.) on the client computer that has downloaded the ocamhaxe distribution. It is triggered by config.bat so runs from the toplevel directory.

  • both are precompiled using hxcpp so they can get run on a system even if no haxe is available.

  • both are referencing haxe/config.json which contains cygwin tools / opam libs to install etc. mostly used for the build process or to check in Config if the cygwin already installed on the computer have all the necessary tools/libs

ocamhaxe's People

Contributors

ncannasse avatar simn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ocamhaxe's Issues

Build issues

Issues with build:

  • dumpbin is required in PATH, should maybe auto detect in C:\Program Files (x86)\Microsoft Visual Studio XX.0\VC\bin
  • tar uses Windows/System32 one by default instead of Cygwin, and deadlock the app... (PATH should prioritize cygwin over everything else)
  • perl ipc system simple needs to be installed with cygwin to compile camlp5
  • some extra mingw libs are required to be installed and distributed, I didn't update the Build script yet but I have listed the urls in haxe/config.json (see 5526d8c)

Uninstall

It would be nice to have a way to remove all the environment variables set by Config.hx

Support libuv

Once HaxeFoundation/haxe#8831 lands, ocamhaxe is going to need an update to work with libuv. There are no official cygwin packages for mingw-libuv support, but I've prepared them here: https://github.com/Simn/mingw64-uv/releases

Note that even if we submit these as official packages, it's likely going to take a while before they get approved and integrated, so ocamhaxe should manually handle this for now either way.

Existing Cygwin requirements

ATM Config.exe correctly detect required tools for MingW but it doesn't check that zlib-mingw32 and pcre-mingw32 are correctly installed

OPAM not working

ATM when using ocamhaxe distrib the opam commandline is not working.
This is discussed here ocaml/opam#2896
Once solved, we need a new fdopen release and also maybe additional config files to modify in Config.hx

Automatic build

It would be nice if for each commit on ocamhaxe we run that on a windows build machine to create a distribution.

What's required is:
a) clone ocamhaxe
b) run haxe/Build.exe
c) zip the resulting ocamhaxe directory
d) upload it somewhere it can be accessed publicly

Could you help @andyli ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.