Welcome to MSDN Blogs Sign in | Join | Help

Install VS 2010 Beta 2 on a dual boot Macbook Pro

For a developer, last week's big event was more the availability of VS 2010 beta 2 than Windows 7, which have been installed on my laptop for already several months. So I downloaded the iso from msdn web site and tried to intall it.... without success ! Here is the message I got :

[10/28/09,07:10:49] Microsoft .NET Framework 4 Beta 2: [2] Error code 5 for this component means "Access is denied."
[10/28/09,07:10:49] Microsoft .NET Framework 4 Beta 2: [2] Component Microsoft .NET Framework 4 Beta 2 returned an unexpected value.
[10/28/09,07:10:49] Microsoft .NET Framework 4 Beta 2: [2] Return from system messaging: Access is denied.

After a few cleanup, I tried again to get the same error and investigated a bit more in my temp folder and found this dd_dotnetfx40_Full_X86_x64_Decompression_log.txt file :

[10/28/2009, 7:10:49] === Logging started: 2009/10/28 07:10:49 ===
[10/28/2009, 7:10:49] Executable: f:\vs2010_beta2\setup\..\wcu\dotnetframework\dotNetFx40_Full_x86_x64.exe v4.0.21006.1
[10/28/2009, 7:10:49] --- logging level: standard ---
[10/28/2009, 7:10:49] Successfully bound to the ClusApi.dll
[10/28/2009, 7:10:49] Error 0x80070424: Failed to open the current cluster
[10/28/2009, 7:10:49] Cluster drive map: ''
[10/28/2009, 7:10:49] Considering drive: 'C:\'...
[10/28/2009, 7:10:49] Considering drive: 'D:\'...
[10/28/2009, 7:10:49] Drive 'D:\' is rejected because of the unknown or unsuitable drive type
[10/28/2009, 7:10:49] Considering drive: 'E:\'...
[10/28/2009, 7:10:49] Considering drive: 'F:\'...
[10/28/2009, 7:10:49] Considering drive: 'R:\'...
[10/28/2009, 7:10:49] Drive 'R:\' is rejected because of the unknown or unsuitable drive type
[10/28/2009, 7:10:49] Drive 'E:\' has been selected as the largest fixed drive
[10/28/2009, 7:10:49] Error 0x80070005: Failed to create the directory to extract to.
[10/28/2009, 7:10:49] Error 0x80070005: Failed to select and/or prepare the directory for extraction
[10/28/2009, 7:10:49] Exiting with result code: 0x80070005
[10/28/2009, 7:10:49] === Logging stopped: 2009/10/28 07:10:49 ===

Cool ! Here is the explanation : my 320 GB drive is partitioned with 220 GB for Windows 7 and 100 for Mac OS X, but as I am almost exclusively using the Windows partition, the other one has more free space : that's the reason it has been selected by .NET 4 installer, even if it is a READ ONLY partition...

Once the problem is correctly understood, the solution is simple : go to computer management and remove the drive letter associated to the Mac OS X partition, and the launch the installer again => now, the Windows 7 partition is selected and the installation runs smoothly (well, it failed again because I already had Silverlight 3.0 tools for VS 2008 installed but this was easier to correct).

Now it is time to play with VS 2010 ;-)

Posted by alainza | 3 Comments

Wiki-OS Silverlight Edition : Develop Silverlight Applications directly in your Browser and share them with one click !

The Silverlight Edition of Wiki-OS is now online.

Wiki-OS is an online environment that lets you write, build, execute, and share open-source Silverlight applications without ever leaving the web browser.

It simulates an operating system running inside the browser, complete with a start menu that lists all the applications by order of popularity and a task bar for switching between windows. Applications can be launched right away, without installation.

A development environment is included that allows creating new Silverlight 3 applications. It provides features such as syntax Image
 
 
highlighting, auto-completion, instant deployment of updates to all users, and a source control to let multiple people work collaboratively on the same project and see the history of modifications.

