Compare commits

...
10 Commits
Author SHA1 Message Date
vhaudiquet ad7256b4fb debian: initial packaging work 2026-09-16 21:43:25 +02:00
takase1121 0af4dae0e2 chore: bump versions [skip ci] 2025-06-09 06:45:20 +08:00
takase1121 b5ee18c966 chore: update changelogs [skip ci] 2025-06-09 06:45:20 +08:00
takase1121 85c2c3fdc8 main: keep PLATFORM consistent between SDL2 and SDL3 2025-06-05 11:03:45 +08:00
takase1121 b5317c5318 core: make project_dir detection more robust
On macOS, listing / can silently fail due to SIP. We try to default to ~ if there's no choice.
2025-06-05 11:03:45 +08:00
takase1121 7a2214ae0e main: fix not receiving text input 2025-05-19 08:52:43 +08:00
takase1121 94b2b28377 subprojects: fix freetype2 bzip2 dep issue 2025-05-19 08:52:41 +08:00
takase1121 409d2cd00b main: set the correct SDL_HINT_IME_IMPLEMENTED_UI 2025-05-19 08:47:47 +08:00
takase1121 fceb773d96 build.sh: update SDL3 version 2025-05-19 08:47:47 +08:00
takase1121 ceea55e97d appstream: fix screenshot link 2025-05-18 23:22:57 +08:00
15 changed files with 205 additions and 35 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ on:
inputs: inputs:
version: version:
description: Release Version description: Release Version
default: v2.1.7 default: v2.1.8
required: true required: true
jobs: jobs:
+87
View File
@@ -1,5 +1,92 @@
# Changes Log # Changes Log
## [2.1.8] - 2025-06-09
This release will be the first to use [SDL3](https://wiki.libsdl.org/SDL3/FrontPage),
which should fix a bunch of issues (and might cause others).
This release also uses LTO to achieve some performance gain.
### Features
* Port to SDL3
([#1756](https://github.com/lite-xl/lite-xl/pull/1756))
* Add SDL App Metadata
([#2068](https://github.com/lite-xl/lite-xl/pull/2068))
* Warn against malformed patterns and disable them
([#2029](https://github.com/lite-xl/lite-xl/pull/2029))
* Update Windows setup files
([#1988](https://github.com/lite-xl/lite-xl/pull/1988))
* build.sh: add LTO support
([#2049](https://github.com/lite-xl/lite-xl/pull/2049))
* Highlight .rockspec files
([#2080](https://github.com/lite-xl/lite-xl/pull/2080))
* Make font loading function return proper error messages
([#1919](https://github.com/lite-xl/lite-xl/pull/1919)
* Defer bitmap rendering when possible
([#1856](https://github.com/lite-xl/lite-xl/pull/1856))
### Fixes
* Update CSS plugin to support more units
([#2010](https://github.com/lite-xl/lite-xl/pull/2010))
* Add __tostring method to all objects
([#1534](https://github.com/lite-xl/lite-xl/pull/1534))
* Use current char to determine col in DocView:get_x_offset_col
([#1946](https://github.com/lite-xl/lite-xl/pull/1946))
* Allow / and \ as PATHSEP on Windows when fuzzy matching files
([#1992](https://github.com/lite-xl/lite-xl/pull/1992))
* Use correct charmap and glyphmap sizes
([#1999](https://github.com/lite-xl/lite-xl/pull/1999))
* Add digit separators for C++ syntax highlighting
([#2026](https://github.com/lite-xl/lite-xl/pull/2026))
* Prevent enumerating the directory tree in system.list_dir
([#2059](https://github.com/lite-xl/lite-xl/pull/2059))
* Fixed dirmonitor excessively high CPU usage on Linux
([#2044](https://github.com/lite-xl/lite-xl/pull/2044))
* Use correct charmap and glyphmap sizes
([#1999](https://github.com/lite-xl/lite-xl/pull/1999))
* Make project folder detection more robust against unexpected errors
([b5317c5](https://github.com/lite-xl/lite-xl/commit/b5317c531837a5d4031dfdae5a52ad969735a22a))
### Other changes
* Replace memory functions with SDL equivalent
([#2067](https://github.com/lite-xl/lite-xl/pull/2067))
* Add postrelease workflow to update docs and release winget packages
([#1983](https://github.com/lite-xl/lite-xl/pull/1983))
* Move dependency resolving into source file
([#1937](https://github.com/lite-xl/lite-xl/pull/1937))
* Improve WASM support
([#1779](https://github.com/lite-xl/lite-xl/pull/1779))
* Update CI Script to fix MSYS2
([#2028](https://github.com/lite-xl/lite-xl/pull/2028))
* Fix missing includes
([#2017](https://github.com/lite-xl/lite-xl/pull/2017))
* Add manifest file to allow installing Lite XL with lpm
([#2043](https://github.com/lite-xl/lite-xl/pull/2043))
## [2.1.7] - 2024-12-05 ## [2.1.7] - 2024-12-05
This release fixes a bug related to scaling on macOS, This release fixes a bug related to scaling on macOS,
+35 -20
View File
@@ -56,12 +56,13 @@ end
function core.set_project_dir(new_dir, change_project_fn) function core.set_project_dir(new_dir, change_project_fn)
local chdir_ok = pcall(system.chdir, new_dir) local chdir_ok = pcall(system.chdir, new_dir)
if chdir_ok then local list_dir_ok = system.list_dir(new_dir)
if chdir_ok and list_dir_ok then
if change_project_fn then change_project_fn() end if change_project_fn then change_project_fn() end
core.project_dir = common.normalize_volume(new_dir) core.project_dir = common.normalize_volume(new_dir)
core.project_directories = {} core.project_directories = {}
end end
return chdir_ok return chdir_ok and list_dir_ok ~= nil
end end
@@ -762,27 +763,41 @@ function core.init()
-- Load user module, plugins and project module -- Load user module, plugins and project module
local got_user_error, got_project_error = not core.load_user_directory() local got_user_error, got_project_error = not core.load_user_directory()
local project_dir_abs = system.absolute_path(project_dir) -- try to load a bunch of directories
-- We prevent set_project_dir below to effectively add and scan the directory because the local try_project_dirs = {project_dir}
-- project module and its ignore files is not yet loaded. if project_dir ~= "." then table.insert(try_project_dirs, ".") end
local set_project_ok = project_dir_abs and core.set_project_dir(project_dir_abs) -- if cwd is not accessible for some reason (SIP on apple when launched from Finder), try home folder
if set_project_ok then if PLATFORM == "Mac OS X" then table.insert(try_project_dirs, string.format("/Users/%s", os.getenv("USER"))) end
if PLATFORM == "Windows" then table.insert(try_project_dirs, string.format("%s\\%s", os.getenv("HOMEDRIVE"), os.getenv("HOMEPATH"))) end
-- FIXME: better POSIX detection
if os.getenv("USER") then table.insert(try_project_dirs, string.format("/home/%s", os.getenv("USER"))) end
-- discouraged since it can be blocked in sandboxed runtimes (SIP)
table.insert(try_project_dirs, os.getenv("HOMEDRIVE") and (os.getenv("HOMEDRIVE").."\\") or "/")
-- discouraged since it could be unreadable or embedded in the exe
table.insert(try_project_dirs, DATADIR)
local project_dir_abs
local function load_project_module()
got_project_error = not core.load_project_module() got_project_error = not core.load_project_module()
if project_dir_explicit then end
update_recents_project("add", project_dir_abs) for _, p in ipairs(try_project_dirs) do
end local abs_dir = system.absolute_path(p)
else if abs_dir and core.set_project_dir(abs_dir, load_project_module) then
if not project_dir_explicit then if p == project_dir and project_dir_explicit then
update_recents_project("remove", project_dir) update_recents_project("add", abs_dir)
end end
project_dir_abs = system.absolute_path(".") project_dir_abs = abs_dir
if not core.set_project_dir(project_dir_abs, function() break
got_project_error = not core.load_project_module() else
end) then if p == project_dir and not project_dir_explicit then
system.show_fatal_error("Lite XL internal error", "cannot set project directory to cwd") update_recents_project("remove", p)
os.exit(1) end
end end
end end
if not project_dir_abs then
system.show_fatal_error("Error", "Please restart Lite XL with a readable project directory.")
os.exit(1)
end
-- Load core plugins after user ones to let the user override them -- Load core plugins after user ones to let the user override them
local plugins_success, plugins_refuse_list = core.load_plugins() local plugins_success, plugins_refuse_list = core.load_plugins()
+6
View File
@@ -0,0 +1,6 @@
debian/files
debian/.debhelper/
debian/*.log
debian/lite-xl/
debian/debhelper-build-stamp
debian/*.substvars
+11
View File
@@ -0,0 +1,11 @@
lite-xl (2.1.8-2) stonking; urgency=medium
* Drop the ":native" qualifiers on the meson/ninja-build Build-Depends.
-- Valentin Haudiquet <valentin.haudiquet@canonical.com> Wed, 16 Sep 2026 16:40:00 +0200
lite-xl (2.1.8-1) stonking; urgency=medium
* Initial release.
-- Valentin Haudiquet <valentin.haudiquet@canonical.com> Wed, 16 Sep 2026 13:56:53 +0200
+22
View File
@@ -0,0 +1,22 @@
Source: lite-xl
Section: utils
Priority: optional
Maintainer: Valentin Haudiquet <valentin.haudiquet@canonical.com>
Rules-Requires-Root: no
Standards-Version: 4.7.2
Build-Depends: debhelper-compat (= 13),
meson,
ninja-build,
libsdl3-dev,
libfreetype-dev,
libpcre2-dev,
liblua5.4-dev
Homepage: https://lite-xl.com/
Package: lite-xl
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: A lightweight text editor written in Lua
A lightweight, fast and extensible text editor written in Lua, designed to be
highly customizable and to have a small footprint. It is written in C and Lua
and uses the SDL library for cross-platform rendering.
+11
View File
@@ -0,0 +1,11 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: lite-xl
Source: https://lite-xl.com/
Files: *
Copyright: 2026 Valentin Haudiquet <valentin.haudiquet@canonical.com>
License: MIT
The package is distributed under the terms of the MIT license. The full license text is available at <https://spdx.org/licenses/MIT.html>.
License: MIT
The package is distributed under the terms of the MIT license. The full license text is available at <https://spdx.org/licenses/MIT.html>.
Vendored Executable
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/make -f
%:
dh $@ --buildsystem=meson
# Use the system Lua from the declared Build-Depends (liblua5.4-dev) instead of
# the bundled lua subproject wrap, so the build works offline and exercises the
# declared dependency (including for cross-builds). freetype2 and pcre2 are also
# resolved from their -dev packages via pkg-config, so no wraps are fetched.
# Note: do NOT pass -Dwrap_mode here; some build drivers (e.g. pkh) already pass
# --wrap-mode on the meson command line, and Meson errors out if the same option
# is given in both forms.
override_dh_auto_configure:
dh_auto_configure -- -Duse_system_lua=true
+1
View File
@@ -0,0 +1 @@
3.0 (quilt)
+1
View File
@@ -0,0 +1 @@
single-debian-patch
+1 -1
View File
@@ -1,6 +1,6 @@
project('lite-xl', project('lite-xl',
['c'], ['c'],
version : '2.1.7', version : '2.1.8',
license : 'MIT', license : 'MIT',
meson_version : '>= 0.56', meson_version : '>= 0.56',
default_options : [ default_options : [
@@ -18,7 +18,7 @@
<screenshots> <screenshots>
<screenshot type="default"> <screenshot type="default">
<caption>The editor window</caption> <caption>The editor window</caption>
<image>https://lite-xl.com/assets/img/editor.png</image> <image>https://lite-xl.com/assets/screenshots/theme-default.png</image>
</screenshot> </screenshot>
</screenshots> </screenshots>
@@ -29,6 +29,6 @@
</provides> </provides>
<releases> <releases>
<release version="2.1.7" date="2024-12-05" /> <release version="2.1.8" date="2025-06-09" />
</releases> </releases>
</component> </component>
+1 -1
View File
@@ -45,7 +45,7 @@ main() {
local build_type="debug" local build_type="debug"
local prefix=/ local prefix=/
local build_type="release" local build_type="release"
local sdl3_version="${SDL3_VERSION:-3.2.8}" local sdl3_version="${SDL3_VERSION:-3.2.14}"
local pkg_config_path local pkg_config_path
local cmake_build_type local cmake_build_type
local force_fallback local force_fallback
+8 -3
View File
@@ -3,6 +3,7 @@
#include <SDL3/SDL.h> #include <SDL3/SDL.h>
#include <SDL3/SDL_main.h> #include <SDL3/SDL_main.h>
#include "api/api.h" #include "api/api.h"
#include "renwindow.h"
#include "rencache.h" #include "rencache.h"
#include "renderer.h" #include "renderer.h"
@@ -134,7 +135,7 @@ int main(int argc, char **argv) {
SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1"); SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");
SDL_SetHint(SDL_HINT_IME_IMPLEMENTED_UI, "1"); SDL_SetHint(SDL_HINT_IME_IMPLEMENTED_UI, "1");
SDL_SetHint(SDL_HINT_RENDER_DRIVER, "software"); SDL_SetHint(SDL_HINT_RENDER_DRIVER, "software");
SDL_SetHint(SDL_HINT_IME_IMPLEMENTED_UI, "composition");
/* This hint tells SDL to respect borderless window as a normal window. /* This hint tells SDL to respect borderless window as a normal window.
** For example, the window will sit right on top of the taskbar instead ** For example, the window will sit right on top of the taskbar instead
** of obscuring it. */ ** of obscuring it. */
@@ -153,7 +154,7 @@ int main(int argc, char **argv) {
exit(1); exit(1);
} }
init_window_icon(); init_window_icon();
if (ren_init(window) != 0) { if (ren_init(window) != 0) {
fprintf(stderr, "Error initializing renderer: %s\n", SDL_GetError()); fprintf(stderr, "Error initializing renderer: %s\n", SDL_GetError());
exit(1); exit(1);
@@ -173,7 +174,9 @@ init_lua:
} }
lua_setglobal(L, "ARGS"); lua_setglobal(L, "ARGS");
lua_pushstring(L, SDL_GetPlatform()); // hack to keep backwards compatibility with other PLATFORM enums
const char *platform = SDL_GetPlatform();
lua_pushstring(L, SDL_strcmp(platform, "macOS") == 0 ? "Mac OS X" : platform);
lua_setglobal(L, "PLATFORM"); lua_setglobal(L, "PLATFORM");
lua_pushstring(L, LITE_ARCH_TUPLE); lua_pushstring(L, LITE_ARCH_TUPLE);
@@ -197,6 +200,8 @@ init_lua:
#endif #endif
SDL_SetEventEnabled(SDL_EVENT_TEXT_INPUT, true); SDL_SetEventEnabled(SDL_EVENT_TEXT_INPUT, true);
SDL_SetEventEnabled(SDL_EVENT_TEXT_EDITING, true); SDL_SetEventEnabled(SDL_EVENT_TEXT_EDITING, true);
// ugly hack to get SDL3 to give us text input... in certain conditions
SDL_StartTextInput(window_renderer.window);
const char *init_lite_code = \ const char *init_lite_code = \
"local core\n" "local core\n"
+5 -7
View File
@@ -1,10 +1,8 @@
[wrap-file] [wrap-git]
directory = freetype-2.13.2 directory = freetype-master
source_url = https://download.savannah.gnu.org/releases/freetype/freetype-2.13.2.tar.xz url = https://gitlab.freedesktop.org/freetype/freetype.git
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/freetype2_2.13.2-1/freetype-2.13.2.tar.xz revision = master
source_filename = freetype-2.13.2.tar.xz depth = 1
source_hash = 12991c4e55c506dd7f9b765933e62fd2be2e06d421505d7950a132e4f1bb484d
wrapdb_version = 2.13.2-1
[provide] [provide]
freetype2 = freetype_dep freetype2 = freetype_dep