Menu

Getting latest svn checkout version to work

Help
Bas A
2020-07-06
2020-07-31
  • Bas A

    Bas A - 2020-07-06

    Hi,

    I was looking for a good dice rolling program after using Dicetool for a while (I was happy with it, but it stopped working and I can't get it to work any more).

    It's been surprisingly hard to find a dice rolling program with all the features I want. I saw this program is under active development, which is promising, but also that the latest release is from five years ago. The five-year-old version works, but I was curious about the latest developments. Using the latest svn checkout ([r1360] as of now), I get the following error:

    TLResourceList.Sort 0 DUPLICATE RESOURCE FOUND: addL:PNG
    TLResourceList.Sort 2 DUPLICATE RESOURCE FOUND: closedis:PNG
    TLResourceList.Sort 4 DUPLICATE RESOURCE FOUND: closehigh:PNG
    TLResourceList.Sort 6 DUPLICATE RESOURCE FOUND: closeinact:PNG
    TLResourceList.Sort 8 DUPLICATE RESOURCE FOUND: closeL:PNG
    TLResourceList.Sort 10 DUPLICATE RESOURCE FOUND: closenorm:PNG
    TLResourceList.Sort 12 DUPLICATE RESOURCE FOUND: tectabctrl:PNG
    TLResourceList.Sort 14 DUPLICATE RESOURCE FOUND: tectabctrl_150:PNG
    TLResourceList.Sort 16 DUPLICATE RESOURCE FOUND: tectabctrl_200:PNG
    [FORMS.PP] ExceptionOccurred 
      Sender=EReadError
      Exception=Error reading memoLog.ScrollOnEditLeftOptions.ScrollExtraPercent: Unknown property: "ScrollOnEditLeftOptions"
      Stack trace:
      $00000000004808C9
      $000000000047FBE9
      $000000000047FCA4
      $000000000047FCA4
      $000000000047FCA4
    

    Is this to do with that it's not an actual release and so won't work, or am I doing something wrong?

     

    Related

    Commit: [r1360]

  • Bloodbat

    Bloodbat - 2020-07-06

    Hello.
    The program does work and does compile, make sure you're building clean and, also, do mind the note about Eye Candy controls being broken, use 0.9.30, not 0.9.44.
    What are your Free Pascal and Lazarus versions?
    There have been a number of changes to SynEdit in Lazarus' trunk (I am using a relatively recent one) and that's what memoLog is, the problem seems to originate in an unknown property for it, so the solution is most likely to use Lazarus trunk to build NDR.
    If your platform is Windows and you are still unable to compile it, I could attach an SVN build in another post.

     
  • Bas A

    Bas A - 2020-07-06

    Ah whoops, I forgot to list my setup. Sorry. Thanks for the swift reply!

    I'm running Arch Linux, using Lazarus version 2.0.8-2 and Free Pascal 3.2.0-1.

    I hadn't seen the note about Eye Candy controls, and I was using 0.9.44, so I'll try downgrading!

     
  • Bloodbat

    Bloodbat - 2020-07-06

    The Lazarus trunk suggestion stands: ScrollOnEditLeftOptions is not present in your Lazarus version, and the upcoming 2.0.10 will not have it either. Make sure you try the Lazarus trunk, the property was introduced on May 23, 2020.
    If you want to try and build it with your current version, edit src/forms/formmain.lfm and remove
    ScrollOnEditLeftOptions.ScrollExtraPercent = 20
    ScrollOnEditLeftOptions.ScrollExtraMax = 10
    Those are the missing properties in your Laz. Version.

     
  • Bas A

    Bas A - 2020-07-06

    Yes, downgrading ECC didn't solve the problem, so I'll try installing the Lazarus trunk.

     
  • Bas A

    Bas A - 2020-07-07

    Well, I couldn't get the Lazarus trunk to work, so I tried removing the lines you mentioned. The program still throws an error, though:

    TLResourceList.Sort 0 DUPLICATE RESOURCE FOUND: addL:PNG
    TLResourceList.Sort 2 DUPLICATE RESOURCE FOUND: closedis:PNG
    TLResourceList.Sort 4 DUPLICATE RESOURCE FOUND: closehigh:PNG
    TLResourceList.Sort 6 DUPLICATE RESOURCE FOUND: closeinact:PNG
    TLResourceList.Sort 8 DUPLICATE RESOURCE FOUND: closeL:PNG
    TLResourceList.Sort 10 DUPLICATE RESOURCE FOUND: closenorm:PNG
    TLResourceList.Sort 12 DUPLICATE RESOURCE FOUND: tectabctrl:PNG
    TLResourceList.Sort 14 DUPLICATE RESOURCE FOUND: tectabctrl_150:PNG
    TLResourceList.Sort 16 DUPLICATE RESOURCE FOUND: tectabctrl_200:PNG
    [FORMS.PP] ExceptionOccurred 
      Sender=EReadError
      Exception=Error reading memoLog.ScrollOnEditRightOptions.ScrollExtraPercent: Unknown property: "ScrollOnEditRightOptions"
      Stack trace:
      $00000000004808C9
      $000000000047FBE9
      $000000000047FCA4
      $000000000047FCA4
      $000000000047FCA4
    

    So I went and found these two lines in src/forms/formmain.lfm:

     ScrollOnEditRightOptions.ScrollExtraPercent = 30
     ScrollOnEditRightOptions.ScrollExtraMax = 25
    

    And removed those as well. Surprisingly, it still throws the same error after compiling. I'm really unfamiliar with compiling Lazarus and using its IDE, so it might be it's not using my updated formmain.lfm, but otherwise is it possible I need to remove these lines from other files?

    As another option: is it possible for you to just make a new release with binaries to download? I don't know if you're close to another release-worthy version, of course, but that'd sure make things easier. I tried working with the 2015 release some more, but that turned out to throw some errors as well. (I could make a separate post about those if you like, but I imagine you don't prefer working on errors for a release from five years ago.)

     
  • Bloodbat

    Bloodbat - 2020-07-07

    If you did compile Lazarus, make sure you run it from your home directory, wherever you compiled it, as the "make install" for Lazarus is kinda idiotic.
    Make sure you clean and rebuild the project, it should use the updated formmain.lmf as long as you made sure you saved it, I don't use that property anywhere in code. The log viewer (separate project) should have the same problem, but one project doesn't affect the other.
    While it is useable, it's not release ready yet, so I won't make a new one for some time. Sorry.

     
  • Bloodbat

    Bloodbat - 2020-07-07

    Update I just downgraded the project to work with the latest 2.0.10 Lazarus "stable" build, it compiles properly; but 2.0.10 is now a requirement for compilation, if the official page hasn't anounced it yet, it can be found at their ftp: ftp.freepascal.org/pub/lazarus/releases

     
  • Bas A

    Bas A - 2020-07-07

    Hmm, well, I'll wait until 2.0.10 is in Arch's repositories then. It's a cutting edge distro, so I expect it'll be updated soon after 2.0.10 is officially released. That way I won't have to mess with a manual Lazarus installation.

     
  • Bas A

    Bas A - 2020-07-26

    Hi Bloodbat,

    Lazarus got updated the other day, so I tried compiling ndr again. No luck yet, unfortunately. This is the compilation log:

    Compile package FCL 1.0.1: Success
    Compile package LazUtils 1.0: Success, Warnings: 3, Hints: 405
    [Edited: all we need is the error]
    

    The error that Lazarus colored red in the compilation was

    bgrafreetype.pas(900,18) Error: identifier idents no member "CharKerning"
    

    Any idea what I'm doing wrong? I'm now running Lazarus 2.0.10.

     

    Last edit: Bloodbat 2020-07-26
  • Bloodbat

    Bloodbat - 2020-07-26

    Technically you are doing nothing wrong. The problem is bgrafreetype.pas has a problem with Lazarus version constants in an IFDEF (can't blame them: getting that version properly is a PITA: I ended up making a small util to get it right). Make sure you have the latest bgrabitmap release from their github at https://github.com/bgrabitmap/bgrabitmap/releases, 11.2 at the time I'm writing this.
    Also, a ton of commits have been made to NDR, so make sure you update the sources as well, check manual.odt for compilation requirements, as they changed (I am sure I removed pexpandpanel; but maybe I changed something else).
    If bgrafreetype.pas continues to fail compilation, let me know, I'll tell you which line needs to be commented out, looking at their log though, it should work properly.

     
  • Bas A

    Bas A - 2020-07-30

    Alright, got it to work! Woowee, turns out this is nowhere near what I was looking for, though. I'm now making a simple bash script to make a menu with different rolldice commands... But it's good to have your program in case of some more complicated situations.

     
  • Bloodbat

    Bloodbat - 2020-07-31

    I'm glad you did :)
    Take a look at diceparser.pas, ndrlexlib.pas and ndryacclib.pas (diff the last two against FPCs lexlib and yacclib), those could easily be adapted to create a far, far simpler command line dice roller, or, if you're more adventurous or have lex and yacc experience, take a look at diceparser.y and dicelex.l, those implement a dice parser with the NDR underlying base dice roller.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.