Oxygen Basic
Programming => Tools => Topic started by: marpon on May 05, 2015, 07:08:20 AM
-
To Mike
I've opened a new topic because I've not been able to reply on your's.
Thank's a lot for your win32.chm , i've used it as source .
I've decompiled it to make the QuickInfo working.
To do that I've used the Precision Helper software, after I've used my own utility to modify the .htm files ( done with freebasic) according that steps :
On each file with <TITLE>(Untitled)</TITLE> and with >Import Library<
i've changed the title by the first bold text (the real topic) adding __QI as suffix to avoid duplicated title name and i've also recorded in a array the name of that file related to that topic,
and on each file with /images/bm1.gif without link before that image, wich is the file topic , I've put the link to the relevant file recorded previously .
I've recompiled the modified files and voila : the win32.chm with all the hlp file features.
the link is here : https://db.tt/JTTNo1yP (https://db.tt/JTTNo1yP) it is from my DropBox public file
because I was not able to use the attachment ! ( to big ?)
hope it can help, Charles can put it in permanent vision, as he decides !
Marc
-
Hi Marc,
Welcome to our forum!
There is a copy of Mike's prior version (7.5 Meg) on this page of the website:
http://www.oxygenbasic.org/reference.html
Should I replace it with yours? (9.1 Meg)
-
Hi Charles
You can decide, yes I noticed also , my evolution is bigger but the QuickInfo links are working now ...
because it's the Mike base job, let him to say what he thinks.
I'm not sure Precision Helper software is the best to reduce compiled size , as I've said , I've used the Mike's Compiled version as source , my adjustments were only adding links to the QuickInfo .
It does not reflect the size increase, so I think Mike used different soft to compile the files,
I can provide all the modified decompiled files to recompile again with other tool if needed.
-
Okay, I'll place your version.
Many thanks Marc :)
-
I'm not sure Precision Helper software is the best to reduce compiled size
no is not ..better option is wahelp
-
Hi Marc,
Thanks a lot for your work! The help file is now definitely better. Can I also upload it for FBSL users with references to your enhancements? Uploads are permanent on the FBSL site, so the file will stay there for as long as the site remains intact. (it did in the past 14 years... :) )
-
And thanks Mike, for all your work on this help file.
-
Mike , sure you can post it where you want , as I said , you have done the main job, no interest to notify my evolutions.
But, I am curious how did you convert the .hlp to .chm ( with HelpScribble ? ), I've tested with it but not working.
And wich is your chm compiler, it's more efficient on size compression than Precision Helper , I use.
In the mean time , I post the help file in FreeBasic ; José Roca ; Firefly Forum wich could be also interested.
Again thank's for your job !
Marc
-
Hi Marc,
So, I will also upload it on the FBSL site and I think I should do it on the MASM32 forum too since this is exactly where the old Win32.hlp file originated from.
As for the workflow, - There are NO free third-party programs that can decompile a .HLP file of such size to its equivalent .CHM or a set of constituent .HTM files in one go. Suffice it to say that there are 16K topics in there and the corresponding content file in the MS Word .RTF format is about 50MB large.
- There are absolutely NO free third-party programs that can re-create automatically old-school help popups and non-scrollable areas in any equivalent HTML form. The ones that claim such functionality (e.g. HHPMod) are simply lying to their users.
- The only practical way to go is as follows:
- decompile the .HLP file to its original old MS Help Workshop .HPJ project file and its accompanying .RTF (content proper), .MVP/.MRB/.BMP/.ICO (multimedia), .PH (phrases) and .CNT (help contents) files with a free and open-source HELPDECO.EXE command-line tool;
- use new MS HTML Help Workshop that can convert automatically the old .HPJ project and its constituents into a new .HHP project and its equivalent constituents;
- use MS HTML Help Worshop to compile the resultant .HHP project into a modern .CHM file.
MS HTML Help Workshop seems to generate smaller .CHM files than its competitors. Use it whenever you can, even though its interface is somewhat outdated and not particularly user-friendly.
The main problem with the old .HLP file was that it contained no structured contents tree so that the resultant .CNT file was a mere unclassified list of 16K topics. I spent two working days adding folders to topics manually according to my understanding of Win32 SDK structure. Therefore some subfolders' contents may not exactly reflect Microsoft's own vision of the same. :)
Below please find a zip with the HelpDeco utilities. Note that in order to obtain a valid .CNT file, you have to make a separate run of HELPDECO.EXE on the original .HLP file. This peculiarity isn't mentioned anywhere in the accompanying text or source code files. See the bottom of HELPDECO.C for the command-line switches usable with this utility.
You can download MS HTML Help Workshop directly from Microsoft for free. ;)
[UPDATE] Attached please also find my recompilation of your .CHM file in MS HTML Help Workshop. I've taken the liberty of changing the style of your notes just a little and the file is now only 4.38MB large.
The new file seems to have all its components intact including the pictures. But please recheck it again, just in case.
@Charles:
Will you please re-upload this new smaller recompilation instead of the huge old one to http://www.oxygenbasic.org/reference.html once its integrity and usability is verified?
[UPDATE 2] The .CHM file was found defective and was removed from here. A new larger but fully functional version comes further below in this thread.
.
-
Done! Thank you Mike.
-
Hi Mike
Sorry but the size reduction is mainly because you skip the full text search , in that version you are not able to get all the topics.
It's a reduced size version but also with reduced features. ( your previous version was with full text search )
I've also almost same size (5.1 Mb vs 4.8 mb) without the full text search, I think it's better with.
Thank's also for the HELPDECO.EXE, but I've already get it , even with its Gui companion ...
I've also tested the HHPMod tool and HelpScribble, without success...
Finally, I am doing like you for smaller hlp files , but I simply did not want to spend the time for the TOC for this huge file : You did It ! Thanks a lot.
before finding your version , i've also used the one made by chr1x on http://tuts4you.com/
but it was without Toc for obvious reason ( He did not spend the time), and less features than your previous version.
Mike : could you try to recompile but with full text search to see if is significant size reduction
and Charles , I think it's better to wait a little
Marc
-
No problem Marc,
Thanks for pointing it out to me. It's funny that the full text search list is included in the project but somehow fails to compile into the project.
[UPDATE] So here it goes at 6.68MB with full text search functionality. I've also deleted my earlier submission that appeared too ascetic to your taste. Thanks again for improving, testing and spreading this file around. :)
@Charles:
Can you change the recently uploaded version again for this larger but fully functional attachment? And sorry for having been so messy with this submission. But again I stressed that the file might need some more attention before uploading... ;)
.
-
Mike
Great !!!
Now it's THE real reference : I will use and spread it arround.
Thanks again for your job and reactivity, and I'm happy to have contributed to that
Marc
-
Any time, Mike :)
-
Mike
Sorry again, I was surprised for the reduction of size , so I checked after decompiling again:
And i've found only 11063 html files versus 16108 original html files.
What the reason for killing these files ? Did you find them not useful ?
And what criteria , have you selected ?
Thanks in advance for your answers
Marc
-
I think the ideal code based documentation should be a Bitbucket repository. The wiki uses industry standard markdown formating and code examples along with user contribution could be added to the source tree. Trying to do it in a Mediawiki format will take a lifetime and no portability to speak of.
-
Hi Marc,
This is a good question. But as it happens, now I have an answer to it. :)
The old help file seems to have a set of Quick Info popup window data that belongs to topics which didn't make it into that particular file and have no mention (cross-reference) in either the help contents tree or any other topic included in the file. Such topics obviously were Microsoft's legacy OpenGL 1.1 software renderer driver, deprecated early DirectX interfaces, and probably a few others.
All the missing files that I found have a __QI suffix in them. The keywords they belong to have no cross-reference to any other topic in the file, cannot be found by extended search in either the .HLP or .CHM version, and for all intents and purposes are dead data. (See an example in the attached snapshot)
On default, MS HTML Help Workshop ignores the files that have not a single cross-reference elsewhere in the project (starting from the contents tree) and compiles them into the resultant .CHM only if explicitly forced to do so; there's a dedicated [FILES] option in the .HHP project file for this purpose.
I didn't find any information in these files that may be of interest or help to a casual user in the year of 2015. Therefore, I didn't enforce MS HTML Help Workshop to include any dead data into the resultant .CHM file this time, while my older compilation contained a [FILES] section of all the 16K topics found in the decompiled 50MB .RTF content file.
So, in my opinion it would be reasonable to dismiss this matter as it is really not an issue. There's no real reason in storing the dead data that you wouldn't be able to access, and especially so if the said data is of very questionable value at present times.
Anyway, thanks for bringing this matter to my attention. I hope you're satisfied with my findings. :)
.
-
@ Mike
Sorry to not reply before, I had problems with my old Notebook hard disk...
Very good answer, the win32.hlp file was done with plenty of dead topics , specially for the quickinfo popup boxes, i've also checked the cross-references,
so I aggree completly with your position, killing what is not convenient.
I've done the same from my side, but obvously your full text search stop list file (.stp) is much more efficient than mine, and your size is 700 kb smaller than my test.
Could you please , post your .stp file , it will be convenient for me for others Chm files ...
Thanks in advance
Marc
-
Yoo
I don't know why but i recently have problems with .chm files.
One one computer with win7ultimate 32 bit work but after reinstall NOT.
On another with win7 home version i think not work too.
I tried also my son on win 10-64bit and again nothing..
i just recieve stupid errror:
-
Hi Aurel,
I think .chm files are associated with hh.exe which is located in c:\windows. But this should already happen when Windows is installed. This can be checked by right-clicking on a .chm file. A popup should open with a menuitem: Open with > and then an option similar like: Executable Microsoft HTML-Helpfile. If this does not work then perhaps something is missing with the accessing rights. There should be more information available in Internet, e.g.:
https://borncity.com/win/2018/06/05/windows-may-2018-update-blocks-viewing-chm-files/
But I myself did not encouter problems with .chm files until now.
-
Hi Arnold
and thanks for reply
hh.exe is there same as hhctrl.ocx
but i simply cannot open any .chm file
update of windows is disabled
error is mk:@MSIStore ?
-
I searched in Internet for:
:@MSIStore
or
:@MSIStore +chm
and I found some links regarding troubles with opening chm files, but I do not know if any of the messages would be a solution to your problem.
-
A highly likely cause why HH.exe refuses to open a particular .CHM file may be that the file has been downloaded from the net. Since a lot of .CHM files contain precompiled executable scripts in order to perform their advanced functions, and may thus contain malicious code, the OS blocks their execution just like it would block any other executable (.EXE) binary or MS Office .DOCX documents (those often contain VBA executable code in their embedded macros).
If the downloaded .CHM file comes from a known trusted source and you want or need to open it by all means, you have to unblock it first. Right-click on the file icon and select Properties at the bottom of the popup menu. This will open a File Properties dialog in the bottom part of which you will see a security warning about the file having been downloaded from the Internet, and a button called Unblock. Click that button and then click Apply in the File Properties dialog, and there you go with your .CHM file unblocked for reading by HH.exe or HHCtrl.ocx.
This procedure also applies to any other file (.EXE, DOCX, etc) that comes from the net and is therefore blocked for execution by the OS.
-
Funny how Windows 10 sees the VB6 IDE as a foreign invader. :)
-
yes Mike you have a right
BUT
what if I don't have Unblock button ?
so what then?
yes there is no Unblock button in my case and i cannot figured why?
that is a stupid problem.
By the way i have chm files from original CD-s which also not work,, >:(
-
Once the file is unblocked, its File Properties dialog won't show the button or warning note any more. This means you are already done unblocking them, or they haven't been downloaded from the net at all.
Frankly, I don't know what else might be causing such a strange behavior. Are your .CHM files associated with HH.exe at all?
-
.CHM files associated with HH.exe at all?
-yes Mike it is of course.
I never have such a problem on any of my computer before.
-
Hi Aurel,
as Mike has already stated, everything should work if .chm files are correctly associated. Did you try to open a console window (cmd) and open a chm file directly? If this does not work then something is indeed wrong. I learned that there is an update for Windows 10 of April 9th which could cause some problems. I do not know if .chm files are affected. But I have setup my computer for installing updates automatically, I trust that everything will go well afterwards.
-
Hi Arnold
Ok i tried and again nothing. >:(
It looks that i must reinstall windows 7 on this comp >:(