• This topic assumes you are using Windows.
topic updated 5th July 2018
Now that I have posted the open-source code for Templot, you might want to join in the developments. Or use Templot as a basis to learn some coding. If there is something in Templot which you have always wanted to change, now is your chance.
There is the
Templot3 Project which might one day replace Templot2, see:
https://sourceforge.net/projects/opentemplot/
Or alternatively you might like to try the
TemplotMEC option so that you can dabble in coding on your own personal version of Templot.
If so, the first thing to do is to download and extract the open-source TemplotMEC files. They are in the zip file at:
https://sourceforge.net/projects/opentemplot/files/
Create a new folder somewhere on your system to unzip the file into.
It can be anywhere you like, called whatever you like,
but:
1. NOT in your existing Templot2 folder (
\TEMPLOT_DEV\).
2. NOT in the Windows
\Program Files\ folders.
3. NOT containing any spaces anywhere in the folder name or the path to it.
I suggest
C:\TEMPLOT_MEC\ or maybe on an external drive or USB stick.
After extracting it into that folder, you will have a sub-folder containing the files, like this:
I suggest that you copy all the files from the sub-folder into the main folder:
These then become your working files, to edit the nuts and bolts as you wish. The files in the sub-folder remain unchanged as a backup if the wheels fall off your program.
They are in plain text, so you could open and read them in Windows Notepad (other text editors are available).
But to make any use of them you need a compiler. A compiler is a program which reads the statements which are written in the source code files, and converts them into a runnable computer program, called the object code.
The files are intended to be used with the Lazarus/FreePascal compiler system, which is free.
To download and install Lazarus:
1. go to
http://www.lazarus-ide.org
2. click the
Download Now button.
After a few seconds you will be downloading the file:
lazarus-2.0.6-fpc-3.0.4-win64.exe
That's all you need, don't click any of the other advertising stuff on the Sourceforge pages which might flash up.
Download that file and run it to install the Lazarus program in the usual way. Being free, they aren't paying fees for a digital certificate, so you will need to click past the security warnings (same as for Templot).
During the install process you will probably find it convenient to tick the "create desktop icon" box.
When installation finishes (it may take a while), start Lazarus by clicking that desktop icon.
3. you might then see this:
Don't change anything on there, just click the
Start IDE button. "IDE" means "Integated Development Environment" which is just a fancy name for the normal Lazarus desktop screen.
You won't see this again next time you start Lazarus.
4. click the
File > Open... menu item, and navigate to the previously downloaded TemplotMEC files. Select and open the file:
templotmec.lpi
5. answer
Yes or
Open Project to any questions which come up.
6. You should then be seeing something like this (the windows may be arranged differently):
7. if the
Project Inspector window is showing (not the
Object Inspector), you can close it.
8. if the
Source Editor window is missing or empty, click the
Project > Units ... menu item, and select
control_room.pas from the list.
You are now ready to try compiling TemplotMEC.
9. as this is a first try, it's best to do a full build to check for errors before running. Click the
Run > Build menu item:
10. it will take a while -- the
Messages window will appear and fill with messages.
There will be several Warning messages, but hopefully no red
Error messages. The warnings will need to be fixed in due course, especially if you want to port TemplotMEC to some other platform such as Linux or Mac. But for now they are not serious on Windows and can be ignored.
The word which you are looking for is "Success" on a green background.
It should appear eventually:
11. assuming you get a green, it's finally time to try running it. Click the
Run > Run menu item:
12. it will again take a while, and the Messages window will appear again. But eventually you should see the familiar Templot start-up:
13. and if you click GO, you should have TemplotMEC running.
Note
(debugging...) shown in the Lazarus top bar. This means that TemplotMEC is currently running inside Lazarus, and you should get meaningful error messages if there are any. But TemplotMEC will be fully functional and usable in that condition.
N.B. note that you won't be able to load any of your existing Templot2 .box files. But you should be able to create TemplotMEC track plans, save them, and reload them, in .otbox format. And print them.
Likewise your existing .bgs files, and printer calibration files.
The file conversion functions will be available in the next Templot2 program update soon.
More next time.
cheers,
Martin.
__________
message ref: 24920