Showing posts with label Install. Show all posts
Showing posts with label Install. Show all posts

2008-04-16

Portable Delphi 2007 for Win32 - Part I.5

It's been a while since I started this project and, despite the long period with no posts, it hasn't been forgotten. But a few factors helped to prevent me from completing it as of yet. First I was in bed for a few days from some nasty flue, then I got up before being ready which eventually led back to bed for a few more days, and by then I had a ton of work to catch up with. Factor that with running into some problems with some of my other "thinstalled" applications and not being happy with the Thinstall price tag (which I'm only using because it's registered to the company I'm working for: there's no way I could justify spending 5 grand in a piece of software!), and then you're starting to see the picture. Today I had a bit of time and, after having found another virtualization suite, one that is free for personal use, I decided to give it a spin.

Even though it has some design flaws that would make it improper to make a "Portable" Delphi, it could be a nice tool to create a semi-portable Delphi and I may be back to it in a couple weeks or so. But, for the time being, here are the main disadvantages I found in Altiris SVS in a couple hours of use:

- Requires the engine to be installed first (admin rights);

- Requires the packages to be "imported" which is kind of an Install in that it expands the package over to the virtual redirection folder;

- Does not allow an easy way to configure *where* the local changes are stored so it's not trivial to carry your settings with you;

- If you want the redir folder to be stored elsewhere other than C:\fslrdr you need to use the command line to manually invoke MSI installer and pass some parameters;

- You're "forced" to work in their chosen locale, that is, my Windows XP is English but, because my location and keyboard are Portuguese, I have the regional settings set to Portuguese. If I want the software to be in English as ALL my programs are, I have to overwrite some of it's files, namely copy the .DLLs from the 1033 folder over the ones in the 1046 folder. (I hate dumb programs that try to be smart!)

- I also ran into a weird bug: after restoring another semi-clean ghost of my C: drive, and having installed the SVS client (and after the mandatory reboot), I decided to try a "bold" move: double-click an SVS package that I had created earlier. It started to "import" it or so it seemed, but in no time I was rendered with a useless Admin console:

Bugged

Not even a cold boot sorted it out! I had to restore the ghost image again and re-install SVS again and then I could use the "Import from Archive" option. And I was able to successfully import the VERY same package. Kind of weird of them to create file associations and then have them screw things up so badly!

So, I'll keep my original idea and, in the next few nights and in the next weekend I will go back to resume my work on Thinstalling Delphi 2007. It's a shame as Altiris' SVS product was priced just about right: Free for Personal Use! Download license from here and setup from here if you want to give it a spin.

BTW: Don't get me wrong on this "negative" feedback: Altiris' product does look promising and it even may have a few advantages (other than the price!) over other similar packages. It's just inadequate for my current project of creating a Portable Delphi. If I get to "play" with this product a bit more, I may come up with a more rounded review focusing also the pluses. It won't be in the next couple weeks due to lack of time and other priorities, such as finishing the Portable Delphi! :)

2008-03-15

Portable Delphi 2007 for Win32 - Part I

[EDIT] Even though you can do all listed here, there are a few minor 'gotchas' that you should be aware of, so browse through the 2nd part before following this to the letter, especially if you use the command line rather than a graphical tool to delete the folders. I'm currently typing Part II into Windows Live Writer, so check back in a couple hours if it's not online yet when you're reading this... Unfortunately I ran into an internet problem and then changed my mind and decided to split the work and use WinWord to create a PDF file to upload with the whole start to finish process and only keep the "blah-blah" on the post so that you can more easily follow the process without waving through a ton of blah-blah. But real-life has a way of messing up one's plans! I have been sick for a few days (an annoying flue that kept me in bed and hardly willing to touch a computer). I'm feeling better now and will finish work on this as promised, but it most likely won't happen before the next weekend as I have a lot of work stuff to catch up during the week.[/EDIT]

Ever wanted to carry your development environment with you on a flash memory stick? Well, using Thinstall you can, albeit it comes with a hefty price tag of 5.000 USD... Maybe now that VMWare has bought the company they'll wise up and release a cheaper personal version! I would like one, and have e-mailed them already stating that. If you would too, don't forget to bring it to their attention! (Edit: Thinstall is now known as VMWare Project NorthStar)

There seem to be some cheaper alternatives, and I even tried Xenocode's Virtual Application Studio (VAS for short) but, even though it has a nice visual interface, it has a few fatal flaws. I couldn't find a way to have multiple entry points and even something as simple as selecting the main entry point is painful with an application that has several thousand files as they use a simple non-typing lookup and they display ALL files to be selected. And if your app (or app combo) somehow has the same exe name in two different folders, then you can't tell them apart in that combo-box... But the main problem against VAS was it failing a simple test: virtualizing ActiveState's Perl 5.8.8... That's something that Thinstall did without a glitch...

This is a two-part article, but don't worry: this time both parts are already written before publishing the first one! But I also like to tease a bit, so Part II will only come out in a couple days! That and because I took my notes on a text file while doing things and have to get them into WLW for proper formatting! :)

Thinstalling (TM) Delphi for Win32 2007 (TM) Professional

Those reading my blog will know that I'm a bit anal about files and disk space in my computer: I'm a software developer (among other things), so I like to be in control! It is me and not the machine nor the OS or any given application that should be in control of what goes on on my computer...

In light of that, I have a plethora of small and some not so small utilities that I have in a "ready-to-run" state on a different partition, so that, after a fresh install, I can run those immediately. I also use Delphi (currently the "2007 for Win32" version) and if you couple all that with the lousy installer and/or lousy install script that Delphi ships with you can understand why I have targeted it a few times before.

I also hate the way my system gets noticeably slower as I add programs. That's no big surprise: the big junkyard of Windows, usually known as Registry, easily starts to hold a gazillion of entries slowing it down. Add Windows Installer to the mix (and very few major-named products these days use an installer that is not based on MSI technology) and you can see where all this goes...

MSI technology is one of those nice-in-theory concepts with all it's self-healing that allows a "regular Joe" to keep running, say, Microsoft Office, even after he blissfully deletes some required folders because upon running an office application it will detect that some files are missing and will re-install them. Now, this is bad news for those like me that like to tweak things. Something as simple as deleting some readme's in 30 different languages will trigger the self-healing process and next time you run your app, they'll be back in place... Also, messing up with the MSI files left behind on your disk will usually result in bad news, from missing application icons (why on earth don't they use the proper .EXEs for the shortcut icons?), to more serious problems with self-healing kicking in and asking for original media to put things back there and you not being able to run the app until you please the installer...

So, I decided to try a new angle and this time I decided to experiment with an old tool but one which I only recently got in contact with: Thinstall. In a short sentence, it's VMWare for single applications, that is, it's a virtualization system that allows you to run applications without installing them first. Just double click a "simple" executable file and it will run as if you had installed it on your machine.

So, what are the pluses and minuses of Thinstalling applications?

