[Tool/Web/Other] Zeex's PAWN Compiler Patches
#1

Zeex's PAWN Compiler Patches


Introduction
This is a tool that fixes several PAWN compiler bugs and crashes that is made by Zeex. He removed the direct download link and we have to compile the source ourselves. Since many people don't know how to compile the source, or they don't use Linux, I compiled the source on Windows XP SP3 using Visual C++ 2010 and now I'm releasing the files. It should work on all Windows server. I'm not going to compile the Linux version since I don't use it and the files may vary for different Linux OS.

You can visit the page of the project here: https://github.com/Zeex/pawn
He actually provided a tutorial on how to compile the source there. To compile the compiler, you have to set the source path to "source\compiler" directory in CMake, instead of "source" subdirectory. For example, if you put the project files in C:\Pawn, the source directory is C:\Pawn\source\compiler.

Fixes
I think the most important patch of the project is having the line limit increased to 4095, instead of 511. That means you can have 4095 characters per line without causing crashes.

It also fixes triple states crash and multi-dimensional array's initialisation. Stringize and compile time concatenation are supported, but I'm not very sure about what exactly these 3 patches do. If you know, please tell me.

For stringize and compile time concatenation, seems that you can do this (from http://www.compuphase.com/bitboard/i...q_1179971957):
Quote:
Originally Posted by ******
printf("hello " "there");

printf("hello " #there);

#define MAJOR 1
#define MINOR 2
#define BUILD 2342
#define VERSION(%1,%2,%3) "Version: " #%1 "." #%2 "." #%3
printf(VERSION(MAJOR, MINOR, BUILD));

Note: the # token ignores whitespace between it and the first character, otherwise defines like that would print as:

Version: 1. 2. 2342

If that is what you want just add a space in the ".".

This system also ignores unescaped #'s so this:

printf(#hello #there);

would print as:

hello there.
Download
Executables Only
Executables + Full Source(Compiler source + VC++ 2010 Project)

Installation
Simply putting the executables(pawncc.exe and pawnc.dll) into your pawno folder and replace the files.

Credits
  • leong124 - Compiling the files for Windows.
  • Zeex - PAWN Compiler Patches.
Reply
#2

Awesome, will gonna try this for sure!

EDIT: I've tried it, it works great.
Reply
#3

The compiler crashes for me.
http://i.imgur.com/2tzYLXN.png
Reply
#4

Quote:
Originally Posted by leong124
Посмотреть сообщение
I think the most important patch of the project is having the line limit increased to 4095, instead of 511.
Indeed, I loved it!

Thanks both.
Reply
#5

Quote:
Originally Posted by im
Посмотреть сообщение
The compiler crashes for me.
http://i.imgur.com/2tzYLXN.png
Does it crash for any scripts?
Reply
#6

Thank you leong, I hoped for this when I sent you that pm!
I will try this for sure, and inform you if there are any problems.
Thank you once again.
Reply
#7

Yet another good work, thank you mate.
Reply
#8

Does it not show error when showplayerdialog will long ?
Reply
#9

Really nice, it solved my compile crashes problem!
Reply
#10

Amazing. Thanks both of you.
Reply
#11

This new compiler is very good! work more faster than the old compiler. Thanks leong124!
Reply
#12

This version doesn't work with packed string arrays.

pawn Code:
new const
    g_szTeleportMenu_9[][45 char] =
    {
        !"Grove Street\t\t\t /grove",
        !"Buszmegбllу\t\t\t /bus",
        !"SF Dokkok\t\t\t /dock",
        !"Rendőrsйg LS\t\t\t /rendls",
        !"Rendőrsйg SF\t\t\t /rendsf" // Error!
    };
error 037: invalid string (possibly non-terminated string)
Reply
#13

Quote:
Originally Posted by kurta999
View Post
This version doesn't work with packed string arrays.

pawn Code:
new const
    g_szTeleportMenu_9[][45 char] =
    {
        !"Grove Street\t\t\t /grove",
        !"Buszmegбllу\t\t\t /bus",
        !"SF Dokkok\t\t\t /dock",
        !"Rendőrsйg LS\t\t\t /rendls",
        !"Rendőrsйg SF\t\t\t /rendsf" // Error!
    };
error 037: invalid string (possibly non-terminated string)
Probably best to report that here: https://github.com/Zeex/pawn that way Zeex can look into it...


Love the line limit increase best thing ever. I hate having to strcat long strings in dialogs.
Reply
#14

Quote:
Originally Posted by kurta999
View Post
This version doesn't work with packed string arrays.

pawn Code:
new const
    g_szTeleportMenu_9[][45 char] =
    {
        !"Grove Street\t\t\t /grove",
        !"Buszmegбllу\t\t\t /bus",
        !"SF Dokkok\t\t\t /dock",
        !"Rendőrsйg LS\t\t\t /rendls",
        !"Rendőrsйg SF\t\t\t /rendsf" // Error!
    };
error 037: invalid string (possibly non-terminated string)
I use packed strings with that patch and it works fine.

pawn Code:
new const
    g_szTeleportMenu_9[5][45 char] =
    {
        {!"Grove Street\t\t\t /grove"},
        {!"Buszmegбllу\t\t\t /bus"},
        {!"SF Dokkok\t\t\t /dock"},
        {!"Rendorsйg LS\t\t\t /rendls"},
        {!"Rendorsйg SF\t\t\t /rendsf"}
    };
Reply
#15

Zeex has put in some more things into his compiler any chance for a compiled newer version (pretty please :P).
Reply
#16

Can you please re-compile it? It is currently having many features and bug fixes.
Reply
#17

Grab new binaries here: https://github.com/Zeex/pawn/release...aries-21012014

There's also an experimental port to Mac OS X by Slice, but I can't compile it as I don't have a Mac. For those who have:

https://github.com/Zeex/pawn/archive/mac.zip

There have been added a few more fixes and features since the creation of this topic, you can view the full list here:

https://github.com/Zeex/pawn/wiki (features)
https://github.com/Zeex/pawn/wiki/Known-compiler-bugs (bug fixes)

Edit:

Windows version requires Visual C++ 2010 runtime: http://www.microsoft.com/en-us/downl...s.aspx?id=5555
Reply
#18

thanks zeex for the new binaries !!


P.S. lol are you fake zeex or that is another account ?!
Reply
#19

Very nice!

Please, add __TIME__ macro, like in C++. Would be very useful.
Reply
#20

Quote:
Originally Posted by xeeZ
View Post
Grab new binaries here: https://github.com/Zeex/pawn/release...aries-21012014

There's also an experimental port to Mac OS X by Slice, but I can't compile it as I don't have a Mac. For those who have:

https://github.com/Zeex/pawn/archive/mac.zip

There have been added a few more fixes and features since the creation of this topic, you can view the full list here:

https://github.com/Zeex/pawn/wiki (features)
https://github.com/Zeex/pawn/wiki/Known-compiler-bugs (bug fixes)

Edit:

Windows version requires Visual C++ 2010 runtime: http://www.microsoft.com/en-us/downl...s.aspx?id=5555
Thanks Zeex!!!
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)