How To Install Scriptol
Installing and running the Scriptol
Php compiler under Windows
Installing and running the Scriptol Php compiler
under Linux
Installing the Php interpreter under Windows
How to install the Java extension
How to install the Scriptol to C++ or binary executable
compiler
- Installing BCC
- Installing MingW
- Installing Visual C++
1) Extract the zip archive
inside a directory, "c:\scriptol" for example.
This can be achieved by several free tools, ZipCentral,
or Wiz, for example.
2) Make the compiler accessible
either by moving it into the php directory or by adding the Scriptol directory
to the path.
For this purpose, add a line into autoexec.bat:
path=%path%;c:\scriptol
3) Using
You can call the compiler directly from the tools menu of the editor or at
the command line.
Using the solp compiler at command line:
The solp.exe compiler is executed from the command line under window, with
a file name as parameter and an option.
To get the list of options, type: sol
If you want to compile and run a script, type:
solp
filename
To compile only a source into php, type:
solp -c
filename
If you want to compile a page with scriptol code embedded inside, type:
solp -w filename
Then: php -q filename.php > test.htm
Using the solc compiler at command line:
Compile the main source:
solc
-be filename
then run the program:
filename
Read the manual for more details.
Extract the tar.gz archive
1) Open a super-user terminal.
2) Copy the archive inside your personal directory.
3) Extract the archive:
tar -zxvf scriptol.tar.gz
The scriptol directory is created.
4) Copy the compilersinside the path:
cp solp /usr/local/bin/.
cp solc /usr/local/bin/.
cp solc.ini /usr/local/bin/.
5) Close the super-user terminal and open a normal one.
6) Run the setup script (See the README file for details).
Using the compiler:
As under Windows.
Once you have downloaded the archive on php.net,
do as below:
1) Unarchive the files into a directory,
c:\php for example:
2) Let this directory included in the path.
To do that, add this line to autoexec.bat (in the root of the
C drive unit):
path=%path%;c:\php
Don't forget the semicolon.
3) Copy the file "php.ini-dist" into the Windows directory,
under the name "php.ini".
4) Set the path of extensions:
Now edit php.ini:
Search for the "extensions_dir" string in the section
"Paths and directories". Put here the path of the extensions
provided along with the php archive, or got from other sources:
extensions_dir=c:\php\extensions
(No quotes.)
5) Select the extensions you will use:
Search then for the list of extensions in the section "Dynamic
Extensions". Each of them is prefixed with a semicolon.
For each extension you want to use, remove the semicolon.
For example, if you want to process images, you must have this
line:
extension=php_gd.dll
without the preceding semicolon.
6) Set the parameters:
If you use the Php interpreter for application, and especially
for applications with a Java GUI, the default max execution time will
be too short. Change it for a longer time, 5 hours for example:
max_execution_time = 18000
memory_limit=128M
To allow php code use html variables, change this flag:
register_globals = On
Now, you are ready to work.
How to install the Java extension for Php or C++
1) Installing Java for Php
Search for the java path
Example: c:\jdk1.4
Search for the php extensions path
Example: c:\php\extensions
The extension directory must hold these files:
php_java.dll
php_java.jar
Set these lines into php.ini (in the Windows directory)
extension_dir = c:\php\extensions
extension=php_java.dll
Search for the [java] section in php.ini
(You can use a dot to designate the current path for yours jar or class file)
- If these classes are inside jar files, the jar filenames are a part of the path.
- If several paths are required, they are separated by semicolons and enclosed in double quotes.
Example:
[Java]
java.class.path = "c:\php\extensions\php_java.jar;c:\myclasses"
java.home = "c:\jdk1.4"
java.library = "c:\jdk1.4\jre\bin\client\jvm.dll"
java.library.path = "c:\php\extensions;c:\jdk1.4\jre\lib"
2) Installing Java for Scriptol C++
- The jvm.dll must be in the path.
- The jvm.lib, jni.h, jni_èmd.h files must be in the directory of the source.
- The JAVA_HOME variable must be assigned the path of the JDK (ex: c:\jdl1.4).
- See the README file if you encounter problems...
How to install the Scriptol to C++ or binary executable compiler
1) Extract the zip archive
inside a directory, "c:\scriptol" for example.
This can be achieved by several free tools, ZipCentral,
or 7-zip, for example.
2) Make the solc compiler accessible
either by moving it into the php directory or by adding the Scriptol
directory to the path.
For this purpose, add a line into autoexec.bat:
path=%path%;c:\scriptol
3) Download and install the Borland
C++ compiler
Once the compiler is installed, you must update the bcc32.cfg
and ilink32.cfg files for the path (inside the bin directory
of Bcc).
And add the path of the bin directory of Bcc to the PATH variable into
autoexec.bat.
Verify the compiler is installed, type:
bcc32.
Download and install the
mingw C++ compiler
An installer is provided.
Don't miss to add the path of the compiler to the PATH variable into
autoexec.bat.
This variable also must be set: SET GCC_EXEC_PREFIX=c:\gcc\lib\gcc-lib\
If no C++ is installed, your scriptol program will be compiled to C++,
but not as executable.
Verify the compiler is installed, type:
g++ -v
Installing Visual C
If you don't own the Microsoft's compiler, a free version is available
along with the .Net SDK. See at Microsoft.
You have also to define the environment variables:
set PATH="%PATH%";"c:\vc7\BIN"
set INCLUDE=c:\vc7\INCLUDE;c:\vc7\ALTMFC\INCLUDE
set LIB=c:\vc7\LIB;c:\vc7\ATLMFC\LIB
4) Using the compiler
First, compile the program, just give the name of the file containing
the "main" function or the name of the main file for a script.
solc -be hellocpp
Type: hellocpp to execute the program.