Pascal Script: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Pascal Script
| Old | New | Line | |
|---|---|---|---|
| 1 | + | **Pascal Script** is an [[Object Pascal]]/[[Delphi]]/[[Lazarus]]-compatible interpreter with bytecode compiler that delivers a [[PascalScript|scripting]] environment for application programs. | |
| 2 | + | ||
| 3 | + | It currently works in [[Portal:Mac|macOS]], [[Portal:Windows|Windows]] and [[Portal:Linux|Linux on 32-bit and 64-bit]] [x86](/wiki-category/x86), [[PowerPC]] and [[ARM]] processors. | |
| 4 | + | ||
| 5 | + | It was created and is maintained by Carlo Kok and is copyrighted by [RemObjects software](http://www.remobjects.com) as freeware with full source available. | |
| 6 | + | ||
| 7 | + | The fixing of a few incompatibilities between ROPS (RemObjects Pascal Script) and Free Pascal 2.0.1 was made by Bogusław Brandys with a great help of many developers from \#fpc and \#lazarus-ide IRC channels. Thank You. | |
| 8 | + | ||
| 9 | + | Its main characteristics are : | |
| 10 | + | ||
| 11 | + | - almost all Object Pascal syntax supported | |
| 12 | + | - Delphi/Lazarus classes supported (however cannot be declared inside of script) | |
| 13 | + | - can create fully workable GUI forms with components | |
| 14 | + | - easily import new classes into script engine | |
| 15 | + | ||
| 16 | + | The download contains the components package for Delphi (various versions) and Lazarus + a few samples for Delphi (which may or may not work under Free Pascal+ Lazarus). It is work in progress... | |
| 17 | + | ||
| 18 | + | This component is now designed for cross-platform applications, however limited to 32-bit Intel platform only. I'd like to make it work on PowerPC and 64-bit architectures someday. (Note: The current version seems to support 64-bit machines, according to RemObjects.) | |
| 19 | + | ||
| 20 | + | ## Screenshots | |
| 21 | + | ||
| 22 | + | Here are some screenshots how it looks under Lazarus: | |
| 23 | + | ||
| 24 | + | Image:Rops_linux.png\|under Linux Image:Rops_windows.png\|under Windows Image:maXbox_mini_LAZARUS.png\|under Windows Image:Pascal Script for Lazarus 2 on Mac.png\|macOS Mojave | |
| 25 | + | ||
| 26 | + | ## License | |
| 27 | + | ||
| 28 | + | BSD like, see [[Pascal Script/License|full text]]. | |
| 29 | + | ||
| 30 | + | ## Download | |
| 31 | + | ||
| 32 | + | - From RemObjects (FPC + Lazarus is supported) | |
| 33 | + | ||
| 34 | + | ||
| 35 | + | This is the main page of RemObjects [Pascal Script distribution](http://www.remobjects.com/ps.aspx). There are download links for binary packages. | |
| 36 | + | ||
| 37 | + | - New repository: <https://github.com/remobjects/pascalscript> <git://github.com/remobjects/pascalscript.git> | |
| 38 | + | - **In newer Lazarus versions Pascal Script is included as a standard component.** | |
| 39 | + | ||
| 40 | + | ## Change Log | |
| 41 | + | ||
| 42 | + | - Version 1.0 2005/10/21 | |
| 43 | + | - ("Official" support of FPC, as seen on 2006/07/21) | |
| 44 | + | ||
| 45 | + | ### Dependencies / System Requirements | |
| 46 | + | ||
| 47 | + | - None | |
| 48 | + | - Status: Beta (ToDo: update info) | |
| 49 | + | - Issues: (ToDo: update info) | |
| 50 | + | - Needs testing on Windows. | |
| 51 | + | - Needs testing on Linux. | |
| 52 | + | - Almost working ;-) | |
| 53 | + | ||
| 54 | + | ### Installation | |
| 55 | + | ||
| 56 | + | - Create the directory lazarus\components\pascalscript | |
| 57 | + | - Unzip files into the directory | |
| 58 | + | - Open lazarus | |
| 59 | + | - Open the package pascalscript.lpk with Component/Open package file (.lpk) | |
| 60 | + | - Click on Compile | |
| 61 | + | - Click on Install | |
| 62 | + | ||
| 63 | + | ### Compilation errors | |
| 64 | + | ||
| 65 | + | When compiling to install the package, the compiler will stumble on two lines in uPSR_forms.pas: | |
| 66 | + | ||
| 67 | + | ``` pascal | |
| 68 | + | RegisterMethod(@TAPPLICATION.HELPCOMMAND, 'HELPCOMMAND'); // <-- this one | |
| 69 | + | RegisterMethod(@TAPPLICATION.HELPCONTEXT, 'HELPCONTEXT'); | |
| 70 | + | RegisterMethod(@TAPPLICATION.HELPJUMP, 'HELPJUMP'); // <-- and that one | |
| 71 | + | ``` | |
| 72 | + | ||
| 73 | + | Simply comment out the lines. These methods are not yet implemented in the LCL. | |
| 74 | + | ||
| 75 | + | ## Usage | |
| 76 | + | ||
| 77 | + | Drop the PascalScript component on a form and a few plugins. (TODO:finish) | |
| 78 | + | ||
| 79 | + | If you get the error "Fatal: Can't find unit uPSCompiler used by ...", open up the pascalscript package, and under the "more" options, select "add to project". | |
| 80 | + | ||
| 81 | + | See the example projects. | |
| 82 | + | ||
| 83 | + | See also these [articles](https://github.com/remobjects/pascalscript/wiki) from RemObjects. | |
| 84 | + | ||
| 85 | + | ## Example application | |
| 86 | + | ||
| 87 | + | Sample small console mode interpreter application: [[Pascal Script Examples|Pascal Script Examples (psce)]] | |
| 88 | + | ||
| 89 | + | Sample components Demo with Lazarus GUI: [[http://sourceforge.net/projects/maxbox/files/Lazarus/PASCALSCRIPT LAZARUS.zip/download]] | |
| 90 | + | ||
| 91 | + | ## History | |
| 92 | + | ||
| 93 | + | Pascal Script started out in 2001 with CajScript 1.0, which was soon superseded by CajScript 2.0 (later called Innerfuse Pascal Script 2.0). Version 2.0 interpreted scripts while it ran them, which had the disadvantage that every piece of code had to be reparsed every time the script engine went over it. With Pascal Script 3.0, this was changed to a new model, where the compiler and runtime were completely separated from each other and used a custom byte code format to represent the compiled script. This compiled script only contained the bare minimum that was required to execute the code. Later, when Carlo Kok joined RemObjects, it was renamed RemObjects Pascal Script and is now being maintained by RemObjects Software. | |
| 94 | + | ||
| 95 | + | One prominent use of Pascal Script is the Open Source InnoSetup project. InnoSetup is a widely used setup engine that uses Pascal Script as scripting engine to provide advanced scripting abilities during installation and uninstallation. Using Pascal Script, users can customize almost all parts of the setup, add new wizard pages, call into dlls to add advanced features and provide custom behavior and install conditions. | |
| 96 | + | ||
| 97 | + | ## See also | |
| 98 | + | ||
| 99 | + | - [RemObjects Pascal Script page](https://www.remobjects.com/ps.aspx) | |
| 100 | + | - [[Pascal Script tab]] | |
| 101 | + | ||
| 102 | + | --- | |
| 103 | + | *From the Free Pascal wiki, page "Pascal Script", as it stood on 2019-12-10 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* | |
| 104 | + | Category: Pascal Script |
