Cool!
> I've managed to get so far. I had to update Makefile.in to have $
> (PARROT_DIR)/parrot.exe instead of $(PARROT_DIR)/parrot, similar for
> Makefile.PL.
>
> I've includes patches for Makefile.in and .PL at the end of this
> message.
Applied, with slight modifications. Thanks!
> nmake doesn't work with the error
>
> "NMAKE : fatal error U1073: don't know how to make 'lib/
> November.pir'"
Don't know enough about nmake to know why it fails here. Maybe someone
else on the list does.
> Just noticed the other thread pointing to the HTML-Template port on
> github.
I added some of the explanations from that thread in the README file
of November.
> I had to do similar patches again to get the Makefile (patches
> at bottom of this message). Win32 doesn't support symlinks but it does
> hardlinks. I also changed it so that it looks for RAKUDO_DIR like
> november does as following the current Rakudo install guide it doesn't
> end up in PARROT_DIR/languages/rakudo
Also applied. Thanks!
The whole build system of the different Perl 6 projects out there is
going through a speedy evolution. November's build system, despite
having been updated quite recently, is already completely outdated. :)
Druid's is currently the most modern one; when I have the tuits, I'll
look into cross-pollinating the Windows-detection improvements with
the improved build system of Druid.
> Also I noticed that PERL6LIB only seems to check the last folder. Such
> as setting PERL6LIB to multiple folders such as:-
> set PERL6LIB=/folder1;/folder2;/folder3
>
> It only looks in /folder3 for the files. Not sure if it's supposed to
> do that but it seems wrong. Is that an issue with Rakudo?
Worksforme. But I use colons where you use semicolons -- maybe try the
former instead?
> After building HTML-Template I copied the lib folder over to november.
> Now I'm getting the error
>
> mingw32-make
> c:\temp\rakudo\parrot/parrot.exe c:\temp\rakudo/perl6.pbc --target=pir
> --output=
> lib/November.pir lib/November.pm
> Statement not terminated properly at line 33, near ":[\n "
>
> I don't know any Parrot code and hardly any Perl 6 at this time. So
> I'm stumpped.
That was a syntax error due to a missing space. All fixed now.
Again, thanks! Best of luck.
// Carl
Yes colons work. But the standard windows way is to use semi-colons.
Maybe I should submit that to Rakudo as a bug.
>> I don't know any Parrot code and hardly any Perl 6 at this time. So
>> I'm stumpped.
>>
>
> That was a syntax error due to a missing space. All fixed now.
>
> Again, thanks! Best of luck.
>
That's fixed it :) I had to create a .bat version of test_wiki.sh, here:-
set QS=%1
set PARROT_DIR=c:\temp\rakudo\parrot
set RAKUDO_DIR=c:\temp\rakudo
set REQUEST_METHOD=GET
set SERVER_NAME=test.foo
set SERVER_PORT=80
set REQUEST_URI=%QS%
%PARROT_DIR%/parrot %RAKUDO_DIR%/perl6.pbc wiki
Which works :) Although I'm not sure how I can get it working through
apache. I tried creating wiki.bat:-
#!c:\windows\system32\command.com
PARROT_DIR=c:\temp\rakudo\parrot
RAKUDO_DIR=c:\temp\rakudo
%PARROT_DIR%/parrot.exe %RAKUDO_DIR%/perl6.pbc wiki
Then updated Apache with:-
AddHandler cgi-script .bat
RewriteEngine On
RewriteRule ^/([^\.]*)$ /cgi-bin/wiki.bat [PT]
But it just tries to download wiki.bat instead of running it.
Shouldn't wiki.sh be replaced with a Perl 6 cgi script? Then we could
easily have something that should work all over? Such as
'wiki.p6'
#!c:\temp\rakudo\perl6.exe
use v6;
### Code to run wiki
Apache:-
AddHandler cgi-script .p6
RewriteEngine On
RewriteRule ^/([^\.]*)$ /cgi-bin/wiki.p6 [PT]
Or simply name wiki.p6 index.p6 and have DirectoryIndex point to it.
That way it could easily be setup in IIS as well.
Lyle
I tried this. It was as simple as renaming wiki to wiki.p6 and adding
#!c:\temp\rakudo\perl6.exe
to the top. But unfortunately it doesn't work. Apache just hangs. Trying to run it directly from the command prompt works fine, if I modify test_wiki.bat to read:-
set QS=%1
set REQUEST_METHOD=GET
set SERVER_NAME=test.foo
set SERVER_PORT=80
set REQUEST_URI=%QS%
c:\temp\rakudo\perl6.exe wiki.p6
I get the expected output.
I'm led to believe this is a problem with Rakudo on windows when it is invoked from another program such as Apache or IIS.
I'm not sure how I can figure out what the problem is though, so I've hit a bit of a dead end :( Pretty frustrating as having it work on the command prompt means I'm very close...
I'll see if I can find some windows programmer forums and do some kind of trace to find out what's actually happening. If anyone has any ideas then please let me know.
Lyle