Recent

Author Topic: Problem installing OMultiPanel  (Read 11686 times)

edvard

  • Full Member
  • ***
  • Posts: 172
Problem installing OMultiPanel
« on: December 01, 2013, 10:58:33 pm »
From the OMultiPanel website:
Quote
OMultiPanel - the ultimate TSplitter replacement for Delphi & Lazarus
OMultiPanel is a TSplitter replacement that allows you to split windows percentually. It can also be understood as a TGridPanel replacement with the ability to resize the cells with mouse (and the limitation of 1 row or column).

I tried to convert the .dpk to .lpk using the Lazarus converter, but I get this error:
Code: [Select]
The package omultipanel does not have any "Register" procedure,
which typically means, it does not provide any IDE addon.
Installing it will probably only increase the size of the IDE
and may even make it unstable.

There is a file "OMultiPanel_reg.pas" in the OMultiPanel directory root, but Lazarus is apparently not picking up on it.  Has anybody else tried this and been successful, or should I just give up and use TSplitter?
All children left unattended will be given a mocha and a puppy.

Arch (though I may go back to Debian)| FreePascal 3.2.2 + Lazarus 2.2.4, GTK2+ and Qt.  Mostly Qt...

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Problem installing OMultiPanel
« Reply #1 on: December 01, 2013, 11:03:10 pm »
If they really support Lazarus, a .lpk should be provided instead of telling users to convert the .dpk to .lpk.

edvard

  • Full Member
  • ***
  • Posts: 172
Re: Problem installing OMultiPanel
« Reply #2 on: December 02, 2013, 12:24:02 am »
OK, I got it installed after a few hours of trial and error with the official documentation.  >:(
Here's what I got:

If you download and unpack the archive, put this in a file named 'OMultiPanel_design.lpk' in the 'package' folder:
Code: [Select]
<?xml version="1.0"?>
<CONFIG>
  <Package Version="4">
    <Name Value="OMultiPanel_design"/>
    <Author Value="Ondřej Pokorný (http://www.kluug.net)"/>
    <CompilerOptions>
      <Version Value="11"/>
      <SearchPaths>
        <IncludeFiles Value=".."/>
        <OtherUnitFiles Value=".."/>
        <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)/"/>
      </SearchPaths>
      <Other>
        <CompilerMessages>
          <MsgFileName Value=""/>
        </CompilerMessages>
        <CompilerPath Value="$(CompPath)"/>
      </Other>
    </CompilerOptions>
    <Description Value="OMultiPanel is a TSplitter replacement that allows you to split windows percentually. It can also be understood as a TGridPanel replacement with the ability to resize the cells with mouse (and the limitation of 1 row or column)."/>
    <License Value="  Copyright (C) 2012 Ondrej Pokorny
    http://www.kluug.at

  This license is applicable to all files distributed in this archive if not
  stated differently.
 

  *** BEGIN LICENSE BLOCK *****


  OMultiPanel is licensed under MPL 1.1/GPL 3/LGPL 3 tri-license.

  MPL: http://www.mozilla.org/MPL/1.1/
  GPL: http://www.gnu.org/licenses/gpl-3.0.html
  LGPL: http://www.gnu.org/licenses/lgpl-3.0.html


  ***** END LICENSE BLOCK *****
"/>
    <Version Major="1" Minor="2"/>
    <Files Count="3">
      <Item1>
        <Filename Value="../OMultiPanel.pas"/>
        <UnitName Value="OMultiPanel"/>
      </Item1>
      <Item2>
        <Filename Value="../OMultiPanel_reg.pas"/>
        <HasRegisterProc Value="True"/>
        <UnitName Value="OMultiPanel_reg"/>
      </Item2>
      <Item3>
        <Filename Value="../omultipanel_icon.lrs"/>
        <Type Value="LRS"/>
      </Item3>
    </Files>
    <Type Value="RunAndDesignTime"/>
    <RequiredPkgs Count="2">
      <Item1>
        <PackageName Value="LCL"/>
      </Item1>
      <Item2>
        <PackageName Value="FCL"/>
      </Item2>
    </RequiredPkgs>
    <UsageOptions>
      <UnitPath Value="$(PkgOutDir)"/>
    </UsageOptions>
    <PublishOptions>
      <Version Value="2"/>
    </PublishOptions>
  </Package>
</CONFIG>

Use this to replace the 'OMultiPanel_reg.pas' file (make a backup first):
Code: [Select]
unit OMultiPanel_reg;

interface

procedure Register;

implementation

uses Classes, OMultiPanel, LResources;


procedure Register;
begin
  {$I OMultiPanel_icon.lrs}
  RegisterComponents('Additional', [TOMultiPanel]);
end;

end.

About the .lrs file:
I couldn't convert the .dcr icon file to a .lrs, so I made my own 24x24 png icon and converted with Lazres.  Even then I couldn't get it to use my graphic for the icon.  If anybody has any suggestions getting that to work, please let me know.  If you don't care, the $I directive can be left out entirely.