Applications can be shared by copying their URL - for example https://www.wiki-os.org/Sudoku/Sudoku to launch the Sudoku - or be embedded into web pages by using an html code snippet.

Every window contains an "Edit" button that lets anyone access the source code of the window and possibly make changes, thus bringing open-source collaboration to a new level. Developers can instantly access the source code of any application, reference other people's projects, and build on top of existing components instead of constantly reinventing the wheel. They can also start a project and let the community finish it.
 
In the next few days, I'll describe some specifically interesting challenged of Wiki-OS implementation such as the Colored C# Editor included (the Rich Text Box does not exist in Silverlight).
Posted by alainza | 0 Comments
Filed under: , ,

My Favourite Wiki-OS Demo

One of the coolest features of Wiki-OS is the possibility to access the source of an application, do some changes, recompile it and tests the changes without having to close the application (ok, if you change the layout of a window, you'll have to close and reopen this window to see the new version).

Here is a small sample, let's start the "My Favourite Demo" application and click on the "Hello ! " button :

Hello World...

It does not seem correct, let's click on the "Edit" button :

Edit button

It opens the Code Editor, while the application is still there (look at the taskbar) :

Code Editor

Let's double click on the "Hello !" button, we see that its code delegates the work to the MySuperAssistant class :

private void HelloButton_Click(object sender, RoutedEventArgs e) {
    MySuperAssistant assistant = new MySuperAssistant();
    string answer = assistant.StartDialog(NameTextBox.Text);
    MessageBox.Show(answer);
}

Let's now open the MySuperAssistant class and replace
return "Hello world";
with
return "Hello " + name;

Let's now Save the changes : this will trigger a compilation of the updated classe(s) and all its/their dependencies.

Save

Now switch back to the application with the taskbar, there is no need to launch it again, and click the same "Hello !" button as previously : "et voilà !" the application has been corrected by a simple user :-)

Application is now OK

Posted by alainza | 0 Comments
Filed under: ,

Article sur Visual C++ dans le dernier Programmez! Hors série sur .Net

Le dernier numéro hors série de Programmez! sur .NET contient un article que j'ai écrit sur le VC Feature Pack pour Visual Studio 2008.
Posted by alainza | 0 Comments

XNA 3 CTP = XNA for Zune

The first CTP of XNA Game Studio 3.0 is now available !

This CTP only targets Windows and Zune and only supports 32 bits edition of Windows, but it is already great to be able to develop games for Zune ! I have ported my Xna Chess game from Xbox 360 to Zune in just a few hours : most of the work was bitmap resizing ! Of course the Zune does not have enough power to make it competitive against native engines for Pocket PCs (such as Fruit under CEBoard :-) ) but it is really cool to have the same code running on XBox, PC and Zune !

Here is a screenshot:

Zune Chess

Posted by alainza | 2 Comments
Filed under: ,

Nouvel article dans Programmez!

Le dernier numéro hors série de Programmez! sur .NET contient un article que j'ai écrit cet été sur le développement pour Pocket PC avec .NET. Il s'appuie sur une petite application de gestion d'une base de Bandes Dessinées que j'ai écrite pour l'occasion.

 Complément : les sources sont maintenant disponibles à l'adresse : http://www.zanchetta.fr/articles/CompactFramework/SourcesPocketBD.zip

Complément 25 juin 2008 : l'article est maintenant disponible en ligne http://www.zanchetta.fr/Articles/WindowsMobile/WindowsMobile.htm

Posted by alainza | 1 Comments
Filed under:

Silverlight and dedicated chess computers

I have rewritten my Atlas Wooden Chess Computer comparer in Silverlight. I wanted to use only Silverlight 1.0 which is very close to release now and not Silverlight 1.1 which is still in early stage.

I looked at the samples already existing on the web and found that the Silverlight Pad sample looked very close to what I was looking for. I adaptated the reusable part of its source, added a few classes of mine (I needed a slider as well as a more generic bar because I wanted to have two of them) and it was very interesting to do because the approach "design in XAML + behavior in Javascript class" seems quite clean to me.