+ No more re-install whenever you switch machines or re-format your C: drive or reset it to a "working" ghost image;
- You do need to re-activate when you switch machines; (that's an area where those using pirated and cracked versions have an edge over us, licensed users, but that's the price to pay when companies don't trust their customers and with MSFT setting the way, other companies keep following like lambs...)
+ You can run Delphi 2007 for Win32 from a 1 GB USB flash drive even on a machine with NO .Net installed and from a restricted guest account;
+ You can run it from a network share with no concurrency problems;
- Updating a "Thinstalled" app requires a bit more work (more on that on Part II);
- By default, a thinstalled program will have R/W access to "My Documents" and "Desktop" only: every other file/folder accessed, if changed, will be modified in a local copy on a "sandbox"; you can however configure per folder/drive which ones will be writeable or not. Or you can configure your thinstalled app to run in "merged" mode, but that can be tricky if the host computer has a similar version of the app installed.
+ Thankfully, network and removable drives are used R/W by default so if your files are not on a local disk, you don't need to make further changes to modify them.
- You can't Thinstall apps that install device drivers, such as PalmOne apps or a Virtual CD/DVD emulator or even some Anti-Virus.
+ You can Thinstall applications that install and depend on services as those will be virtualized and started as well when you run your app.

In my current setup, using a 4 GB flash drive, I can fit pretty much everything I need, being 1 GB for a ghost image of Win XP SP3 RC2 with nothing but Win XP + AV + , another one for Delphi 2007 and still have 2 GB left for other thinstalled applications and some data files. This allows me to be back in a working condition within 10 minutes, even if something seriously messed up my hard disk big-time...

So, how does one get to Thinstall Delphi 2007 for Win32?

After you get hold of a copy (you can get a trial from Thinstall's website), you do the following:

0 - Start with a CLEAN machine: I recently re-installed my C: partition with Windows XP SP2 and, after changing some settings, I proceeded to make a ghost of that partition to a bootable 2 GB USB flash disk (only uses less than 600 MB after a bit of tweaking). Using a CLEAN machine is important as is choosing the "oldest" one, that is, if you plan on running it on Windows 2000 and XP, don't use XP for the CLEAN machine as it may already have some files that the 2000 will not and those won't be installed and thus won't be captured.

0b- It's also VERY important to do it all in one go and refrain from using non-related programs, such as surfing the net or doing downloads or even cleaning up your temporary folders: whatever you do may get added to the thinstall project and needlessly clutter it.

  1. Run "Setup Capture" and do the pre-install capture.
  2. Install Delphi (including .net runtime and SDK); as for the shortcuts location, I used the option for "All Users" so it would not clutter my relocated "My Documents".
  3. Launch and activate (if you want the install to be pre-activated, e.g., you're the only one using it); if you don't activate, when you run it you'll have 30 days to do it later, although I believe, but haven't tested, that those 30 days start counting from the day you INSTALLED it and not from the date you first run the Thinstalled version.
  4. Configure any settings and/or install components and/or install updates.
  5. Run "Setup Capture" and do the post-install capture.
  6. Select the "shortcuts" to create and main package name. When you Thinstall an application, you create a single executable file but you can have alternative "entry points" into that file to run other applications that are part of the same capture. For instance, you can have an independent shortcut for running the Help Documentation without first launching Delphi. These are dependent of the "main" package where all the files/registry settings are stored. On my system, and for some reason (GUID conflict?), it suggests to store the capture in "ATI - Software Uninstall Utility". I opted instead to name the capture folder "Delphi 2007".
  7. Wait a few minutes while it copies over 31.000 files using 3+ GB for my Professional SKU full install.
  8. On my system, it failed to copy "C:\Documents and Settings\LocalService\NTUSER.DAT" and "C:\Documents and Settings\NetworkService\NTUSER.DAT": just ignore as those should not be copied anyway... This may be a symptom of me not following step 0b! :)
  9. IMMEDIATELY SAVE this captured installation, that is, save the "Delphi 2007" sub-folder inside the Captures folder: this will be needed later if you want to upgrade your installation. I copied it to my external hard-drive and named it "Delphi 2007 (Full)" to distinguish from a copy that I'll make later after the tweaking is done.
  10. Now we can start tweaking the thinstallation!

Tweaking the Thinstallation

You can do the remaining process on any machine: all you need is access to the thinstall folder and respective Capture sub-folder where you stored your "Delphi 2007" capture. I opted to use the same machine as I will quickly restore it to a clean state by booting from a flash drive and running ghost from there.

  1. Go to your "Delphi 2007" capture folder and open up "Package.ini";
  2. Uncomment (remove the starting ";") the "CompressionType=Fast" line and comment the other one (";CompressionType=None"); this will instruct Thinstall to use a quick compression when creating this application. Whenever in doubt, check Thinstall's online help file for available options.
  3. Edit the "Sandbox=" line and use a descriptive name. (I used SandboxName=Delphi 2007). Whenever you run a Thinstalled application, any changes to registry and files that are not in the "merged" folders/keys will be saved in a local sandbox. By default, that is in your current user's Application Data\Thinstall\<sandboxname> folder, so, in a typical Win XP install, with a user named Joe and the suggested sandbox name above, this will be "C:\Documents and Settings\Joe\Application Data\Thinstall\Delphi 2007". It is possible to configure the application to clear this folder on exit, but you can also do a more interesting thing: if you create a "Thinstall" folder in the same place where you have your Thinstalled application, that folder will be used to store the Sandbox. This is particularly useful to do when running an application from an USB flash drive as in this way, not only your settings are not stored on the local computer, they will "travel" alongside the application on your flash drive.
    3b- I like to keep my apps in the same drive, a partition of my HDD and a copy of everything on a 4 GB flash drive. In both cases, a neat way to keep all your settings (read: sandboxes) nicely grouped in one place is to add the following line next to the previous one:
    SandboxPath=LocalSandbox\..\..\..\..\.Settings
    This way, and as long as your apps are not stored more than 3 levels deep, all the sandboxes will be created under the .Settings folder in the root of the drive where the applications are. So you can have something like:
    X:\Multimedia\Image\Image Editing App 1.exe
    X:\Multimedia\Image\Image Editing App 2.exe
    X:\Multimedia\Audio\Audio Editing App 1.exe
    X:\Dev\RAD Studio 2007\Delphi 2007.exe
    and, assuming the Sandboxes use the same name as the executables, you'll have the sandboxes created like this:
    X:\.Settings\Image Editing App 1\
    X:\.Settings\Image Editing App 2\
    X:\.Settings\Audio Editing App 1\
    X:\.Settings\Delphi 2007\
  4. At this point, I did my first "build" which is as simple as invoking the BUILD.BAT file: 1 hour and 22 minutes later (on a 3 year old laptop!), I had a 2.000.782.941 bytes "Delphi 2007.dll" file along with a few .exe entry points for a total of 1.86 GB. Of course, this includes at least the huge 600 MB file with the .NET framework SDK install files. We'll get rid of those soon!

    4b- Don't worry about two things: the app won't show the proper icon (we'll use a workaround for an explorer bug soon), and it may take a LOAD of time launching (we'll get to that fix soon too!). If you want to test it out quickly, just launch something like the Command Prompt or the Documentation.
  5. Thinstall captures are very easy to process: 3 "registry change" files are created containing all the registry changes to HKLM, HKCU and HKU; several "virtual" folders are created such as "%desktop%" which equals the current user's desktop folder and some %drive_x% folders for each drive where changes where made other than in one of the "standard" folders, that is, if the program only makes changes to, say, "C:\Program Files\CodeGear...", you will see no %drive_c% folder created, but if you change the default install to, say, "C:\Delphi2007", then you'll see a %drive_c%" folder with whatever was created/modified there.
  6. We can safely get rid of uninstall files(*) as there's no point in uninstalling stuff from a Thinstalled app: even though the changes would be recorded in the local sandbox, and it would appear uninstalled, you'd save nothing by doing so and by deleting the sandbox, it will revert back to the "default" state. Thinstall also already ignores changes to some self-healing registry keys, so you can remove stuff without being prompted with a "re-install".
    (*) As we'll see in Part II, there are some exceptions, with Delphi being one of them!
  7. With that in place, let's delete (you DID make that full copy already, didn't you?!) the following folders/files:
    - %ProgramFilesDir%\Microsoft Visual Studio 8\Microsoft .NET Framework 2.0 SDK - ENU (569,8 MB)
    - %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\Microsoft .NET Framework 2.0 (76,4 MB)
    - %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\Microsoft Visual J# 2.0 Redistributable Package (15,6 MB)
    - %SystemRoot%\Installer (93,9 MB - this was unrelated to Delphi 2007 and probably because I somehow ran something else: I've had this capture on "hold" for a couple days...)
    - %Common AppData%\{6AF0EFC6-B937-4704-A430-319EB93F4C12} - Delete all sub-folders but leave the files as they're needed for the "Check for Updates" option. (423 MB) This one will be in %Local AppData% instead of %Common AppData% if you used the "Just for me" shortcuts option when installing.
    - %Common AppData%\{135F413C-658B-4923-B950-5F2B786BC8DA} (341 MB - Help update setup files)
    - %Profile% (nothing useful)
    - %Common Programs% and %Desktop% - These hold the shortcuts as created by the installer, but we'll use a different set
    - HKEY_USERS.txt (on my system, there's only a handful entries and none Delphi related, probably for me breaking step 0b!)
  8. Now let's open up Package.ini and fix a few more things:
    - Fix the broken Icon for "Delphi 2007.exe". Find the section [Delphi 2007.exe] and duplicate it. Now do a find/replace (on the whole text file) finding "Delphi 2007.exe" and replacing with "Delphi 2007.dll". Next, change one of those two sections to read [Delphi 2007.exe]. You'll need a few more changes so just check that they look like this:

    [Delphi 2007.exe]
    Shortcut=Delphi 2007.dll
    Source=%ProgramFilesDir%\CodeGear\RAD Studio\5.0\bin\bds.exe
    CommandLine="%ProgramFilesDir%\CodeGear\RAD Studio\5.0\bin\bds.exe" -pDelphi
    Shortcuts=%Programs%\CodeGear RAD Studio

    [Delphi 2007.dll]
    ReadOnlyData=bin\Package.ro.tvr
    Source=%ProgramFilesDir%\CodeGear\RAD Studio\5.0\bin\boreditu.dll

    The "problem" you fixed is that Explorer will try loading the whole .exe file in memory to show the icon, and with an .exe several hundred MBs it will fail. We trick it by storing the "bulk" of the information in a .dll or .bin or .dat or whatever non-exe file and then adding a smaller shortcut to Delphi 2007.exe, as per the Thinstall help section on this topic.

    - You can cleanup quite a few more entries in here, or just leave them with Disabled=1 so they won't have shortcuts created alongside with the main executable. I left the following entry points enabled:
    Check for Updates, Delphi 2007, RAD Studio Command Prompt, RAD Studio Documentation, Rave Reports.
  9. You may want to find and delete all the "Icon=" lines as they force some applications to use an icon stored in an MSI instead of the one in the EXE and deleting the Install cache will get rid of the icons.
    [EDIT]In order to keep the RAD Studio Command Prompt and the Documentation icons, move those two *.ICO files elsewhere or copy them from the "full" version if you have already deleted them from step 7 above and update the Icon= line accordingly. You can, for instance, name them RAD Studio Command Prompt.ico and Documentation.ico and place them straight in the project root directory so that it's clear what they're used for.
    [/EDIT]


  1. Also, while you're at it, check the lines with "Shortcuts=" (notice that it's PLURAL Shortcuts with an S at the end: not to be mistaken with the similar but different meaning option Shortcut!).
    In my install, I set all the shortcuts into a Thin\genre\app type of folder, for instance, I use Shortcuts=%Programs%\Thin\Dev\Delphi 2007, so that all shortcuts created (for the sections that don't have Disabled=1), will be stored in a Thin -> Dev -> "Delphi 2007" folder. (More on that on Part II).
  2. The speed problem seemed to go away as soon as the "main" executable file dropped in size: didn't test to see if it was related to being over 2 GB of uncompressed data or to having a few huge files in there, but it works ok in a 1.7 GB uncompressed version as well as in this 1 GB compressed one...
  3. Now you can re-build by simply invoking the batch again. On the same machine as above, and because Thinstall caches the files from the previous compilation, it took only 10 minutes to generate the brand new 1.032.472.412 bytes file. This means that, together with the few extra shortcuts or alternative entry points, it now uses up only 984 MB, so it perfectly fits on a 1 GB flash drive. (And we'll trim that further in Part II).

That's all for now. In Part II, we'll tweak a lot more by removing the .net related help content. I will also explain how to update your Thinstalled "Delphi 2007.exe" file so that you can incorporate patches, add/remove/update some components or simply modify default settings. Finally, I'll show you how easy it is to have the proper file type associations so that you can simply double-click an *.dpr file and open up your Thinstalled Delphi. Until then, get your own (30 day trial of Thinstall)* and start playing!

* EDIT: Thanks to Xsintill for pointing out the VMWare NorthStar beta (which is essential the full Thinstall project) but has two things better than the Thinstall trial: 1) lasts until 1st of June 2008 (roughly 70 days from now); 2) The whole registration process for the trial is automated and less restrictive in the choice of e-mails. So go grab that beta and start playing...

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 SP3 - Some quirks

On my Help Tests, I ran around some minor quirks and I decided to blog about them as well! (Whoa: 3 whole posts in one day? Don't worry, that's probably 3 more months without posting so you'll have enough time to recover!)

Don't get me wrong, these are minor quirks, but it's also the 4th release of Delphi 2007 for Win32 (Release, SP1, SP2, SP3), so these should have been caught and dealt with by now, unless the quality control processes are seriously flawed... And before someone else goes "Oh, but the product is VERY good if this is all you can say about it", let me just point out that, no, this is not all (I've placed over 40 QC reports back when I did care about doing it), these are just those that immediately jump on you seconds after you start using the product, which doesn't give a good idea about the overall product quality... First impressions usually take longer to disappear...

1) Even selecting "Just me", the shortcut for the RAD Studio Documentation is installed for All Users.

In all honesty, I can't say whether this is a bug from the default SP3 install or caused by the Help Update. In either case, it should have been child's play to both detect and fix this, so there's no real excuse for letting something as simple as this slip through...

2) Minor toolbar sizing errors:
Toolbars

3) Personality Icon not showing (it appears to show only when a project is loaded, which is a bit odd for a single personality product)
Personality

4) Help Improve Visual Studio. WHY? If you buy a Volvo, will you get a form to fill out and return to FORD about how pleased you are with their engine? It doesn't make sense and for a team of developers, it shouldn't be hard to determine what registry key is needed to stop that from showing. Creates a wrong impression, when one does NOT buy Visual Studio and instead opts for buying a CodeGear product and then sees that "Help Improve Visual Studio"!

