SetCompilerPathsII & SetCompilerSwitches for WinFBE
Re: SetCompilerPathsII & SetCompilerSwitches for WinFBE
could you please publish the source, i could be interrested to adapt it for my ide csed_fb
Marpon
Marpon
-
- Posts: 4292
- Joined: Jan 02, 2017 0:34
- Location: UK
- Contact:
Re: SetCompilerPathsII & SetCompilerSwitches for WinFBE
@Marpon
I have published quite a bit of source code since joining in January 2016 but on rare occasions I have not, Encrypternet being one although that was derived from several of my threads which has source code.
This is one of the rare occasions where I will not be publishing the source code as well. I hope nobody flames me for this because we are not obliged to publish source code for everything we do especially since 99% of my stuff published here has been source code. Of course, I have my reasons but I am not obliged to mention them either.
Sorry.
I have published quite a bit of source code since joining in January 2016 but on rare occasions I have not, Encrypternet being one although that was derived from several of my threads which has source code.
This is one of the rare occasions where I will not be publishing the source code as well. I hope nobody flames me for this because we are not obliged to publish source code for everything we do especially since 99% of my stuff published here has been source code. Of course, I have my reasons but I am not obliged to mention them either.
Sorry.
Re: SetCompilerPathsII & SetCompilerSwitches for WinFBE
no problem,
you certainly have your own reasons...
you certainly have your own reasons...
-
- Posts: 4292
- Joined: Jan 02, 2017 0:34
- Location: UK
- Contact:
Re: SetCompilerPathsII & SetCompilerSwitches for WinFBE
@marpon
Thank you for your understanding. It will probably be sometime before I withhold again - it really is a rare occasion for me.
Thank you for your understanding. It will probably be sometime before I withhold again - it really is a rare occasion for me.
-
- Posts: 4292
- Joined: Jan 02, 2017 0:34
- Location: UK
- Contact:
Re: SetCompilerPathsII & SetCompilerSwitches for WinFBE
This is how my Cswitches has looked for a while. Basically, I had five sets doubled up by adding -exx giving ten sets in the group box. I added another two sets and doubled up giving a total of 14 in the group box. I am contemplating adding another three sets which, when doubled up with -exx, would give a total of 20 sets in the group box. The window will then be rather 'deep'.
I am now using -exx for all new projects - I learnt that the hard way recently with a new project without using -exx. Some folk may have more switch presets than me and if they use -exx for new projects and double up then their window may be very deep.
I needed a rethink so decided to treat -exx as a separate issue and SetCompilerSwitchesII was born.
This is what the above now looks like.
This does the same job as the opening screenshot, but we now have five sets in the group box and double up by selecting the -exx check box.
With SetCompilerSwitches the WinFBE.ini file got updated on selecting an entry in the group box. If we did that with SetCompilerSwitchesII there would be the possibility of a user checking or unchecking the -exx checkbox and then closing the window. WinFBE.ini would not get updated unless a group box entry was clicked even though they may not want to change a group box selection. So the group box entries are now parsed and WinFBE.ini is only updated by clicking on the Apply button. If we do not click on the Apply button and close the window then WinFBE.ini is left as was.
When we close the window SetCompilerSwitchesII remembers whether the -exx checkbox was checked or not. The first idea I had was to have the first entry of the ini file as '-exx On' or '-exx Off'. A user would have to enter this first entry when they create their ini file. I would have to program to deal with this first entry. Well, I figured that was too much hard work for both of us.
What I ended up with is a simple trick. If the -exx checkbox is checked then if the file 'exx.dat' does not exist a zero byte file 'exx.dat' is created. If the -exx checkbox is not checked then if the file 'exx.dat' exists it is Killed. So, the user can now create their ini file without thinking about -exx and all I have to do is check whether 'exx.dat' exists or not with just a few lines of code. So, if the -exx checkbox is checked it will remain checked for each execution of SetCompilerSwitchesII until we uncheck it.
Some of you may not know how to create a zero byte file:
remembering that I am using José Roca's WinFBX so that SetCompilerSwitchesII is high DPI aware.
As with SetCompilerSwitches, SetCompilerSwitchesII.ini is limited to 32 sets of switches. Anyone doubling up with -exx would then be limited 16 without -exx and 16 with -exx. Now they can have 32 sets without -exx and get access to 64 sets with -exx being treated separately.
This is what my current ini file is:
and I use SetCompilerSwitchesIIL.exe with the 'L' giving a larger text size like this
Here is the SetCompilerSwitchesII.zip download. Compiled with fbc 1.07.1, gcc 8.3, -exx unchecked and switches -gen gcc -Wc -O3 resulting in a binary of only 69KiB.
SetCompilerSwitchesII.zip
I am now using -exx for all new projects - I learnt that the hard way recently with a new project without using -exx. Some folk may have more switch presets than me and if they use -exx for new projects and double up then their window may be very deep.
I needed a rethink so decided to treat -exx as a separate issue and SetCompilerSwitchesII was born.
This is what the above now looks like.
This does the same job as the opening screenshot, but we now have five sets in the group box and double up by selecting the -exx check box.
With SetCompilerSwitches the WinFBE.ini file got updated on selecting an entry in the group box. If we did that with SetCompilerSwitchesII there would be the possibility of a user checking or unchecking the -exx checkbox and then closing the window. WinFBE.ini would not get updated unless a group box entry was clicked even though they may not want to change a group box selection. So the group box entries are now parsed and WinFBE.ini is only updated by clicking on the Apply button. If we do not click on the Apply button and close the window then WinFBE.ini is left as was.
When we close the window SetCompilerSwitchesII remembers whether the -exx checkbox was checked or not. The first idea I had was to have the first entry of the ini file as '-exx On' or '-exx Off'. A user would have to enter this first entry when they create their ini file. I would have to program to deal with this first entry. Well, I figured that was too much hard work for both of us.
What I ended up with is a simple trick. If the -exx checkbox is checked then if the file 'exx.dat' does not exist a zero byte file 'exx.dat' is created. If the -exx checkbox is not checked then if the file 'exx.dat' exists it is Killed. So, the user can now create their ini file without thinking about -exx and all I have to do is check whether 'exx.dat' exists or not with just a few lines of code. So, if the -exx checkbox is checked it will remain checked for each execution of SetCompilerSwitchesII until we uncheck it.
Some of you may not know how to create a zero byte file:
Code: Select all
Dim f As Long
f = FreeFile
Open AfxGetExePath & "\exx.dat" For Binary As #f
Close #f
As with SetCompilerSwitches, SetCompilerSwitchesII.ini is limited to 32 sets of switches. Anyone doubling up with -exx would then be limited 16 without -exx and 16 with -exx. Now they can have 32 sets without -exx and get access to 64 sets with -exx being treated separately.
This is what my current ini file is:
Code: Select all
"-gen gas"
"-gen gcc"
"-gen gcc -Wc -O1"
"-gen gcc -Wc -O2"
"-gen gcc -Wc -O3"
"-gen gcc -Wc -Ofast"
"-gen gcc -Wc -Os"
Here is the SetCompilerSwitchesII.zip download. Compiled with fbc 1.07.1, gcc 8.3, -exx unchecked and switches -gen gcc -Wc -O3 resulting in a binary of only 69KiB.
SetCompilerSwitchesII.zip
Re: SetCompilerPathsII & SetCompilerSwitches for WinFBE
Hi deltarho[1859], I like the new look and the -exx check box :-)
-
- Posts: 4292
- Joined: Jan 02, 2017 0:34
- Location: UK
- Contact:
-
- Posts: 4292
- Joined: Jan 02, 2017 0:34
- Location: UK
- Contact:
Re: SetCompilerPathsII & SetCompilerSwitches for WinFBE
SetCompilerSwichesII has one thing in common with SetCompilerSwiches in that if the string CompilerSwitches in WinFBE.ini does not match with a preset, including whether the -exx checkbox is checked or not, then the application will have no radio button set on opening. This will happen if you add a command manually after using a preset.
Suppose you added '-arch 686' then no radio button will be set. You should remember what you did but SetCompilerSwichesII very kindly tells what it found. In this case we could get, for example:
When we click OK we will get a display without a radio button being set. If you want to stay with what was found then simply close SetCompilerSwichesII.
What happens if we click on Apply with no radio buttons selected. Well, we get told that no radio button has been selected - what else?
New version uploaded.
Suppose you added '-arch 686' then no radio button will be set. You should remember what you did but SetCompilerSwichesII very kindly tells what it found. In this case we could get, for example:
When we click OK we will get a display without a radio button being set. If you want to stay with what was found then simply close SetCompilerSwichesII.
What happens if we click on Apply with no radio buttons selected. Well, we get told that no radio button has been selected - what else?
New version uploaded.
-
- Posts: 4292
- Joined: Jan 02, 2017 0:34
- Location: UK
- Contact:
Re: SetCompilerPathsII & SetCompilerSwitches for WinFBE
There is an issue which has irritated me - I am easily irritated.
When either SetCompilerPathsII or SetCompilerSwitchesII load they will be displayed in the centre of your primary monitor. If you only have one monitor then this is not a problem. However, if you have more than one monitor as I do then I find it irritating to have them centred on my primary monitor when my development is done on my secondary monitor ie WinFBE opens on my secondary monitor.
With the latest versions they will still centre on the primary monitor, initially, but if we move them, then the next time they load they will display at their last location. This is still useful with only one monitor as we can now ensure that both can be loaded without the second load sitting on top of the first load. Since they are both TOPMOST SetCompilerSwitchesII will probably totally cover SetCompilerPathsII, when they are both centred.
Chances are that you will have some white space in your editor so, whether you have one or more monitors, you can place the displays at the far right of your white space. I have placed mine at the top right of WinFBE's edit window. Unless their location is an inconvenience there is no need to close either of them since they both run asynchronously with WinFBE and when we click on WinFBE's edit window they both remain visible because WinFBE is not TOPMOST.
Unzip the following to get a folder called SCP&SCS which includes the updates.
SCP&SCS.zip
Added: The updates use the 'standard' size font. I have both names appended with 'L' giving the above screenshot. Of course, the command line in WinFBE's 'Tools>User Tools...' need the 'L' as well.
When either SetCompilerPathsII or SetCompilerSwitchesII load they will be displayed in the centre of your primary monitor. If you only have one monitor then this is not a problem. However, if you have more than one monitor as I do then I find it irritating to have them centred on my primary monitor when my development is done on my secondary monitor ie WinFBE opens on my secondary monitor.
With the latest versions they will still centre on the primary monitor, initially, but if we move them, then the next time they load they will display at their last location. This is still useful with only one monitor as we can now ensure that both can be loaded without the second load sitting on top of the first load. Since they are both TOPMOST SetCompilerSwitchesII will probably totally cover SetCompilerPathsII, when they are both centred.
Chances are that you will have some white space in your editor so, whether you have one or more monitors, you can place the displays at the far right of your white space. I have placed mine at the top right of WinFBE's edit window. Unless their location is an inconvenience there is no need to close either of them since they both run asynchronously with WinFBE and when we click on WinFBE's edit window they both remain visible because WinFBE is not TOPMOST.
Unzip the following to get a folder called SCP&SCS which includes the updates.
SCP&SCS.zip
Added: The updates use the 'standard' size font. I have both names appended with 'L' giving the above screenshot. Of course, the command line in WinFBE's 'Tools>User Tools...' need the 'L' as well.
Re: SetCompilerPathsII & SetCompilerSwitches for WinFBE
thank you :-)
-
- Posts: 4292
- Joined: Jan 02, 2017 0:34
- Location: UK
- Contact:
Re: SetCompilerPathsII & SetCompilerSwitches for WinFBE
@srvaldez
Thank you.
On the face of it, it would appear that very few people are using these user tools; although over 1400 views would suggest otherwise unless most of them are simply curious as to what I am rambling about now.
At PowerBASIC I wrote many threads on encryption and many of them only had me posting in them. For a while I thought I was just talking to myself. As the years went by it transpired that quite a few people were using my code but very few people mentioned it. So, I ignore the lack of feedback and just keep chugging away.
Thank you.
On the face of it, it would appear that very few people are using these user tools; although over 1400 views would suggest otherwise unless most of them are simply curious as to what I am rambling about now.
At PowerBASIC I wrote many threads on encryption and many of them only had me posting in them. For a while I thought I was just talking to myself. As the years went by it transpired that quite a few people were using my code but very few people mentioned it. So, I ignore the lack of feedback and just keep chugging away.
Re: SetCompilerPathsII & SetCompilerSwitches for WinFBE
I had thought of doing something like this a number of years ago with ALL of the FBC compile flags along with brief explanations for each so you could compile a source file in the way you like from a GUI instead of having to use command line. It was not meant to integrate with any IDE's though and I just never got around to doing it.
I have been watching this thread with interest.
I have been watching this thread with interest.
-
- Posts: 4292
- Joined: Jan 02, 2017 0:34
- Location: UK
- Contact:
Re: SetCompilerPathsII & SetCompilerSwitches for WinFBE
Thanks, Imortis.
If you can think of anything that may improve either tool then let me know. I am all ears to any suggestions to anything that I write. Chances are I won't have a clue how to implement them and more reading will be required but that is where the fun starts again. Arachnophilia wanted a variable width form and that had me scratching my head for while.
If you can think of anything that may improve either tool then let me know. I am all ears to any suggestions to anything that I write. Chances are I won't have a clue how to implement them and more reading will be required but that is where the fun starts again. Arachnophilia wanted a variable width form and that had me scratching my head for while.
-
- Posts: 4292
- Joined: Jan 02, 2017 0:34
- Location: UK
- Contact:
Re: SetCompilerPathsII & SetCompilerSwitches for WinFBE
Once you have both the latest versions of SetCompilerPathsIIL and SetCompilerSwitchesIIL located close to each other you can execute both concurrently, if you wanted to, with this batch file:
SCPplusSCS.bat
using your paths and without the 'L' if you do not use it.
With a mouse pointer that big you can see why I use the tools with the larger font. With a 'small' mouse and two monitors I could spend ages trying to find it.
WinFBE version 1.94? I still have version 1.93 in case 1.94 misbehaved. I have 2.03 downloaded, but I am no hurry to start using it - all the new stuff is adding to the designer but I prefer creating my forms manually.
Added: Try running the batch file twice - we get our wrists slapped twice.
SCPplusSCS.bat
Code: Select all
start F:\WinFBE_Suite_1.94\Tools\SetCompilerPathsIIL.exe
start F:\WinFBE_Suite_1.94\Tools\SetCompilerSwitchesIIL.exe
With a mouse pointer that big you can see why I use the tools with the larger font. With a 'small' mouse and two monitors I could spend ages trying to find it.
WinFBE version 1.94? I still have version 1.93 in case 1.94 misbehaved. I have 2.03 downloaded, but I am no hurry to start using it - all the new stuff is adding to the designer but I prefer creating my forms manually.
Added: Try running the batch file twice - we get our wrists slapped twice.
-
- Posts: 4292
- Joined: Jan 02, 2017 0:34
- Location: UK
- Contact:
Re: SetCompilerPathsII & SetCompilerSwitches for WinFBE
I was going to do some experimenting and knew that I would need both the 'Paths' and 'Switches' tools so executed the batch file. I did quite a few 'Build And Execute' and kept both tools open.
It then dawned on me that since both tools did not take up much 'real estate' on my monitor then why not always load both tools. To that end I removed both tools from WinFBE's 'User Tools' window and kept SCPplusSCS. I then changed SCPplusSCS's accelerator to Ctrl+3. Of course, if the 'L' appendage is not used then they would take up even less space on the monitor.
It then dawned on me that since both tools did not take up much 'real estate' on my monitor then why not always load both tools. To that end I removed both tools from WinFBE's 'User Tools' window and kept SCPplusSCS. I then changed SCPplusSCS's accelerator to Ctrl+3. Of course, if the 'L' appendage is not used then they would take up even less space on the monitor.