Paths fixes, Open in System changes and a few others done
This commit is contained in:
parent
ad4c221dd8
commit
df8eaa64d1
|
@ -12,8 +12,8 @@ LiteXL_OBJ := \
|
|||
src/api/dirmonitor/os4.o src/platform/codesets.o
|
||||
|
||||
outfile := lite-xl
|
||||
compiler := gcc-11
|
||||
cxxcompiler := g++-11
|
||||
compiler := gcc
|
||||
cxxcompiler := g++
|
||||
|
||||
INCPATH := -Isrc -I/sdk/local/newlib/include/SDL2 \
|
||||
-I/sdk/local/common/include/lua54 -I/sdk/local/common/include/freetype2
|
||||
|
@ -23,7 +23,7 @@ DFLAGS += -D__USE_INLINE__ -DLITE_XL_DATA_USE_EXEDIR
|
|||
CFLAGS += -Werror -Wwrite-strings -O3 -std=gnu11 -fno-strict-aliasing
|
||||
|
||||
LFLAGS += -mcrt=newlib \
|
||||
-lpcre2 -lSDL2 -llua54 -lfreetype -lpng -lz -lpthread -athread=native
|
||||
-lpcre2-8 -lSDL2 -llua54 -lfreetype -lpng -lz -lpthread -athread=native
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
CFLAGS += -g -gstabs
|
||||
|
|
|
@ -223,6 +223,23 @@ https://git.walkero.gr/walkero/lite-xl/issues
|
|||
|
||||
# Changelog
|
||||
|
||||
## [2.1.2r1] - future
|
||||
### Updated
|
||||
- Updated the code to the upstream 2.1.3 release
|
||||
- Compiled with SDL 2.30.x that supports writing in ISO encodings, other
|
||||
than English. Now the editor should be able to support any language
|
||||
and in conjuction with the codesets plugin be able to make text
|
||||
encodings conversions (AmigsOS 4 version only)
|
||||
|
||||
### Changed
|
||||
- Changed the way the "Open in system" option executes the WBRun command
|
||||
in AmigaOS 4, with a more secure way
|
||||
- Did a lot of code cleanup in sync with the upstream, and parts that
|
||||
were left over
|
||||
|
||||
### Fixed
|
||||
- Fixed opening partition and assign paths
|
||||
|
||||
## [2.1.2r1] - 2023-12-19
|
||||
### Added
|
||||
- Added the new experimental codesets plugin (AmigaOS4 version only).
|
||||
|
|
|
@ -177,7 +177,13 @@ end
|
|||
-- compute a file's info entry completed with "filename" to be used
|
||||
-- in project scan or falsy if it shouldn't appear in the list.
|
||||
local function get_project_file_info(root, file, ignore_compiled)
|
||||
local info = system.get_file_info(root .. PATHSEP .. file)
|
||||
local info
|
||||
if (PLATFORM == "AmigaOS 4" or PLATFORM == "MorphOS") and (string.sub(root, -1) == ":") then
|
||||
info = system.get_file_info(root .. file)
|
||||
else
|
||||
info = system.get_file_info(root .. PATHSEP .. file)
|
||||
end
|
||||
|
||||
-- info can be not nil but info.type may be nil if is neither a file neither
|
||||
-- a directory, for example for /dev/* entries on linux.
|
||||
if info and info.type then
|
||||
|
@ -200,7 +206,13 @@ function dirwatch.get_directory_files(dir, root, path, entries_count, recurse_pr
|
|||
local t0 = system.get_time()
|
||||
local ignore_compiled = compile_ignore_files()
|
||||
|
||||
local all = system.list_dir(root .. PATHSEP .. path)
|
||||
local all
|
||||
if (PLATFORM == "AmigaOS 4" or PLATFORM == "MorphOS") and (string.sub(root, -1) == ":") then
|
||||
all = system.list_dir(root .. path)
|
||||
else
|
||||
all = system.list_dir(root .. PATHSEP .. path)
|
||||
end
|
||||
|
||||
if not all then return nil end
|
||||
local entries = { }
|
||||
for _, file in ipairs(all) do
|
||||
|
|
|
@ -250,6 +250,7 @@ function core.add_project_directory(path)
|
|||
-- will be simply the name of the directory, without its path.
|
||||
-- The field item.topdir will identify it as a top level directory.
|
||||
path = common.normalize_volume(path)
|
||||
|
||||
local topdir = {
|
||||
name = path,
|
||||
item = {filename = common.basename(path), type = "dir", topdir = true},
|
||||
|
|
|
@ -5,13 +5,14 @@ MOD_VERSION = "3"
|
|||
SCALE = tonumber(os.getenv("LITE_SCALE") or os.getenv("GDK_SCALE") or os.getenv("QT_SCALE_FACTOR")) or 1
|
||||
PATHSEP = package.config:sub(1, 1)
|
||||
|
||||
EXEDIR = EXEFILE:match("^(.+)[/\\][^/\\]+$")
|
||||
EXEDIR = EXEFILE:match("^(.+)[:/\\][^/\\]+$")
|
||||
if MACOS_RESOURCES then
|
||||
DATADIR = MACOS_RESOURCES
|
||||
else
|
||||
local prefix = os.getenv('LITE_PREFIX') or EXEDIR:match("^(.+)[/\\]bin$")
|
||||
local prefix = os.getenv('LITE_PREFIX') or EXEDIR:match("^(.+)[:/\\]bin$")
|
||||
DATADIR = prefix and (prefix .. PATHSEP .. 'share' .. PATHSEP .. 'lite-xl') or (EXEDIR .. PATHSEP .. 'data')
|
||||
end
|
||||
|
||||
USERDIR = (system.get_file_info(EXEDIR .. PATHSEP .. 'user') and (EXEDIR .. PATHSEP .. 'user'))
|
||||
or os.getenv("LITE_USERDIR")
|
||||
or ((os.getenv("XDG_CONFIG_HOME") and os.getenv("XDG_CONFIG_HOME") .. PATHSEP .. "lite-xl"))
|
||||
|
|
|
@ -789,10 +789,12 @@ command.add(
|
|||
["treeview:open-in-system"] = function(item)
|
||||
if PLATFORM == "Windows" then
|
||||
system.exec(string.format("start \"\" %q", item.abs_filename))
|
||||
elseif string.find(PLATFORM, "Mac") then
|
||||
elseif string.find(PLATFORM, "Mac") or PLATFORM == "MorphOS" then
|
||||
system.exec(string.format("open %q", item.abs_filename))
|
||||
elseif PLATFORM == "Linux" or string.find(PLATFORM, "BSD") then
|
||||
system.exec(string.format("xdg-open %q", item.abs_filename))
|
||||
elseif PLATFORM == "AmigaOS 4" then
|
||||
system.exec(string.format("WBRUN %q SHOW=all VIEWBY=name", item.abs_filename))
|
||||
end
|
||||
end
|
||||
})
|
||||
|
|
|
@ -876,6 +876,13 @@ static int f_exec(lua_State *L) {
|
|||
#if _WIN32
|
||||
sprintf(buf, "cmd /c \"%s\"", cmd);
|
||||
WinExec(buf, SW_HIDE);
|
||||
#elif defined(__amigaos4__)
|
||||
SystemTags( cmd,
|
||||
SYS_Input, ZERO,
|
||||
SYS_Output, NULL,
|
||||
SYS_Error, ZERO,
|
||||
SYS_Asynch, TRUE,
|
||||
TAG_DONE);
|
||||
#else
|
||||
sprintf(buf, "%s &", cmd);
|
||||
int res = system(buf);
|
||||
|
|
|
@ -273,7 +273,7 @@ init_lua:
|
|||
" error_dir=USERDIR\n"
|
||||
" pcall(core.on_error, err)\n"
|
||||
" else\n"
|
||||
" error_dir=system.absolute_path('.')\n"
|
||||
" error_dir=system.absolute_path(error_dir)\n"
|
||||
" local fp = io.open('error.txt', 'wb')\n"
|
||||
" fp:write('Error: ' .. tostring(err) .. '\\n')\n"
|
||||
" fp:write(debug.traceback(nil, 4)..'\\n')\n"
|
||||
|
|
Loading…
Reference in New Issue