Commit Graph

1513 Commits

Author SHA1 Message Date
Abou Al Montacir
cd0756f17b gir2pas: Enabled generating Pascal sets to C bitfield enums by CLO.
Based on command line option (CLO) `-e/--declare-enums-as` that
selects the way how to define C enums and bit fields.

Added support for 5th options in addition 4 already implemented.
 1. `IntConst`: No type, just use integer non typed constants. This was
    already implemented, but not easily selected at CLI.
 2. `TypedIntConst`: Use non strict type aliases and typed constants.
    This was already implemented, selected by default in the code.
 3. `IntAliasConst`: Use strict type aliases and non typed constants.
    This was newly added.
 4. `Enum`: Use Pascal enumeration type for both C enums and bit fields.
    This was newly added.
 5. `Set`: Use Pascal enumeration type for both C enums and Pascal sets
    for bit fields. This is now implemented.
2023-06-04 10:10:42 +00:00
Abou Al Montacir
bb05d66329 Renamed executable from gir2pascal to gir2pas. 2023-06-04 10:10:42 +00:00
Abou Al Montacir
050dfa3884 gir2pascal: Small code improvements.
These changes are:
 1. Added line break to last line of generated files.
 2. Removed unused field `FEnumImpl` from `TGirConsoleConverter`.
 3. Moved command line from .lpi to .lps as this depends on the path
    of the user debugging the program.
2023-05-27 15:53:56 +00:00
Abou Al Montacir
b2013f8634 Fixed issue causing generation of duplicate declarations for some opaque types.
There was an issue with the logic for resolving opaque types that misses
some types due to not comparing C types with opaque type name.

This is now fixed and all Gtk3 units now compile without any manual
modification.

Tested with
43cac7495f
using
`./gir2pas/gir2pas -i gir-rs-files/Gtk-3.0.gir -o gtk3-test-enums -e Enum`
2023-05-23 12:57:27 +00:00
Abou Al Montacir
0838345684 Fixed generation of unnamed unions handling within objects.
The generated code was missing an identifier and thus was unable to
compile.

Now we generated a name based on the type and this seems for fix the
issues with Gtk3.gir file.
2023-05-22 22:22:51 +00:00
Abou Al Montacir
8ebe4628c8 Generate pointer types for all declared types.
If the type is not used within the unit it was declared in, then pointer
types will not generated. This causes an error when a pointer type is
used by a unit using it.

An example is a compilation error on `Pango1` that uses `Glib2` because
the type `Pgconstpointer` was not defined.

The new code generates a lost of pointer types, but at least it allows
get a code that compiles fine.
2023-05-21 22:09:42 +00:00
Abou Al Montacir
08ee4a27b4 gir2pascal: Created a dedicated section for declaring enumeration types, issue #FP39988.
This section is placed just after the constants section in order to
avoid declaration of function parameters and variables of enumeration
types that are not yet declared.

The issue was hidden in the typed constants implementation because the
constants section is placed at the beginning of the unit. This is not
true anymore and thus we need a dedicated section.
2023-05-21 15:50:48 +00:00
Abou Al Montacir
194cc1a4fc git2pascal: Refactored code to avoid duplication.
Inserting `external` directive for `C` identifiers was done manually.
This commit adds a method to add such a directive for any identifier.
This helps keeping inserted code consistent and if a change is to be
done in the future, we do it at one place only.
2023-05-20 13:32:33 +00:00
Abou Al Montacir
5c6f02b8ee gir2pascal: Used consistent naming of MsWindows directive.
Compilation directive `MsWindows`is inserted in 3 different places with
3 different case mixing.

Also white spaces around it are some times added and sometimes not.

This commit fixes all to a single convention.
2023-05-19 18:58:31 +02:00
Abou Al Montacir
d1f64050ea gir2pascal: Generate C enums based pascal type selected by CLO, issue #39988.
Added a new command line option (CLO) `-e/--declare-enums-as` that
selects the way how to define C enums and bit fields.