J'ai réécrit avec Silverlight mon Comparateur d'Echiquiers Electroniques en Bois auparavant codé en Atlas ; j'ai tenu à l'écrire en Silverlight 1.0 qui est pratiquement prêt (contrairement à Silverlight 1.1 qui est encore en version très préliminaire).

Je me suis beaucoup inspiré de l'exemple Silverlight Pad qui ressemblait beaucoup à ce que je recherchais. J'ai adapté la partie réutilisable de ses sources, ajouté mes propres classes (c'était nécessaire car j'avais besoins de composants supplémentaires comme un Curseur ou une barre plus générique car je voulais en afficher deux sur la même page). L'approche "Design en XAML + comportement en Javascript" est intéressante et finalement assez propre.

Silverlight version Atlas version
Posted by alainza | 1 Comments

Fruit 2.3.1 pour CEBoard

J'ai profité de mes vacances pour porter la dernière version de Fruit sur Pocket PC en tant que moteur pour CEBoard. Cette version supporte les End Game Table Bases et pourrait bien être le plus fort programme d'échecs disponible à ce jour pour Pocket PC. Le .cab correspondant est disponible sur la page de CEBoard.

I have taken advantage of holidays to port the latest release of Fruit to the Pocket PC Platform as an engine for CEboard. This release supports End Game Table Bases and could be the strongest chess program for Pocket PC available. Fruit's cab can be downloaded on CEBoard's page

Posted by alainza | 0 Comments
Filed under:

XNA Chess pour XBox 360

Lorsque XNA Game Studio Express est sorti, je me suis dit que j'allais développer un jeu d'échecs pour Xbox 360. Comme les jeux d'échecs sur PC sont maintenant toujours constitués d'une interface graphique et d'un moteur indépendant, j'ai décidé de transposer en C# un des meilleurs programmes open source disponibles, Toga II 1.2.1A et de lui développer une interface utilisateur avec XNA Game Studio Express.

Voici le résultat :

Bon, ça n'a malgré tout pas été de tout repos, même si l'interface utilisateur est assez réduite. En effet, il a fallu commencer par transposer de C# en C++ les presque 400 Ko de source de Toga II ; bien que la syntaxe du C# soit assez proche de celle du C++, il subsiste des différences comme la quasi-impossibilité d'incorporer un tableau à l'intérieur d'une classe ou d'une structure (je parle bien du tableau lui-même qui est à l'intérieur de la structure et non d'une référence vers un tableau alloué séparément).

Après un portage "brut" de fonderie, j'ai été un peu surpris par les performances assez moyennes du résultat : sur mon portable, la version C++ de Toga II analyse environ 650 000 positions / seconde alors que la version transposée en C# n'atteint que 100 000 positions / seconde environ. Cela dit, il faut relativiser car ces 100 000 positions / seconde sont suffisantes pour exploser la plupart des joueurs humains.