Here's my OMultiPanel_icon.lrs file if you want it:
Code: [Select]
LazarusResources.Add('omultipanel','PNG',[
  #137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0
  +#0#0#6'bKGD'#0#177#0#177#0#177#172#30#141#230#0#0#0#9'pHYs'#0#0#11#19#0#0#11
  +#19#1#0#154#156#24#0#0#0#7'tIME'#7#221#12#1#21'()'#26':xh'#0#0#0#25'tEXtComm'
  +'ent'#0'Created with GIMPW'#129#14#23#0#0#0#181'IDATH'#199#237#150'1'#14#195
  +' '#12'E?'#17'k'#164#156')'#7'`'#5'y'#205#185'X-f'#14#208'3U=@'#221#169#17
  +#162#129'"'#21#166#242'''d'#27#190#133'x2JD'#224#156#19#12'P'#8'aQ'#214#218#7
  +#0#16#209#218#243'pf'#6#0'h'#0'+'#17'a'#223#142#190#237#147#7'3C'#167#177#219
  +#221#127#212#237#219'q'#25#175')mV'#231'Ic'#204#185#142'1^'#198'kJ'#247#0#192
  +#130#193#154#6#127'`'#160'['#11#243#231#215#213#224#23#202#155#12'J$'#151'('
  +#175#146'\RNr'#137#242'I'#242#4#173#12'T'#13#180'ZN'#183#0'U'#3#237#27#132
  +#250#28#208#228#187'^'#205'{'#232'+'#17'Q'#206#185#231#160'o'#139'z'#1#185
  +#200'@'#1#29#225'\'#220#0#0#0#0'IEND'#174'B`'#130
]);

Also, you can change 'Kluug.net' in RegisterComponents to 'Additional' if you want it to show up there instead of in it's own tab.
« Last Edit: December 02, 2013, 03:48:55 am by edvard »
All children left unattended will be given a mocha and a puppy.

Arch (though I may go back to Debian)| FreePascal 3.2.2 + Lazarus 2.2.4, GTK2+ and Qt.  Mostly Qt...

Ondrej Pokorny

  • Full Member
  • ***
  • Posts: 220
Re: Problem installing OMultiPanel
« Reply #3 on: December 11, 2013, 12:46:33 pm »
Why did you try to convert the DPK package into LPK?

You could have created a new LPK package fast and with ease as it's described in this tutorial: http://wiki.freepascal.org/How_To_Write_Lazarus_Component.

But ok, I'll add a .lpk package into the zip file too :)

edvard

  • Full Member
  • ***
  • Posts: 172
Re: Problem installing OMultiPanel
« Reply #4 on: December 12, 2013, 03:10:37 am »
Why did you try to convert the DPK package into LPK?

I tried to convert it because there's a handy item in the "Tools" menu called "Convert Delphi package to Lazarus package"  :D

Quote
You could have created a new LPK package fast and with ease as it's described in this tutorial: http://wiki.freepascal.org/How_To_Write_Lazarus_Component.

Well, maybe I'm a bit of a dunce, but it wasn't fast nor easy, as I am a bit of a beginner to Pascal and Lazarus, so package creation from scratch was a... um... learning experience.  I was successful, however, as you can see from my post. 8)

Quote
But ok, I'll add a .lpk package into the zip file too :)

Hey, that would be great, and I would actually be quite interested in the differences between my feeble efforts and your official offering. 
While we're on the subject, what did I do wrong with the icon?  I tried many ways to get it to work, but it just gives me the official toolbar generic icon, and I would like to see the icon you included as well.  I could not get it converted no matter what I did.

Thanks for the great component, by the way; still figuring out the best ways to use it.  ::)



All children left unattended will be given a mocha and a puppy.

Arch (though I may go back to Debian)| FreePascal 3.2.2 + Lazarus 2.2.4, GTK2+ and Qt.  Mostly Qt...

Ondrej Pokorny

  • Full Member
  • ***
  • Posts: 220
Re: Problem installing OMultiPanel
« Reply #5 on: December 12, 2013, 07:16:04 pm »
Those converters never work... I think you convinced yourself.

Yeah, everybody has to learn everything somehow :)

By the way, I updated the zip package. Now with a Lazarus installation package included. And the icon works just well for me.

edvard

  • Full Member
  • ***
  • Posts: 172
Re: Problem installing OMultiPanel
« Reply #6 on: December 14, 2013, 03:09:59 pm »
I just tried it out.  No warnings, no problems and the icon shows up just fine.  8-)

Thanks, Ondrej!
All children left unattended will be given a mocha and a puppy.

Arch (though I may go back to Debian)| FreePascal 3.2.2 + Lazarus 2.2.4, GTK2+ and Qt.  Mostly Qt...

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Problem installing OMultiPanel
« Reply #7 on: December 14, 2013, 04:15:53 pm »
Quote
Those converters never work... I think you convinced yourself.
They WORK, and they have IMPROVED over the years. You never really use them, do you? I've successfully converted several Delphi projects flawlessly with that, just need to adjust some platform specific codes.

Ondrej Pokorny

  • Full Member
  • ***
  • Posts: 220
Re: Problem installing OMultiPanel
« Reply #8 on: December 15, 2013, 10:25:22 am »
They WORK, and they have IMPROVED over the years. You never really use them, do you? I've successfully converted several Delphi projects flawlessly with that, just need to adjust some platform specific codes.

Sorry for the OT. This thread is not about converters. I do apologize to all programmers that have been developing some converters.

 

TinyPortal © 2005-2018