Updates to make latest code compile and work under OS4

This commit is contained in:
George Sokianos 2023-01-09 00:45:37 +00:00
parent 65d95c7f40
commit 62adafb59d
6 changed files with 73 additions and 63 deletions

View File

@ -11,23 +11,22 @@ LiteXL_OBJ := \
src/api/utf8.o src/platform/amigaos4.o \
src/api/dirmonitor/os4.o
outfile := lite
compiler := gcc
cxxcompiler := g++
compiler := gcc-11
cxxcompiler := g++-11
INCPATH := -Isrc -Ilib/dmon -I/sdk/local/newlib/include/SDL2 \
INCPATH := -Isrc -I/sdk/local/newlib/include/SDL2 \
-I/sdk/local/common/include/lua54 -I/sdk/local/common/include/freetype2
DFLAGS += -D__USE_INLINE__ -DLITE_XL_DATA_USE_EXEDIR
CFLAGS += -Werror -Wwrite-strings -O2 -g -std=gnu11 -fno-strict-aliasing
CFLAGS += -Werror -Wwrite-strings -O3 -std=gnu11 -fno-strict-aliasing
LFLAGS += -mcrt=newlib -lauto \
-lpcre2 -lSDL2 -llua54 -lfreetype -lz -lm -lpthread -athread=native
ifeq ($(DEBUG),1)
CFLAGS += -gstabs
CFLAGS += -g -gstabs
LFLAGS += -gstabs
ifeq ($(PROFYLER),1)
@ -97,4 +96,3 @@ release:
@lha -aeqr3 a LiteXL2_OS4.lha release/
@echo "Clean release files..."
@delete release ALL QUIET FORCE

View File