L'enrobage du moteur a nécessité deux autres composants : la partie purement graphique et une petite bibliothèque de gestion de partie d'échecs (que j'ai portée à partir du code de CEBoard). Le plus long était comme souvent d'obtenir un rendu un peu agréable des pièces et des boîtes de dialogue (sans compter le dessin des boutons des pads xbox que j'ai dessinés avec Expression Design).

Une fois le jeu déposé sur Xbox... les performances étaient descendues à 950 positions / seconde environ !!!!

Heureusement, quelques emails échangés avec d'autres amateurs de XNA m'ont orienté vers la gestion de la mémoire : l'outil "XNA Framework Remote Performance Monitor for Xbox 360" est très pratique : il permet de voir en temps réel un certain nombre de compteurs de performance de XNA sur la Xbox et m'a permis de constater que j'avais environ 7 Garbage Collections par seconde... Or si on lit l'article http://blogs.msdn.com/netcfteam/archive/2006/12/22/managed-code-performance-on-xbox-360-for-xna-part-2-gc-and-tools.aspx, on voit que ma xbox passait son temps à faire le ménage !!!

Donc, voici les opérations que j'ai effectuées :

  • suppression de toutes les allocations dynamiques de l'interface utilisateur (conservation des objets entre les appels) et surtout du moteur de jeu : comme celui-ci est récursif, il était impossible de transformer toutes les variables locales en variables globales ! J'ai donc créé une liste par type d'objet alloué dynamiquement : lorsqu'on a besoin d'un objet, on prend la tête de liste (et effectue une allocation dynamique si la liste est vide) et surtout lorsqu'on n'en a plus besoin, on le remet dans la liste. C'est bien dommage de devoir gérer ainsi la mémoire en C# mais bon, ce n'est pas plus compliqué de penser à appeler delete en C++ !
  • remplacement des chaînes de caractères utilisées par le moteur pour envoyer ses informations à l'IHM (le moteur C++ original communique via son entrée standard et sa sortie standard) par une classe (allouée comme les précédentes).
  • changement de l'affinité du thread du moteur pour le mettre sur un processeur différent de l'interface homme machine.

Le gain est appréciable : on atteint maintenant 15 000 positions / seconde sur la xbox. C'est encore loin du PC et encore plus de la version C++ mais ce n'est pas très étonnant : non seulement, la xbox utilise le .NET Compact Framework et non le .NET Framework 2.0 qui est plus sophistiqué au niveau du runtime mais aussi XNA Express a été optimisé pour les opérations graphiques et non celles de calcul.

Un dernier point à noter avant les liens pour télécharger XNA Chess : dans la position initiale, le moteur C# sur mon portable générait initialement 3380 GC de génération 0 en 10 secondes (pour donc environ 1 000 000 positions analysées). La version "optimisée" descend à une trentaine... mais les performances sur le PC n'ont quasiment pas bougé (quelques % tout au plus) ! Cela montre à quel point le GC "générationnel" du .NET Framework (malheureusement absent de la version Compact) est efficace.

http://alain.zanchetta.free.fr/softs/XnaChess-Windows.ccgame

http://alain.zanchetta.free.fr/softs/XnaChess360-Xbox360.ccgame

Source C# de Toga

 

Posted by alainza | 1 Comments

XNA Panic Game

L'annonce de XNA Game Studio Express en août dernier m'a incité à essayer de développer mon premier jeu d'arcade, cela faisait longtemps que je rêvais de pouvoir développer pour mes XBox. Voici donc XNA Panic qui est un remake d'un jeu de borne d'arcade auquel je jouais lorsque j'étais lycéen. La description de son implémentation devrait être publiée dans le prochain numéro du magazine Programmez!
XNA Panic PC
Le lien ci-dessous contient les sources de la version XBox ainsi que de la version Windows.

Télécharger XNA Panic

Posted by alainza | 3 Comments

Transmission d'entités entre client et Service Web

Entrée supprimée car trop longue.... va être remise sur http://www.zanchetta.fr

Posted by alainza | 0 Comments
Filed under:

CEBoard 2.0

CEBoard is a chess tool for Pocket PC.It's main purpose is game viewing and editing. It fully supports the PGN standard (including variations). The two main features of the 2.0 release are :

  1. multi-criteria, multi-file search
  2. hosting of chess engines : CEBoard is able to host CraftyClassic2004, Fruit 2.1 and Toga II 1.0

http://www.zanchetta.net/CEBoard

Posted by alainza | 0 Comments
Filed under:

Scrabble duplicate for Pocket PC

I've put on my web site (http://www.zanchetta.net/pocketPC/default.aspx?page=srabblce.htm) an English version of my Scrabble Duplicate program for Pocket PC. The web page is in French but the program is fully translated and uses the English Dictionary.
Posted by alainza | 0 Comments
Filed under:

Tâches Aujourd'hui 1.2 disponible

   J'ai déposé sur mon site (http://www.zanchetta.net/pocketpc) une nouvelle version de TâchesAujourd'hui. Elle gère maintenant les tâches Terminées.
Posted by alainza | 1 Comments
Filed under:
 
Page view tracker