Commit Graph

246 Commits

Author SHA1 Message Date
Francesco Abbate fb1e08840e Merge branch 'dmon-1' into dmon-debug 2021-09-30 14:24:50 -07:00
Francesco Abbate 66196d612c Fix in dmon.h for macOS path case sensitivity 2021-09-30 14:11:37 -07:00
Francesco Abbate 4e58e8be28 Use new dmon version win watch_add/rm
Include changes in dmon not yet merged into master.
2021-09-29 14:08:05 +02:00
Francesco Abbate 494587954f More accurate path compare function 2021-09-29 14:08:05 +02:00
Francesco Abbate e57d63e3a3 Update dmon from septag/dmon commit 74bbd93b
The new version includes fixes from jgmdev, github PR:

https://github.com/septag/dmon/pull/11

to solve incorrect behavior on linux not reporting directory creation.

Includes also a further revision from septag.
2021-09-29 14:08:05 +02:00
Francesco Abbate aa37f2b149 Fix several problem with directory update
When scanning a subdirectory on-demand ensure files aready present
are not added twice. Files or directory can be already present due
to dir monitoring create message.

Fix check for ignore files when adding a file to respond to a dir monitor
event to use each part of the file's path.

Fix C function to compare files for treeview placement.
2021-09-29 14:08:04 +02:00
Francesco Abbate e01f6fefe6 Treat watch dir errors and fix various things
Verity if dmon_watch returns an error.

Add a check if an added file for which we received a create event is
ignored based on the user's config.

Add some explanatory comments in the code.
2021-09-29 14:08:04 +02:00
Francesco Abbate 09d2c0a325 Update dmon from septag/dmon with fix for linux
Update from https://github.com/septag/dmon, commit: 48234fc2 to
include a fix for linux.
2021-09-29 14:08:04 +02:00
Francesco Abbate 1ba385eb5e First integration of dmon for directory monitoring 2021-09-29 14:07:34 +02:00
Francesco Abbate 590c83148e Enable inotify specific api only on linux 2021-09-29 11:38:03 +02:00
Francesco Abbate 958703de02 Fix abort when dmon_watch_rm remove a wd 2021-09-26 22:43:13 +02:00
Francesco Abbate 9198e48fec Bring back the dmon_watch_rm function 2021-09-26 22:41:07 +02:00
Francesco Abbate ff86d54ff5 Move to dmon.h new version to test
By doing so we removed the addition of dmon_watch_rm and
the Lua code will no longer compile.
2021-09-26 22:37:57 +02:00
Francesco Abbate c08b76746b WIP: temporary fix for testing 2021-09-21 23:50:50 +02:00
Francesco Abbate 941f135047 Fix errors with previous commit 2021-09-21 16:41:09 +02:00
Francesco Abbate 794fd6b47b Add dmon_watch_rm function to remove subdir 2021-09-21 11:39:38 +02:00
Francesco Abbate 31eed0c61a WIP: using new dmon_watch_add function 2021-09-20 17:51:46 +02:00
Francesco Abbate 3fa8866532 Adding new dmon version with dmon_watch_add 2021-09-20 17:18:03 +02:00
Francesco Abbate c9669410ad Fix macOS build issue with recent commit
Add objc_args in meson when compiling to pass C defines also to
bundle_open.m.

Default "bundle" option to false to have by default a unix-like
build and install.

In the run-local script always expect that "bundle" option is to
false to have a unix-like install.

In the build-package script pass the -Dbundle=true option when
building on macos.

When setting the resouce path revert to original method using

[[NSBundle mainBundle] resourcePath]

