Prepare 2.1.1r1 release

This commit is contained in:
George Sokianos 2023-01-29 12:58:56 +00:00
parent 62adafb59d
commit e4f3f1b744
9 changed files with 46 additions and 45 deletions

View File

@ -1,7 +1,7 @@
# #
# Project: Lite XL # Project: Lite XL
# #
# Created on: 26-12-2021 # Created on: 26-12-2021
# #
LiteXL_OBJ := \ LiteXL_OBJ := \
@ -12,7 +12,7 @@ LiteXL_OBJ := \
src/api/dirmonitor/mos.o src/api/dirmonitor/mos.o
outfile := lite outfile := lite-xl
compiler := gcc compiler := gcc
cxxcompiler := g++ cxxcompiler := g++
@ -32,9 +32,7 @@ clean:
LiteXL: $(LiteXL_OBJ) LiteXL: $(LiteXL_OBJ)
@echo "Linking LiteXL" @echo "Linking LiteXL"
@$(cxxcompiler) -o $(outfile) $(LiteXL_OBJ) $(LFLAGS) @$(cxxcompiler) -o $(outfile) $(LiteXL_OBJ) $(LFLAGS)
.c.o: .c.o:
@echo "Compiling $<" @echo "Compiling $<"
@ -65,8 +63,6 @@ src/api/utf8.o: src/api/utf8.c
src/api/dirmonitor/mos.o: src/api/dirmonitor/mos.c src/api/dirmonitor/mos.o: src/api/dirmonitor/mos.c
release: clean LiteXL release: clean LiteXL
@echo "Creating release files..." @echo "Creating release files..."
@mkdir -p release/LiteXL2 @mkdir -p release/LiteXL2
@ -74,8 +70,8 @@ release: clean LiteXL
@mv release/LiteXL2/LiteXL2.info release/ @mv release/LiteXL2/LiteXL2.info release/
@cp data release/LiteXL2/ -r @cp data release/LiteXL2/ -r
@cp changelog.md release/LiteXL2/ @cp changelog.md release/LiteXL2/
@cp lite release/LiteXL2/ @cp $(outfile) release/LiteXL2/
@strip release/LiteXL2/lite @strip release/LiteXL2/$(outfile)
@cp README.md release/LiteXL2/ @cp README.md release/LiteXL2/
@cp README_Amiga.md release/LiteXL2/ @cp README_Amiga.md release/LiteXL2/
@cp LICENSE release/LiteXL2/ @cp LICENSE release/LiteXL2/
@ -83,4 +79,3 @@ release: clean LiteXL
@lha -aeqr3 a LiteXL2_MOS.lha release/ @lha -aeqr3 a LiteXL2_MOS.lha release/
@echo "Clean release files..." @echo "Clean release files..."
@delete release ALL QUIET FORCE @delete release ALL QUIET FORCE

View File

