Quick run tool - Windows

Post your FreeBASIC source, examples, tips and tricks here. Please don’t post code without including an explanation.
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Quick run tool - Windows

Post by dodicat »

Added a minimalist version, first post.
deltarho[1859]
Posts: 4292
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: Quick run tool - Windows

Post by deltarho[1859] »

dodicat wrote:Added a minimalist version
A vast improvement, IMO. Image I compiled it using gcc 8.3 opt -O2 32-bit and 64-bit, no issues.

Did you get WinBE working?
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Quick run tool - Windows

Post by dodicat »

I have the latest winFBE.
I have yet to try out your configurations.
I note (SetCompilerPaths and SetCompilerSwitches. They will need to be installed).
Where are these installed?
I don't mind zippers, but installers??
deltarho[1859]
Posts: 4292
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: Quick run tool - Windows

Post by deltarho[1859] »

@dodicat
I don't mind zippers, but installers??
I use the term loosely.

I mentioned above a tutorial that I wrote on how to include the tools (it is dead easy, a few minutes). Go to HERE.
Yours truly wrote:You will also need the updates for the additional toolchains HERE. My current advice is to download only 8.3, in which case SetCompilerPathsII.ini, in the Tools folder, will need the 9.2 line removing. Put 'FreeBASIC-1.07.1-gcc-8.3' next to 'FreeBASIC-1.07.1-gcc-5.2'.
When you have done that I will give you a fantastic undocumented WinFBE command, as far as I know, that has saved me a headache on many an occasion. Image
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: Quick run tool - Windows

Post by Tourist Trap »

dodicat wrote:Use this to run code previously written or copied code from the forum.
Keep this file in it's own folder, there are three .txt files written.
I see many users have a stash of fb compilers.
Add some of your favourites and choose one from your list (An idea from member deltarho).
Mainly quick compile then quick run, but compile and run is available.
Your chosen code is shown in notepad, it can be edited and saved and re compiled.
You can use the build options, e.g. -Wc -O3, to quickly test out your code.
Might be handy for fbide users.
Hello dodi!

Thanks a lot for this, a minimalist quickrunner was highly expected around.

I have a few remarks, and a couple of suggestions coming from my experimentations of your tool. The reason why I can not make my remarks just an addition to your code in order to show you this all more conveniently is that I had got not a minute free to do some freebasics for a while, and as you built this tool over the windows programming model it wwould ask me some effort to know where to introduce any change. Anyway, here are my few opinions:

Remarks:
  • *** the minimalistic version brings the console window (red window) at the top of the desktop. In my case that's a little disturbing since I use the taskbar at the very top also. Then non-minimalistic version throws the console anywhere, which is better.
  • *** when we get code from the clipboard, the program does open the text file. I think that this should be optionnal, because we generally know what we've just copied. As an alternative I would make avaiable a button to look at the textfile at any moment, but not necessarily at the grab time. It's simply just that it really can be useless to watch at this content, and will end stealing some of our precious busy time, if repeated continuously ;)
Suggestions
  • xxx First, I have to say that I quickrun your code from FBIDE in order to test it - as I do most of time for any code I want to try. So my suggestion is, can you add a button to steal the path configuration of FBIDE to make your program settle down with all things ready. This installation would the come in a second time. --- Said otherwise: first quickrun with FBIDE, grab the FBIDE location at this moment, steal the configuration, ask the user if he wants to make your tool settle down somewhere in this state.... Could be very convenient for the FBIDE quickrunners.
  • xxx Can you provide in the tool, or here, a list of the swithches best suitable for a given task. You know the gen gcc O3 and so on stuff. Now that we can easily use them thanks to this IDE.
  • xxx Can you launch a test for the version of the compiler, #print __FB_VERSION__, whenever the compiler path is set up. Just to make it clear when we switch between multiple versions?
  • xxx Ok I think this tools has great potential, and I'll try to stick around to hear about your future changes ;)
Thanks.
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Quick run tool - Windows

Post by dodicat »

Thanks TT.
Taskbar at the top, I never thought of that.
I believe it can be at either side also?
Line 60 (ish)
SetWindowPos(consoleWindow,0,100,100,0,0,SWP_NOSIZE or SWP_NOZORDER )
should keep it clear.
I have noted your suggestions.
I could have a drop list of compiler options to choose from (fbedit style), but my train of thought was that fbide users are so used to writing in their options that continuing the tradition would suit well enough.
You can kill the notepad view of clipboard, clipboard.txt is the running code, but I see your point.
At the moment I have chosen compilers fb 0.24, fb 1.05 fb 1.06 and fb 1.07.
I don't bother with the daily builds and the various gcc's.
Thanks again for testing.
Post Reply