2018-09-10 09:15:55 +01:00
|
|
|
# Pawn Community Compiler
|
2015-03-28 12:03:44 +05:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
[![Build Status][build_status_linux]][build_linux]
|
|
|
|
[![Build Status - Windows][build_status_win]][build_win]
|
2015-03-28 12:03:44 +05:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
## What
|
2015-03-28 12:03:44 +05:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
This is a modified version of the Pawn 3.2.3664 compiler with many bug fixes and
|
|
|
|
enhancements.
|
2017-12-31 19:01:30 +06:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
This project was originally started by Zeex but on 2017-12-31, the project was
|
|
|
|
taken over by some members of the SA:MP community. Zeex still contributes to the
|
|
|
|
project, along with the [Compiler Team][team].
|
2015-03-28 12:03:44 +05:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
The original readme is available [here][original_readme]
|
2015-03-28 12:03:44 +05:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
## Why
|
2017-10-21 16:12:18 +06:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
This project exists to:
|
2017-10-21 16:12:18 +06:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
- Fix known bugs with the original compiler
|
|
|
|
- Provide a better development experience for the SA:MP community
|
2017-10-21 16:11:36 +06:00
|
|
|
|
2018-11-18 19:29:44 +06:00
|
|
|
If you find a problem, you can [open an issue][issues] and contributors can work
|
2018-09-10 09:15:55 +01:00
|
|
|
on a fix. This isn't true with the original compiler that comes with the SA:MP
|
|
|
|
server distribution.
|
2018-01-11 07:48:41 +06:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
There are also new features that enhance the development experience, such as
|
|
|
|
telling you which tags are involved in a "tag mismatch" or showing you where
|
|
|
|
that pesky "symbol is never used" is actually declared.
|
2018-01-11 07:48:41 +06:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
There are plenty of features and fixes that are documented, see below for links:
|
2018-01-11 07:48:41 +06:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
- [Known compiler bugs][bugs] contains a list of bugs that the team are aware of
|
|
|
|
with their status.
|
2018-01-11 07:48:41 +06:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
- [What's new][new] contains features and other notable changes.
|
2018-01-11 07:48:41 +06:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
- [Release notes][releases] list of all official releases of the compiler
|
|
|
|
binaries.
|
2018-01-11 07:48:41 +06:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
## How to Use
|
2018-01-01 17:39:15 +00:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
Binary packages can be downloaded from [Releases][releases], see the below
|
|
|
|
sections for platform-specific installation instructions.
|
2017-06-08 08:13:25 +02:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
**Note:** You will _probably_ get warnings/errors/fatals when you first build
|
|
|
|
with this compiler — you need to add the `-Z` flag to your build configuration
|
|
|
|
or add `#pragma compat`. See [this page][compat] for more information.
|
2017-06-08 08:13:25 +02:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
You can also get the latest development binaries for Windows on
|
|
|
|
[AppVeyor][artifacts]. This archive is built automatically on every Git commit
|
|
|
|
and can be pretty unstable, so use at your own risk.
|
2017-10-21 16:11:36 +06:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
### Windows
|
2017-10-21 16:11:36 +06:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
If you just use an editor configured to run `pawncc` such as Pawno, Sublime Text
|
|
|
|
or VS Code you can simply delete your existing `pawncc.exe` and replace it with
|
|
|
|
the new one.
|
2017-10-21 16:11:36 +06:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
Download the ZIP archive and extract `pawnc.dll`, `pawncc.exe`,
|
|
|
|
`pawndisasmsm.exe` to your original `pawncc` directory. If you use Pawno, this
|
|
|
|
will be in the `pawno/` folder that's inside your server directory.
|
2017-10-21 16:11:36 +06:00
|
|
|
|
2018-12-14 05:20:00 +01:00
|
|
|
### openSUSE
|
2018-01-01 17:39:15 +00:00
|
|
|
|
2018-12-14 05:20:00 +01:00
|
|
|
There is an installation package available for openSUSE users so that you
|
2019-01-27 17:52:26 +06:00
|
|
|
can easily install the latest compiler on your distribution. Please follow
|
|
|
|
these steps:
|
2017-10-21 16:11:36 +06:00
|
|
|
|
2019-01-27 17:52:26 +06:00
|
|
|
1. Go to https://build.opensuse.org/package/show/home:mschnitzer:pawncc/pawncc
|
2018-09-10 09:15:55 +01:00
|
|
|
2. On the right side, select your distribution (only if it's not disabled!)
|
|
|
|
3. Click "Go to download repository"
|
|
|
|
4. Copy the link and enter in sudo mode in your shell:
|
2018-12-14 05:20:00 +01:00
|
|
|
`zypper ar $COPIED_LINK home:mschnitzer:pawncc`
|
2018-09-10 09:15:55 +01:00
|
|
|
5. Again as root, type: `zypper ref`
|
|
|
|
6. Install the package with `zypper in pawncc`
|
|
|
|
7. Run `pawncc` in your shell to test if it's working
|
2018-01-01 17:39:15 +00:00
|
|
|
|
2019-01-27 17:52:26 +06:00
|
|
|
The download repository for openSUSE does provide older versions as well (oldest
|
|
|
|
version: 3.10.7). Just install the version you like (e.g.:
|
|
|
|
`zypper in pawncc-3.10.8` and run it via `$ pawncc-3.10.8 -Z -O3 [...]`).
|
|
|
|
Parallel installation is supported.
|
2018-12-14 05:20:00 +01:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
### With sampctl
|
2018-01-01 17:39:15 +00:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
If you are a [sampctl][sampctl] user, you are already using this compiler!
|
2017-10-21 16:11:36 +06:00
|
|
|
|
2020-03-15 20:09:00 +00:00
|
|
|
### Building from Source
|
2017-10-21 16:11:36 +06:00
|
|
|
|
2020-03-15 20:09:00 +00:00
|
|
|
If you are interested in contributing then please first read
|
|
|
|
[this document][contributing] and ensure you have discussed your proposed
|
|
|
|
changes before writing any code. Check out [this page][build_source] for
|
|
|
|
instructions for compiling for your platform.
|
2017-10-21 16:11:36 +06:00
|
|
|
|
2018-01-01 17:39:15 +00:00
|
|
|
## Background
|
2015-03-28 12:03:44 +05:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
The project was originally started as a set of patches aimed to create a
|
|
|
|
compiler that would be compatible with the compiler used in
|
|
|
|
[SA-MP (San Andreas Multiplayer)](http://sa-mp.com/).
|
2015-03-28 12:03:44 +05:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
SA-MP uses a modified version of Pawn 3.2.3664 [1] with Windows-only
|
|
|
|
executables, and the developers said that they lost the source code for it which
|
|
|
|
means it can't be ported to other platforms (e.g. Linux) and newly discovered
|
|
|
|
bugs can't be fixed. So the main goal of the project is to re-create changes
|
|
|
|
that were previously made by the devs as well as fix all known compiler bugs.
|
2015-03-28 12:03:44 +05:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
[1] It's worth noting that the version of the AMX embedded into the SA-MP server
|
|
|
|
seems to be based on an older release of Pawn.
|
2015-03-28 12:03:44 +05:00
|
|
|
|
2018-09-10 09:15:55 +01:00
|
|
|
[build_linux]: https://travis-ci.org/pawn-lang/compiler
|
|
|
|
[build_status_linux]: https://travis-ci.org/pawn-lang/compiler.svg?branch=master
|
2018-01-31 12:05:53 +00:00
|
|
|
[build_win]: https://ci.appveyor.com/project/Southclaws/compiler/branch/master
|
2018-09-10 09:15:55 +01:00
|
|
|
[build_status_win]:
|
|
|
|
https://ci.appveyor.com/api/projects/status/k112tbr1afrkif0n?svg=true
|
2018-09-30 07:59:45 +01:00
|
|
|
[team]: https://github.com/pawn-lang/compiler/graphs/contributors
|
2018-09-10 09:15:55 +01:00
|
|
|
[original_readme]:
|
2018-09-30 07:59:45 +01:00
|
|
|
https://github.com/pawn-lang/compiler/tree/master/readme_compuphase.txt
|
2018-09-10 09:15:55 +01:00
|
|
|
[issues]: https://github.com/pawn-lang/compiler/issues
|
|
|
|
[bugs]: https://github.com/pawn-lang/compiler/wiki/Known-compiler-bugs
|
|
|
|
[new]: https://github.com/pawn-lang/compiler/wiki/What's-new
|
|
|
|
[releases]: https://github.com/pawn-lang/compiler/releases
|
|
|
|
[artifacts]:
|
|
|
|
https://ci.appveyor.com/project/Southclaws/compiler/branch/master/artifacts
|
|
|
|
[compat]: https://github.com/pawn-lang/compiler/wiki/Compatibility-mode
|
|
|
|
[sampctl]: http://bit.ly/sampctl
|
2020-03-15 20:09:00 +00:00
|
|
|
[contributing]:
|
|
|
|
https://github.com/pawn-lang/compiler/tree/master/.github/CONTRIBUTING.md
|
2018-09-10 09:15:55 +01:00
|
|
|
[build_source]: https://github.com/pawn-lang/compiler/wiki/Building-From-Source
|