Thursday, March 15. 2007
In a previous blog post I presented my solution for automated code signing, which relied on PTFBPro to generate the necessary key strokes when the Enter Private Key Password window would pop up.
A reader proposed another solution, which is cleaner: using SignTool.exe instead of SignCode.exe.
This requires the following steps: - Convert the private key (PVK) and public key (SPC) pair to a personal information exchange file (PFX) using the pvk2pfx tool. I did this:
pvk2pfx -pvk key.pvk -spc key.spc -pi p@ssw0rd -pfx key.pfx
- Import the PFX Certificate. This is easy; just double click on the PFX file and this will launch the Certificate Import Wizard. Follow the instructions.
- Update the post build events in order to use signtool. In my case, I launch a small batch file which iterates over the specified files, signing them:
for %%f in (%1) do signtool.exe sign /a /n "OPaC" /d "OPaC bright ideas" /t http://timestamp.verisign.com/scripts/timstamp.dll "%%f" I am specifiying which certificate to use with the /n option and the /d option is necessary to make the Vista installer happy. Without it, the MSI file which appears in the UAC prompt will have a random name.
Thursday, February 15. 2007
You can now download the 2.0.12 version. This is the second extensive bug fix release since Creative Docs .NET became certified for Windows Vista. The following problems were addressed: - Fixed a bug which prevented the creation of new documents based on no template at all.
- Fixed two TIFF decoding problems (old versions of Corel Draw produce invalid tags which prevented the files from loading; 8-bit grayscale images with alpha channel trashed the memory).
- Fixed several minor problems with the open and save dialogs.
- Fixed a few other bugs related to the image cache and the image object.
Expect a 2.0.13 version soon, if the trend continues...
Wednesday, February 14. 2007
You can now download the 2.0.11 version. This is the first extensive bug fix release since Creative Docs .NET became certified for Windows Vista.
I'd like to thank everybody who submitted bug reports. Keep them coming, it will help us further improve the quality of Creative Docs .NET.
I'd also like to apologize for several issues which caused crashes in Creative Docs .NET 2.0.10. I should never have released 2.0.10 so early, but I was eager to get a version online in order to promote Creative Docs .NET on www.windowsmarketplace.com... and the rush didn't prove useful, as the Windows Marketplace site is still undergoing internal changes, which prevents them from picking up new products in their catalog  . Let's see when Creative Docs .NET shows up there. Maybe next week (before end of February 2007, I hope).
Saturday, February 3. 2007
You can now download the 2.0.10 version which is the first stable 2.x version. There are no visible changes in the application user interface, but the core engine has been significantly optimized and improved: - The application starts up in much less time; the font cache is rebuilt only when it is really needed and it no longer consumes hundreds of megabytes of memory.
- The splash screen is displayed earlier and the initialization time has been reduced to 40% of the previous 2.0.x versions.
- A new image cache is used when working with images in documents. Huge images can be used without trouble and the creation of the downsampled images used on screen is now done in the background.
- Documents which include lots of images take less time to save; the images won't be recompressed every time.
- Loading of documents from a network share is significantly faster; the application becomes available as soon as enough information has been loaded to display the first page.
- Saving a document first saves in a temporary file and only then does it replace the previous file; in the event of a crash while saving a file, you won't lose the previous version, at least.
- The text rendering engine is now 3 times faster and the layout of a text document of more than one page becomes possible without falling asleep waiting for the next key press to become visible, but more work is still needed in this area

- Our custom open/save dialogs are faster than before.
- The samples have been updated to use the new text objects.
We are aware that there are still lots of possible improvements. What are you missing? What can we do better? Please send us an e-mail (the address is bugs [at] creativedocs.net) or post a comment in the blog.
Monday, January 15. 2007
I am both thrilled and relieved to announce that Creative Docs .NET 2.x passed the certification for the Windows Vista logo program!