to have the real resource path when the bundle option will be
activated. With the recent commit the function
set_macos_bundle_resources will be called only if the "bundle"
option is activate and is not used in unix-like mode.
2021-08-19 14:33:39 -07:00
Francesco Abbate 717f4eb782 Conditionally disable macos bundle function 2021-08-19 11:33:03 +02:00
Francesco Abbate d9e73a97ea Merge remote-tracking branch 'harens/macos-bundle' 2021-08-19 11:32:36 +02:00
Nikolai Sinyov 1687bbd92d
Update main.c
Fixed interface Scale in MacOS in get_scale function
2021-08-19 10:07:46 +03:00
harens 2d088256b1
Add unix-like behaviour on macOS
Closes https://github.com/lite-xl/lite-xl/issues/398
2021-08-18 13:26:51 +01:00
takase1121 35fd29fc39 remove extraneous DPI code
since 5 months ago (ttps://github.com/libsdl-org/SDL/commit/c289bad9007cb672c994f726d967f6e5682f200d)
SDL2 now reads Xft.dpi. There is no need to link to X11 anymore.
2021-08-17 07:53:44 -07:00
redtide 3468164518 Updated Meson configuration
- Added version and license metadata
- Configuration data to be used in configured files to set metadata
- Portable binary and directories in the main install directory
- Binary file installed in correct places for all supported platforms
- Freedesktop AppStream support
- Added missing files install rules
2021-08-09 22:26:16 +02:00
Adam Harrison 0777a6f0b8 Merged dev to master. 2021-07-20 14:39:50 -04:00
Francesco Abbate aa9221e785 More accurate path compare function 2021-07-20 15:28:36 +02:00
Francesco Abbate 5f06a0a871 Update dmon from septag/dmon commit 74bbd93b
The new version includes fixes from jgmdev, github PR:

https://github.com/septag/dmon/pull/11

to solve incorrect behavior on linux not reporting directory creation.

Includes also a further revision from septag.
2021-07-20 11:47:55 +02:00
takase1121 c7bbf221ee remove duplicated constants 2021-07-15 18:01:24 -04:00
takase1121 192a93014d change double quotes to single quotes to reduce escaping 2021-07-15 18:01:24 -04:00
takase1121 818e21610c do not terminate process when read fails 2021-07-15 18:01:24 -04:00
takase1121 de3013ce88 fix wrongly spaced variable name 2021-07-15 18:01:24 -04:00
takase1121 e7b025203b add generic read function
process_read and process_read_errors no longer contain redundant code
2021-07-15 18:01:24 -04:00
takase1121 8bbb26a469 refactor process.c
- include api.h instead of individual #includes
- moved metatable name to API_TYPE_PROCESS
- moved read buffer size to READ_BUF_SIZE
2021-07-15 18:01:24 -04:00
Francesco Abbate 8e7d3c0f66 Fix several problem with directory update
When scanning a subdirectory on-demand ensure files aready present
are not added twice. Files or directory can be already present due
to dir monitoring create message.

Fix check for ignore files when adding a file to respond to a dir monitor
event to use each part of the file's path.

Fix C function to compare files for treeview placement.
2021-07-15 18:49:18 +02:00
Francesco Abbate 3994c3ac42 Treat watch dir errors and fix various things
Verity if dmon_watch returns an error.

Add a check if an added file for which we received a create event is
ignored based on the user's config.

Add some explanatory comments in the code.
2021-07-15 09:56:49 +02:00
Francesco Abbate 3101cfff7b Update dmon from septag/dmon with fix for linux
Update from https://github.com/septag/dmon, commit: 48234fc2 to
include a fix for linux.
2021-07-14 12:36:17 +02:00
Francesco Abbate d7bdca3f48 Add missing files from previous commits 2021-07-14 10:11:46 +02:00
Francesco Abbate 79b65014a5 WIP: add correct binary search for removed file
Use a C function to compare nested files in project tree to enable
binary search of a file across the project files tree.
2021-07-13 22:23:52 +02:00
Francesco Abbate b2affddf32 WIP: advance implementation bot not yet complete
Now we request a watch on the directory and we manage sending
and receiving directory change events.

The mechanism to update on the fly the directory scan is not complete.
The code to remove a file is there but we need to implement the code
to add a new file.
2021-07-13 17:40:26 +02:00
Francesco Abbate 31199ecbfc WIP: integrating dmon for directory monitoring
Just integrating the file, adding initialization and some
stub code.
2021-07-12 18:21:27 +02:00
Adam 9126b5e64d
Merge pull request #313 from jgmdev/add-system-rmdir
Added `system.rmdir(path)`, and `common.rm(path, recursive)`
2021-06-29 17:44:58 -04:00
jgmdev 4188269cef Added system.rmdir(path)
It is reported that the built-in lua function os.remove(path) does
not removes empty directories on windows. To fix this a system.rmdir
function is introduced that calls a native win32 function.

Also common.rm(path, recursively) was added which wraps system.rmdir()
to easily delete an entire folder with all its contents.
2021-06-28 11:07:27 -04:00
redtide df63775dca Use lite-xl as project and exacutable names 2021-06-25 22:54:02 +02:00
redtide 3f58e554ba Reorganization of data resources 2021-06-24 22:53:14 +02:00
Adam 83a604dfb7
Merge pull request #296 from lite-xl/font-copy-api
Add a C API copy method for font_desc objects
2021-06-24 12:47:16 -04:00
jgmdev 88704c6ecb [api/process] added missing fields and minor fix to pid() 2021-06-22 15:01:30 -04:00
Francesco Abbate 1cf0f2009c Add a C API copy method for font_desc objects
Add a renderer.font's method "copy" to clone the font object
by specifying an optional new size. In the size is not given
the size of the original object is used.

Should fulfill the request from issue #288.
2021-06-21 11:18:52 +02:00
jgmdev 5d2734de81 Merge reproc changes from dev. 2021-06-18 14:19:09 -04:00
lqdev 6195b246a5 ignore SIGPIPE from subprocesses spawned with reproc 2021-06-18 11:17:36 -04:00