Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

How to install 3rd party libraries 4 years 10 months ago #13408

  • Graham
  • Graham's Avatar Topic Author
  • Visitor
  • Visitor
Hi, this may be considered a "newbie" type of question, but how do I go about installing a library or package in Code Typhon? I am aware of the install/uninstall Packages option, but that does not list the library I wish to install. For example, I want to use the Asphyre PXL framework (library) as found here: asphyre.net/products/pxl

I have downloaded the framework, but how do I go about installing it successfully in Code Typhon? I know there is already an Asphyre package (pl_AsphyreSphinx) available when I go to the install/uninstall packages list, but that is another library of theirs (2D/3D Graphic facilities) and does not provide me with the GPIO access tools that I need for the raspberry Pi 3 SBC. I need the PXL framework library.

A second question in this regard: When I installed pl_AsphyreSphinx as found in the install/uninstall Packages window, everything appeared to work correctly (installed and then restarted the IDE). However now when I go to install/uninstall Packages, it shows no packages installed (IE the left hand (Install) and right hand (Available for Installation) windows are blank.) Note I have nothing typed in the filters option.
I followed the instructions found here:
www.pilotlogic.com/sitejoom/index.php/wi...ll-unistall-packages

Interestingly, if I click on "Save and Rebuild IDE) then it shows all the existing libraries, with the option to Keep, and also the newly added library (pl_AsphyreSphinx) with the option to Remove. I therefore don't believe all the libraries have somehow disappeared or been removed, they just aren't showing up in the relative window.

If need be I can split this out into two questions on the forum.

I'm running the latest (version 6.8) of CT on my Ubuntu (version 18.10) PC.

Thanks for the help!

Please Log in or Create an account to join the conversation.

How to install 3rd party libraries 4 years 10 months ago #13409

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1047
  • Thank you received: 145
Sir
1) First of all it's NOT necessary to install a library to Typhon IDE in order to use it in your project.
You can simple add in to your Project Folders the folder(s) of the external library you want to use (Asphyre PXL framework).

2) You must install an external library to Typhon IDE only if you want to use Visual components of this library in CT Visual Form designer or
you want to use it in your project as pkg

In this case Typhon has codetyphon/typhon/pkglinks/ folder with *.pkgln files (are simple text files) to remember where the packages are.
To edit this folder files Typhon has Packages Link dialog







For a single pkg you can great/update pkg link with



...
PilotLogic Core Programmer
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Matis A..

How to install 3rd party libraries 4 years 10 months ago #13424

  • Graham
  • Graham's Avatar Topic Author
  • Visitor
  • Visitor
Thanks for the reply Matis, unfortunately I am still confused about this.

