Include Digger
-
- Posts: 556
- Joined: Mar 10, 2007 15:44
- Location: Ohio, USA
- Contact:
Re: Include Digger
It is set up to do any Freebasic compiler whether native to the system or not.
Can also do libraries.
In the menu:
Library -> Add external library
A dialog box will open to allow you to select the MAIN ".bi" file for the library. And then, yes, will parse that and any other "Included" files.
Can also do libraries.
In the menu:
Library -> Add external library
A dialog box will open to allow you to select the MAIN ".bi" file for the library. And then, yes, will parse that and any other "Included" files.
-
- Posts: 556
- Joined: Mar 10, 2007 15:44
- Location: Ohio, USA
- Contact:
Re: Include Digger
Version 1.1.1 July 9, 2019
-- Added fbc compiler version '1.07.0' to the list of available compilers.
---- Only for when adding a "non-native" compiler.
-- Added '.inc' to list of parsable files.
-- Fix load error for native compilers.
Source: https://github.com/bcohio2001/Freebasic-Include-Digger
-- Added fbc compiler version '1.07.0' to the list of available compilers.
---- Only for when adding a "non-native" compiler.
-- Added '.inc' to list of parsable files.
-- Fix load error for native compilers.
Source: https://github.com/bcohio2001/Freebasic-Include-Digger
Re: Include Digger
There is nothing new on GitHub ... still the version of: Sept. 30th, 2018
(no changes since then, please check)
(no changes since then, please check)
-
- Posts: 556
- Joined: Mar 10, 2007 15:44
- Location: Ohio, USA
- Contact:
Re: Include Digger
Ok. Check it now.
I am still trying to figure out GitHub.
Am using "GitHub Desktop" for the first time to update. Did not know that had to "Push" to update.
I am still trying to figure out GitHub.
Am using "GitHub Desktop" for the first time to update. Did not know that had to "Push" to update.
-
- Posts: 556
- Joined: Mar 10, 2007 15:44
- Location: Ohio, USA
- Contact:
Re: Include Digger
On a general note to all:
When adding the compiler, it takes a long time to process all the files.
Have a progress bar dialog to display progress, but bogs down and says that program is not responding.
Give it time ...
When adding the compiler, it takes a long time to process all the files.
Have a progress bar dialog to display progress, but bogs down and says that program is not responding.
Give it time ...
-
- Posts: 606
- Joined: Nov 28, 2012 1:27
- Location: CA, USA moving to WA, USA
- Contact:
Re: Include Digger
Hi
I love support for large projects like this. It helps everyone, and shows that FB is a serious tool.
I haven't used/adapted this yet, but have been watching and will when I have a free point in time.
Is this project Windows only? I guess I missed that, somewhere. (I use Linux only.)
I peeked at Progress Bar.bi.
For your progress bar, maybe I missed it, but add a timer check. Update no quicker than every tenth second or so, whatever is pleasing/smooth.
(I just use a 'spinner' char set every 300 ms; less clutter/cleanup. To me, bars suggest you know when the process will end and your prediction has meaning. An activity indicator just says: "I'm not dead, yet.")
I love support for large projects like this. It helps everyone, and shows that FB is a serious tool.
I haven't used/adapted this yet, but have been watching and will when I have a free point in time.
Is this project Windows only? I guess I missed that, somewhere. (I use Linux only.)
I peeked at Progress Bar.bi.
For your progress bar, maybe I missed it, but add a timer check. Update no quicker than every tenth second or so, whatever is pleasing/smooth.
(I just use a 'spinner' char set every 300 ms; less clutter/cleanup. To me, bars suggest you know when the process will end and your prediction has meaning. An activity indicator just says: "I'm not dead, yet.")
-
- Posts: 556
- Joined: Mar 10, 2007 15:44
- Location: Ohio, USA
- Contact:
Re: Include Digger
ANY help, comments will be gladly accepted.
Here is the sub which "Builds" the database.
Obviously not runnable.
As for running on Linux? It uses just general dlg commands, so I don't see why not.
I don't know anything about Linux to know if it would work.
Here is the sub which "Builds" the database.
Obviously not runnable.
Code: Select all
Sub Parser.Build(ReBuildFlag As Long)
Dim As String PBTitle
Dim As Long x, BumpFactor, NextBump
'
Select Case ReBuildFlag
Case FBInc_Build_Init
PBTitle = "Initial build of"
Case FBInc_Build_Comp
PBTitle = "Compiler change - Rebuilding"
Case FBInc_Build_IncDiff
PBTitle = "Include files change - Rebuilding"
Case FBInc_Build_DBChange
PBTitle = "Database storage change - Rebuilding"
Case Else
'FBInc_Build_User
'this comes from main dlg (others from .Load())
PBTitle = "Requested rebuild of"
If CompType = CompType_Lib Then
ReDim Preserve FileData(0) 'keep base file name
'FileData(0).FileName = Mid(LibPath, LenPlace) 'remove Place/
FileData(0).DataLoc = 0 'ensure cleared
FileData(0).TimeStamp = FileDateTime(FBIncPath + FileData(0).FileName) 'might have new timestamp
FileData(0).Count = -1 'mark not parsed
ArrBound = 0
'
DB.BuildOpen() 'deletes database file
Lib_PreBuild()
Else
For x = 0 To ArrBound
FileData(x).Count = -1 'mark not parsed
FileData(x).DataLoc = 0 'ensure cleared
Next
EndIf
End Select
'
'progress dialog
Dim As Long PBOpen 'flag if progress bar dlg created
Dim As ProgBarDlg MyProgress = ProgBarDlg(PBTitle + " database - Parsing files")
MyProgress.SetRange(1, ArrBound + 1)
MyProgress.SetBackG(BGR(127, 127, 0))
If ArrBound > 99 Then
BumpFactor = ceil(ArrBound/100) '<-- crt/math.bi
Else
BumpFactor = 1
EndIf
NextBump = BumpFactor
'
' **** Initial build ****
DB.BuildOpen() 'closes and deletes file if needed, then reopen for full access
PBOpen = MyProgress.OpenIt()
For x = 0 To ArrBound
'Parse it
Parse(x) 'NO MORE RECURSION ---
'progress bar active and time for next inc of bar
If PBOpen > 0 And x > NextBump Then
MyProgress.BumpIt(x+1)
NextBump += BumpFactor
EndIf
Next
If PBOpen > 0 Then
MyProgress.KillIt()
PBOpen = 0
EndIf
'
'identify "#Include"
Dim As ItemDef I 'read into this
Dim As Long y
Dim As ULong Plat(ArrBound)
Dim As UShort Prop(ArrBound)
'
MyProgress = ProgBarDlg(PBTitle + " database - Identify dependencies")
MyProgress.SetRange(1, DB.ItemCount)
MyProgress.SetBackG(BGR(127, 127, 0))
If DB.ItemCount > 99 Then
BumpFactor = ceil(DB.ItemCount/100) '<-- crt/math.bi
Else
BumpFactor = 1
EndIf
NextBump = BumpFactor
'
DB.PosInFile(1)
PBOpen = MyProgress.OpenIt()
For x = 1 To DB.ItemCount
I = DB.ReadItem()
If (I.ItemProperties And FBInc_Data_Inc) = FBInc_Data_Inc Then
'#Include
y = GetFileIndex(I.Name, I.FileNum) 'include this file
If y >= 0 Then
'file found
'This file will be loaded with this Platform/Properties
Plat(y) Or= I.Platform 'first time might be Win32 then later Linux....
Prop(y) Or= (I.ItemProperties And (FBInc_Lang_Mask Or FBInc_Format_Mask)) 'only save last 4 bits
EndIf
EndIf
If PBOpen > 0 And x > NextBump Then
MyProgress.BumpIt(x+1)
NextBump += BumpFactor
EndIf
Next
If PBOpen > 0 Then
MyProgress.KillIt()
PBOpen = 0
EndIf
'
'Assign
'DB.PosInFile(1) 'top of file
MyProgress = ProgBarDlg(PBTitle + " database - Assigning dependencies")
MyProgress.SetRange(1, ArrBound + 1)
MyProgress.SetBackG(BGR(127, 127, 0))
If ArrBound > 99 Then
BumpFactor = ceil(ArrBound/100) '<-- crt/math.bi
Else
BumpFactor = 1
EndIf
NextBump = BumpFactor
PBOpen = MyProgress.OpenIt()
Dim As ULong RewriteLoc
For x = 0 To ArrBound
'anything saved from this file
If FileData(x).Count > 0 Then
'if no dependancies found, skip
If Plat(x) > 0 Or Prop(x) > 0 Then
'position for start of this file
DB.PosInFile(FileData(x).DataLoc)
'NOTE: not changing length of "record", just changing ULong and UShort values
For y = 1 To FileData(x).Count
'store rewrite location
RewriteLoc = DB.PosInFile()
I = DB.ReadItem()
'make changes, if needed
If Plat(x) > 0 Then I.Platform = Plat(x)
If Prop(x) > 0 Then I.ItemProperties = (I.ItemProperties And FBInc_Data_Mask) Or Prop(x)
'reposition for rewrite
DB.PosInFile(RewriteLoc)
DB.WriteItem(I)
Next
EndIf
EndIf
'progress bar active and time for next inc of bar
If PBOpen > 0 And x > NextBump Then
MyProgress.BumpIt(x+1)
NextBump += BumpFactor
EndIf
Next
If PBOpen > 0 Then
MyProgress.KillIt()
PBOpen = 0
EndIf
'Reopen new database
DB.RegOpen(DB.CurrV)
DataAdded = TRUE
End Sub
I don't know anything about Linux to know if it would work.
-
- Posts: 606
- Joined: Nov 28, 2012 1:27
- Location: CA, USA moving to WA, USA
- Contact:
Re: Include Digger
At least the status bar uses the hwnd structure.
Your main include asks for 'windows.bi.'
That won't compile in Linux.
david
Your main include asks for 'windows.bi.'
That won't compile in Linux.
david
Re: Include Digger
DLG structs are part of WIN-API, which means automatically "Windows only".bcohio2001 wrote:As for running on Linux? It uses just general dlg commands, so I don't see why not.
-
- Posts: 606
- Joined: Nov 28, 2012 1:27
- Location: CA, USA moving to WA, USA
- Contact:
Re: Include Digger
Thanks.
Re: Include Digger
AFAICS this project provides a subset of the fbdoc features. And fbdoc isspeedfixer wrote:I love support for large projects like this. It helps everyone, and shows that FB is a serious tool.
- documented (self-generating docs for Doxygen backend)
- cross-platform
- a text tool that can get integrated in the build management system
- expandable by plugins, so it can generate any desired output format (examples: simple list of symbols, python ctypes wrapper)
-
- Posts: 556
- Joined: Mar 10, 2007 15:44
- Location: Ohio, USA
- Contact:
Re: Include Digger
I have seen postings of a "dialog" that did not look like "Window's" dialog. So I assumed that Linux has a way to create them.MrSwiss wrote:DLG structs are part of WIN-API, which means automatically "Windows only".
As I said before, I know nothing of Linux.
Re: Include Digger
Yes there are, but you'd have to use a GFX lib. and hand-create them, yourselfbcohio2001 wrote:So I assumed that Linux has a way to create them.
(for multi platform), or use xWin (Linux/Unix equivalent of WIN-API).
The alternative is: OpenGL (which exists in both OS's).
-
- Posts: 556
- Joined: Mar 10, 2007 15:44
- Location: Ohio, USA
- Contact:
Re: Include Digger
Modifying now with FLTK … Going to be a while until done. But am working on it.
-
- Posts: 606
- Joined: Nov 28, 2012 1:27
- Location: CA, USA moving to WA, USA
- Contact:
Re: Include Digger
I appreciate the effort. Thank you.
I chose FB when I got back to (serious) programming when I retired because:
it was relatively cross-platform
it was relatively fast in execution
it was small in executable size
it was easily extensible (easy C linking) - which gives it lower level power
it was small
Large bonus: the community was nice, responsive, helpful, very aggressively being expertly developed. Very few trolls.
Very little 'guru' attitude of the helpers. (Easy to measure by the number and tone of RTM replies. AND the frequency that any 'developer' participated in the discussions.)
I had started with D, but when cataloging the keywords, I found:
--- it was not small
--- it was not finished enough
--- it was not self-consistent
--- it 'fixed' itself with too many properties and modifiers (leaning on RTTI, etc. will hurt FB later, I believe)
I quit when my inventory of keywords and exceptions hit 2500 and I was not even close to comprehensive
The process of my choice took well over a year.
I would NEVER choose that kind of learning load or ask it of anyone else. That's why c and c++ (burden of the syntax) were not a choice.
Bottom line: I only 'cherry pick' code and projects that all truly cross-platform.
Just ... my choice.
Porting to any non-Windows-only graphics library qualifies as cross-platform. Any effort like this lowers the bar for another to learn and promotes better programming style, generally, to my mind.
Again, thank you for the effort.
david
I chose FB when I got back to (serious) programming when I retired because:
it was relatively cross-platform
it was relatively fast in execution
it was small in executable size
it was easily extensible (easy C linking) - which gives it lower level power
it was small
Large bonus: the community was nice, responsive, helpful, very aggressively being expertly developed. Very few trolls.
Very little 'guru' attitude of the helpers. (Easy to measure by the number and tone of RTM replies. AND the frequency that any 'developer' participated in the discussions.)
I had started with D, but when cataloging the keywords, I found:
--- it was not small
--- it was not finished enough
--- it was not self-consistent
--- it 'fixed' itself with too many properties and modifiers (leaning on RTTI, etc. will hurt FB later, I believe)
I quit when my inventory of keywords and exceptions hit 2500 and I was not even close to comprehensive
The process of my choice took well over a year.
I would NEVER choose that kind of learning load or ask it of anyone else. That's why c and c++ (burden of the syntax) were not a choice.
Bottom line: I only 'cherry pick' code and projects that all truly cross-platform.
Just ... my choice.
Porting to any non-Windows-only graphics library qualifies as cross-platform. Any effort like this lowers the bar for another to learn and promotes better programming style, generally, to my mind.
Again, thank you for the effort.
david