lazarus execute after vs lazbuild execute after lazarus / 13-General ---------------------------------------------------------------------- Чебурашка · 2022-11-10 09:51 Hello, I have a lpi where there is a execute after assigned for build (see pic.). Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i cmd /C myscript.bat  I see that when I do "Build" or "Clean up and build" from lazarus, myscript.bat is called as expected, but if I use lazbuild script isn't called. currently I was doing: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i c:\projectdir>lazbuild myproject.lpi  Is it possible to obtain the same result in lazbuild? Thanks ---------------------------------------------------------------------- Чебурашка · 2022-11-11 10:34 Any ideas? ---------------------------------------------------------------------- MarkMLl · 2022-11-11 12:05 Works correctly on Linux, I routinely use it to output a date and time on completion. MarkMLl ---------------------------------------------------------------------- Thaddy · 2022-11-11 12:13 @MarkMLI So cmd /C works on Linux?  And I suppose a .bat extension also works on Linux with the correct interpretation?  Both are MS dos and/or Windows specific. @tt I never use LazBuild - I use make - , so may be you can give a small, but full example that demonstrates this. It should work either way, but may depend on settings, not code. E.g. It may be the case the .lpi does not contain the full configuration ---------------------------------------------------------------------- MarkMLl · 2022-11-11 13:14 Thaddy, you know effing well what I mean: execute-after works correctly on Linux. So kindly stop being so gratuitously obtuse: your comment that you don't use Lazbuild is even less helpful than my implied comment that I don't use Windows. MarkMLl ---------------------------------------------------------------------- Чебурашка · 2022-11-11 13:44 Hey guys, by chance I tried to do Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i lazbuild -B myproject.lpi  and about magically I had Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Info: (lazarus) Execute Title="Project: Executing command after"Info: (lazarus) Working Directory=".....some local path...."Info: (lazarus) Executable=".....some local bat...."  I therefore conclude that passing the -B option is equivalent to doing the Build in the IDE. Sorry but from the wiki nor from the inline help it was not very clear to me, but ok I am about 50 so my head isn't so fast anymore, if it has ever been. Note: I have a project whose code is compiled both under linux and windows. I use separate lpis that point to the same lpr/pas. In this way the linux lpi calls a sh and the windows lpi calls a bat, to make similar operations using different syntaxes, of course. ---------------------------------------------------------------------- Чебурашка · 2022-11-11 13:59 Another question related to lazbuild: is it possible to emulate the IDE operation "Clean up and build..."? ---------------------------------------------------------------------- Чебурашка · 2022-11-11 14:12 Quote from: Thaddy on November 11, 2022, 01:13:04 pm@MarkMLI So cmd /C works on Linux?  And I suppose a .bat extension also works on Linux with the correct interpretation?  Both are MS dos and/or Windows specific. @tt I never use LazBuild - I use make - , so may be you can give a small, but full example that demonstrates this. It should work either way, but may depend on settings, not code. E.g. It may be the case the .lpi does not contain the full configuration In attach a very simple example. Doing lazbuild -B it does the job instead. ---------------------------------------------------------------------- MarkMLl · 2022-11-11 14:16 Quote from: tt on November 11, 2022, 02:59:18 pmAnother question related to lazbuild: is it possible to emulate the IDE operation "Clean up and build..."? Not that I can immediately see, referring to the source and also to the --help output. In my case I typically keep a makefile so that I can build a console- only version of a program for unix, and makefile doctrine implies a "clean" target to get rid of all intermediate files and a "distclean" that also wipes binaries. I note that (according to --help etc.) lazbuild has a --create-makefile option, but have never used it. MarkMLl Sorry but from the wiki nor from the inline help it was not very clear to me, but ok I am about 50 so my head isn't so fast anymore, if it has ever been. [/quote] Youngster :-) MarkMLl ---------------------------------------------------------------------- Чебурашка · 2022-11-11 14:23 Quote from: MarkMLl on November 11, 2022, 03:16:19 pmQuote from: tt on November 11, 2022, 02:59:18 pmAnother question related to lazbuild: is it possible to emulate the IDE operation "Clean up and build..."? Not that I can immediately see, referring to the source and also to the --help output. In my case I typically keep a makefile so that I can build a console- only version of a program for unix, and makefile doctrine implies a "clean" target to get rid of all intermediate files and a "distclean" that also wipes binaries. I note that (according to --help etc.) lazbuild has a --create-makefile option, but have never used it. MarkMLl Sorry but from the wiki nor from the inline help it was not very clear to me, but ok I am about 50 so my head isn't so fast anymore, if it has ever been. Youngster :-) MarkMLl Thanks I will give a deeper look in the direction of make or fpcmake in order to make more automatic certail building processes, including the clean and build, that I feel very necessary. ---------------------------------------------------------------------- MarkMLl · 2022-11-11 14:28 Quote from: tt on November 11, 2022, 03:23:55 pmThanks I will give a deeper look in the direction of make or fpcmake in order to make more automatic certail building processes, including the clean and build, that I feel very necessary. Example makefile at https://github.com/MarkMLl/hp2671/blob/main/hp2671/Makefile However I might redo some of that if Lazbuild's makefile generation is halfway decent. MarkMLl ---------------------------------------------------------------------- Thaddy · 2022-11-11 15:01 Quote from: MarkMLl on November 11, 2022, 02:14:41 pmSo kindly stop being so gratuitously obtuse: your comment that you don't use Lazbuild is even less helpful than my implied comment that I don't use Windows. That is by no means gratuitously: OS and shell files are essential to the solution. You make yourself silly by not noting that and "works on Linux". It is something different: it works on Windows too with correct configuration. Period. ---------------------------------------------------------------------- Bogen85 · 2022-11-12 05:13 My take on the banter between Thaddy and MarkMLI... QuoteIf something works it does not mean it can fail. TEST I guess if every one reading Thaddy's signature was support to test (evaluate) it (and provide feedback) we have likely all failed (or most of us at least). But I guess because anything Thaddy says can't be wrong no one has (or very few have) publicly provided feedback on it. ---------------------------------------------------------------------- MarkMLl · 2022-11-12 07:58 Quote from: Bogen85 on November 12, 2022, 06:13:43 amI guess if every one reading Thaddy's signature was support to test (evaluate) it (and provide feedback) we have likely all failed (or most of us at least). But I guess because anything Thaddy says can't be wrong no one has (or very few have) publicly provided feedback on it. I took Thaddy's sig as wryly meta: he's making a valid point, and in making the point is providing an example :-) Incidentally, I took a look at lazbuild's --create-makefile yesterday and couldn't get it to do anything. Can anybody comment either way (irrespective of platform)? MarkMLl