himselfv / viper

Enhanced Windows Service manager application
28 stars 2 forks source link

Instructions on how to compile? Thoughts on switching to Lazarus? #40

Open jcrben opened 1 month ago

jcrben commented 1 month ago

I've never messed around with Pascal or Delphi before, but I wanted to compile this - it looks like the last release is probably missing a few commits.

I don't like cluttering my system with dependencies so I tend to use https://scoop.sh/ which tends to be uninstalled cleanly. freepascal is available from scoop so I installed that: scoop install freepascal

I dug around a bit and saw that Viper.dpr is the entry point.

When I tried to compile, I get this:

ben@lenovo-legion viper [master]$ cd Project
ben@lenovo-legion Project [master]$ fpc Viper.dpr
Viper.dpr(4,3) Fatal: Can't find unit Vcl.Forms used by Viper
Fatal: Compilation aborted
Error: C:\Users\ben\scoop\apps\freepascal\current\bin\i386-win32\ppc386.exe returned an error exitcode

So I need to install Delphi. I went to install the Delphi Community Edition and it requires me to sign up and input a bunch of information https://www.embarcadero.com/products/delphi/starter/free-download

I'm not up for signing up for a mailing list for a bit of exploration.

I also found that there's an open-source project to compile Delphi projects, but I guess it would require some refactoring of the VCL components to LCL components. Apparently there's something called Lazarus Code and Component Repository (Lazarus CCR https://wiki.lazarus.freepascal.org/Components_and_Code_examples which might make it a bit easier?

himselfv commented 3 weeks ago

It should compile on Delphi XE3+, maybe even earlier, in case you have one of those laying around. I too dislike the hoops they make people go through for community edition.

I can make cross-compilation easier by removing all the "Vcl." unit name scopes (which are Delphi's addition anyway), I think FreePascal will then auto-substitute "LCL". But it'll still take some tweaking to get it to compile. If you don't care, maybe just wait and I'll rebuild it eventually.