Alexey-T / CudaText

Cross-platform text editor, written in Free Pascal
Mozilla Public License 2.0
2.55k stars 174 forks source link

How to use Lazbuild? #950

Closed van-de-bugger closed 7 years ago

van-de-bugger commented 7 years ago

Neither readme.md nor CudaText wiki page say a word about how to build it. I have downloaded source code, unpacked it, I also have Lazarus and FreePascal installed on My Fedora Linux, but I have no idea how to build the CudaText. Could you please write few sentences how to build it? Thanks.

Alexey-T commented 7 years ago

Help/ Wiki menu item. In wiki, find topic "how to compile". Ok?

van-de-bugger commented 7 years ago

Help/ Wiki menu item.

What the application do you mean? In Lazarus, I do not see "Wiki" item in "Help" menu.

Alexey-T commented 7 years ago

In Cudatext, menuitem Help/Wiki.

van-de-bugger commented 7 years ago

In Cudatext, menuitem Help/Wiki.

If I cannot build it, how can I run it to open Help menu??

Alexey-T commented 7 years ago

http://wiki.freepascal.org/CudaText#How_to_compile_program

van-de-bugger commented 7 years ago

Thanks. However, it is not what I am looking for. My intention was to create an rpm package for Fedora Linux. For that purpose, build process should be scriptable. This instruction:

install .lpk packages into Lazarus IDE (find all .lpk files, open them in IDE, install from Packages dialog) in IDE, in component palette, you must see…

Assumes working with IDE, which cannot be implemented in rpm spec file. I know Lazarus has lazbuild command line tool, so could you please describe how to build CuteText with lazbuild command?

Alexey-T commented 7 years ago

I dont know lazbuild. maybe in next days will see it. If possible, will tell you how to use it...

Alexey-T commented 7 years ago

now you should unpack my .xz distro, to make RPM from its files.

Alexey-T commented 7 years ago

@vhanla Do you know how to use lazbuild here?

vhanla commented 7 years ago

No, I've never tried it.

van-de-bugger commented 7 years ago

now you should unpack my .xz distro, to make RPM from its files.

Where is .xz distro? It is binary or source distribution? Fedora policy requires rpm package is built from sources (and source rpm is also provided, too), repacking binaries is not welcome.

Alexey-T commented 7 years ago

xz distro is on cudatext.SF.net. (it is Unix xz archiver). about Lazbuild: no time to work with it....

Alexey-T commented 7 years ago

(if you build from sources, you will get not ready beta).

van-de-bugger commented 7 years ago

it is Unix xz archiver

I know what is xz archiver. The question was about xz content: is it source or binary distribution. I found it on sf.net — it is a binary distribution. I am not interested in repacking prebuilt binaries. According to Fedora policy, rpm package should be built from sources, not binaries.

about Lazbuild: no time to work with it....

Looks like you are not interested in getting more users. It's up to you, though.

Alexey-T commented 7 years ago

Lazbuild is not easy thing. Im interested but lazbuild is hard for me.

van-de-bugger commented 7 years ago

Automated build is a task number one for every project. It is a base for automated nightly builds, testing, making distribution packages, etc. To me it is very strange that you do not have it yet.

Lazbuild is not easy thing. Im interested but lazbuild is hard for me.

I have no experience in Lazarus. (I had experience in TurboPascal (not Delphi), but it was more that 20 years ago.) I found lazbuild tool and study how to build package in less than 5 minutes:

$ lazbuild atbuttons/atbuttons_package.lpk

I found two issues in the CuteText build:

  1. Package file names.

Minor problem is that directory and package names are not named systematically and uniformly:

atbuttons/atbuttons_package.lpk
src/gauge_pkg.lpk
atsynedit/atsynedit_package.lpk
ec/econtrol_package.lpk
Components/python4lazarus_pkg.lpk

It would be nice you you name directories and packages uniformly, for example:

atbuttons/atbuttons_package.lpk
atgauge/atgauge_package.lpk
atsynedit/atsynedit_package.lpk
econtrol/econtrol_package.lpk
python4lazarus/python4lazarus_package.lpk
  1. Build requirements.

download ATnnnnnn packages, EControl package, from https://github.com/Alexey-T/

is not the best way to document dependencies. Please enlist all the required packages (which are not part of Lazarus).

  1. Build time errors.

There are real showstoppers, though:

package ATSynEdit has one file, which depends on EControl. It is atsynedit_adapter_econtrol.pas. It is here to not make new package for 1 file. When you compile CudaText, FPC shows error about this file, you need to add dir "atsynedit" to project's search dirs.

and

package ATSynEdit has files, which depend on ATListbox package. atsyneditform*.pas. They are here to not make new package. You added dir to "atsynedit" to project's dirs, so files will be found.

You do not want to have a package for one unit, and introduces a circular package dependency instead. This circular dependency causes build time error which should be fixed by manual intervention to the build process. This is simply unacceptable. What the problem in a creating package for one file?

Alexey-T commented 7 years ago

OK. Issues 1/ 2 fixed; renamed lot of files in packages. fixed in wiki.

Alexey-T commented 7 years ago

Im fixing issue-3 too; thanks that you wrote this note.

Alexey-T commented 7 years ago

Fixed; new infos and new package, http://wiki.freepascal.org/CudaText#How_to_compile_program