5) What's with this dull launch screen? So much space and the only thing that changes is a couple lines at the bottom? I used to like the previous launch screen better. Maybe it gets "filled" when you have some optional dotNET "modules", but as it is, it's plain dull...

Dull

Like I said above, all minor quirks, but also all first wrong impressions with a product...

Delphi 2007 for Win32 SP3

This week I've been a bit sick. Nothing serious, just a nasty cold with the nasty side effect of going through paper tissues like there was no tomorrow.

So, rather than trying really hard to stay focused on debugging tasks at hand when I had to interrupt every 30 seconds to wipe my nose, I decided it was about time to do something I've been wanting to do for a long time and just couldn't afford the time to do it: upgrade my Delphi 2007 SP1 with both the SP3 and the improved help files that were released after that. That's something that doesn't require much concentration and is "compatible" with using paper tissues every 30 seconds...

So, I start by going to the Delphi registered user's downloads and download two files:

Armed with those files, I reset my computer to a ghost file with nothing but Windows XP SP2 + patches + drivers. After a few hours of installing more patches and all the software I use *except* Delphi (a process that is now much faster as I keep many utilities pre-installed on my D:\Utils folder), it was time to tackle the main procedure: Install Delphi 2007 SP3.

So, I start by creating a new ghost image to have a more recent "fall-back" should something fail, and I mount the ISO on a Virtual CloneDrive.