@ -11,7 +11,7 @@ LiteXL_OBJ := \
src/api/utf8.o src/platform/amigaos4.o \ src/api/utf8.o src/platform/amigaos4.o \
src/api/dirmonitor/os4.o src/api/dirmonitor/os4.o
outfile := lite outfile := lite-xl
compiler := gcc-11 compiler := gcc-11
cxxcompiler := g++-11 cxxcompiler := g++-11
@ -80,15 +80,17 @@ src/api/utf8.o: src/api/utf8.c
src/api/dirmonitor/os4.o: src/api/dirmonitor/os4.c src/api/dirmonitor/os4.o: src/api/dirmonitor/os4.c
release: src/api/process.o: src/api/process.c
release: clean LiteXL
@echo "Creating release files..." @echo "Creating release files..."
@mkdir -p release/LiteXL2 @mkdir -p release/LiteXL2
@cp -r release_files/* release/LiteXL2/ @cp -r release_files/* release/LiteXL2/
@mv release/LiteXL2/LiteXL2.info release/ @mv release/LiteXL2/LiteXL2.info release/
@cp -r data release/LiteXL2/ @cp -r data release/LiteXL2/
@cp changelog.md release/LiteXL2/ @cp changelog.md release/LiteXL2/
@cp lite release/LiteXL2/ @cp $(outfile) release/LiteXL2/
@strip release/LiteXL2/lite @strip release/LiteXL2/$(outfile)
@cp README.md release/LiteXL2/ @cp README.md release/LiteXL2/
@cp README_Amiga.md release/LiteXL2/ @cp README_Amiga.md release/LiteXL2/
@cp LICENSE release/LiteXL2/ @cp LICENSE release/LiteXL2/

View File

@ -215,13 +215,13 @@ https://git.walkero.gr/walkero/lite-xl/issues
# Changelog # Changelog
## [2.1.1r1] - 2022-01-08 ## [2.1.1r1] - 2022-01-29
### Changed ### Changed
- Synced the code with the latest upstream master branch, which means that - Binary name changed to lite-xl
this version is based on the latest available source
- Compiled with SDL 2.26
- Updated the colour themes and the plugins that are included in the release - Updated the colour themes and the plugins that are included in the release
- Compiled with gcc 11 on AmigaOS 4 - Compiled with latest SDL 2.26
- Compiled with gcc 11
- Synced the code with the upstream master branch at 8th January 2023
### Fixed ### Fixed
- Set the default locale on AmigaOS 4, so as to fix some issues with decimal - Set the default locale on AmigaOS 4, so as to fix some issues with decimal
@ -284,7 +284,6 @@ https://git.walkero.gr/walkero/lite-xl/issues
### Fixed ### Fixed
- Fixed the usage of NumPad (reported by root) - Fixed the usage of NumPad (reported by root)
## [2.0.3r1] - 2022-03-30 ## [2.0.3r1] - 2022-03-30
### Changed ### Changed
- Applied all the necessary changes to make it run under AmigaOS 4.1 FE - Applied all the necessary changes to make it run under AmigaOS 4.1 FE

View File

@ -6,4 +6,5 @@ int get_changes_dirmonitor(struct dirmonitor_internal* monitor, char* buffer, si
int translate_changes_dirmonitor(struct dirmonitor_internal* monitor, char* buffer, int size, int (*callback)(int, const char*, void*), void* data) { return -1; } int translate_changes_dirmonitor(struct dirmonitor_internal* monitor, char* buffer, int size, int (*callback)(int, const char*, void*), void* data) { return -1; }
int add_dirmonitor(struct dirmonitor_internal* monitor, const char* path) { return -1; } int add_dirmonitor(struct dirmonitor_internal* monitor, const char* path) { return -1; }
void remove_dirmonitor(struct dirmonitor_internal* monitor, int fd) { } void remove_dirmonitor(struct dirmonitor_internal* monitor, int fd) { }
int get_mode_dirmonitor() { return 1; }

View File

@ -10,7 +10,7 @@
#if _WIN32 #if _WIN32
// https://stackoverflow.com/questions/60645/overlapped-i-o-on-anonymous-pipe // https://stackoverflow.com/questions/60645/overlapped-i-o-on-anonymous-pipe
// https://docs.microsoft.com/en-us/windows/win32/procthread/creating-a-child-process-with-redirected-input-and-output // https://docs.microsoft.com/en-us/windows/win32/procthread/creating-a-child-process-with-redirected-input-and-output
#include <windows.h> #include <windows.h>
#else #else
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>
@ -19,6 +19,9 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/wait.h> #include <sys/wait.h>
#endif #endif
#if defined(__amigaos4__)
#include "platform/amigaos4.h"
#endif
#define READ_BUF_SIZE 2048 #define READ_BUF_SIZE 2048
@ -116,7 +119,7 @@ static bool signal_process(process_t* proc, signal_e sig) {
case SIGNAL_INTERRUPT: kill(-proc->pid, SIGINT); break; case SIGNAL_INTERRUPT: kill(-proc->pid, SIGINT); break;
} }
#endif #endif
if (terminate) if (terminate)
poll_process(proc, WAIT_NONE); poll_process(proc, WAIT_NONE);
return true; return true;
} }
@ -152,7 +155,7 @@ static int process_start(lua_State* L) {
if (arg_len > 1) { if (arg_len > 1) {
lua_getfield(L, 2, "env"); lua_getfield(L, 2, "env");
if (!lua_isnil(L, -1)) { if (!lua_isnil(L, -1)) {
lua_pushnil(L); lua_pushnil(L);
while (lua_next(L, -2) != 0) { while (lua_next(L, -2) != 0) {
const char* key = luaL_checklstring(L, -2, &key_len); const char* key = luaL_checklstring(L, -2, &key_len);
const char* val = luaL_checklstring(L, -1, &val_len); const char* val = luaL_checklstring(L, -1, &val_len);
@ -179,7 +182,7 @@ static int process_start(lua_State* L) {
} }
} }
} }
process_t* self = lua_newuserdata(L, sizeof(process_t)); process_t* self = lua_newuserdata(L, sizeof(process_t));
memset(self, 0, sizeof(process_t)); memset(self, 0, sizeof(process_t));
luaL_setmetatable(L, API_TYPE_PROCESS); luaL_setmetatable(L, API_TYPE_PROCESS);
@ -196,9 +199,9 @@ static int process_start(lua_State* L) {
} }
self->child_pipes[i][i == STDIN_FD ? 1 : 0] = INVALID_HANDLE_VALUE; self->child_pipes[i][i == STDIN_FD ? 1 : 0] = INVALID_HANDLE_VALUE;
break; break;
case REDIRECT_DISCARD: case REDIRECT_DISCARD:
self->child_pipes[i][0] = INVALID_HANDLE_VALUE; self->child_pipes[i][0] = INVALID_HANDLE_VALUE;
self->child_pipes[i][1] = INVALID_HANDLE_VALUE; self->child_pipes[i][1] = INVALID_HANDLE_VALUE;
break; break;
default: { default: {
if (new_fds[i] == i) { if (new_fds[i] == i) {
@ -289,7 +292,7 @@ static int process_start(lua_State* L) {
goto cleanup; goto cleanup;
} }
self->pid = (long)self->process_information.dwProcessId; self->pid = (long)self->process_information.dwProcessId;
if (detach) if (detach)
CloseHandle(self->process_information.hProcess); CloseHandle(self->process_information.hProcess);
CloseHandle(self->process_information.hThread); CloseHandle(self->process_information.hThread);
#else #else
@ -426,7 +429,7 @@ static int f_close_stream(lua_State* L) {
static int process_strerror(lua_State* L) { static int process_strerror(lua_State* L) {
#if _WIN32 #if _WIN32
return 1; return 1;
#endif #endif
int error_code = luaL_checknumber(L, 1); int error_code = luaL_checknumber(L, 1);
if (error_code < 0) if (error_code < 0)
lua_pushstring(L, strerror(error_code)); lua_pushstring(L, strerror(error_code));
@ -484,13 +487,13 @@ static int self_signal(lua_State* L, signal_e sig) {
static int f_terminate(lua_State* L) { return self_signal(L, SIGNAL_TERM); } static int f_terminate(lua_State* L) { return self_signal(L, SIGNAL_TERM); }
static int f_kill(lua_State* L) { return self_signal(L, SIGNAL_KILL); } static int f_kill(lua_State* L) { return self_signal(L, SIGNAL_KILL); }
static int f_interrupt(lua_State* L) { return self_signal(L, SIGNAL_INTERRUPT); } static int f_interrupt(lua_State* L) { return self_signal(L, SIGNAL_INTERRUPT); }
static int f_gc(lua_State* L) { static int f_gc(lua_State* L) {
process_t* self = (process_t*) luaL_checkudata(L, 1, API_TYPE_PROCESS); process_t* self = (process_t*) luaL_checkudata(L, 1, API_TYPE_PROCESS);
if (!self->detached) if (!self->detached)
signal_process(self, SIGNAL_TERM); signal_process(self, SIGNAL_TERM);
close_fd(&self->child_pipes[STDIN_FD ][1]); close_fd(&self->child_pipes[STDIN_FD ][1]);
close_fd(&self->child_pipes[STDOUT_FD][0]); close_fd(&self->child_pipes[STDOUT_FD][0]);
close_fd(&self->child_pipes[STDERR_FD][0]); close_fd(&self->child_pipes[STDERR_FD][0]);
poll_process(self, 10); poll_process(self, 10);
return 0; return 0;
} }
@ -535,7 +538,7 @@ int luaopen_process(lua_State *L) {
API_CONSTANT_DEFINE(L, -1, "STREAM_STDERR", STDERR_FD); API_CONSTANT_DEFINE(L, -1, "STREAM_STDERR", STDERR_FD);
API_CONSTANT_DEFINE(L, -1, "REDIRECT_DEFAULT", REDIRECT_DEFAULT); API_CONSTANT_DEFINE(L, -1, "REDIRECT_DEFAULT", REDIRECT_DEFAULT);
API_CONSTANT_DEFINE(L, -1, "REDIRECT_STDOUT", STDOUT_FD); API_CONSTANT_DEFINE(L, -1, "REDIRECT_STDOUT", STDOUT_FD);
API_CONSTANT_DEFINE(L, -1, "REDIRECT_STDERR", STDERR_FD); API_CONSTANT_DEFINE(L, -1, "REDIRECT_STDERR", STDERR_FD);
API_CONSTANT_DEFINE(L, -1, "REDIRECT_PARENT", REDIRECT_PARENT); // Redirects to parent's STDOUT/STDERR API_CONSTANT_DEFINE(L, -1, "REDIRECT_PARENT", REDIRECT_PARENT); // Redirects to parent's STDOUT/STDERR
API_CONSTANT_DEFINE(L, -1, "REDIRECT_DISCARD", REDIRECT_DISCARD); // Closes the filehandle, discarding it. API_CONSTANT_DEFINE(L, -1, "REDIRECT_DISCARD", REDIRECT_DISCARD); // Closes the filehandle, discarding it.

View File

@ -8,7 +8,7 @@
#include <signal.h> #include <signal.h>
#if defined(__amigaos4__) || defined(__morphos__) #if defined(__amigaos4__) || defined(__morphos__)
#define VSTRING "Lite XL 2.1.1r1 (08.01.2023)" #define VSTRING "Lite XL 2.1.1r1 (29.01.2023)"
#define VERSTAG "\0$VER: " VSTRING #define VERSTAG "\0$VER: " VSTRING
#endif #endif
@ -62,7 +62,7 @@ static void get_exe_filename(char *buf, int sz) {
_NSGetExecutablePath(exepath, &size); _NSGetExecutablePath(exepath, &size);
realpath(exepath, buf); realpath(exepath, buf);
#elif defined(__amigaos4__) || defined(__morphos__) #elif defined(__amigaos4__) || defined(__morphos__)
strcpy(buf, _fullpath("./lite")); strcpy(buf, _fullpath("./lite-xl"));
#elif __FreeBSD__ #elif __FreeBSD__
size_t len = sz; size_t len = sz;
const int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; const int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };

View File

@ -2,7 +2,10 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#if defined(PROFYLER)
#include <profyle.h> #include <profyle.h>
#endif
#include "amigaos4.h" #include "amigaos4.h"
@ -16,7 +19,7 @@ static BOOL getFullPath(const char *path, char *result)
return TRUE; return TRUE;
} }
return FALSE; return FALSE;
} }
@ -43,10 +46,10 @@ char *_fullpath(const char *path)
strcpy(prvPath, path); strcpy(prvPath, path);
if (!strcmp(path, "./lite")) if (!strcmp(path, "./lite-xl"))
{ {
// TODO: Add code to get the name of the executable // TODO: Add code to get the name of the executable
if (getFullPath("PROGDIR:lite", result)) if (getFullPath("PROGDIR:lite-xl", result))
{ {
return result; return result;
} }
@ -60,11 +63,10 @@ char *_fullpath(const char *path)
} }
} }
if (getFullPath(path, result)) if (getFullPath(path, result))
{ {
return result; return result;
} }
return NULL; return NULL;
} }

View File

@ -9,4 +9,3 @@ char *_fullpath(const char *);
#endif #endif

8
src/platform/morphos.c Executable file → Normal file
View File

@ -41,10 +41,10 @@ char *_fullpath(const char *path)
strcpy(prvPath, path); strcpy(prvPath, path);
if (!strcmp(path, "./lite")) if (!strcmp(path, "./lite-xl"))
{ {
// TODO: Add code to get the name of the executable // TODO: Add code to get the name of the executable
if (getFullPath("PROGDIR:lite", result)) if (getFullPath("PROGDIR:lite-xl", result))
{ {
return result; return result;
} }
@ -58,10 +58,10 @@ char *_fullpath(const char *path)
} }
} }
if (getFullPath(path, result)) if (getFullPath(path, result))
{ {
return result; return result;
} }
return NULL; return NULL;
} }