Recent

Author Topic: Executing before / after (compile/build)  (Read 510 times)

egsuh

  • Hero Member
  • *****
  • Posts: 1694
Executing before / after (compile/build)
« on: September 15, 2025, 09:49:38 am »
Hello,
I'm running an FCGI web server.
When I make any modifications to the program, I have to stop running the FCGI service (on Windows), and restart it, before and after compilation and build.

Are there any way that I can stop and restart it simply before after linking, because if there are errors during compilation, it doesn't have to be restarted.

Restarting the service only after compile/build doesn't work, as the newly compiled exe file will not be saved.

ASBzone

  • Hero Member
  • *****
  • Posts: 733
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: Executing before / after (compile/build)
« Reply #1 on: September 15, 2025, 01:47:10 pm »
If you are compiling it directly to the location where the service will run from, then you will have to stop the service to overwrite the file, yes.

I usually compile my files to one location, and then automate the process of updating them somewhere else.

Perhaps you could apply those as part of Compiler Options, before and after the compilation.
-ASB: https://www.BrainWaveCC.com/

Lazarus v4.3.0.0 (bcf314a670) / FreePascal v3.2.3-46-g77716a79dc (aka fixes)
(Windows 64-bit install w/Win32 and Linux on ARM and x64 cross-compilers via FpcUpDeluxe)

My Systems: Windows 10/11 Pro x64 (Current)

 

TinyPortal © 2005-2018