My first impression is not good when I double-click the drive:

Error01 Error02 Error03

I then proceed to open the drive instead and manually click the install file which brings me to this:

InstallLauncher

Pre-Reqs

Pre-Reqs Disk Space From this point on, everything runs much smoother: I proceed to install the pre-reqs, which I intentionally had not installed before, and then a reboot is in order.

The pre-reqs took an astonishing 2 GB of my C: drive as you can see from the image on the left. After closer scrutiny, you can easily see that it still suffers from the same "bugs" as the original install, namely, caching the same install files in several different places. That's 1.1 GB worth of .NET SDK install files in those two folders marked in the image.

This whole process did complete without any problems and within approximately 10 minutes, after which I had to reboot to proceed with the install.

 

 

Install

Delphi Disk Space Then, on to installing Delphi 2007 for Win32 SP3. After inputting my registration data, I selected to install everything available to my PRO SKU, including Rave Reports. The whole process took around 15 minutes and again proceeded with no problems.

As you can see, Delphi itself, discounting the pre-reqs, requires around 1.5 GB in the Professional Win32 SKU. That's roughly 450 MB for cached install files, 340 MB for help files and 690 MB for CodeGear files in either the program folder or common files.

I could have ran the IDE, but instead I opted for installing the Help Update. The one minor quirk about it, is that you need to go to a command line and type HelpSetup /upgrade. But the upgrade ran smoothly and this time I didn't time it, but it was around 10 or 15 minutes. Not worth another space screenshot as it only differed in a couple MB.

 

Full space report

Full  Disk Space To the left you can find a FULL disk space report before installing even the pre-reqs and after installing Delphi and the help update. As you can see, that's 3.7 GB worth of stuff, from pre-reqs to cached files to more cached files to the proper program files. Not really an improvement over the original setup, IIRC... However, since I believed that at least 1.1 GB of this can be safely shaved, that's what I'll did next. So, I removed the first of the two folders marked in the Pre-Reqs image above and was surprised to find out that the 2nd one was no longer there. However, the total space used was not consistent with that 2nd folder being removed, so after a quick search, I found out that it had been instead moved into my own Local Settings rather than the All Users' one. That's consistent with the choice I was given of installing for myself only (which I chose), or installing for all users. So, I deleted that 2nd folder and then ran Windows Update to download the latest .NET 2 security updates. As expected, it worked flawlessly, and I don't expect to be running into problems by not having those files around.  Of course, Windows Update doesn't update the SDK itself, so this was not a big test. But if you want to play safe, just burn those two folders to a DVD should they be required at some upgrade point in the future...

So, the (current) final space used is down to 2.5 GB, but that's without having yet followed my own guide on how to trim some more MBs out of it. That's intentional, as I want to test the help file and see if it has been REALLY improved without using my own tweaks. That will be the subject of my next post which should be posted either later today or tomorrow, if all goes as planned.

Conclusion

The whole process ran very smoothly, even if CodeGear still thinks that, just because disk space is cheap, they can waste as much as they want. Sure, disk space IS cheap, but if you want to create a ghost image of your main working drive and burn that to a DVD, having 2 GB worth of data or having 2 GB worth of data + 2 GB of worthless cached files DOES make a big difference in making it all fit onto a DVD or not. The way I do it, if anything other than an hardware failure goes very wrong, I can be up and running with a working configuration by popping a DVD into my drive and restoring my system to a full working condition in under 20 minutes, instead of re-installing everything for the better part of 1 or 2 days. The same problem applies to creating and backing up a Virtual Machine with a full working install, so, please CodeGear, stop wasting one's disk space just because it's "apparently" cheap!

2007-07-27

The best 330 MB of my C: drive...

Well, I hate to be negative about stuff, I really do, but I just can't help it. Having fought so many times with a lacking help system, I finally decided it was time to uninstall it. It's pretty useless to me as if I want MS docs I'll search for them on the net and they will be more up to date. So, I finally decided to go to Add-Remove Programs and Change the Rad Studio installation to remove those help files.

In doing so, I found out a few more things:

  1. Install-aware sucks even more than I thought! What used to be a few seconds on a decent installer takes over 6 minutes to do in this Install-Aware setup!
  2. They use a lot of progress bars but really show no progress: a blinking light would show the same information... At one point 2 were present at once and really I could be no closer or farther away from knowing how much more time I'd have to wait as they were file-based progress bars and not *process* based ones...
  3. What the heck is a "Cach"? As in "Removing Cach folder xxx"
  4. Shouldn't I get a more graceful message when pressing F1 on RAD Studio if I chose to remove the help files? (in a legitimate way and not hacking the files!)
    And the message even shows in Portuguese even though my Windows and RAD Studio are both English...
    X
  5. Finally, if I chose to remove the cached install files, what are 100 MB left there for?

This is all a nasty combo of a lousy installer with probably some lousy install scripts...

Q: Would I uninstall Delphi 2007?

A: Well, I've got used to it and it works well overall so most likely no, I'll keep using it. I just got fed up with the so labeled "Improved Help"... Pitty that MSFT set the road that others followed by releasing unfinished software...

For those who may not like me "bitching" about this: would you like to buy a car that "sort of works"? And that has to go through a few Service Packs before you really got what you're promised it would be before purchasing? I'm just applying the same principle to Software...

