[Plugin] Chess (1 Viewer)

catch22

MP Donator
  • Premium Supporter
  • May 28, 2006
    89
    6
    Sydney, Australia
    Hi
    Im running chess 0.3 on windows 7 with BlueSkinWide and I get the floowing error and MP is trashed I have o kill it form the task manager.

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.NullReferenceException: Object reference not set to an instance of an object.
    at MediaPortal.GUI.MyChess.MyChessGUI._Game_Tick(Object sender, EventArgs e)
    at System.Windows.Forms.Timer.OnTick(EventArgs e)
    at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    Any ideas what is going on?

    Cheers
     

    huha

    Extension Developer
    January 3, 2008
    890
    556
    Home Country
    Germany Germany
    I recompiled Kroko´s version with 1.2. It is working fine for me. As I have not seen a response I assume it is no more supported, so i am uploading my recompiled version.
    All the credit goes to kroko.
    You have to use kroko´s original plugin and just substitute Chess.dll for MP1.2
    Please understand that i cannot do any more support for the plugin if this should not work for you.
    Greetings, huha

    Update: Below I am documenting the code changes i did in the plugin:

    MyChess.cs:

    line 45:
    //huha changes:
    // replaced MediaPortal.Configuration.Config.Dir.Base by MediaPortal.Configuration.Config.Dir.Config to avoid Windows Vista UAC access rights to program folder for saving and loading games
    // added assembly plugin compatibilty in assembly.cs
    // changed version number from 0.4.0.0 to 0.4.0.1

    // changed project properties .net framework to 3.5
    // unchecked project properties build code optimization
    // unchecked project properties build trace
    // one of the latter three caused for me an "image could not be loaded" exception of the plugin

    Line 60:
    if (File.Exists(MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Config) + "\\chess.sav"))

    Line 270:
    string path = MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Config) + @"\chess\";

    Line 551:
    if (File.Exists(MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Config) + "\\chess.sav"))

    Line555:
    StreamReader sr = new StreamReader(MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Config) + "\\chess.sav", false);

    Line 766:
    StreamWriter sw = new StreamWriter(MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Config) + "\\chess.sav", false);


    ChessSetupForm.cs:
    Line143:
    string path = MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Config);

    AssemblInfo.cs:
    // Sie können alle Werte angeben oder die standardmäßigen Revisions- und Buildnummern
    // übernehmen, indem Sie "*" eingeben:
    [assembly: AssemblyVersion("0.4.0.1")]
    [assembly: AssemblyFileVersion("0.4.0.1")]


    [assembly: CompatibleVersion("1.1.6.27652")]
    [assembly: UsesSubsystem("MP.SkinEngine")]
    [assembly: UsesSubsystem("MP.Config")]
     

    Attachments

    • Chess.zip
      20.1 KB

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    14,363
    10,399
    Königstein (Taunus)
    Home Country
    Germany Germany
    AW: [Plugin] Chess

    Long awaited - finally there! Big :D huha!
    And now: Could you recompile the other games of kroko as well - seems he is not very active here...
     

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    14,363
    10,399
    Königstein (Taunus)
    Home Country
    Germany Germany
    AW: [Plugin] Chess

    Hi huha, put the dll into plugin\windows, and I also have the old Chess folder in MP base folder (because the My+Chess.mpi form archive won´t install). But when starting Chess, I don´t get the message from the program (AFAIK something Hello from the chess engine or similiar), and I also can´t make any move.
    Any ideas/hints?
     

    huha

    Extension Developer
    January 3, 2008
    890
    556
    Home Country
    Germany Germany
    Hi Catavolt,
    I have not used any other games from kroko and do not have the time to follow that up - sorry. I hope someone else can recompile.
    On chess I did change the save folder to ProgramData (like described here in my previous post). I have installed the chess engine in
    C:\ProgramData\Team MediaPortal\MediaPortal\Chess
    and do get the window message at the beginning. I am using your skin PureVisionHD.
    The chess engine i got from the source code of kroko in the release folder
     

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    14,363
    10,399
    Königstein (Taunus)
    Home Country
    Germany Germany
    AW: [Plugin] Chess

    Hi huha, found it out by myself where to put the Chess engines (from the error message in Config referring to a path not found) ;)
    Again :D for your efforts. Maybe I provide a MPEI for Chess here later ;)
     

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    14,363
    10,399
    Königstein (Taunus)
    Home Country
    Germany Germany
    AW: [Plugin] Chess

    Well, here we go ;)
    Made up a Chess.mpei with a new chess.xml for DefaultWide. Tested the install three times, worked OK.
    Have fun :D
     

    Attachments

    • 00-30-08.jpg
      00-30-08.jpg
      90.8 KB
    • Chess.mpe1
      3.2 MB

    huha

    Extension Developer
    January 3, 2008
    890
    556
    Home Country
    Germany Germany
    Chess for MP1.3 alfa
    I recompiled for 1.3 alfa. This version should work for both MP1.2 and Mp1.3 alfa.
    I also added a few error messages if the chess engine is not found and the settings are now stored in a separate xml file, as i had issues before.

    The .dll file is in Chess.zip and needs to replace the old version chess.dll.
    Please provide some testing.

    Update: zappa needs version 2 protocol, ufim needs version 1
     

    Attachments

    • Source.zip
      1.3 MB
    • Chess.zip
      20.6 KB
    Last edited:

    Users who are viewing this thread

    Top Bottom