Windows build

42 views
Skip to first unread message

Vasileios Anagnostopoulos

unread,
Feb 4, 2013, 8:32:15 AM2/4/13
to jo...@googlegroups.com
Hi, is there any chance to have a windows build?

Eric Merrit

unread,
Feb 4, 2013, 2:07:41 PM2/4/13
to Vasileios Anagnostopoulos, jo...@googlegroups.com
Vasileios,

There isn't really much that would stop there from being a windows build. I don't actually have a windows box available. 

However, if you want to try to get the build working on windows. I am more then willing to provide guidance and help on that. I just don't have the bandwidth or equipment to do it myself. 

Eric


On Feb 4, 2013, at 5:32 AM, Vasileios Anagnostopoulos <fithi...@gmail.com> wrote:

Hi, is there any chance to have a windows build?

--
You received this message because you are subscribed to the Google Groups "joxa" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joxa+uns...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Dave Cottlehuber

unread,
Feb 26, 2013, 8:26:30 AM2/26/13
to jo...@googlegroups.com, Vasileios Anagnostopoulos
On Monday, 4 February 2013 20:07:41 UTC+1, Eric Merritt wrote:
Vasileios,

There isn't really much that would stop there from being a windows build. I don't actually have a windows box available. 

However, if you want to try to get the build working on windows. I am more then willing to provide guidance and help on that. I just don't have the bandwidth or equipment to do it myself. 

Eric


Here's one off current master, it's pretty easy if you're familiar with rebar, erlang, and windows.

http://people.apache.org/~dch/misc/joxa/
Install erlang R15B03 to somewhere without spaces e.g. c:\erlang and add c:\erlang\bin to your path. Put joxa.cmd into the same location.

Vasileios if you can test out these build steps, I'll send them as a pull request for INSTALL.md.

- get git and ensure it's in your path from http://code.google.com/p/msysgit/downloads/list?q=full+installer+official+git
- install erlang R15B03-1 to a path **without spaces** (I used the 32 bit version, and installed to c:\erlang)
- set a workdir somewhere and change into it

PATH=%PATH%;c:\erlang\bin;

:: build rebar
git clone git://github.com/rebar/rebar.git
cd rebar && bootstrap
path=%PATH%;.\rebar
cd ..

:: build joxa
git clone git://github.com/erlware/joxa.git
cd joxa
rebar get-deps
rebar compile

I also rename joxa -> joxa.cmd and fudge the first 3 lines of the shebang listed here http://osdir.com/ml/erlang-programming-patches-discuss/2012-11/msg00049.html so you can run as `joxa.cmd` or `joxa` in any terminal.

Note that this still requires having `c:\erlang\bin` in your path for escript and the VM emulator.

@echo off & setlocal & path=%~dp0;%path%; & escript.exe "%~dpn0.cmd" %* & goto :eof
%% -*- erlang -*-
%%! -smp enable

IIRC there's support for doing this now in rebar but I've not looked into it in detail. There's also no reason why this can't be done during the unix build as well, you don't need a windows box to produce the build artefact.

The current sieve from http://joxa.org/ appears not to compile, but I've no reason to suspect that joxa.cmd itself is faulty as the same error reports on windows and OSX:

$ joxa -c sieve.jxa
sieve.jxa:3:9 *error* invalid use clause [[quote,as],core,[quote,only],[{'--fun','!=',2}]]
sieve.jxa:11:30 *error* invalid reference '!='/2

A+
Dave

Dave Cottlehuber

unread,
Feb 26, 2013, 9:45:05 AM2/26/13
to jo...@googlegroups.com
Damn. I think I got my repos mucked up and made a chimera of half-mac
half-windows that doesn't always work…. ignore the first email :-((((.

After cleaning everything and rebuilding, I got both platforms working
to compile the sieve. Sorry for the confusion!! I uploaded a new .zip
that actually passed the tests.

TL;DR I ended up weaseling out and using a unixy shell to build this.

To use:

1. install http://www.erlang.org/download/otp_win32_R15B03-1.exe to c:\erlang
2. download http://people.apache.org/~dch/misc/joxa/ and put joxa.cmd
in c:\erlang\bin
3. add c:\erlang\bin to your path, run joxa.