[EDIT: I've just "fixed" that error message: removed the htmlhelp2100.bpl (or something like that) from the known IDE packages so now pressing F1 silently fails. I'll probably try and find some replacement help files/reader as I vaguely remember something about using previous versions help files. Then I'll try downloading those help files from the customer area if it works! :)]

2007-06-13

Delphi 2007 Update - Take 3

I wasn't very fond of InstallAware, not as it's used by the Delphi installer, but now I'm even lesser of a fan: so much bloat and so much file messing around from here to there back here then a new there... Is it really necessary? Can't the Delphi installer be a bit more (read: a LOT more!) streamlined?

I've attempted to update my clean Delphi 2007 image and the process stalled. I read somewhere that some people achieved good results by disabling all their startup programs, only I will rather reformat my PC than I start disabling software just so I can upgrade or install something...

Luckily, both in that clean Delphi VM and in my main machine, "upgrading" using the now available ISO image went just fine. And I say "upgrading" as it's really a complete uninstall followed by a new install, not really an update... The only good thing is that component registration is left intact so you don't need to re-install them all again.

Well, after all that, all that was left was testing the update on the tweaked install that I've blogged about earlier. Even though my main dev machine is a variation of that setup, I wanted to test on the same configuration used for that article. Took me a while as I had to redo that image as I recently tried repartitioning my external HDD and good 'ol Murphy stepped in ruining everything in it, but eventually I found enough time to follow the step by step instructions on my own article and redo that image. Oddly enough, upgrading went fine when it had failed on the non-tweaked and clean VM! Just a couple notes for those updating that version:

  1. To be on the safe side, export HKCU\Software\Classes and HKCU\Software\Borland from the account used and import on the install user account;
  2. After the install is done, repeat those steps in the other direction
    (Note: I did it without using these steps and it appears to have worked fine, but if you want to be 100% sure, do these two operations as they won't take much time)

Also, when asked for the missing files, be sure to enter the {ABE...} folder in the Install user's local settings\application data used for the original install. And don't check the "Clear cache" option!

The installer works in very weird ways: first, a new GUID is used to cache the files ({2EB...}); then it clears almost everything from the old install cache ({ABE...}), leaving only around 60 MB there. In the end, it copies some files back there, so the end cache space used is around 420 MB in {ABE...} and 770 MB in {2EB...}. Which ones will it use when you use update 2? I have no idea!! Just guessing, and judging from the files and sizes, I'd say that the cached files are in {ABE...} and the uncompressed cached files are in {2EB...}. However, the Setup.exe and related files are together with the uncompressed files, so I really have no clue what the 7z files are needed for... Will all those files be sufficient to install on a new machine? I don't know nor have tested yet. Maybe later but no promises...

If you really want to be on the safe side, I'd download the ISO since it's the option that installed fine for me in a couple tests where the update would fail. In that case, just click the option to delete the cache. Now, if CodeGear would smarten up a bit and use a decent installer...

2007-06-08

My Second impressions of the Delphi 2007 Update 1

Well, this time, even though I have the ISO I downloaded last night, I choose to try the auto-updater. So, I fired up my Delphi VM and, as I write this, it's been 2 hours since it said the updates were ready to install and started installing them... No clue as to how many more and, unlike Nick said of slow hard-disks, I'll hardly think this to be a HD problem as neither my physical HD light nor the virtual HD light from the VM seem busy: they hardly flash at all!

I'll check back every couple hours or so to update the progress...

EDIT: Almost 4 hours into it and in the same spot: that is surely stalled. I'll leave it running a bit more as Nick says it will "eventually finish", but after dinner, I'll check again and most likely will try again. If it fails once more, then I'll try with the ISO image...

My first impressions of the Delphi 2007 Update 1

+ Update went well very smoothly (didn't time it as I used the time for having breakfast!)

+ Disk space required after the full install was more or less the same used previously: a couple MB less in some places a few more in others, but overall was only around 10 MB more.

+ Pressing F1 on a IDE menu will no longer render the IDE unusable

- It still doesn't show the help page for that menu though ("No help available for context")

+ New filters available on the Help Index, including "Language: Delphi"

- Interestingly, integer, array, and several other keywords I tried, don't seem to be part of the "Language: Delphi"! :)

- Pressing F1 over those keywords in the editor (and some others such as uses, private, program and more), will either show the infamous "No help found for context" or will point me to C++ only information;

- An empty help filter option (Dinkumware) was left in the shipped version that should not be there;

- There's still C# and VB.NET help offered for some keywords instead of the proper Delphi version of those keywords (try pressing F1 over "implementation"). I wonder if Codegear wants to sell us on MSFT tools! :)

That's all for the first few minutes. I thought of going through my Quality Central reports and see which ones had been addressed (if any), but seeing so many still in the un-opened state after over 2 months of them being reported kind of made me lost interest in doing that check.
In fact, that's one reason, if not the major one, behind my lost of interest in helping out on QC in the latest months... That and seeing clear, concise and easy to replicate reports being left un-opened for years, kind of makes me think that it's a waste of time QCing at all... Sure, it's all fine and dandy using volunteers to pre-process QC, but leaving so many reports un-opened does not add to the overall quality they (CodeGear) are trying to achieve. I'd guess this is one area where they'll need and want to make some changes...

And now another week is ending and I've yet to make a couple promised posts... :(

I'll try to make at least one of those either today or tommorrow at most, since that one involves a discount coupon on a set of components and the time is ticking on that coupon... Stay tuned.

CodeGear: All customers are equal but some are (no longer) more equal than others

For those who missed a small subtlety with the latest Delphi 2007 update, there is now an ISO available for download from the registered users area!

It's a 4.16 GB file and after a couple small problems I finally managed to download it. Just beware that, using the FTP link, it will incorrectly show as only 160 or so MB file but it seems to download the whole file anyway. In the end, I had to use the Borland Download Manager and I'd recommend you to do the same because continuing the FTP download will fail due to the incorrectly displayed size should you run into any network problem during the download.

As usual, I'll be doing some installations/tests/updates and I'll blog a bit about it later!

For now, and even before installing, I'd like to publicly thank CodeGear for two things: making the ISO available to all customers and having an option to delete the cache. Now, if only they added a way to not use that cache at all and instead use the DVD or downloaded cache instead, now that finally would be a decent installer!

2007-06-05

Easier to browse list of incoming Fixes in Delphi 2007

That's what one gets to do when having a few minutes left: not enough to do some coding, but enough to do some text find/replace and blog about it! :) I did it for myself, but maybe others will find this useful too as it's far easier to browse than the full QC post here... For the more curious, just took some 10 minutes or so to manually process that list using UltraEdit: then a couple more to paste it in excel to find a couple exceptions missed and fix them, then copy/paste them into Windows Live Writer after going through UltraEdit again to add some table formating code... (List sorted by Area then Description)

[EDIT: added links for valid QC reports]

[EDIT 2: I'm still fighting with blogger to get it to re-display the table properly without placing so much empty space between the text and the table!]

[EDIT 3: Found the problem: apparently blogger doesn't like it when I paste back some HTML with extra CR/LFs as I used to make each table row in it's own line; removed all CR/LFs, pasted back and it's working again!]

QC#AreaShort Description
42627ActiveX->IDE->Implementation file management TLB is not renamed if project that contains a TLB is renamed using save as.
40156Compatibility->Previous -> Current Custom Action developed in Delphi 7 blocks BDS2006 when form viewed
44731Compiler dcc32.exe reports E2029 error incorrectly
34298Compiler->Delphi Compiler allows *static* class methods to be passed as value of method pointer variable.
45896Compiler->Delphi Compiler generates internal error on compiling attached project
41751Compiler->Delphi->Code Generation/Optimization Property with inlined function and Data type conversion produces wrong code
41285Compiler->Delphi->Code Generation/Optimization using self in a class method of a class helper causes an av
32786Compiler->Delphi->Errors - Warnings BTInner class cannot get access to strict protected virtual method of outer class
43943Compiler->Delphi->Interaction with UI IDE disappears when opening D7 forms.pas
45336Compiler->Delphi->Language->Overloading cannot implicitly cast records to Float type
22878Database InterBase Blob output params of StoredProcs truncated in D2006
42824Database->DBExpress->TSQLConnectionDBX4 TSQLConnection Memory Leak and Debugger Fault Notification
42673Database->DBExpress->TSQLConnection Memory leak in TSQLConnection.Open
45565Database->dbExpressCore Create constructor of DBXDynalink.DBXDriverLoader or of third party driver never called
43141Database->dbExpressCore mixing DBX3 and DBX4 drivers leads to crash in IDE and code
43125Debugger->Evaluator->Delphi Default display for PChars is "Character"
34555Debugger->Multi-process cannot switch the active project when a process is being debugged
38658Debugger->Stepping using f7 to step into a method causes bds to lockup with 100% cpu use
42423Documentation Help for TStream.Seek is incorrect
21202Documentation Missing Help for AlignWithMargin
44320Documentation Unable to overload shift operators
16261Documentation->IDE Help Contexts Component | Import Type Library missing
39516Documentation->IDE Help Contexts Help missing for TDBGrid.Anchor properties
39517Documentation->IDE Help Contexts Help missing for TDBGrid.Constraints
39857Documentation->IDE Help Contexts Help missing for the following TDBGrid.TitleFont properties
39856Documentation->IDE Help Contexts Help topic missing for the following TDBGrid.Style properties
27348Documentation->IDE Help Contexts TCustomListView.TopItem Property help file has conflicting instructions
13801Documentation->IDE Help Contexts There is no context sensitive help for the EllipsisPosition property on a TLabel
31928Documentation->Online Help Clipped Help re: dynamic arrays
9957Documentation->Online Help Many VCL indexed properties documented incorrect
20522Documentation->Online Help TControl.Margins help topic not helpful
39569Documentation->Online Help->Main help AllocMem function is not present in Online Help
30552Documentation->Online Help->Main help Help for the TEventStatus Enum Has Duplicated Text
34061Documentation->Online Help->Object Pascalincomplete list of fundamental types
36354Documentation->Online Help->Object Pascal Delphi help doesn't say about Iterators for interfaces, but feature is implemented.
34676Documentation->Online Help->Object Pascal Delphi help doesn't say about Iterators for records, but feature is implemented.
39761Documentation->Online Help->Object Pascal Links in Ceil, Floor, and Trunc help don't work.
42767Documentation->Online Help->Object Pascal Warning/error confusion in FOR and FOR IN documentation
38647Documentation->Online Help->VCL TCheckBox does not fire OnKeyDown for arrow keys, as help suggests
33417Documentation->Online Help->VCL TCollectionItem.Create is not described as virtual
38801Documentation->Online Help->VCL THandleObject.WaitFor is not documented
42285Documentation->Online Help->VCL The documentation for TMenuItem.Hint Property is incorrect.
43092IDE BDS does not show on Task Manager applications listSB: XP only
43477IDE editor or welcome page has incorrect size after maximize, minimize and restore
32650IDE IDE Exception dialog: Call stack should be included with copy to clipboard
33315IDE->Code Browsing ctrl+shift+up/down command doesn't work in some classes with nested types.
40744IDE->Code Editor Caret positioned one character further left of compiler error position
44894IDE->Code Editor->Error Insight Delphi 2007 IDE suddenly disappears while typing
43597IDE->Code Editor->Help Insight Help insight 'Object reference not set' errors with dotted filenames on search path
42808IDE->Code Templates Automated Incident Report
32108IDE->Desktop Layouts Resizing maximized editor window causes erratic behaviour
43130IDE->Desktop Layouts Under undocked mode the main Delphi window is improperly sized after a minimize/restore
40821IDE->Dialogs Confirmation dialog to add BPL path to the PATH environment variable is wrongly translated
43097IDE->Dialogs Text display problems on Tools->Options
44770IDE->Dialogs->Project Options Linker output option resets after closing & reopening project
42948IDE->Dialogs->Project Options Record Field Alignment Option not saved
40074IDE->Dialogs->Project Options should remove "Windows Forms designer" from the Tools | Options dialog
42338IDE->File Handling When using Ctrl+Enter in the code editor to open a file, the IDE is not able to open an INC file
41681IDE->Form Designer Minimising D2007 whilst in undocked mode leaves forms visible
41917IDE->Help DEXPLORE.EXE not closed upon exit
42640IDE->Help Garbled characters within a help topics selection dialog
42237IDE->Help Help by F1 Doesn't work at all in object inspector for Modelling projects!!!
219029IDE->History Viewwhen project is reopen, on History view, code pane ( bottom pane ) is grayed out
41079IDE->Memory Issues using safemm, changing selected unit in the ide causes a read-AV
43475IDE->Project Management Automatic conversion of .bdsproj to .dproj fails to convert $Z (DCC_MinimumEnumSize)
44777IDE->Project Management Child forms are not recreated together with the main form when MainFormOnTaskbar is True
43569IDE->Project Management Environment variables not expanded/recognized at compile time.
43052IDE->Project Management Switching between Debug and Release doesn't cause a recompile when project is run
21953IDE->ToDoList Priority information in To-Do List is lost
42529IDE->Tool Palette Icon scrambling and unpredictible error messages in palette.
43021IDE->Unit Testing->Test Case Wizard Catastrophic failure when creating unit test
45149IDE->Unit Testing->Test Case Wizard No task bar entity for test case app
40818Install Delphi does not work without installing Database Features
42602Install EPackageRegistrationException in module sanctuarylib.dll
44514Install->Files Enterprise instead of Professional in field ProductName in the version info resource of bds.exe of the Professional edition
44662Install->Files TeePrevi.dfm is missing in ->lib
42247Install->Registry settings Package load errors on startup when de-selecting some internet packages
42403International->Truncation [STRING CORRUPTION]First phrase in installer is too long in French
43114Internet->Indy Default browsing path for Indy is incorrect
43986Midas->TClientDataSet Blob fields truncated in TClientDataSet
22253Modeling->IDE Integration Added units do not show up in model view
21228Modeling->Printing Overview in documentation generation is just a black box
3910RTL->Delphi->Other RTL AccessViolation in TBucketList and TObjectBucketList DeleteItem
45532RTL->Delphi->Other RTL Bug in ObjAuto.pas affects CreateMethodPointer functionality
43199RTL->Delphi->WinAPI HelpShowTableOfContents gives error 'Unable to find a Table of Contents.'
38342SOAP->WSDL Importer WSDL Importer renames "name" to "name_"
37537VCL Form.ScreenSnap handling is wrong if Windows Taskbar is docked to left or top of the screen
43331VCL Taskbar button is duplicated when restarting Explorer.exe
45745VCL Vista Modal Dialog flashing broken in Update Patch
36283VCL->Additional Controls->Action Bar Controls TCustomizeDlg is not localized
43334VCL->Core VCL Classes IDE keeps focus if project MainFormOnTaskBar is False
46202VCL->Core VCL Classes->TApplication Application.BringToFront not working as expected
44910VCL->Core VCL Classes->TApplication BDS 2006 compiled applications do not get their taskbar button selected on startup with the latest vcl bpl files for Delphi 2007
42374VCL->Core VCL Classes->TApplication Hiding main form changes the caption of the task bar icon
43007VCL->Core VCL Classes->TApplication Wrong taskbar focus behaviour in IDE
43984VCL->Core VCL Classes->TForm Application set to start minimized will behave erratically if MainFormOnTaskbar := True for non-Vista Windows
43333VCL->Core VCL Classes->TWinControl A control whose parent's FShowing is false will not hide
44401VCL->Dialog Controls Open and Save dialogs don't return FilterIndex under Vista
46134VCL->Dialog Controls->TOpenDialog TOpenDialog under Vista Breaks doShareAware
42610VCL->Graphics gifimg unit might display modal error dialog in initialization
42867VCL->Win 32 Controls->TImageList Image list never grows its internal bitmap

2007-04-25

Delphi 2007 - Updating install files

A small tip just learned...

I've been doing some experimentation installing Delphi in various Virtual Machines to test some things, and in the process, I tested another one: replaced the provided QualityCentral.exe (broken, v1.0.1.20) with the fixed and updated v. 1.0.1.21.

Guess what? The installer didn't complain, even though the files are different sizes... When I moved that cache to another machine and installed from there, I got the updated version installed as part of the normal setup.

This is good because my future installs can now install the working version of it instead of the default one!

You probably can get away (haven't tested) with modified source files too, so should you "patch" some source file, remember to try and update the cached version. If you install from DVD, and assuming the DVD has all the files plainly available, try to make an ISO, update the file, and install on a VM to try it out: wouldn't be surprised if it worked just fine... (Again, untested as I didn't order a media kit, and since ISO downloads are only available for those purchasing the media kits...)

2007-04-22

RTFM - Read The Forgotten Manual

Actually, it's more about "Read the forgotten Readme"...

Recently, I've had a couple small issues with Delphi 2007 or I tried helping some people with some other smaller issues. It turns out that by simply reading the Readme (not just skimming the topics as I did, but actually reading it!), I could find quite a few answers to quite a few questions/problems!

If you're like me and in time have "forgotten" to read the readme's, try to take them for a spin... :)

BTW: Before someone points out the true meaning of the F in RTFM, I'm well aware of what it is... ;)

Edit: Thks for the comment, Steve. Here's the clickable link for the Updated Delphi 2007 Readme.

2007-04-16

Delphi 2007: Putting a "fat cow" on a diet...

First, for those who don't understand the title, it's a small joke to another blog post which has since been renamed...

In this post, I'll explain to all those hackers around how to install the Delphi 2007 ESD while preserving 2.6 GB of your C: drive. You will require 1.2 GB on another partition, but if you're like me, you'll have those around! :) Still, your total will be 2.2 GB versus the default 3.6 GB and you'll loose nothing important (other than redundantly cached install files and needless .NET help...)

I like to keep my C: drive as lean as possible so as to be viable to make a compressed GHOST image of it and still fit a fully installed and configured working environment on a DVD. This way, I can restore my system to a working condition in around 10 minutes. However, the default way of installing Delphi 2007 simply uses 3.6 GB of C: space! So, I needed to come up with something different. CodeGear is supposedly working on a better install, although it's now a whole month since Delphi 2007 is out and that new installer is yet to be seen, and, even worse, due to SOX, they won't commit on a date for when that's coming out...

So, let me describe this process, which I must say I haven't tested on Vista as I don't use that... It does however work very well in decent versions of Windows such as XP, 2000 or 2003.

There are two main goals that I want to achieve here:
1) Setting up Delphi 2007 while simultaneously keeping it from caching stuff on C:;
2) Improve the help by not returning .NET results and, again, shave some few more MBs from C:.
This 2nd part should only be followed by those not requiring the .NET help for another dev tool, that is, for all those that like myself couldn't care less of .NET and only develop "for Win32".

Step 1: Download the following 3 prerequesites:

1) Microsoft .NET Framework Version 2.0 Redistributable Package (x86)

2) Microsoft Visual J# Version 2.0 Redistributable Package

3) .NET Framework 2.0 Software Development Kit (SDK) (x86)

You should now have the following 3 EXE files:
setup.exe
dotnetfx.exe
vjredist.exe

Step 2: "pre-process" those files.

Using WinZip, 7-Zip or your favorite archiving tool, uncompress all those 3 files (yes, they're self-extracting .ZIP files but we want some control!). Extract the contents of each file onto it's own folder.

You should now have the following 3 folders:

setup
dotnetfx
vjredist

Rename "setup" to a more descriptive "dotnetsdk".

You should save them somewhere where you can access them later, should you want to modify the installations. In this example, we'll be using D:\Install, so move them all over there.

Step 3: Installing the prerequesites.

1) Run "D:\Install\dotnetfx\install.exe"
2) Run "D:\Install\vjredist\install.exe"
3) Run "D:\Install\dotnetsdk\install.exe"
In this last one, select only "Product Documentation": the other two options are not needed.