Added support for 4 options and a 5th to be implemented later.
 1. `IntConst`: No type, just use integer non typed constants. This was
    already implemented, but not easily selected at CLI.
 2. `TypedIntConst`: Use non strict type aliases and typed constants.
    This was already implemented, selected by default in the code.
 3. `IntAliasConst`: Use strict type aliases and non typed constants.
    This was newly added.
 4. `Enum`: Use Pascal enumeration type for both C enums and bit fields.
    This was newly added.
 5. `Set`: Use Pascal enumeration type for both C enums and Pascal sets
    for bit fields. This is not yet added.
2023-05-18 10:44:10 +02:00
Abou Al Montacir
7920db790b Issue #39988: Forbid duplicate paths in directories search list.
As the directories search list is not sorted, FPC implementation of
`TStringList` ignores the `dupIgnore` option and thus leads to having
the same entry multiple times in the list.

We forbid this manually in order to avoid searching multiple times for
the same file in the very same directory.

We also add more default search paths (Debian based).
2023-05-12 21:44:21 +00:00
Abou Al Montacir
9c5b942b66 Issue #39988: Use system path separator instead in folders search list.
This is more consistent with other tools and allows passing drives on
MS Windows systems.
2023-05-12 21:44:21 +00:00
Abou Al Montacir
5c34ab0510 Issue #39988: Try to create output directory if it does not exist.
This is more convenient for users and when included in a script.
2023-05-12 21:44:21 +00:00
Abou Al Montacir
f64c1307f9 Issue #39988: Changed order of folders where to search for included files.
The order of folders where to search for included files should be
related to user preference as follows:
 1. directory where the input is located,
 2. directories supplied by user at command line in the order they were
    passed,
 3. default system directories, where distributions used to put them.

 This way, user can easily override files in the default system
 directories without the need to have write access to such folder, as in
 most Unix systems this will require root access.

 Also, one expects, that if copy of an included file is placed in the
 same directory as the input one, then this copy should be used.
 This makes sens, because people generally work on the same directory,
 and will consider their local work copy the preferred one to be used.
