Marvellous
Could I suggest that we don't worry about Git for now and share ideas about the code structure first. Or rather, what the code structure could look like in a single codebase.
The code you have commented out Martin could be wrapped in {$IFDEF CLOSED} directives?
Then, to update the contents of open_templot_2024.zip a batch file could copy the relevant files to another directory ready for creating an updated zip file? Something like:
COPY action_unit.* c:\ZIP
COPY alert_unit.* c:\ZIP
.
.
Post the zip file to the OpenTemplot2024 -- files ex-Delphi5 topic and others can update a Git repository.
Does that make sense?
Martin
@nickom @NoIdea @Rusty @Alistair Ward @graeme @Steve_Cornford @James Walters @Phil G
Here we go.
I said I would post an oven-ready Lazarus version of the open-source files. This is oven-ready in the sense that it will compile and run in Lazarus, but there are still many issues to fix, mostly cosmetic relating to font sizes and group-box controls (the Delphi Converter seems to have messed up a lot of stuff). Also at present the file viewer is missing, and the image exports aren't working. Most of the stuff which needs looking at is commented out "OT2024". The sketchboard can't be open-sourced for copyright reasons, so replacing that is a major separate project for the future.
But it should work mostly ok for track planning and plug track.
I'm provisionally calling this "Templot5" for when it finally replaces Templot2 for general use, but we can change the name later if we wish. In the meantime it opens as OpenTEMPLOT2024 to avoid confusion with Templot2.
The zip is too big to attach here, it can be downloaded from:
https://85a.uk/laz/LAZ_2024.zip
The Delphi5 files which I posted previously are not needed and can be ignored. Don't get them muddled up with the above.
For those new to this:
1. extract the files from the above zip into a suitable location on your computer, entirely separate from anything else.
2. it includes a sub-folder
TEMPLOT5_OUTPUT which is where Lazarus will save its output. There is already a copy of the
templot_5.exe compiled program in there, so even if you can't get Lazarus to compile you can try running Templot5 to see how well it works, what to expect and what needs fixing.
It should start up looking like this:
The background console window is needed to prevent the program hogging 30% or more CPU, even when idle. Why this should be necessary with Lazarus is a mystery to me -- with some IT professionals on board perhaps we can find out?
3. if not already, download and install Lazarus 3.4 from:
https://www.lazarus-ide.org
4. in Lazarus click the
File > Open... menu item, and navigate to the above downloaded files. Select and open the file:
OpenTemplot2024.lpi
5. answer
Yes or
Open Project to any questions which come up.
6. if the
Project Inspector window is showing (not the
Object Inspector), you can close it.
7. if the
Source Editor window is missing or empty, click the
Project > Units ... menu item, and select
control_room.pas from the list to see that something is indeed there.
8. you are now ready to try compiling Templot5.
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 Templot5 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 may again take a while, and the Messages window may appear again. But eventually you should see the familiar Templot start-up, running Templot version 555a.
cheers,
Martin.