Showing posts with label Help. Show all posts
Showing posts with label Help. Show all posts

2007-12-10

Even slimmer Delphi for Win32 2007

Slim Following on previous posts, I decided to remove the Windows SDK documentation from my Delphi 2007 installation. The main drive was for the added space: with those 250 MB less I would be able to fit the whole C: into a compressed ghost image file with less than 2 GB and that's with Windows XP SP2 + Office 2003 + Delphi 2007 + quite a few more programs and updates.

Why is it so important to be < 2GB? Because I can easily upload that single file to any FTP server without worrying about the server or client being unable to FTP files bigger than 2GB; because I can copy that to any disk partition/external drive without worrying about the 2GB FAT 32 limit; because it's a single file to keep track of, without risking to have no backup at all just because somehow one of the multi-part files didn't get copied for whatever reason and finally, because I can now fit the file into a 2 GB usb flash drive.

So, rather than just delete the files, I decided to check out the Help registration files and modify them as well. I needed to modify 3 files: h2reg.ini, Master.HxT and RADStudioFilter.xml (get all 3 from here).

What did I gain?

  1. 250 MB less of disk space;
  2. Going from 14 to 4 seconds on the first help call of each session;
  3. Getting less extraneous results;
  4. Being able to now fit my whole C: drive onto a single < 2GB file.

What did I loose?

  1. Basically, the Dinkumware, C++, Delphi.NET and Windows Platform SDK help.

Of these, the most "troublesome" will be the PSDK, but that can be easily accessed online directly from MSDN Library, and has the advantage of being more up to date...

How did I do it:

  1. Go into your "%ProgramFiles%\CodeGear\RAD Studio\5.0\Help\Doc" folder;
  2. h2reg -u
  3. copy the supplied files over the ones with the same name there;
  4. h2reg -r (or run the install_and_view.cmd file that is already there)

Now you can delete the PSDK and Dinkumware folders.

If you want to "play safe", backup the whole DOC folder to a CD or external drive, should you want to go back. To undo, h2reg -u, replace the folder, run the install_and_view.cmd.

BTW: disregarding the .NET pre-reqs, Delphi 2007 for Win32 uses around 400 MB of my disk space now, which is just about right for me!

Get rid of another 343 MB...

If you installed the Help Update, be aware that you now have an extra cached (yes, duplicate!) 343 MB worth of data in C:\Documents and Settings\All Users\Application Data\{15EDF4CD-698A-4E52-8278-2E25143AD95B} (change to wherever you have your user profiles and I don't know where that is in Vista, but if you scan your HDD for the folder named {15EDF4CD-698A-4E52-8278-2E25143AD95B}, you should find out easy!

Yep, that's CG again thinking that they ought to know better than us, developers, and treating us like "dumb users" and caching stuff without even asking for our consent...

343MB

For those thinking "when will this guy stop complaining about this?": you know the answer! When CG stops DOING it! :) I can understand some lack of choices for "normal" software, where the users may need to be protected of themselves, but as a developer, I like to be in control of my machine, rather than have it control me, or in this case, rather than have software waste disk space for no good reason other than because someone was lazy when creating the installer...

Sure, disk space is cheap, but what happens when you try to BACKUP that "cheap" disk space? You're left with no other choice than backing up to ANOTHER disk which has huge drawbacks such as now allowing you to (easily) keep a backup outside your installation so you can quickly recover from a building fire or something... And most 1-man shops just can't afford a fire-proof vault that can keep data backups safe because those things are just too expensive, not to mention bulky and heavy...

EDIT (for those that don't read the comments!): Chris Pattinson, from CodeGear, warns about not being able to run future help patches and needing a full re-install should you delete this folder, so, you can do two things if you still need the space:

1) Back up the folder to a CD/other disk prior to removing it;

2) If you have already deleted the folder, simply install on a Virtual Machine and copy the folder from there. Or, should you have multiple machines with Delphi 2007, just copy the folder from another one. As long as it's added to the same place, you should be fine.

2007-11-29

Delphi 2007 Improved Help (?)

If you recall from previous posts (yes, I know it has been a while, but I've been busy!), I was frankly disappointed at the so-called "Improved Help".

The major flaws

Back on release of Delphi 2007 for Win32, the major flaws I found were the following (listed in no particular order, but numbered for easier reference):

  1. Crashing the IDE when requesting help on a menu;
  2. Failing to retrieve help for common Pascal/Delphi keywords;
  3. Giving "precedence" in searches to results pertaining to VB, VC++, Anything else under the moon and, in the last spot, Delphi;
  4. Taking up a huge amount of space with non Delphi for Win32 help contents;
  5. Using an Help engine that would consistently remain in memory leaking resources;
  6. Failure to retrieve help for components in forms or giving too many pointless options to choose from;

What has changed on SP3

#1 was solved with SP1, IIRC;

Help on End#2 Simple test program loaded from the demo ones. Pressed help on unit, interface, uses. All of these would pop a few options to choose from, but among those was the "correct" one. Then press F1 over type: only two options given and neither very useful... Class, procedure: again a few choices; private: a few choices too and among them the "good" one, but the one that I clicked first because it looked as the most promising, took me instead to the C++ reference section. No, that's not C++.net, but rather RAD Studio C++ reference. Odd for a "Delphi for Win32" product. Yes, I know that they have common bases for all their products, but that's THEIR choice and US, END-USERS, should NOT be bothered with that. If I'm programming in Delphi (Pascal), I should NOT need C++ help on my system and certainly not being offered that help when I press F1 on a Delphi keyword... The image on the right shows a list of the choices given when pressing F1 on end (but a similar one shows up for begin as well)...

#3 From the tests above, it appears that this has been nicely worked out: many VC++, VB or J# entries still show up, but usually towards the END of the list, rather than being at the top of it.

#4 remains the same and I don't expect it to change seeing that it's a common base for their Win32+dotNET products;

#5 I couldn't get a single DEXPLORER instance to stay in memory. Maybe the conditions that cause that are rather peculiar, but in all the open/closes I did, not once did I see it left or even another instance being loaded while another one was already in memory.

#6 I had to try REALLY hard to find a component that would not get me to that component's reference help. Almost every single component, from those in a form, to even those in the component selector, got me to the proper page after pressing F1 with no further questions asked.

Conclusions

1) Definitely a much welcome improvement, but still needs a lot of work. It's sad that 9 months after the initial release that touted "Improved Help" as one of the key factors for purchasing the new version, it still fails to live to that promise. Maybe by the time they get to Delphi 2008 the help is then at the standards they said it was back on release of Delphi 2007. Let's just hope they keep improving it, because it certainly looks as they still have a lot of work to do, but as long as they keep doing it, maybe in the future we will get a decent help!

2) There are still quite a few "place-holders" like the one in this example:
Place Holder

3) I was, towards the end of my tests, prompted with this:
Local Help

I opted to use Local Help as the primary source and haven't tested with the default option given as shown above. Seemed to work pretty much the same but only did a few more tests.