2023-05-11 15:46:44 +00:00
Abou Al Montacir
8a7116f248 Issue #39988: Added support for .typelib files.
Debian ships .gir files in a compressed binary format with .typelib
extension. We use `g-it-generate`to decompress them on the fly.
2023-05-10 22:00:29 +00:00
Maxim Ganetsky
debb889759 gir2pascal: Updated to support generating Gtk4 bindings. Patch from theo222, issue #40196. 2023-04-06 01:49:50 +03:00
Michaël Van Canneyt
57e0738de1 * Fix some warnings about unused variables 2023-03-14 22:32:33 +01:00
Maxim Ganetsky
3150888bc3 LazDataDesktop: cleaned up unused strings, regenerated translations and updated Russian translation 2023-03-14 00:40:15 +03:00
Michaël Van Canneyt
8d7ad0ab18 * correct IsTransactionActive implementation 2023-03-13 08:59:50 +01:00
Michaël Van Canneyt
4663f00008 * Add transaction control buttons 2023-03-12 11:54:26 +01:00
Michaël Van Canneyt
ef4c066857 * Show readonly/required for fields 2023-03-12 11:54:26 +01:00
mattias
63039e34f5 rpm: put lazarus into /usr/share/lazarus/ 2023-03-05 22:10:40 +01:00
Martin
78416496c6 Spelling 2023-02-20 15:11:36 +01:00
Martin
c1de827226 PoFileMaintenance: dup-finder include search term for items in full pot view. 2023-02-20 14:19:17 +01:00
Martin
b31586fc9c Add tool to maintain po files. Move entries between files. Find duplicates. 2023-02-20 12:29:32 +01:00
Juha
5ea4a1e270 Tools: Fix handling program parameters in runwait.sh. Issue #40045, patch by Dean Mustakinov. 2022-12-23 09:41:28 +02:00
Martin
28247a829c IDE: Move LazConf.pp to new base-package "IdeConfig" 2022-12-08 19:28:19 +01:00
Željan Rikalo
e5b2a64d68 ApiWizard: added missing qt5 widgetset. 2022-11-11 18:02:35 +01:00
mattias
4f567766ef lcl: added ide macro value qt6 2022-11-11 17:53:38 +01:00
wp_xyz
c0fbe886a0 Tools/Icons_to_HTML: Speed-up display of icons in IconTable application. Patch by Roland Hahn. 2022-09-24 18:49:25 +02:00
Maxim Ganetsky
c987cf35a0 Translations: Brazilian Portuguese translation update by Marcelo B Paula, issue #39863 2022-08-22 02:21:13 +03:00
marcoonthegit
13d8a9cbb2 * initial support to make generated headers work on Windows with minimal editing, or to start from .gir files with Windows DLL names in them.
(for some glib/gobject based libs on Windows, like Aravis)
2022-08-16 13:52:53 +02:00
wp_xyz
2b63ae02b5 tools/icons_to_html: Minor refactoring. 2022-08-07 23:21:15 +02:00
wp_xyz
0ddb329d2a tools/icons_to_html: Minor refactoring of ini storage for IconTable project. 2022-08-06 12:15:29 +02:00
Maxim Ganetsky
fd7e574b54 LazDataDesktop: removed obsolete IFDEFs (register all possible engines), issue #39836 2022-07-30 01:18:12 +03:00
Maxim Ganetsky
f5dc6e64a4 Tools: updated gir2pascal README.md 2022-07-19 01:41:02 +03:00
Maxim Ganetsky
7c8e197abd Tools: updated gir2pascal .gitignore 2022-07-19 01:18:18 +03:00
Maxim Ganetsky
5194609a53 Tools: updated gir2pascal LPI and icon 2022-07-19 01:14:42 +03:00
Maxim Ganetsky
697d41437c Tools: initial import of gir2pascal sources from https://github.com/n1tehawk/gir2pascal 2022-07-19 01:01:00 +03:00
wp_xyz
9f9fdf6a9d Images: New general purpose images by Roland Hahn (more arrows, filter, flame, flip, secure, sound, share) 2022-07-01 23:11:55 +02:00
wp_xyz
d15b15d97c Tools/Icons_to_HTML: Improvements in layout of HTML table. Refactored CSS. 2022-06-30 15:17:15 +02:00
Maxim Ganetsky
578fe79ed5 Revert "Installer, Win: updated Russian translation"
This reverts commit 80e25af269.
2022-06-24 00:54:03 +03:00
Martin
1b80d31355 Installer, Windows: No longer install openssl libs. They will be downloaded by OPM on request.
https://idefix.freepascal.org/cgi-bin/mailman/private/lazarusdev/2022-May/037206.html
2022-06-23 22:39:48 +02:00
Martin
e051041493 Revert "Installer, Win: Do not install dll globally by default / Changes/Adds installation "Types" (pre-selectable settings) and custom names for the types."
This reverts commit cbbdabd969.
2022-06-23 22:27:47 +02:00
wp_xyz
61f77f3cbf Tools/icons_to_html: Add mouse-over to see the images in dark-mode. Store parameters in ini file. By Roland Hahn. 2022-06-21 23:18:22 +02:00
wp_xyz
be6696ff4b Tools: Updated version of the IconTable tool showing the image count (by Roland Hahn) 2022-06-10 18:28:13 +02:00
wp_xyz
25c54a7e4e tools/icons_to_html: Minor refactoring. 2022-06-06 11:41:31 +02:00
wp_xyz
9fd15edd81 Tools/icons_to_html: Updated version by Roland Hahn allowing to check the images also on dark background. 2022-06-04 11:52:15 +02:00
mattias
bd81eaf9f6 tools: Debian requires installed perl scripts to shbang perl directly, from Paul Gevers 2022-05-29 19:25:06 +02:00
mattias
26fb8e8750 deb: fixes system wide default Lazarus configuration 2022-05-29 19:19:31 +02:00
wp_xyz
0d94210f62 Images: More general-purpose images by Roland Hahn. Improved usability of IconTable tool. 2022-05-25 13:12:53 +02:00
Maxim Ganetsky
80e25af269 Installer, Win: updated Russian translation 2022-05-25 01:40:05 +03:00
Martin
cbbdabd969 Installer, Win: Do not install dll globally by default / Changes/Adds installation "Types" (pre-selectable settings) and custom names for the types. 2022-05-24 17:15:39 +02:00
wp_xyz
90472ec714 Tools/glazres: Remove the images; they are in images/general_purpose now. 2022-05-13 20:21:07 +02:00
wp_xyz
b8a356f9f0 tools/IconTable: Add button to view generated html page in browser, patch by Roland Hahn. 2022-05-02 20:29:33 +02:00
wp_xyz
4af239470b images: Add tool by Roland Hahn ("IconTable") to create an html page from the general-purpose images. 2022-04-30 23:59:13 +02:00
Juha
d921dc84fd Tools: Allow spaces in file path in runwait.sh script. Issue #39666, patch by Pavel. 2022-03-06 09:04:29 +02:00
Maxim Ganetsky
83be6f15c5 Tools/glazres: regenerated translations and updated Russian translation 2022-02-14 00:58:30 +03:00
wp_xyz
60cfbfedb4 Tools/glazres: Add captions to buttons. Enforce form size constraints. 2022-02-12 19:57:49 +01:00
wp_xyz
918cc3797c Tools/glazres: new "close" and "file name" images by Roland Hahn for more consistent GUI. 2022-02-12 19:28:09 +01:00
Maxim Ganetsky
a297b6b623 Tools/glazres: regenerated translations and updated Russian translation 2022-02-12 01:32:03 +03:00
wp_xyz
953d802876 Tools/glazres: Fix LCL scaling when form size is in ini file. Fix form resizing. 2022-02-11 23:13:27 +01:00
Martin
fcebca8c7a Installer, Win: Update images. Issue #39587 2022-02-11 22:01:55 +01:00
wp_xyz
4ac2ed675a Tools/glazres: Activate LCL scaling. Replace images by new high-dpi aware images by Roland Hahn. New icon. 2022-02-11 19:49:31 +01:00
marcoonthegit
c0c92c1b57 * try to fix sitemap editor. Still the whole concept is rough, and probably also suffers from changes wrt projectdir, since the sitemaps are saved to a different directory 2022-02-11 13:52:22 +01:00
Maxim Ganetsky
7e0c54cc3a Tools/glazres: regenerated translations and updated Russian translation 2022-02-11 00:54:13 +03:00
Maxim Ganetsky
4318fc80e2 Tools/glazres: enabled HighDPI 2022-02-11 00:44:56 +03:00
wp_xyz
de040950ce Tools/glazres: Fix issue in German translation file. 2022-02-10 19:44:57 +01:00
wp_xyz
ed604f6e7b Tools/glazres: Fix "Close" button opening a file dialog. Update German translation. 2022-02-10 19:34:05 +01:00
wp_xyz
ab4d68ba4b Tools/glazres: Support drag and drop from OS file manager. Issue #39643, patch by Mark A Paley. 2022-02-10 15:14:33 +01:00
Martin
097da34d5b Installer, Win: Add backslash after path var, in case... 2022-02-04 16:40:52 +01:00
Martin
dfd23c955d Installer, Win: fix initial EnvironmentOptions.xml Issue #39630 2022-02-04 16:08:35 +01:00
wp_xyz
61ad4be039 Tools/chmmaker: Fix crash when editing table-of-contents of loaded sample project. 2022-02-03 13:45:38 +01:00
wp_xyz
1f695b9d3a Tools/chmmaker: Fix compilation with FPC 3.2.x 2022-02-02 18:36:59 +01:00
mattias
9352dc3bdd rpm: optimized create lazarus tgz 2022-01-25 12:26:16 +01:00
wp_xyz
92be3d6975 tools/install: Replace lazgear.bmp by image provided by Roland Hahn 2022-01-19 12:26:23 +01:00
wp_xyz
5e65d1405f Icons: Replace lazarus-icon of demo/example projects by new smaller version (Roland Hahn). 2022-01-14 21:20:10 +01:00
Maxim Ganetsky
0778b93613 Tools/glazres: replaced Mac OS X with macOS in resource strings, regenerated translations and updated Russian translation 2021-12-21 01:58:04 +03:00
Maxim Ganetsky
738e48c6b7 Translations: French translation update by Gilles Vasseur, issue #39487 2021-11-26 03:47:29 +03:00
wp_xyz
2e7022648b LCL: Add missing dialog shield icon (by Roland Hahn). 2021-11-20 11:29:39 +01:00
John Shand
c817696268 Create fpc folder for git working tree. Copy .git from source.
See merge request freepascal.org/lazarus/lazarus!39