Q: Why did we uncompress these and "manually" run the MSIs?
A: We're doing this to save you 400 MB of C: space in exchange of a couple minutes of your time!

Q: And how are we saving space?
A: That's what we'll do next!

Step 4: Saving 400 MB of cached files in C:, while still not breaking anything...

Installing those 3 products cached the install files on C:. We will now update the registry to point to the same files in D:\Install, so as to allow you to Remove/Repair apply any security update on any of those products...
Using RegEdit, change the following values:

Start by navigating to here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\
Key.....: 5B868AEEE5852414A85EBF681240D704
Value...: D6461317C3DC4F04799BDCE9E42626FE
Old Data: C:\WINDOWS\Microsoft.NET\...\netfx.msi
Set To..: D:\Install\dotnetfx\netfx.msi

Key.....: 521E4F6057E22F94ABD31D61977E7BAD
Value...: 2C951936B72B802498568D0AEABDED2D
Old Data: C:\Program Files\...\netfxsdk.msi
Set To..: D:\Install\dotnetsdk\netfxsdk.msi

Key.....: EF03A325B58ACCF46AD453FC5B8D3A6D
Value...: 2C951936B72B802498568D0AEABDED2D
Old Data: C:\Program Files\...\netfxsd1.cab
Set To..: D:\Install\dotnetsdk\netfxsd1.cab

