diff --git a/.lite_project.lua b/.lite_project.lua new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.lite_project.lua @@ -0,0 +1 @@ + diff --git a/build.sh b/build.sh index 308ebf9..6f9d4fe 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,8 @@ #!/bin/bash -cflags="-Wall -O3 -g -std=gnu11 -fno-strict-aliasing -Isrc" -lflags="-lSDL2 -lm" +# -I/usr/local/include/SDL2 +cflags="-Wall -O3 -g -std=gnu11 -fno-strict-aliasing -Isrc -I/usr/local/include/SDL2 -D_THREAD_SAFE" +lflags="-L/usr/local/lib -lSDL2 -lm" if [[ $* == *windows* ]]; then platform="windows" @@ -26,8 +27,9 @@ fi echo "compiling ($platform)..." for f in `find src -name "*.c"`; do - $compiler -c $cflags $f -o "${f//\//_}.o" + $compiler -c $lflags $cflags $f -o "${f//\//_}.o" if [[ $? -ne 0 ]]; then + echo "!?!?! " -c $cflags $f -o "${f//\//_}.o" got_error=true fi done diff --git a/data/core/init.lua b/data/core/init.lua index cef305e..9986007 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -34,15 +34,21 @@ local function project_scan_thread() local all = system.list_dir(path) or {} local dirs, files = {}, {} - for _, file in ipairs(all) do + for i, file in ipairs(all) do if not common.match_pattern(file, config.ignore_files) then local file = (path ~= "." and path .. PATHSEP or "") .. file local info = system.get_file_info(file) if info and info.size < size_limit then info.filename = file table.insert(info.type == "dir" and dirs or files, info) + -- if i < 10 then + -- table.insert(info.type == "dir" and dirs or files, info) + -- end end end + -- if i > 512 then + -- break + -- end end table.sort(dirs, compare_file) diff --git a/data/core/style.lua b/data/core/style.lua index ab597c2..77abe8d 100644 --- a/data/core/style.lua +++ b/data/core/style.lua @@ -12,9 +12,9 @@ style.big_font = renderer.font.load(EXEDIR .. "/data/fonts/font.ttf", 34 * SCALE style.icon_font = renderer.font.load(EXEDIR .. "/data/fonts/icons.ttf", 14 * SCALE) style.code_font = renderer.font.load(EXEDIR .. "/data/fonts/monospace.ttf", 13.5 * SCALE) -style.background = { common.color "#2e2e32" } -style.background2 = { common.color "#252529" } -style.background3 = { common.color "#252529" } +style.background = { common.color "#000000" } -- doc bg +style.background2 = { common.color "#151519" } -- left panel, tab bar deselected +style.background3 = { common.color "#212125" } -- pop up bg style.text = { common.color "#97979c" } style.caret = { common.color "#93DDFA" } style.accent = { common.color "#e1e1e6" } diff --git a/error.txt b/error.txt new file mode 100644 index 0000000..06ec723 --- /dev/null +++ b/error.txt @@ -0,0 +1,16 @@ +Error: /Users/isha/git/lite/data/plugins/treeview.lua:149: /Users/isha/git/lite/data/plugins/treeview.lua:32: attempt to index local 'item' (a nil value) +stack traceback: + [C]: in function 'for iterator' + /Users/isha/git/lite/data/plugins/treeview.lua:149: in function 'draw' + /Users/isha/git/lite/data/core/rootview.lua:369: in function '?' + /Users/isha/git/lite/data/core/rootview.lua:58: in function 'propagate' + /Users/isha/git/lite/data/core/rootview.lua:374: in function '?' + /Users/isha/git/lite/data/core/rootview.lua:58: in function 'propagate' + /Users/isha/git/lite/data/core/rootview.lua:374: in function 'draw' + /Users/isha/git/lite/data/core/rootview.lua:496: in function 'draw' + /Users/isha/git/lite/data/plugins/autocomplete.lua:236: in function 'draw' + /Users/isha/git/lite/data/core/init.lua:413: in function 'step' + /Users/isha/git/lite/data/core/init.lua:454: in function 'run' + [string "local core..."]:10: in function <[string "local core..."]:2> + [C]: in function 'xpcall' + [string "local core..."]:2: in main chunk \ No newline at end of file diff --git a/lite b/lite new file mode 100755 index 0000000..76dd1eb Binary files /dev/null and b/lite differ diff --git a/src/api/system.c b/src/api/system.c index 235d582..b93777e 100644 --- a/src/api/system.c +++ b/src/api/system.c @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/src/main.c b/src/main.c index 1c6872f..3d51abc 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,5 @@ #include -#include +#include #include "api/api.h" #include "renderer.h" diff --git a/src/renderer.h b/src/renderer.h index 3cefa5c..b915fe5 100644 --- a/src/renderer.h +++ b/src/renderer.h @@ -1,7 +1,7 @@ #ifndef RENDERER_H #define RENDERER_H -#include +#include #include typedef struct RenImage RenImage;