nInf
#1
Posted 15 February 2008 - 11:55 AM
It can be used to analyse a given INF file such as txtsetup.sif
The first topic will be updated as things move forward.
Hope you like it.
Last version:
ninf1.1.zip 569.25KB 1168 downloads
Missing:
- Drag and Drop nodes on treeview to organize section priorities
- Load Template with section priorities
- Interpret the meaning of ,,,, on INF language
Log of Changes:
--- 1.1 --- 080217-FEB
- Program title change
- Source code included
- Added - faster section load
- Added - function to list Key/Value
- Added - function to find similar keywords based on the selected key name
- Added - Icon
- Added - Option to "Save" and "Save As" with optimized values
--- 1.0 --- 080215-FEB
- Initial release
- no functions, just UI test
Older versions:
xSIF.7z 215.4KB 859 downloads
#2
Posted 15 February 2008 - 12:50 PM
Since today is "wish" day , here is how I would like it to behave (as always cannot say if it is possible or easy/extremely difficult):
the right bottom pane should be divided in three (and possibly have a horizontal grid):
left section automatically listing all occcurrencies of (partial) Section Names
center section automatically listing all occurrencis of (partial) Key name
right section automatically listing all occurrencies of (partial) Key Value
based on the currently selected Section/Key/Value in the upper part.
As an example, using the "reduced" txtsetup.sif file here:
http://www.911cd.net...o...20983&st=18
with:
[SCSI]
atapi="IDE CD-ROM (ATAPI 1.2)/PCI IDE Controller"
selected in the upper part, the lower part should look something like:
Section Key Value[SCSI.Load] atapi atapi.sys,4[Map.SCSI] atapi ATAPI[Map.SCSI] atapi "ISA"[Map.SCSI] atapi "IDE"[ScsiClass][ScsiClass.Load][HardwareIdsDatabase] *PNP0600 "atapi"[BusExtenders] aliide "ALI IDE Bus Driver",files.aliide,aliide[BusExtenders] cmdide "CMD IDE Bus Driver",files.cmdide,cmdide[BusExtenders] intelide "Intel IDE BUS Driver",files.intelide,intelide[BusExtenders] pciide "PCI IDE Bus Driver",files.pciide,pciide[BusExtenders] toside "Toshiba IDE Bus Driver",files.toside,toside[BusExtenders] viaide "VIA IDE Bus Driver",files.viaide,viaide[BusExtenders.Load] aliide aliide.sys[BusExtenders.Load] cmdide cmdide.sys[BusExtenders.Load] intelide intelide.sys[BusExtenders.Load] pciide pciide.sys[BusExtenders.Load] toside toside.sys[BusExtenders.Load] viaide viaide.sysetc., etc.with each line clickable, bringing the upper part to focus on the clicked item.Since I can dream, having beside each line a tick box that would allow to select manually the strictly related items and save these as a "set" of interconnected items, possibly in a .ini file , re-usable and exchangeable, would be great, I guess that in a very short time, with the contributions of a few members we could have a number of "sets" to be used instead of the results of the "search". (another checkbox will be needed to switch between "search mode" and "presets mode")
Moreover, I would like to have the rather cryptic syntax of "commas" interpreted, maybe one could add a "Status bar" at the bottom that , whenever a key like:
is selected, resolves to:iaStor.sys=100,,,,,,3_,4,1,,,1,4
or something like that.Copy file iaStor.sys from "Windows XP Professional CD-ROM" to system32\drivers
Finally, I wouldn't "tie" the name of the utility to a specific ".sif", as said the format is shared also by .ini files and, more important, by .inf files. (and if I remember correctly by .OEM files as well)
jaclaz
#3
Posted 15 February 2008 - 01:35 PM
At the moment:
- The left pane is displaying all sections for navigation
- The right-top pane will display in two columns the keys and the sections
- The right-low pane would display all the contents inside that section (this includes lines that are not recognized as INI values)
---
The initial concept was designed to allow tweaking the section and saving changes. It would also merge sections with identical names and remove empty lines automatically.
----------------
I'd suggest starting with these steps:
(the base UI structure is complete, only missing to add functionality itself)
1 - Start working on the display of the keys inside each section with the possibility to raw edit the contents of each section (to allow editing non-ini values like the ; lines)
2 - Add find&display of related keys/sections on the bottom pane
3 - Interpret the meaning of ,,,, to human readable format
4 - Support to export/import hardware schemes
----------------
At this point I see that the features you mention can be done but this project would be developed much better and faster if you personally modified the source code to suit your exact requirements.
Will also include the project files so that you can easily click and open the project.
Delphi is a very readable language (compared to C, Basic or python) so I think that you would find it quite confortable.
Look here, I promisse you won't regreat learning a bit of pascal: http://www.festra.com/eng/les01.htm
#4
Posted 15 February 2008 - 03:05 PM
@Nuno
I will have a look at the thingie, and actually I KNEW Pascal, I used it last time on the Sinclair Spectrum, some 25 years ago, so I guess I am a bit more than rusty, decayed.
@All,
Nuno is, rather obviously, joking.
I could probably, in a few days (Latin Time, translate to several weeks) be able to write and debug a "Hello, world!" program.
Writing this program would, should I ever succeed, take me next few years.
In other words, DO NOT hold your breath, you will anyway ALL die before I can have this proggie written, your (and my) ONLY hope of surviving is if we "en-masse" actually beg Nuno to go on himself.
I will start right now:
Nuno, please, please, don't do this to me, I know I have been critical to some aspects of Winbuilder and of "your" Delphi programs, but I swear, it was unintentional, it is in my nature to try and push people (also by criticising their work) towards bettering, but everything was done in good faith, and if by any means I somehow offended you or the Delphi deity, I am sorry, and I promise it will never happen again....
.... please do carry on the writing of the program.....
....please....
jaclaz
P.S.: Nuno, DO NOT READ BELOW!
Ok, I am a liar , I had my fingers crossed when I affirmed
it will happen, and VERY SOON, unless you start back working!I promise it will never happen again
#5
Posted 15 February 2008 - 03:39 PM
It is much easier to use Textpad or another editor and do the work than using mouse click navigation, editing of text fields etc.
@jaclaz: can you define your background ideas to suggest this app?
For me currently there is only one issue: It is time consuming to find the sections / the values, especially if one section is divided into several parts.
For this I wrote my iniSort program. It sorts the sections and the keys alphabetically, combines multiple instances of one section and removes empty lines (besides one empty line between sections).
Syntax: iniSort <full path to ini file>. It creates in the <ini file folder> a file <ini file>.srt
For those who are interested, attached the app.
Peter
iniSort.zip 42.23KB 785 downloads
#6
Posted 15 February 2008 - 04:45 PM
I currently do not see the practical use of a txtsetup.sif editor.
It is much easier to use Textpad or another editor and do the work than using mouse click navigation, editing of text fields etc.
@jaclaz: can you define your background ideas to suggest this app?
For me currently there is only one issue: It is time consuming to find the sections / the values, especially if one section is divided into several parts.
I thought that the "final goal" would be clear enough.
I too, for lack of a suitable app, have used Notepad or any other text editor.
Not being a programmer, I used a spreadsheet to sort and order the keys/values.
But a typo is always possible, and it happened to me a few times, even in the very reduced txtsetup.sif I tried using for Recovery Console, of roughly the same (small) size as the one you published on the other thread.
Having an app that "interpreters" correct values is a form of easily identify such typos.
And the actual feature I am missing is the idea of "filtering" all interconnected keys, in order to avoid leftovers when editing an entry that has connections to other sections, and to allow for an easy way to test "pre-sets", besides being easier to play "what if" games.
And once again, this would be interesting for the editing of .inf files as well.
We could use your inisort program to pre-process the file, though (no offence intended, mind you ) I do not find an alphabetical sorting useful as it is a "logical" sorting, expecially when dealing with .sif or .inf files.
If we could have a sort of template telling the inisort program which "priority" to give to each known section, the result would be much more easy to work with.
Do compare the two attached txtsetup.sif's, first one is my (manually) sorted (no empty separting lines, I know it's ugly ) and the other one is the output of the inisort applied to it.
jaclaz
Attached Files
#7
Posted 15 February 2008 - 04:54 PM
You have a natural talent for writing and your topic was surely fun to read.
Perhaps this apparent complexity of coding gets dismistified once you get your hands on it. (crossing my fingers here)
Don't know if it helps but if you're going to try out delphi 7 then I also recommend going onto the options and change the color scheme of the source code editor back to classic mode - it's the same color scheme used at the Turbo Pascal from the early 90's and I find it very intuitive.
No need to worry much about a "Hello world!", under delphi you can write
ShowMessage('Hello World!');
And I (amongst others surely) will always be here to explain or talk with you whenever in doubt.
-----------------
I understood your explanation and will try to work on it until sunday to produce a visible result, then I'll publish the code as Peter and other members might also be interested in taking a look and maybe lending some of their time to do fine tunnings in the future.
I still believe that this would be a good tool for such a craft man as yourself.
---
Peter, this app is meant to be used as a profile tool to select different hardware configuration and also help studying the relationships between files inside txtsetup.
#8
Posted 15 February 2008 - 05:00 PM
Sounds to me, as if jaclaz wants a program to be able to fiddle with inf files, without actually having to know or care about the inner workings of them.
#9
Posted 15 February 2008 - 05:04 PM
I thought that the "final goal" would be clear enough.
I too, for lack of a suitable app, have used Notepad or any other text editor.
Not being a programmer, I used a spreadsheet to sort and order the keys/values.
But a typo is always possible, and it happened to me a few times, even in the very reduced txtsetup.sif I tried using for Recovery Console, of roughly the same (small) size as the one you published on the other thread.
Having an app that "interpreters" correct values is a form of easily identify such typos.
That's a good reason!
And the actual feature I am missing is the idea of "filtering" all interconnected keys, in order to avoid leftovers when editing an entry that has connections to other sections, and to allow for an easy way to test "pre-sets", besides being easier to play "what if" games.
I fully understand the issue, I did all this stuff inside the 'genTxtSetup' I'm using in nativeEx_puzzleXP.
And once again, this would be interesting for the editing of .inf files as well.
That looks like a good reason, too: My concerns: When installing a driver, I usually DO NOT change the *.inf!
We could use your inisort program to pre-process the file, though (no offence intended, mind you ) I do not find an alphabetical sorting useful as it is a "logical" sorting, expecially when dealing with .sif or .inf files.
My first goal to write this sort app was: to be able to compare files by a prog.
If we could have a sort of template telling the inisort program which "priority" to give to each known section, the result would be much more easy to work with.
Please explain a bit more!
Do compare the two attached txtsetup.sif's, first one is my (manually) sorted (no empty separting lines, I know it's ugly ) and the other one is the output of the inisort applied to it.
In your solution is nice that the (never(?) used) HardwareIdsDatabase section is at the end.
Maybe I should think about some customizable 'Sort Rules'.
jaclaz
In the quote, blue bold italic is my response.
Thanks, Jaclaz
I saw, that such an app is not as senceless as I thougt in my first idea.
Peter
#10
Posted 15 February 2008 - 05:48 PM
That is not so easy! Here some snippets from my genTxtSetup app for nativeEx_puzzleXP:Peter, this app is meant to be used as a profile tool to select different hardware configuration and also help studying the relationships between files inside txtsetup.
special := tStandard; if AnsiCompareText(actType, 'FileSystems') = 0 then special := tSpecial else if AnsiCompareText(actType, 'MouseDrivers') = 0 then begin special := tSpecial; flagDriver := true; end else if AnsiCompareText(actType, 'SCSI') = 0 then begin special := tSpecial; flagHW := true; end else if AnsiCompareText(actType, 'Keyboard') = 0 then flagHW := true else if AnsiCompareText(actType, 'BootBusExtenders') = 0 then flagHW := true else if AnsiCompareText(actType, 'BusExtenders') = 0 then flagHW := true else if AnsiCompareText(actType, 'HAL') = 0 then special := tHAL; entryLines := TStringList.Create;// All descriptions on source txtsetup.sif if special <> tHal then readSection(srcSif, actType, entryLines) else readSection(srcSif, 'Computer', entryLines); contentLines := TStringList.Create;// provided drivers on source txtsetup.sif readSection(srcSif, actType + '.Load', contentLines);// delete descriptions with no driver checkEntries(entryLines, contentLines, False);// All descriptions on target txtsetup.sif defaultLines := TStringList.Create; if special <> tHal then begin readSection(trgSif, actType, contentLines); readSection(trgSif, actType, defaultLines); end else begin readSection(trgSif, 'Computer', contentLines); readSection(trgSif, 'Computer', defaultLines); end;// delete descriptions already on target checkEntries(entryLines, contentLines, True);// entrylines: drivers to add to target// defaultlines: drivers already on target// combine with prefix ! for entrylines for i := 0 to entryLines.Count - 1 do defaultLines.Append('!' + entryLines[i]);If you really want to spend some weeks for developing an 'AddOn' rather than working on WinBuilder core, I can PM you my source code.This may save you some days of research and tests (which are already done by me).
Peter
BTW: Only some relationships inside txtsetup.sif can be read from that file. Most of them must be hardcoded depending on the actual section. Another present of Bill G.
BTW2: I tried some month ago with *.inf and aborted, because of too many unresolvable questions.
If you want, I can PM you this code, too.
#11
Posted 15 February 2008 - 05:52 PM
What I mean is having the possibility to load a (.ini ) file like this:If we could have a sort of template telling the inisort program which "priority" to give to each known section, the result would be much more easy to work with.
Please explain a bit more!
so that the sorting in done in a "logical" manner.[Sections.Set.Order]
Comments=KeepWhereTheyAre
Version=1
SetupData=2
SourceDisksFiles=3
SourceDisksNames=4
SourceDisksFiles.x86=5
SourceDisksNames.x86=6
Keyboard=7
Map.Keyboard=8
"Keyboard Layout"=9
Files.KeyboardLayout=10
....
Having the possibility to load such a template would allow, as an example, for:
[Sections.Set.Order]
Comments=Ignore
Version=1
SetupData=2
SourceDisksFiles=Remove
SourceDisksNames=Remove
SourceDisksFiles.x86=5
SourceDisksNames.x86=6
Keyboard=7
Map.Keyboard=8
"Keyboard Layout"=9
Files.KeyboardLayout=10
....
And of course we need also, I know I am asking a lot, but remember I thought it was "wish" day an interface to the template .ini with "move up" "move down" buttons and checkboxes for "KeepWhereTheyAre", "Ignore" and "Remove".
Hope this explains my ideas.
@Medevil
Nothing much to do today, huh?
Since you are a programmer, if this is the case, I have lots of ideas for you too...., should you ever declare your availability , you WILL REGRET it , you remember, I am an Admin...., my work is NOT caring about the inner workings of programs.
jaclaz
#12
Posted 15 February 2008 - 06:15 PM
I understood!What I mean is having the possibility to load a (.ini ) file like this:
so that the sorting in done in a "logical" manner.
Great idea
As to be seen: Besides Developers / Progammers sometimes also Finders are creative!
Peter
#13
Posted 16 February 2008 - 10:14 PM
These results were optimized by interpreting the txtsetup.sif file only once, using these steps:
1 - Add each new section at the treeview
2 - copy the portion of text up to the the next section to the newly created node
--2a if the section is duplicate - add the new lines on the previously created node
3 - loop to step 1 until end of file
----------
All nodes are alphabetically sorted and *most* empty lines removed away (except for some pontual cases to help reading)
I've chosen to use raw text instead of INI interpreting because there are many sections that contain data inside in non-INI format and and this way you can edit in a small text editor frame at the bottom of the app.
When the user clicks on a section at the treeview, the top-right panel will display all recognizable keys/values on the top-right panel and display the raw text of the section at the bottom.
-----
At the moment - when a user clicks on a key/value of this top-right panel, the bottom-right panel will display all recognizable key/values inside the text file that contain the selected key name.
-------
Please explain
On the first example you mention
[SCSI]
atapi="IDE CD-ROM (ATAPI 1.2)/PCI IDE Controller"
1 - Should this app search for all occurences of "atapi" inside the text file and display all recognizable key/values?
2 - Or should it try to find any of the keywords "atapi" or "IDE" or "CD-ROM" or "(ATAPI" or "1.2)/PCI" or "IDE" or "Controller"?
In order to output:
[ScsiClass.Load] [HardwareIdsDatabase] *PNP0600 "atapi" [BusExtenders] aliide "ALI IDE Bus Driver",files.aliide,aliide [BusExtenders] cmdide "CMD IDE Bus Driver",files.cmdide,cmdide [BusExtenders] intelide "Intel IDE BUS Driver",files.intelide,intelide [BusExtenders] pciide "PCI IDE Bus Driver",files.pciide,pciide [BusExtenders] toside "Toshiba IDE Bus Driver",files.toside,toside [BusExtenders] viaide "VIA IDE Bus Driver",files.viaide,viaide [BusExtenders.Load] aliide aliide.sys [BusExtenders.Load] cmdide cmdide.sys [BusExtenders.Load] intelide intelide.sys [BusExtenders.Load] pciide pciide.sys [BusExtenders.Load] toside toside.sys [BusExtenders.Load] viaide viaide.sys
Please let me know how it would work best for you.
-----------------
...having beside each line a tick box that would allow to select manually the strictly related items and save these as a "set" of interconnected items, possibly in a .ini file, re-usable and exchangeable, would be great, I guess that in a very short time, with the contributions of a few members we could have a number of "sets" to be used instead of the results of the "search". (another checkbox will be needed to switch between "search mode" and "presets mode")
Please give more examples so that I can fully understand what you mean - guess this is the sort of thing that would really help to talk in person and exchange ideas pointing at the computer screen.
How should these sets be used - to they mean exporting/modifying a custom txtsetup file? (for example)
Should this set change values inside the target file?
--------
Giving priority to some sections can easily be done and it is even possible to drag and drop sections to suit your preference instead of using INI templates - please tell which you prefer if not both (to save some time)
Moreover, I would like to have the rather cryptic syntax of "commas" interpreted, maybe one could add a "Status bar" at the bottom that , whenever a key like:
Should be last step when all above are complete.
----
Peter - thanks for the code snippets - I'm not (yet) using them because I've used a treeview and associated raw data inside to sort everything up but I thank you for sharing them.
#14
Posted 17 February 2008 - 12:04 PM
Time to get some sleep, see everyone back on monday!
#15
Posted 17 February 2008 - 03:57 PM
Please explain
On the first example you mention
1 - Should this app search for all occurences of "atapi" inside the text file and display all recognizable key/values?
2 - Or should it try to find any of the keywords "atapi" or "IDE" or "CD-ROM" or "(ATAPI" or "1.2)/PCI" or "IDE" or "Controller"?
In order to output:
Section Key Value[SCSI] atapi "IDE CD-ROM (ATAPI 1.2)/PCI IDE Controller"a search for all occurrences of "atapi", i.e. the Key Name in Key Names. This would result in:
Section Key Value[SCSI.Load] atapi atapi.sys,4[Map.SCSI] atapi ATAPI[Map.SCSI] atapi "ISA"[Map.SCSI] atapi "IDE"the above could be displayed to screen in, say, RED colour, meaning "direct" find, then the utility should search:in [Sections] for partially matching (and thus related Section Names, using the . (period) and space as separator, this would result in:
[ScsiClass][ScsiClass.Load]the above could be rendered in, say, GREEN colour, then the utiity should search the Key Name under values, which should result in:
[HardwareIdsDatabase] *PNP0600 "atapi"the above could be rendered in, say, BLUE colour, then the utility should search EACH Value found in the RED found items in Key Names, (exception made for "atapi", already searched for) i.e. "ISA" and "IDE" (without quotes), that would result in:
[BusExtenders] aliide "ALI IDE Bus Driver",files.aliide,aliide[BusExtenders] cmdide "CMD IDE Bus Driver",files.cmdide,cmdide[BusExtenders] intelide "Intel IDE BUS Driver",files.intelide,intelide[BusExtenders] pciide "PCI IDE Bus Driver",files.pciide,pciide[BusExtenders] toside "Toshiba IDE Bus Driver",files.toside,toside[BusExtenders] viaide "VIA IDE Bus Driver",files.viaide,viaide[BusExtenders.Load] aliide aliide.sys[BusExtenders.Load] cmdide cmdide.sys[BusExtenders.Load] intelide intelide.sys[BusExtenders.Load] pciide pciide.sys[BusExtenders.Load] toside toside.sys[BusExtenders.Load] viaide viaide.systhe above could be rendered in the "usual" BLACK.This should be enough to get at a glance the main "relationships" the selected Key has with other Sections and Keys.[quote name='Nuno Brito' post='29418' date='Feb 16 2008, 11:14 PM']Please give more examples so that I can fully understand what you mean - guess this is the sort of thing that would really help to talk in person and exchange ideas pointing at the computer screen.[/quote]Yes, that would help a bitm I do miss the Star Trek transporter thingie. [quote name='Nuno Brito' post='29418' date='Feb 16 2008, 11:14 PM']How should these sets be used - to they mean exporting/modifying a custom txtsetup file? (for example)Should this set change values inside the target file? [/quote]Optionally, yes, but it's not compulsory, as long as the ordering appears within the app, my idea of these "viewing sets" is that they would provide a more "targeted" insight in the relationship between keys, i.e. having "grouped together" all the possible linked to entries.[quote name='Nuno Brito' post='29418' date='Feb 16 2008, 11:14 PM']Giving priority to some sections can easily be done and it is even possible to drag and drop sections to suit your preference instead of using INI templates - please tell which you prefer if not both (to save some time)[/quote]I would prefer "external" sets (not necessarily in the form of .ini files): say we are talking on the board about Boot Bus Extenders, I could post my "view set" that you can apply to your txtsetup.sif and more easily understand my point of view, and viceversaand something like the good ol' move up/move down to manage this "sets", something lke this:http://www.powerbasic.com/support/help/pbf..._MENUEDITOR.htm(apploed to a "viewing set" instead of a menu)but if it's easier to do, something like this:http://www.captain.at/howto-xul-drag-drop-tree.phpwould be more than enough. .[quote name='Nuno Brito' post='29433' date='Feb 17 2008, 01:04 PM']Some more work as been done over the night - the modified version is available on the first post along with the source code.
Time to get some sleep, see everyone back on monday! [/quote]
VERY, VERY, VERY, VERY good!
(actually, only VERY, VERY, but I must keep Nuno as content as possible , otherwise he will make me write the program in Delphi )
Do have a nice rest, it is well deserved!
jaclaz
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users