Key.....: AAC54F5B3FA6B6B45864A1DA921F3C4C
Value...: 34053A86A55C7324889C73EEC136DE17
Old Data: C:\WINDOWS\Microsoft.NET\...\jsredist.msi
Set To..: D:\Install\vjredist\jsredist.msi

Key.....: 0DFA9869D465FA14CAFF90CB479360E9
Value...: 34053A86A55C7324889C73EEC136DE17
Old Data: C:\WINDOWS\Microsoft.NET\...\jsredis1.cab
Set To..: D:\Install\vjredist\jsredis1.cab
You can also delete (but it's not required) the following key:
HKEY_CLASSES_ROOT\Installer\Products\D6461317C3DC4F04799BDCE9E42626FE\SourceList\Net\2
Since the 1st one is set to the correct path, this "2" will be ignored anyway.

By now, you've just lost 1.079 MB. Yep! That's 1 GB of .NET prereqs for a "for Win32" product! :)

Don't worry, we'll shave some of that now!

Step 4b: "Safe" shaving...

You can now delete the following folders as they're no longer required:
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft .NET Framework 2.0"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft Visual J# 2.0 Redistributable Package"
"C:\Program Files\Microsoft Visual Studio 8\Microsoft .NET Framework 2.0 SDK - ENU"

We have now cut down our losses to "only" 685.4 MB...

Step 4c: ".NET Help" shaving: only do this if you don't require .NET help in any development application:
(If in doubt, make a backup of those files elsewhere so as to undo it later...)

Delete the following folder:
"C:\Program Files\Microsoft.NET\SDK\v2.0\Docs\1033"

Delete all files starting with "MS.NETFramework.v20." in this folder:
"C:\Documents and Settings\All Users\Application Data\Microsoft Help"

We have now cut our losses to only 324.8 MB and simultaneously prevented Delphi 2007 from showing unappropriated .NET help...


If you have the time, there's a couple hundred registry references to all those files/folders we deleted above: I haven't bothered with deleting/changing them all and all seems to be working just fine. Maybe if one of these days I find myself some free time I'll make a program to automate all that...

Step 5: "A small trick..."
Now for the fun part! :)
  1. Create another user on your computer named "Install" and make it an admin.
  2. Log off your current user account and login to "Install".
  3. Now log off again and back to your "regular" user.
  4. Open RegEdit and navigate to this key:
    "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"
  5. You'll find a few subkeys like "S-1-5-18", "S-1-5-19", "S-1-5-20", and a few more with much longer names, starting with "S-1-5-21-".
  6. You will find one that has the following value: "%SystemDrive%\Documents and Settings\Install" for the "ProfileImagePath". Change that into "D:\Install\Delphi2007". Don't forget to create the folder too!
  7. Now go into Computer properties->Advanced->User Profiles, select the "Install" profile and use "Copy To".
  8. In the new dialog, browse to the folder "D:\Install\Delphi2007" and in the "Permitted to use" type "Install".
  9. Now delete "C:\Documents and Settings\Install".
  10. Log back on to "Install" and run the Delphi ESD Setup.
  11. Important step:
    when asked where to create the "shortcuts", answer "Just Me". If you choose "All users", you'll break this whole "leaning" process!
  12. Just let the installer run and you'll notice that the cache is now being created in:
    "D:\Install\Delphi2007\Local Settings\Application Data\{AB3EC276-D261-4943-A921-1CC1C6799AED}"
    Note: If you already have downloaded the install files, you can simply cancel the install, copy the previously cached install files into the folder above and resume the installer. Or create the folder before running the installer and copy the files there then run the installer... :)
    Note: When the installer finishes, or at some later time in the future, you can back up that folder to a DVD to be able to install later on another computer or at another time on that computer, should you reformat all...
  13. Finish the installer and let it run "Delphi 2007" for the first time. For the moment, disable the option to check for updates automatically. (You can check manually by using the shortcut provided).
Step 6: Final wrap up
Now we need to do a few more things:
- Ensure the "Check for updates" will work;
- Migrate the settings to your normal account.

