Commit Graph

2406 Commits

Author SHA1 Message Date
Jan200101 a5ba96c073 generate metainfo releases using git 2024-11-29 15:37:43 +08:00
Takase 3fe64609e7
Install plugins with lpm inside meson (#1951)
* meson: install plugins with lpm

* meson: add cachedir as output

* build.sh: fix bash syntax error

* build.sh: only copy datadir when PGO is enabled

* build.sh: properly install files with meson install

* build.sh: install macOS bundle files with .app suffix

* ci: copy bundle and portable files correctly

* package-dmg: remove extraneous steps

* ci: fix wrong bundle path

* build.sh: force reconfigure bundle=false if bundle is not explicitly given

* build.sh: move wrong bundle=true assignment to the right place

* ci: remove -a flag from cp command

* ci: use xargs and find -print0 to omit spaces in find output

* ci: specify correct path to Info.plist

* ci: correctly run dmgbuild

* dmgbuild: get application path from command line

* ci: organize dmgbuild arguments

* ci: properly escape arguments

* ci: finally correctly specify yaml string

* ci: don't copy Info.plist again

* build.sh: don't install any plugins if -A is not specified

* build.sh: use the latest release from github
2024-11-25 13:39:48 +01:00
Takase 7c5b631ff0
Remove install-dependencies.sh (#1950)
* ci: remove usage of install-dependencies.sh

* ci: use build-box action properly

* readme: add prerequisites section to the quick build guide

* ci: fall back to using step entrypoint

* ci: add ca-certifcates to msys build

* ci: add patch command to msys ci

* scripts: remove install-dependencies.sh

* readme: reword

Co-authored-by: Guldoman <giulio.lettieri@gmail.com>

---------

Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
2024-11-25 20:32:21 +08:00
Takase 7d457f8fc5
Fix multiple continuous release binaries (#1948)
* ci,scripts: remove unused lua patching code

* ci: remove old continuous release binaries

* ci: generate release notes when releasing with tags

* ci: remove the unicode patch flag

* ci: add content: write permission to GH_TOKEN

* ci: use ncipollo/release-action@v1

* ci: update existing releases

* ci: actually set removeArtifacts to true

* ci: do not rebuild for both bundle and portable

We now allow using meson setup --reconfigure, which will preserve the build cache, and changes nothing but the installation path

* build.sh: fix wrong conditional

* ci: fix tar command output

* ci: fix tar command extracting to wrong directory

* ci: add merge-multiple: true to properly lay out the artifacts

* ci: only upload the correct files
2024-11-16 14:10:24 +08:00
Jan200101 c15910856a convert unix style paths literals into meson path segments 2024-11-15 17:41:57 +08:00
Jan200101 dcedce8e6a use meson datadir as lite_datadir base 2024-11-15 17:35:41 +08:00
Samuel 00b4527efa
fix appimage cd error and use static appimage runtime (#1924)
* fix appimage cd error and use static appimage runtime

* include `desktop-file-utils` for appimagetool

* remove mv of old `AppRun`

* revert indentation

* don't export `APPIMAGE_EXTRACT_AND_RUN`
2024-11-15 10:39:11 +08:00
Jan200101 5530d8a46f Update lua wrap 2024-11-13 11:21:51 +08:00
Jan200101 532cd0d06a Update FreeType2 wrap 2024-11-10 22:53:32 +08:00
Jan200101 de13b6da2b Update PCRE2 wrap
fixes configuration issues on systems that don't support the sealloc jit
2024-11-03 18:20:38 +08:00
Jan200101 1345e9f345 Format renderer font scale code to be actually readable 2024-10-31 16:00:35 +08:00
dependabot[bot] a32d6fdb89 build(deps): bump softprops/action-gh-release
Bumps the github-actions group with 1 update: [softprops/action-gh-release](https://github.com/softprops/action-gh-release).


Updates `softprops/action-gh-release` from 1 to 2
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-31 15:59:49 +08:00
Jan efa257ddbd
include unicode patch in lua meson wrap (#1908) 2024-10-22 19:19:42 +02:00
Guldoman 1ce8cd1d82
Add `minimum_thumb_size` and `{contracted,expanded}_scrollbar_margin` to `Scrollbar` (#1589)
* Add `minimum_thumb_size` to `Scrollbar`

* Add `{contracted,expanded}_scrollbar_margin` to `Scrollbar`
2024-10-22 13:05:07 -04:00
Adam Harrison 38d18395cb Lock LPM version. 2024-10-22 13:03:56 -04:00
Guldoman f81bd133b8
Add `inclusive` parameter to `Doc:get_text` (#1586)
This is needed to get the last character of the "selection".

For example:
```lua
doc:get_text(1, 1, #doc.lines, math.huge)
```
will return everything but the last newline, while
```lua
doc:get_text(1, 1, #doc.lines, math.huge, true)
```
will return the last newline too.
2024-10-22 12:59:55 -04:00
Takase b9e9041052
feat(core.emptyview): add name to emptyview (#1569)
* feat(core.emptyview): add name to emptyview

* fix(core.emptyview): set filename to empty
2024-10-22 18:44:04 +02:00
Takase f2a18cdce7
feat(core.emptyview): add name to emptyview (#1569)
* feat(core.emptyview): add name to emptyview

* fix(core.emptyview): set filename to empty
2024-10-22 18:43:50 +02:00
Guldoman 46b1499f4f
Fix multi-type usage in delimited patterns (#1740)
In the "end" pattern we weren't considering the multiple types.
2024-10-22 12:33:01 -04:00
Guldoman d486058875
Add support for relative `require`s (#1634) 2024-10-22 12:31:45 -04:00
Takase d925da47fa
Allow writing to hidden files on Windows (#1653)
* feat(system): add system.ftruncate

* fix: EPERM writing to hidden files on Windows

* chore(doc): fix capitalization

* refactor(system): make ftruncate length optional

* refactor(doc): don't specify length
2024-10-22 18:14:30 +02:00
ThaCuber 08fd994423
improve projectsearch (#1876)
* improve projectsearch

- stick status to top of view
- add horizontal scrolling
- added ellipsis at the end of the text if it's too long

* Reverted removal of 0 on yield.

---------

Co-authored-by: Adam Harrison <adamdharrison@gmail.com>
2024-10-22 18:10:33 +02:00
Adam 82d78350e2
Streamlined and simplified CI, and made it use lpm to install addons. (#1649)
* Streamlined and simplified CI, and made it use lpm to install addons.

Removed universal-dmg packager, as it is not necessary under the new workflow; a regular fat binary being packaged with the normal dmg works.

Incoprorated Guldo's suggestions.

Fixed minor issue.

Fixed slight issues.

Reverted to master.

Fixed nit.

Split up packaging steps.

Sigh,.

?

Fixed up x86 build.

Split Mac into two workers with a matrix.

Sigh.

Removed unecessary lines.

More descriptive name.

Split arch workflow for Mac.

Syntax error.

Spaced things out.

Fixed mac build.

Removed unecessary steps.

Takase's suggestions.

Removed unecessary `..`.

Modified patch to reference the new lua version (hopefully no other modifications needed).

Restored logic to create bundle.

New release workflow.

Changed to welcome plugin.

Changed build.

Added in package-portable to make this easier.

Corrected compiling arch.

Harmonized formats.

Remove package portable.

Fixed universal build.

Fix mispelling.

Sigh.

Sigh.

Sigh.

Sigh.

Sigh.

Sigh.

Sigh.

Sigh.

Sigh.

Sigh.

Sigh.

* Expanded things as per Takase's request.

* Renamed Mac to Darwin.

* Fixed missing variable.
2024-10-22 17:53:17 +02:00
Adam Harrison e8a4ed2a21 Additional small fixes for windows as part of the process API move to lua. 2024-10-22 11:48:51 -04:00
Adam Harrison 56b7d8abef Fixed minor typo from merge of #1854 for windows builds. 2024-10-22 11:33:41 -04:00
takase1121 a5d466d6cf arena_allocator: return lxl_arena instead of initializing an existing struct 2024-10-22 17:17:40 +02:00
takase1121 a25ab3c535 process: migrate arg validation and checking to Lua 2024-10-22 17:17:40 +02:00
takase1121 1f0533482b utfconv: add functions that use arena_allocator 2024-10-22 17:17:40 +02:00
takase1121 9293a317cd allocator: add arena_allocator
This allocator uses Lua userdatas for dynamic allocation
that is automatically freed when the current scope exits.
2024-10-22 17:17:40 +02:00
Jan 0966be64b0
remove lhelper script, build configuration and dependency support (#1906)
* remove lhelper script, build configuration and dependency support

* turn lhelper flag into a error
2024-10-22 17:12:23 +02:00
Jan de805aaf64
Implement logic for tracking target window (#1891)
this will be needed when SDL3 happens due to many more functions requesting a window handle

Signed-off-by: Jan200101 <sentrycraft123@gmail.com>
2024-10-22 17:09:20 +02:00
Guldoman 850aa25879
treeview: remove unused code (#1895)
It caused a lot of useless `system.absolute_path` calls.
2024-10-21 18:28:55 +02:00
Guldoman 219dc55eae
meta: remove `FUNDING.yml` 2024-10-11 05:42:09 +02:00
Adam 5b6c666652
Add keyboard shortcut to tooltips in `ToolbarView` (#1880) 2024-10-02 05:41:12 +02:00
Guldoman de118ab82a
Add primary selection support (#1729)
* Add support for primary selections

* Handle primary selection in `DocView`s
2024-09-13 13:31:15 -04:00
Adam f5c63d8c8f
Removed draw asserts for window renderer, because certain commands between frames may want to use draw commands to get the sizes of things. (#1878) 2024-09-12 21:20:38 -04:00
Takase 4b70c3e082
ci: use lite-xl-build-box-manylinux (#1877) 2024-09-06 12:49:14 -04:00
Takase 872364ded3
Configurable statusview icon (#1617)
* docs(core.statusview): fix item.visible being mandatory

* feat: make the line icon configurable

* fix: empty icons

* fix: use user specified font

Co-authored-by: Guldoman <giulio.lettieri@gmail.com>

* fix: never draw anything if disabled

Co-authored-by: Guldoman <giulio.lettieri@gmail.com>

* fix: always add stonks icon

Co-authored-by: Guldoman <giulio.lettieri@gmail.com>

* feat: add rgb functionality

* fix: reduce number of color changes

---------

Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
2024-09-03 13:42:55 -04:00
Takase f5df5d6626 Revert "fix: avoid following symlinks in `common.rm`"
This reverts commit e3e8badf99.
2024-07-22 12:10:35 +08:00
Guldoman e3e8badf99 fix: avoid following symlinks in `common.rm` 2024-07-22 11:06:51 +08:00
Takase 27d95f63cb
renderer: rewrite glyph cache (#1845)
* renderer: rewrite glyph cache

This commit splits the current GlyphSet-based system into 2 caches,
CharMap and GlyphMap, which maps codepoints -> glyph IDs and glyph IDs -> glyphs respectively.
Each GlyphMap contains a number of GlyphAtlas mapped by their width,
and each GlyphAtlas has a list of surfaces with the same width.
Surfaces within the GlyphAtlas acts like a bump allocator, but is flexible
enough to allow older GlyphAtlas surfaces to be recycled.

GlyphMetric now contains atlas_idx and surface_idx, which points to the correct surface.
Since GlyphAtlas supports rudimentary packing & allocation, we no longer render whole
GlyphSets and this speeds up rendering in most cases.

Tab width is no longer set with the hacky "modify the GlyphMetric" hack.

* renderer: set natlas to 0 after freeing

* renderer: fix printf warning

* renderer: fix memory leak

* renderer: better whitespace rendering

* renderer: fix ubsan warning when casting ints

* renderer: fix tab handling

There's a bug with inconsistent tab widths caused by fontgroups.

* renderer: fix glyphs being loaded over and over

* renderer: add glyphmap size

* renderer: store per-surface offset_y and use it to find best-fitting surface

* renderer: fix MSVC compiler error

* renderer: remove return value from ren_font_glyph

* renderer: refactor xadvance calculation

* renderer: fix double free SDL_RWops if FT_Set_Pixel_Size fail

* renderer: always try .notdef before U+25A1

* renderer: disable ren_font_dump yet again

Accidentally commited this change.

* renderer: remove unused imports

* renderer: fix double free with FT_Open_Face

* renderer: return SDL_Surface in font_find_glyph_surface

* renderer: bring back metric flags for future extension

* renderer: refactor xadvance calculation into macro

* renderer: fix comment

* renderer: store GlyphMetric directly in the surface

* renderer: remove duplicated comment

* renderer: rename font_find_glyph_surface to font_allocate_glyph_surface

* renderer: refactor glyphmetric retrieval into an inline function

* renderer: do not render glyphs with bitmap set to null

This is a weird edge case, but at least it shouldn't crash

* renderer: refactor face metric code into its own function

* renderer: actually check if glyph fits in surface

* renderer: rudimentary support for non-scalable faces

At least it won't render nothing on the screen

* renderer: check for font_surface instead of metric directly

This is safe and shorter

* renderer: fix indentation

* renderer: rename GLYPH_PER_ATLAS to GLYPHS_PER_ATLAS

* renderer: rename all GLYPH_PER_ATLAS correctly

* renderer: make utf8_to_codepoint slightly more durable

* renderer: fix compiler unsigned cast warning
2024-07-13 02:39:49 +02:00
kramo 5a427a89b5 macos: Add proper platform-specific icon 2024-07-12 14:56:16 +08:00
takase1121 77d443c53d api/system: check if a window is created when firing DND events 2024-07-04 22:25:36 +08:00
takase1121 3d0344393c src/renwindow: correctly free texture and renderer 2024-07-04 21:57:33 +08:00
aia29 96579d9a7f add cuda 2024-07-04 13:09:00 +08:00
Adam 3bb27082ae
(fix): passed missing core.window to set_window_mode call (#1836)
* (fix): passed missing core.window to set_window_mode call

* Propogated fix to calls made from TitleView.
2024-06-30 07:26:01 +08:00
Takase e981fe46b5
Release v2.1.5 (#1840)
* chore: changelogs for v2.1.5

* chore: update versions
2024-06-30 07:21:35 +08:00
takase1121 482e8f3aed ci/release: adapt release note generation to the new script 2024-06-30 07:19:27 +08:00
takase1121 0129e9330f resources,scripts: use gh cli to fetch the correct release tags 2024-06-30 07:19:27 +08:00
Guldoman 9dd4b81b39 refactor(mac): adapt `LITE_USE_SDL_RENDERER` scaling to new windowing system 2024-06-25 13:42:17 +08:00