(cherry picked from commit 5d482579e7)
2021-11-08 00:27:13 +03:00
mattias
1391c8cb7d tools: lplupdate showing git commands 2021-10-31 09:10:33 +01:00
mattias
934d701488 rpm: comments 2021-10-30 13:31:14 +02:00
mattias
71584f5ece deb: fixed git checkout on older systems 2021-10-30 12:58:14 +02:00
mattias
d7ed558c61 tools: gitignore 2021-10-30 11:48:12 +02:00
mattias
1e22686cfe deb: building with a git repo 2021-10-30 11:21:43 +02:00
mattias
1c177dd9c2 tools: gitignore updatemakefiles linux binary 2021-10-18 14:31:31 +02:00
Martin
056cc6dd26 Installer, Win: Fix for git / restore binw32/binw64 2021-10-16 13:01:34 +02:00
Martin
f81cc24f83 Build scripts: GIT // git clone --depth=1 => "git describe" does not work, as no history is cloned / maybe clone the entire branch or at least depth 10000 on one single branch 2021-10-16 10:37:13 +02:00
Martin
b26d9aa832 svn2revisioninc, Installer: use first-parent for git describe 2021-10-09 21:38:25 +02:00
Juha
ce6715ed78 Correct spelling errors for "Width" in various units. Issue #39402, patch by Don Siders. 2021-09-26 21:40:16 +03:00
Juha Manninen
0ffa296511 Merge branch 'jshand2021-main-patch-93706' into 'main'
Update create_fpc_rpm.sh