Firstly, I have NO packages displayed AFTER I install an optional package as listed (using the Install/Uninstall Packages option) in Code Typhon (for example if I install pl_AsphyreSphinx library package. See here:



Secondly, when I press the (Create and Fix Links) button in the Package Links window, it doesn't do anything. I have tried it several times both before and after trying to install a library using the "Install/Uninstall Packages" option. Is it meant to do nothing (from a user perspective)?

Thirdly, how do I install a library that is NOT part of the standard Code Typhon download. For example, there are thousands of different libraries for Delphi, some of which I use at work. In the Dephi IDE I can install any of these 3rd party libraries. Using my example posted a couple of days ago, what about the Asphyre Platform eXtended Library (PXL)? To clarify, this is a different library (Provides access to GPIO for Raspberry Pi SBC) to the one listed as standard under the Install/Uninstall Packages option (2D/3D graphics library). This library is compatible with both Lazarus and Delphi, so I should have no problem installing it in Code Typhon. How do I do this? I understand that I don't have to install the library, however I wish to use it in several projects, and having it installed makes it more convenient to use/maintain.

Finally, I have also tried to link to the library via my project as you have suggested, but I'm obviously still missing something in this regard too. I have included the PXL library path (see image below) however I am still unable to compile my project. I get a "Fatal: Cannot find PXL.Board.Types" yet the file clearly exists in the library path.





Thank you.
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Graham.

How to install 3rd party libraries 4 years 10 months ago #13425

  • fredvs
  • fredvs's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 205
  • Thank you received: 1
Hello CT team.

IMHO, it would be **great** if CT do fix this **very** old and boring bug:

bugs.freepascal.org/view.php?id=32367

PS: In the issue, Martin gave all the keys how to fix it.

Fre;D

Please Log in or Create an account to join the conversation.

Last edit: by fredvs.

How to install 3rd party libraries 4 years 10 months ago #13426

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1100
Sir
where did you find this library (AsphyreSphinx)
and this library support Linux ?
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

How to install 3rd party libraries 4 years 10 months ago #13432

  • Graham
  • Graham's Avatar Topic Author
  • Visitor
  • Visitor
Hi Sternas,
when I tried installing the AsphyreSphinx library, I was really trying to see if it would also install the Asphyre PXL library, which I now know is a completely different library. Fortunately, I don't need AsphyreSphinx. I only need the Asphyre PXL library (which according to their webpage supports Linux).

Please Log in or Create an account to join the conversation.

How to install 3rd party libraries 4 years 10 months ago #13433

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1100
Sir
we don't know if "Asphyre PXL framework" is compatible with CT
please ask to "Asphyre PXL framework" support
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

How to install 3rd party libraries 4 years 10 months ago #13434

  • Graham
  • Graham's Avatar Topic Author
  • Visitor
  • Visitor
Assuming it is for now, how do I install this library in Code Typhon? This is a bit of a generalised question, as I would like to know what the procedure is for installing any 3rd party library (that is compatible with Code Typhon) into Code Typhon.

Please Log in or Create an account to join the conversation.

Last edit: by Graham.

How to install 3rd party libraries 4 years 9 months ago #13447

  • Klaus Riesterer
  • Klaus Riesterer's Avatar
  • Visitor
  • Visitor
May be this is helpful: afterwarp.io/
This is the newer framework with FPC/Lazarus-support.

Please Log in or Create an account to join the conversation.

How to install 3rd party libraries 4 years 9 months ago #13471

  • Graham
  • Graham's Avatar Topic Author
  • Visitor
  • Visitor
Hi,

thanks for the assistance guys. Unfortunately, either I'm a complete idiot, or there is a signifiant lack of online documentation. I converted a Lazarus program (demo program for the PXL library) using CT2Laz. I have downloaded the Asphyre PXL library (which is Lazarus compatible) and extracted all files under the appropriate CodeTyphon/Typhon/.../Source directory. The demo program I downloaded/converted compiles and runs perfectly!

However, I have been completely unable to gain access to the library when setting up my own project. I have spent HOURS searching through the Project Options as well as Tool -> Options for the demo program, but cannot see where the libraries are installed. This is so easy in Delphi, I just don't understand why I am finding this so difficult in Code Typhon.

So I am back to my original question: I have downloaded a library (in my case the Asphyre PXL library). HOW do I install it in Code Typhon?

Please don't ask me if it works in Code Typhon, or is compatible, as it obviously is (The demo program proves this). The converted demo program compiles and runs just fine in CT, using this library, however my own program fails to find the libraries, even if I add the PXL llibrary path as seen here (Notet pxl-v110 entry under Libraries (-FL) entry, as seen below. This entry is blank though for the demo program, so it is obviously finding the library path somewhere else.:



My project, when compiled, produces the error "Cannot find PXL.TypeDef used by main of the Project Inspector" as seen here:


Code successfully compiles in demo:


Note I have also tried doing a direct copy/paste of the uses from the working demo project, to my own project. This is not a typo on my part, as the identical code fails for my project.The only difference I have been able to find so far, is that my code is contained in a .pas file (standard for Pascal) whereas the working demo code exists in a .ppr file. Unfortunately there is no online information regarding the difference between .ppr (Unique to CT) and .pas files.

What is a .ppr file? I know it used to be referred to as .lpr, but that still doesn't tell me what it is and when it should be used.

For the sake of reference, here is a screenshot of my Asphyre PXL library install. Everything is there, including the relevant files as used (successfully) by the demo project, but never found by my project.



Please can you help, this is so frustrating.
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Graham.

How to install 3rd party libraries 4 years 9 months ago #13472

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1047
  • Thank you received: 145
Sir
1) .ppr is for CT the primary Pascal Project File (like lpr)

2)Where did you find AsphyreSphinx ?
we want to help you with the AsphyreSphinx source.
PilotLogic Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Matis A..

How to install 3rd party libraries 4 years 9 months ago #13473

  • Graham
  • Graham's Avatar Topic Author
  • Visitor
  • Visitor