To build. This may not work if you don't have the MSVC compiler or
Windows SDK installed.

1. install http://code.google.com/p/msysgit/downloads/list?q=full+installer+official+git
2. install http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.6.1.exe
3. install http://www.erlang.org/download/otp_win32_R15B03-1.exe to c:\erlang
4. open a cmd prompt

cd \
git clone git://github.com/joxa/joxa
git clone git://github.com/rebar/rebar

5. build rebar

cd \rebar && bootstrap

6. start mingw shell

call c:\mozilla-build\start-msvc10.bat
export PATH=$PATH:/c/erlang/bin:/c/rebar/bin
cd /c/joxa

7. build lispy otp-ish stuff

make get-deps
make test && make escript

8. copy joxa to joxa.cmd and hack the shebang. This *can* be done
cleanly in rebar now as I mentioned above.

9. quit to normal windows cmd prompt and ensure both c:\erlang\bin and
joxa.cmd are in your path. Joxify!

Here's my output, albeit with slightly different paths
https://www.friendpaste.com/1GV1HanKMIQL55JXhxSlSa

A+
Dave

Dave Cottlehuber

unread,
Mar 11, 2013, 3:45:24 AM3/11/13
to jo...@googlegroups.com
On 26 February 2013 15:45, Dave Cottlehuber <d...@jsonified.com> wrote:
> On 26 February 2013 14:26, Dave Cottlehuber <d...@jsonified.com> wrote:
>> On Monday, 4 February 2013 20:07:41 UTC+1, Eric Merritt wrote:
>>>
>>> Vasileios,
>>>
>>> There isn't really much that would stop there from being a windows build.
>>> I don't actually have a windows box available.
>>>
>>> However, if you want to try to get the build working on windows. I am more
>>> then willing to provide guidance and help on that. I just don't have the
>>> bandwidth or equipment to do it myself.
>>>
>>> Eric

Hi Vasileios

I amended the unix build process[1] so that it produces a
windows-compatible escript as well [2]. Assuming you are using
R15B03-1 or newer this should just work if you drop it into your path
or your erlang/bin directory.

Can you give it a try and confirm back to the list so we can update joxa?

[1]: https://github.com/erlware/joxa/pull/50
[2]: http://people.apache.org/~dch/dist/tools/

@Eric


two things;

- your unix build process now produces a drop-in compatiable escript.
Perhaps you want to distribute this somewhere from the joxa site
rather than use a random binary from some untrusted person on the
internet.

- what's the best place to put the below instructions for building
joxa from source? I'm not convinced these belong in joxa docs per se
as there are several different unix-compatible shell environments, but
this one at least works with minimal pain.
2. download http://people.apache.org/~dch/dist/tools/joxa.cmd and put joxa.cmd
in c:\erlang\bin
3. add c:\erlang\bin to your path, run joxa.

To build. The mozilla tools may not work correctly if you don't have
the Windows SDK 7.1 installed.

1. install http://code.google.com/p/msysgit/downloads/list?q=full+installer+official+git
2. install http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.6.1.exe
3. install http://www.erlang.org/download/otp_win32_R15B03-1.exe to c:\erlang
4. open a cmd prompt

cd \
git clone git://github.com/joxa/joxa
git clone git://github.com/rebar/rebar

5. build rebar

cd \rebar && bootstrap

6. start mingw shell

call c:\mozilla-build\start-msvc10.bat
export PATH=$PATH:/c/erlang/bin:/c/rebar/bin
cd /c/joxa

7. build lispy otp-ish stuff

make get-deps
make test && make escript

8. copy the resulting joxa.cmd file into your erlang/bin folder, or
anywhere on your path. Don't forget that you still need erlang to run
joxa.

A+
Dave

Eric Merritt

unread,
Mar 11, 2013, 12:06:30 PM3/11/13
to Dave Cottlehuber, jo...@googlegroups.com
Sure, why not. At one point we where distributing binaries , we can do so again without much worry.


> - what's the best place to put the below instructions for building
> joxa from source? I'm not convinced these belong in joxa docs per se
> as there are several different unix-compatible shell environments, but
> this one at least works with minimal pain.

We can move this into the wiki. I have been thinking seriously about moving all of the joxa docs into the wiki in any case.
Reply all
Reply to author
Forward
0 new messages