@ -1,13 +1,10 @@
# Lite XL v2 for AmigaOS 4.1 FE & MorphOS 3
Lite XL is a lightweight text editor written in Lua.
Lite XL is a lightweight text editor written in Lua and SDL2.
The port is not perfect and it might have issues here and there. For example
the filesystem notifications are not working yet. So when you make changes
at a project folder those will not be reflected in Lite XL automatically.
It might crash from time to time, if there is a path problem, but overall
it works pretty well. This is my daily editor for any kind of development.
The port is not perfect and it might have issues here and there. It might
crash from time to time, if there is a path problem, but overall it works
pretty well. This is my daily editor for any kind of development.
If it crashes on your system, try to delete to `.config` folder.
## Installation
@ -16,9 +13,9 @@ editor.
## Configuration folder
This editor creates a `.config` folder where the configuration is saved, as
well as plugins, themes etc.. By default this version uses the
executable folder, but if you want to override it, you can create an ENV
variable named `HOME` and set there your prefferable path.
well as plugins, themes etc.. By default this version uses the installation
folder, but if you want to override it, you can create an ENV variable
named `HOME` and set there your prefferable path.
You can check if there is one already set by executing the following command
in a shell
@ -57,10 +54,10 @@ The themes can also be found at
https://github.com/lite-xl/lite-xl-colors
### Plugins
This Lite XL release is based on version 2.0.3 of the application as
released on other systems, by the original development team.
This not the latest version. This means that some of the latest
plugins might not working at all or need modifications to work.
LiteXL is able to use plugins to extend its features. Those can be found
at https://github.com/lite-xl/lite-xl-plugins and other websites. Not all
of them will work fine on AmigaOS 4 or MorphOS, because of missing
dependencies or filesystem issues.
To make it easier for you, I gathered some of the plugins that are working
well, and I included them under `addons/plugins`. For you to install the
@ -94,6 +91,15 @@ Underlines matching pair for bracket under the caret
Underlays color values (eg. `#ff00ff` or `rgb(255, 0, 255)`) with their
resultant color.
**custom_caret**
Customize the caret in the editor setting it to *underline*, *block* or
*line* at the init.lua file in your config folder.
For example add:
`config.plugins.custom_caret.shape = "block"`
**EditorConfig**
EditorConfig (https://editorconfig.org/) implementation for Lite XL
**ephemeral_tabs**
Preview tabs. Opening a doc will replace the contents of the preview tab.
Marks tabs as non-preview on any change or tab double clicking.
@ -137,7 +143,7 @@ File icons set for TreeView. Download TTF font to your config/fonts
folder from https://github.com/yamatsum/nonicons/tree/master/dist
**opacity**
Change the opaqueness/transparency of lite-xl using shift+mousewheel
Change the opaqueness/transparency of lite-xl using LAmiga+mousewheel
or a command.
**openfilelocation**
@ -161,13 +167,12 @@ Highlights regions of code that match the current selection
It adds a small clock at the bottom right corner.
## Tips and tricks
### Transitions
If you want to disable the transitions and make the editor faster,
open your configuration file by clicking at the cog icon at the toolbar
(bottom left, 6th icon) and add the following line at the end of the file,
and then save it. You might need to restart your editor (CTRL+SHIFT+R)
and then save it. You might need to restart your editor.
```
config.transitions = false
@ -179,7 +184,7 @@ If you would like to hide files or whole folder from the left side bar list,
open your configuration by clicking at the cog icon at the toolbar
(bottom left sixth icon) and add the followline at the end of the file and
save it. This hides all the files that start with a dot, and all the `.info`
files. You might need to restart your editor (CTRL+SHIFT+R)
files. You might need to restart your editor.
```
config.ignore_files = {"^%.", "%.info$"}
@ -210,6 +215,18 @@ https://git.walkero.gr/walkero/lite-xl/issues
# Changelog
## [2.1.1r1] - 2022-01-08
### Changed
- Synced the code with the latest upstream master branch, which means that
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
- Compiled with gcc 11 on AmigaOS 4
### Fixed
- Set the default locale on AmigaOS 4, so as to fix some issues with decimal
numbers
## [2.1.0r1] - 2022-10-10
### Added
- This version of LiteXL recognises changes that are done outside the editor
@ -277,4 +294,3 @@ https://git.walkero.gr/walkero/lite-xl/issues
YOU MAY USE IT AT YOUR OWN RISK!
I will not be held responsible for any data loss or problems you might get
by using this software.

View File

@ -1,5 +1,5 @@
-- this file is used by lite-xl to setup the Lua environment when starting
VERSION = "2.1.0r1"
VERSION = "2.1.1r1"
MOD_VERSION = "3"
SCALE = tonumber(os.getenv("LITE_SCALE") or os.getenv("GDK_SCALE") or os.getenv("QT_SCALE_FACTOR")) or SCALE

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 add_dirmonitor(struct dirmonitor_internal* monitor, const char* path) { return -1; }
void remove_dirmonitor(struct dirmonitor_internal* monitor, int fd) { }
int get_mode_dirmonitor() { return 1; }

View File

@ -1,16 +1,11 @@
#include <string.h>
#include "api.h"
<<<<<<< HEAD
#include "renderer.h"
#include "rencache.h"
=======
#include "../renderer.h"
#include "../rencache.h"
#include "lua.h"
// a reference index to a table that stores the fonts
static int RENDERER_FONT_REF = LUA_NOREF;
>>>>>>> master
static int font_get_options(
lua_State *L,

View File

@ -8,7 +8,7 @@
#include <signal.h>
#if defined(__amigaos4__) || defined(__morphos__)
#define VSTRING "Lite XL 2.1.0r1 (10.10.2022)"
#define VSTRING "Lite XL 2.1.1r1 (08.01.2023)"
#define VERSTAG "\0$VER: " VSTRING
#endif
@ -19,6 +19,7 @@
#elif defined(__APPLE__)
#include <mach-o/dyld.h>
#elif defined(__amigaos4__)
#include <locale.h>
#include "platform/amigaos4.h"
static CONST_STRPTR stack USED = "$STACK:102400";
static CONST_STRPTR version USED = VERSTAG;
@ -294,4 +295,3 @@ init_lua:
return EXIT_SUCCESS;
}