Ensuring the "Check for updates" will work:
We will leave that Install user exist on your computer: it makes future upgrades easier... Whenever there is a new upgrade, just log back to this user and run the update from there.

Migrating user settings:
Copy "D:\Install\Delphi2007\My Documents\RAD Studio" to your "My Documents".

Run RegEdit and export the following keys:
HKEY_CURRENT_USER\Software\Borland (save as D:\Install\Borland.reg)
HKEY_CURRENT_USER\Software\Classes (save as D:\Install\Classes.reg)

Edit D:\Install\Borland.reg and update the DBExpress paths in this section:
[HKEY_CURRENT_USER\Software\Borland\BDS\5.0\DBExpress]
Alternatively, you can simply use it from that location and don't edit the paths.

Finally, copy "D:\Install\Delphi2007\Start Menu\Programs\CodeGear RAD Studio" to your normal account's start menu folder...

Now log onto your account and run those two reg files.

Step 7: Enjoy using your Delphi 2007 having spent only 1.06 GB of C: instead of 3.6 GB...

EDIT: Note for self. Short url for this page: http://preview.tinyurl.com/2qdrmz

2007-03-22

Delphi for Win32 - Part 5 - A new beginning

Well, after I finally prepared my dev machine intentionally without the .NET 2.0 Framework, I was once more ready to install Delphi 2007.

In doing so, I discovered that I had previously used an "incomplete" ISO for the install, hence the (non-problem) I reported of it trying to re-download the files. I'll re-install it again shortly, after restoring my pre-Delphi ghost image just to verify that.
[Edit: Well, I tried it again and found out that it wasn't my fault after all! The current installer requires the files on the folder pointed with the red arrow on one of the images below.]

The install process is divided into 3 parts:
- Detect/Download/Install pre-requisites (.NET 2.0 Framework, SDK and J# Runtime);
- Enter your registration data and make your selections;
- Download/Install the CodeGear related files.

As for the install options, here's what you have available in the Professional edition:


And here's the disk space used by the download and install:

As you can see from this, the install files (cached on the folder pointed to by the arrow), use roughly 1.4 GB. To that, you add approximately 1.5 GB of Microsoft related stuff (.NET 2.0 Framework, SDK, SDK install files, .NET 2.0 help files (part of the SDK but worth mentioning the waste of space when installing a "for Win32" type of development app!).

All in all, of the 2 GB needed (not counting the install files), only less than 700 MB are used by CodeGear: the remaining 1.4 GB is "spent" by Microsoft Runtimes, SDKs and tools.

For those more inclined to go and add all the bytes: the values above are approximations, give or take a couple hundred MB! I'm just too lazy to do all the math properly! :)

One nice thing about the install process: part 3 (the one where it installs CodeGear stuff), only takes around 4 minutes on my machine if you already have the files downloaded! Very fast indeed...

2007-03-20

Delphi for Win32 - Part 2

Well, while I keep waiting for my Delphi for Win32 code to arrive, what else can I write about?

I can start with a word of warning for "wanna-be" ESD users: make sure your C: partition has plenty room available. And I don't mean a DVD-Size type of space, but at least twice as much!

Actually, I don't yet know, for the reason mentioned above, what exact space is needed, but I did run the installer and allowed it to fetch the pre-reqs (essentially .NET 2.0 SDK, hereafter referred to as simply SDK). That's pretty much all I can do until the code arrives, so I took a look at my C: drive. It was a bit of a shock to see that I had lost 1.6 GB of free space in my C: drive!

Why?

To keep it simple, 600 MB for the SDK install files that the Delphi installer caches under Documents and Settings, 600 MB for another copy of that file that is simply copied inside a "Microsoft Visual Studio 8" folder in My Programs, and the same contents but this time after extraction partly to Program Files and partly to Documents and Settings.

That's a whole lot of space! And I've yet to start downloading Delphi's own setup files! I wonder if I have enough free space on my C: drive to continue the installation.

And, of course, it's also worth mentioning that of those SDK files actually installed, around 400 MB are pretty useless to me and to pretty much every Delphi for Win32 user: they're the .NET documentation files...

Delphi for Win32 - Part 1

In these multi-part posts about the newly released Delphi for Win32, I'll be blogging about my ordering, installation and usage experiences.

Part 1 (this one you're reading), is about the new ESD version that is available from CodeGear starting with Delphi for Win32.

So, now you have an ESD (Electronic Software Delivery?), meaning that, in theory and using CodeGear's own words, you get "Instant gratification".

I'm a big fan of ESDs: ever since there were internet purchases I've been doing them and all over these years, I've easily made over 100 such purchases. The big advantage of an ESD is to allow you to skip all that lengthy process of duplicating the CDs/DVDs and distributing them all over the globe, so, in theory, it's a nice idea.

Now let me talk a bit about CodeGear's first ESD: Delphi for Win32.

Having attended the CodeRage virtual conference last week, I was caught by surprise on Friday, the closing day, that CodeGear had started to ship Delphi for Win32. So, time to grab my credit card and go check their site... Hmm... There's no such thing as Portugal on their listing, so I'll have to try Spain instead.

Cuting a looong story short, let me just say that I did fight for a few hours trying to find a CodeGear online shop/partner/whatever that would allow me to have that "instant gratification". It turns out that I was expecting too much for two main reasons:

1) In these days of e-commerce and EEC, they block sales from their resellers to other countries, maybe it's something from Borland age and has to do with some business areas but still incomprehensible in these global days we're living;

2) The other reason I was expecting too much was because it wasn't actually official until next Monday, so, Friday was not the release date as I initially thought.

That much I learned after "bugging" DavidI and Michael Swindell.
Having learned that I waited until next Monday to be contacted, as promised by CodeGear. And, in fact, I was: first by a Portuguese retailer, then by a Spanish distributor telling me they had instructed that Portuguese retailer to get in touch with me.

And so they did: after answering their initial request as to what product I was interested in, I waited a few more hours. Late, near business day end, they contacted me again with pricing (there was an issue with using a special CodeRage attendant discount), and, after they told me how to buy the "ESD", I made a wire transfer and mailed them back. I had been told that, from the moment I placed my order, it would have taken 12 hours to receive the "ESD" (gosh: internet is sooo slow!), but 16 hours are gone now and still no code in my mail... :(

[EDIT: It turns out, from their answer just now, that it's 12 "business hours"; considering that they sent me the wire transfer data at the end of yesterday's business day, and even though I made the transfer right away and with 40 minutes to spare, they only picked up my order process today! So, if it's 12 "business hours", this means that ESD for Portugal = 3 days from start to finish... And I thought the year was 2007!!]

Meanwhile, bugging Michael a bit more, I managed to start the Download/Install procedure: I'm yet to get past that stage where I have to enter the yet to be received key, but at least I've now allowed the ESD installer to download the 600 MB of pre-reqs. (More on that on my next post!)

Final notes:

1) For their first ESD experience, I've read that it isn't going that bad, at least in "Civilized" countries for which they have online stores and allow that "instant gratification"; there were a few issues over the weekend but since it was not even supposed to be working 'til Monday, that's no big deal.

2) They *do* need to sort things out for the remaining countries: buying an ESD by using FAX order forms and/or wire transfers is not the way ESDs were meant to be! My suggestion: until local retailers are capable of providing that "instant gratification" experience, allow other retailers to at least sell the ESDs for those countries. If the local retailers don't want to loose on those customers, then they will catch up.

Unless they sort this out, some developers will be 1st class customers with "instant gratification", while others will have to wait, and wait, and wait...

3) CodeGear support was impressive. They have gone to all the lengths to have the right people talk to me and allow me to place the order. It's a bit slow process in Portugal, unfortunately, but I hope that sometime later today I'll be completing the install.

So, stay tuned for more comments on Delphi for Win32...