macos wip...

This commit is contained in:
D4 2020-08-26 02:42:24 -07:00
parent 2caa7f182d
commit a856ade925
9 changed files with 35 additions and 10 deletions

1
.lite_project.lua Normal file
View File

@ -0,0 +1 @@

View File

@ -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

View File

@ -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)

View File

@ -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" }

16
error.txt Normal file
View File

@ -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

BIN
lite Executable file

Binary file not shown.

View File

@ -1,4 +1,4 @@
#include <SDL2/SDL.h>
#include <SDL.h>
#include <stdbool.h>
#include <ctype.h>
#include <dirent.h>

View File

@ -1,5 +1,5 @@
#include <stdio.h>
#include <SDL2/SDL.h>
#include <SDL.h>
#include "api/api.h"
#include "renderer.h"

View File

@ -1,7 +1,7 @@
#ifndef RENDERER_H
#define RENDERER_H
#include <SDL2/SDL.h>
#include <SDL.h>
#include <stdint.h>
typedef struct RenImage RenImage;