Hello Matis,

I am using the Asphyre PXL library (for GPIO control of Raspberry Pi 3, with cross compiling). I downloaded the library (package) from here:
asphyre.net/products/pxl

Scroll down to the download section as seen below (I use Linux, and therefore used the 7z option)


Note the demonstration software I used was also part of the download. I kept the library as-is (IE I did not convert any of the .pas files to suit Code Typhon, as it didn't seem necessary). I converted the demo programs using CT2Laz and after that they compiled and worked without a problem.

Thank you.
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Graham.

How to install 3rd party libraries 4 years 9 months ago #13474

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1047
  • Thank you received: 145
Yes but
CT2Laz can't give CodeTyphon compatibility files,
we DON'T use this crap.

CodeTyphon has a tools for that, more info here

Please convert the AsphyreSphinx library with CT tool and try AsphyreSphinx library again.

Our tests (now) on Win 10 End (1903) of pxl-v110.zip after convert with CT tool



PilotLogic Core Programmer
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Matis A..

How to install 3rd party libraries 4 years 9 months ago #13475

  • Graham
  • Graham's Avatar Topic Author
  • Visitor
  • Visitor
Hi Matis,

ok, so that converts the demo programs. But I had the demo programs working already. That is not my problem. My problem is when I try to use the library in my own project, the library (.pas files) are never found. I have included them in exactly the same manner in my "uses" clause, but the compiler fails and complains it cannot find the files. What is missing from my project? Why can I not see/use the libraries when they work just fine in the demo programs?

To clarify:

Demo program compiles just fine:


BUT my project fails to comply:

Please Log in or Create an account to join the conversation.

Last edit: by Graham.

How to install 3rd party libraries 4 years 9 months ago #13476

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1047
  • Thank you received: 145
You must add the AsphyreSphinx library source directory to your
Project:
-Other unit files (-Fu) and
-Include file (-Fi)

The project must know where the library source is
if don't use packages





Your AsphyreSphinx library don't have any pkg.
PilotLogic Core Programmer
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Matis A..

How to install 3rd party libraries 4 years 9 months ago #13477

  • Graham
  • Graham's Avatar Topic Author
  • Visitor
  • Visitor
Thank Matis,
I was sure this was the problem, but was not sure exactly where to add the file path for the source files. What was confusing is the demo software does not include the file path for their library, under the project options (so I have no idea how their demo projects found the required library source).

Where can I find more help/online information on the Project Options "Other" and "Include" file path so I know I am adding the source file path to the correct place?

Thanks for you help Matis, much appreciated.

Please Log in or Create an account to join the conversation.

How to install 3rd party libraries 4 years 9 months ago #13478

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1047
  • Thank you received: 145
Just, open your project options=>paths
go to "Other unit files (-Fu)"
1) click on right button "..."



2) Click to directory button
3) Add the new folder to you project "Other unit files"

Do the same with your project "Include file"
or
copy and paste directories from "Other unit files" to "Include file"

PS: "..\..\..\..\Source"
is 4 directories up (from your project ctpr file) and in "Source" directory is the library source
PilotLogic Core Programmer
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Matis A..

How to install 3rd party libraries 4 years 9 months ago #13479

  • Graham
  • Graham's Avatar Topic Author
  • Visitor
  • Visitor
Hi Matis,

many thanks for your help. I added the library to the "Other" path option under Project Options, and it now compiles and runs! However I have not added it to the Include path. What is the difference between "Other" and "Include" paths?

Please Log in or Create an account to join the conversation.

How to install 3rd party libraries 4 years 9 months ago #13480

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1047
  • Thank you received: 145
"Include file" are only for *.inc files

In your AsphyreSphinx library source:
-Android.LibDefs.inc
-Jedi.Compilers.inc
-Jedi.Direct3D9.inc
-PXL.Canvas.DX11.Shaders.inc
etc...

For you is the same directory with "Other unit files (-Fu)"
because your AsphyreSphinx library has ALL files (*pas and *.inc) in One directory

have fun...
PilotLogic Core Programmer

Please Log in or Create an account to join the conversation.

How to install 3rd party libraries 4 years 8 months ago #13498

  • Graham
  • Graham's Avatar Topic Author
  • Visitor
  • Visitor
Thanks Matis, really appreciate your help.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1