Archive for October, 2005

 

Goodbye, cruel world

Oct 21, 2005 by Graeme in Development, Fun

Jensen Harris has
posted what I’m sure is a very interesting
explanation of
something-or-other, but I can’t read it because I can’t look at it without
laughing at this picture:

Dammit

Oct 19, 2005 by Graeme in Uncategorized

Just last week I decided to move over to Gmail for my main personal email account. Then look what happens

.NET 2.0 on the 14th October?

Oct 12, 2005 by Graeme in Development

Here’s a rumour to get you all excited… A C#/.NET MVP (who I won’t name here) posted this on a newsgroup (one of the Infragistics newsgroups, as it happens):

See, Whidbey will be FINAL within a couple of xdays (rumour is: 14th of october ready for MSDN download).

Let’s see if he’s right!

Update: Maybe!

Update 2: Then again, maybe not!

Using WiX to run NGen 2.0 against your application during installation - part 2

Oct 11, 2005 by Graeme in Development

Following on from my previous post, here’s an
implementation of Rob’s suggestion.
The following WiX fragment will run NGen 2.0 on your
application without showing a command prompt:

<!-- Put the "wixca.dll" library in the binary table so it can be used by the following custom actions -->
<Binary Id="wixca"
	src="..\Lib\WiX\ca\wixca.dll"/>

<!-- Custom action to generate the command line to run "NGen install" -->
<CustomAction Id="MyApp.exeNGenInstall.Command"
	      Property='QtExecCmdLine'
	      Value='"[WindowsFolder]Microsoft.NET\Framework\v2.0.50215\ngen.exe" install "[#MyApp.exe]" /queue:2 /nologo /silent'/>

<!-- Custom action to perform the "NGen install" -->
<CustomAction Id="MyApp.exeNGenInstall"
	BinaryKey="wixca"
	DllEntry="CAQuietExec"
	Return="check" />

<!-- Custom action to generate the command line to run "NGen uninstall" -->
<CustomAction Id="MyApp.exeNGenUninstall.Command"
	Property="QtExecCmdLine"
	Value='"[WindowsFolder]Microsoft.NET\Framework\v2.0.50215\ngen.exe" uninstall "[#MyApp.exe]" /nologo /silent' />

<!-- Custom action to perform the "NGen uninstall" (we can ignore the result of this) -->
<CustomAction Id="MyApp.exeNGenUninstall"
	BinaryKey="wixca"
	DllEntry="CAQuietExec"
	Return="ignore" />

<InstallExecuteSequence>
	<!-- If not installed, generate the install command and execute it (after finializing the install) -->
	<Custom Action="MyApp.exeNGenInstall.Command"
		After="InstallFinalize">
		NOT Installed
	</Custom>
	<Custom Action="MyApp.exeNGenInstall"
		After="MyApp.exeNGenInstall.Command">
		NOT Installed
	</Custom>

	<!-- If installed, generate the uninstall command and execute it (before removing any files) -->
	<Custom Action="MyApp.exeNGenUninstall.Command"
		Before="MyApp.exeNGenUninstall">
		Installed
	</Custom>
	<Custom Action="MyApp.exeNGenUninstall"
		Before="RemoveFiles">
		Installed
	</Custom>
</InstallExecuteSequence>

You’ll need to modify the path to your copy of wixca.dll, change
the path to ngen.exe (if you’re not using .NET 2.0 Beta 2) and
change MyApp.exe to the Id of the file that is the "root" of your
application.

Using WiX to run NGen 2.0 against your application during installation

Oct 07, 2005 by Graeme in Development

I wanted to run NGen 2.0 on my application (here’s why) as part of the MSI
database generated from a WiX script and run by Windows Installer. I found a
couple of
posts
from Robert Pickering that
pointed me in the right direction, but stopped short of the copy & paste
fragment of XML I was looking for. I did, however, figure out how to do it and here is
my solution:

<CustomAction Id="MyApp.exeNGenInstall"
	ExeCommand='"[WindowsFolder]Microsoft.NET\Framework\v2.0.50215\ngen.exe" install "[#MyApp.exe]" /queue:2 /nologo /silent'
	Directory="INSTALLDIR"
	Return="asyncNoWait" />

<CustomAction Id="MyApp.exeNGenUninstall"
	ExeCommand='"[WindowsFolder]Microsoft.NET\Framework\v2.0.50215\ngen.exe" uninstall "[#MyApp.exe]" /nologo /silent'
	Directory="INSTALLDIR"
	Return="ignore" />

<InstallExecuteSequence>
	<Custom Action="MyApp.exeNGenInstall"
		After="InstallFinalize">
			NOT Installed
	</Custom>

	<Custom Action="MyApp.exeNGenUninstall"
		Before="RemoveFiles">
			Installed
	</Custom>
</InstallExecuteSequence>

Bung the above into the <Product> element of your .wxs
file, change the references to MyApp.exe as appropriate and you’re
probably done. If you’re not using NET 2.0 Beta 2 you will also have to alter
the path to ngen.exe to match your particular framework version.
Note that NGen 2.0 will automatically work out what it needs to do given the
top-level assembly in your application, which simplifies matters a great deal; I
doubt if it’s that simple with previous versions of the .NET framework…

The only problem I am aware of is that the custom action opens a command
prompt window briefly while NGen is run. If anyone knows how to tidy up this
loose end then please do let me know!

Update: I’ve got it working without the command prompt windows. Thanks, Rob!

Screwy tootltips in Firefox?

Oct 04, 2005 by Graeme in Uncategorized

Since the update to Firefox 1.0.7 my mouse pointer has been displaying tiny little empty tooltips wherever you put it in Firefox. Very annoying.

I also noticed that the Google Toolbar for Firefox stopped working, so I disabled it. Sure enough, it looks like it was causing the tooltips problem too!

So, if you’re suffering from funny tooltips in Firefox, try disabling the Google Toolbar and see if that helps!