Forum > Third party

Lazarus Package Manager - CLI package manager for buildsystems

<< < (2/3) > >>

Warfley:

--- Quote from: JuhaManninen on April 03, 2020, 07:30:12 pm ---Another thing is that the package system should not depend on LCL. My goal is to remove LCL dependency from LazBuild but that goal is far far away ...
Splitting BuildIntf from IdeIntf was one step but it does not help by itself. It provides interface for units which still have the LCL dependency.
The problem is now solved with a NoGUI widgetset hack which prevents pulling in the actual GUI libs.

--- End quote ---
I was actually wondering why lazbuild depended on the LCL when looking into it. It was my first idea to use the IDE internals for this and started looking into how lazbuild handles dependencies, but decided that for what I've wanted to accomplish this was way to much effort.

But thank you for the info about the buildsystem units, I might look into it at some point.

balazsszekely:
@Juha

--- Quote ---Unfortunately the online packages don't yet integrate fully.
--- End quote ---
It does in my opinion. We did it togheter.  :) If you have an unresolved package dependency, the project inspector will show you that is avaible online, more over it offers you to install it. Unfortunately there is a small problem, many users did not liked the idea of internet connection on IDE startup, so it's diseabled by default.

JuhaManninen:

--- Quote from: GetMem on April 04, 2020, 09:53:28 am ---@Juha
It does in my opinion. We did it togheter.  :) If you have an unresolved package dependency, the project inspector will show you that is avaible online, more over it offers you to install it.

--- End quote ---
Ok, my info was maybe outdated. I must study this integration thing again to bring it back.
Recently I have studied the package system for potentially reducing dependencies. It is a complex system, damn!


--- Quote ---Unfortunately there is a small problem, many users did not liked the idea of internet connection on IDE startup, so it's diseabled by default.

--- End quote ---
Yes, that discussion I remember. :)

Warfley:
Just added a new command: build

Builds projects using lazbuild, detects missing dependencies and tries to retrieve them via opm. Also added an example using indy for this.

Now compiling a project that only uses OPM dependencies is as simple as:

--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---$> lpm update$> lpm lazarus add 2.0.6 /developer/lazarus/2.0.6$> lpm build 2.0.6 project.lpi # use --yes or -y to avoid having to say yes to installing dependencies (e.g. in docker where no user input is possible)

skrat:
Hi,

First of all, thanks for this!

However, I have some trouble using the lpm. I have created a YML script:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---# This is an example Starter pipeline configuration# Use a skeleton to build, test and deploy using manual and parallel steps# -----# You can specify a custom docker image from Docker Hub as your build environment. image: debian:sid pipelines:  default:    - step:        name: 'Environment'        script:          - echo "Setting environment..."          - apt-get update && apt-get install --yes lazarus-ide-qt5 unzip          - apt-get install git -y          - git clone https://github.com/Warfley/LazarusPackageManager.git          # - export PATH="$HOME/LazarusPackageManager:$PATH"          - cd LazarusPackageManager && ./lpm update && ./lpm lazarus add 2.0.12 /usr/lib/lazarus/2.0.12 && ./lpm install dcpcrypt-2.0.4.1 && lazbuild example/example.lpi    # - step:    #     name: 'Build and Test'    #     script:          - echo "Building project..."          - echo "$PATH"          - ./lpm update          - ./lpm lazarus add 2.0.12 /developer/lazarus/2.0.12 # add lazarus installation so it knows where to install          # - ./lpm direct-download fpspreadsheet http://packages.lazarus-ide.org/FPSpreadsheet.zip # manual download of a package (even though this is also in OPM)          # - ./lpm install 2.0.12 fpspreadsheet # install just downloaded package          # - ./lazbuild WingDesigner.lpi # now after installing the packages we can use lazbuild to simply build our projects          - ./lpm build -y ../WingDesigner.lpi 
Sadly the last line fails, saying:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---[INFO] Downloading FPSpreadsheet.zip from https://packages.lazarus-ide.org/FPSpreadsheet.zip[INFO] Inflating FPSpreadsheet.zip[INFO] installing fpspreadsheet/laz_fpspreadsheet.lpkTraceback (most recent call last):  File "/opt/atlassian/pipelines/agent/build/LazarusPackageManager/./lpm", line 244, in <module>    main()  File "/opt/atlassian/pipelines/agent/build/LazarusPackageManager/./lpm", line 234, in main    success = performBuild(lpm, opm, args.project, args.modes, args.yes, logger)  File "/opt/atlassian/pipelines/agent/build/LazarusPackageManager/./lpm", line 149, in performBuild    performInstall(lpm, opm, [toInstall], logger)  File "/opt/atlassian/pipelines/agent/build/LazarusPackageManager/./lpm", line 33, in performInstall    result = result and lpm.installPackage(pkgName)  File "/opt/atlassian/pipelines/agent/build/LazarusPackageManager/packagemanager.py", line 113, in installPackage    result = result and call([lazbuild.resolve(), "--add-package-link", pkgFile.resolve()]) == 0  File "/usr/lib/python3.9/subprocess.py", line 349, in call    with Popen(*popenargs, **kwargs) as p:  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__    self._execute_child(args, executable, preexec_fn, close_fds,  File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child    raise child_exception_type(errno_num, err_msg, err_filename)FileNotFoundError: [Errno 2] No such file or directory: PosixPath('/developer/lazarus/2.0.12/lazbuild')
Does anybody happen to know what the issue is or even better, how to fix it?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version