I knew I had tested extensively all requirements (but the 64-bit related issues, as I don't own a 64-bit machine to run Vista X64 on it), but I was very nevertheless pleased when I got the official result from VeriTest  .
When rolling out a Vista compatible installation file, I need to sign every executable (EXE and DLL) with my authenticode signature. Doing so involves executing the signcode tool numerous times (for version 2.8.0 of Creative Docs .NET, this tool is invoked more than 30 times). And every time, I have to type in a pass phrase to validate the signature:

Maybe there is a solution to avoid having this dialog pop up 30 times, but I have not been able to find out how to do so. [Note: that's no longer true, read here]
I finally decided to use a macro recorder to automate this part of the build: whenever the dialog pops up, a small utility called PTFBPro awakes and sends the key strokes followed by return to validate the private key... PTFBPro is well worth its $29.99!

As I explained in my last post (Getting ready for Vista), the MSI file generated by a Visual Studio 2005 setup project contains a few errors which prevent it from passing the Vista logo tests.
The only solution I am aware of is to patch the MSI file using the Orca tool from Microsoft.

This tool allows you to peek inside an MSI file and edit its tables. Basically, an MSI file is a database which is used by the Microsoft Installer in order to install, repair and uninstall an application. All the information is stored in a collection of about 90 tables. The left hand side of Orca lists the available tables and the right hand side the rows of the selected table:

I used Orca to apply the following modifications to the MSI file:
- In table AdvtExecuteSequence, drop the only row which has a GUID and a condition set to UpgradeCode.
- In table CustomAction, add this row: MyTargetDir, 51, ARPINSTALLLOCATION, [TARGETDIR].
- In table InstallExecuteSequence, add this row: MyTargetDir, , 798.
- In table InstallUISequence, fix row ERRCA_UIANDADVERTISED by setting its Sequence value to 2.
For me, this fixed all errors and warnings spotted by Orca. However, there is still a missing dialog in the MSI file, which would make the test case 25 fail ( Verify the application properly handles files in use during install, req: 2.12). Fortunately, I found a solution in the Microsoft forums. Derek Sanderson's post was very helpful.
The test case 18, as specified in the December 2006 version of the test document, is broken. See the discussions here: my MSI file contains two rows in the Upgrade table, one with only a VersionMin but no VersionMax and another with both a VersionMin and a VersionMax. Per test case 18 (v1.1), this is not valid. However, it should be considered as correct, as confirmed by Oliver Lundt from Microsoft Global Partner Support and this requirement has been addressed in v1.2 of the test cases. I can confirm here that VeriTest is aware of this issue and will happily accept an MSI file which does not meet test case 18 (v1.1).
Applying all these changes manually would not be realistic, so fortunately, it is possible to automate the process. Before doing any modifications in Orca, use the New Transform command which will record every modification in the MSI file. When you are done with your modifications, you can ask Orca to Generate Transform, which will produce an MST file.
Applying these transforms automatically after every build can be done in a post-build script file, using the Windows SDK tool msitran:
msitran -a xyz.mst application.msi
Finally, the MSI file has to be signed using the standard signcode procedure:
signcode -a sha1 -ky signature -spc opac.spc -t http://timestamp.verisign.com/scripts/timstamp.dll -v opac.pvk application.msi
Friday, December 22. 2006
Windows Vista will be available to a large audience a little more than a month (31 January 2007), so I wondered what it would take to make Creative Docs .NET Vista aware and pass the Certified for Vista logo program.
There are a set of requirements which must be met. Basically, for Creative Docs .NET, this means that: - All executable files must be signed with an Authenticode signature (EXEs and DLLs).
- The installer must rely on the MSI engine (or ClickOnce), behave well and be Restart Manager aware.
- The application must crash reliably, should it crash, and not try to handle unexpected exceptions; a proper crash will trigger Windows Error Reporting.
- The application must behave well when multiple users are logged on a machine (fast user switching) or when used remotely through RDP.
- The application must contain a manifest specifying its UAC level.
- The application must accept shutdown messages from the Restart Manager.
Microsoft provides techincal guidance ( Vista Requirements and Vista Test Cases), 10 hours of free support to help solve the problems which could arise and, for a limited time, pay the first $1000 of the fees incurred when submitting the application for certification, if the certification succeeds.
About two weeks ago, I registered on the Innovate on teh Windows Vista Platform site, purchased a VeriSign Authenticode certificate (there is currently a special offer at $99), signed my preliminary 2.0.8 version of Creative Docs .NET, got a WinQual account from Microsoft, checked the 30 test cases and on the 20th of December, submitted Creative Docs .NET for certification.
This was an interesting experience... and I was only mildly surprised when I discovered that the tools Microsoft provides (Visual Studio 2005) do not produce error free MSI files, and that there is no update I am aware of that fixes several issues which would disqualify the product for the logo. Fortunately, a few helpful Microsoft support engineers provided workarounds and our good friend google helped a lot too...
Next time, I'll summarize the fixes that were required for my MSI file to pass all test cases. Until then, I wish you all a (politically incorrect?) Merry Christmas!
Thursday, November 9. 2006
I've just fixed a problem with the font management code, which led to nasty crashes when characters could not be mapped to known glyphs. Internally, this led to memory corruption because a buffer was allocated with 0 rather than 65536 entries. Ooops.
Friday, October 27. 2006
It is now possible to display directly in the document informations about an image:
Simply press the Display object labels button in the View section of the Documents ribbon and a small frame will be displayed around every image, with its name and the resulting image resolution.
Thursday, October 26. 2006
You can download the 2.0.5 version. It includes an improved image object which has become decent, at last...
 | |  | The image property panel now includes an export button which can be used to extract the image from the document, in exactly the same format as it was originally imported. There is no loss in quality and all image tags are preserved. |
The image can also be rotated and flipped without having to alter its frame. Various filtering modes can be applied to get smoother scaling. Cropping is the hottest feature: the image can be scaled to automatically fill all the space and then further scaled or shifted in its containing frame. |  |  | |
The file format has changed. We now rely on a ZIP container instead of compressing our document into a single stream. The change was motivated by the new ability to embed images and fonts into a document. This did not work well with a continuous stream, so we switched to what appeared as the most natural choice: a ZIP file format. Try renaming the *.crdoc file into *.zip and peek inside if you are curious.
We also reimplemented the standard open/save dialogs in order to get full control over how the user interface is displayed. We have not reached the richness of a real shell based open or save dialog, but we feel the result was worth the effort:
And, please, let me know if something does not work properly for you. Thanks!
Tuesday, October 24. 2006
We have been very busy all Summer and we could not invest as much time as we wanted into the project. Still, we have an internal version of Creative Docs .NET which is based on .NET 2.0 (at last!) and as soon as we consider it stable enough, it will become available on this web site. Expect a 2.0 version before the end of October 2006.
Sunday, July 23. 2006
One typical question I am asked regularly about Creative Docs .NET is:
"when do you intend to release the GUI code?"
Every time, I am sad to have to reply "not yet". There are several reasons I see for not yet releasing our code:
- I don't think the GUI features are stable enough; releasing the code means I'll have to commit to some backward compatibility. For now, I prefer to remain free to change anything without breaking code which does not belong to me.
- There is no documentation whatsoever.
- I don't know where to find the time to answer the questions which are bound to pour in as soon as other people start using the GUI code. And I can't simply reply RTFM...
- The GUI code is very tightly bound to the rest of our framework. Releasing the GUI code would also require me to release almost every piece of code on which Creative Docs .NET is built.
...ah well, and there is also the fact that I have to get our management's approval first .
This blog has been quite quiet for since May. It is not because we consider Creative Docs .NET to be perfect now; oh no, surely not. No, we are simply very busy with some parallel developments which require all our attention. I'll blog about them as soon as we have something to show, I promise.
Internally, we have a new version of Creative Docs .NET which uses an upgraded GUI framework and is now based on .NET 2.0, making extensive use of the new generic collection classes and other interesting features. Externally, however, nothing significant has changed for the user; under the cover, thousands of lines of code were refactored in order to make the user interface serializable and editable with an interactive designer, allow data binding, etc.
Monday, May 22. 2006
This is just a maintainance (bug-fix) release. There is nothing new in the functionality of the application.
You can download the 1.8.4 version.
|