See merge request freepascal.org/lazarus/lazarus!9
2021-09-26 08:24:04 +00:00
Juha Manninen
4efd1734e9 Merge branch 'jshand2021-main-patch-87160' into 'main'
Update create_lazarus_export_tgz.sh

See merge request freepascal.org/lazarus/lazarus!10
2021-09-26 08:20:03 +00:00
Martin
2bb1f2ea36 Installer, Win: Change to git 2021-09-14 15:23:02 +02:00
mattias
266c74db95 tools: added git ignores for linux binaries and config 2021-08-26 16:09:40 +02:00
John Shand
0ca9443df0 Update create_lazarus_export_tgz.sh 2021-08-16 01:31:03 +00:00
John Shand
d753efec99 Update create_fpc_rpm.sh 2021-08-16 01:26:15 +00:00
Maxim Ganetsky
3945f7302f updatepofiles: improved diagnostic output 2021-08-12 00:38:13 +03:00
Maxim Ganetsky
e2f89909cf updatepofiles: improved diagnostic output 2021-08-11 02:36:11 +03:00
Maxim Ganetsky
8d7e9e30ff updatepofiles: added ability to search for .rsj/.rst/.lrj files in specified directory, do not ignore missing .rsj/.rst/.lrj files anymore 2021-08-11 02:18:47 +03:00