From 0be4f86dcd85f6a91bfaa7b600da4b916ad4f432 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sun, 15 Mar 2020 11:58:58 +0100 Subject: work --- build-linux.sh | 2 +- release-linux.sh | 2 +- src/mo_edit.c | 2 ++ src/save.c | 3 ++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/build-linux.sh b/build-linux.sh index 536cc17..545a940 100755 --- a/build-linux.sh +++ b/build-linux.sh @@ -36,7 +36,7 @@ cd src ld -r -b binary -o ../bin/data.o ../data/imgs/en.png ../data/imgs/nl.png ../data/imgs/logo_64.png ../data/fonts/mono.ttf ../data/translations/en-English.mo ../data/translations/nl-Dutch.mo ../data/imgs/list.png ../data/imgs/delete.png ../data/imgs/exclaim.png ../data/imgs/add.png ../data/imgs/set.png -gcc -Wall -g -m64 -DMODE_DEVELOPER -Wno-unused-label -rdynamic -Wno-unused-variable mo_edit.c ../bin/data.o -o ../bin/mo-edit -lX11 -lGL -lGLU -lXrandr -lm -lpthread -ldl -lcurl +gcc -Wall -g -m64 -DMODE_DEVELOPER -Wno-unused-label -rdynamic -Wno-unused-variable mo_edit.c ../bin/data.o -o ../bin/mo-edit -lX11 -lGL -lGLU -lXrandr -lm -lpthread -ldl rm -f ../bin/data.o diff --git a/release-linux.sh b/release-linux.sh index efc84ff..7eba327 100644 --- a/release-linux.sh +++ b/release-linux.sh @@ -10,7 +10,7 @@ cd src ld -r -b binary -o ../bin/data.o ../data/imgs/en.png ../data/imgs/nl.png ../data/imgs/logo_64.png ../data/fonts/mono.ttf ../data/translations/en-English.mo ../data/translations/nl-Dutch.mo ../data/imgs/list.png ../data/imgs/delete.png ../data/imgs/exclaim.png ../data/imgs/add.png ../data/imgs/set.png -gcc -Wall -O3 -m64 -Wno-unused-label -Wno-unused-variable mo_edit.c ../bin/data.o -o ../bin/mo-edit -lX11 -lGL -lGLU -lXrandr -lm -lpthread -ldl -lcurl +gcc -Wall -O3 -m64 -Wno-unused-label -Wno-unused-variable mo_edit.c ../bin/data.o -o ../bin/mo-edit -lX11 -lGL -lGLU -lXrandr -lm -lpthread -ldl rm -f ../bin/data.o cp --remove-destination ../bin/mo-edit ../release/linux/mo-edit diff --git a/src/mo_edit.c b/src/mo_edit.c index 9b954b4..d0215d7 100644 --- a/src/mo_edit.c +++ b/src/mo_edit.c @@ -10,6 +10,8 @@ s32 global_language_id = 1; char project_path[MAX_INPUT_LENGTH]; +// TODO(Aldrik): show current loaded project path somewhere (maybe title?) + typedef struct t_language { char *name; diff --git a/src/save.c b/src/save.c index 35eac85..4de31a8 100644 --- a/src/save.c +++ b/src/save.c @@ -193,6 +193,8 @@ bool read_mo_file(char *buffer, s32 buffer_size, s32 language_id) void load_project_from_folder(char *path_buf) { + string_copyn(project_path, path_buf, MAX_INPUT_LENGTH); + if (!platform_directory_exists(path_buf)) { platform_show_message(main_window, localize("error_loading_project"), localize("project_directory_does_not_exist")); @@ -277,7 +279,6 @@ static void* load_project_d(void *arg) if (string_equals(path_buf, "")) return 0; if (!platform_directory_exists(path_buf)) return 0; - string_copyn(project_path, path_buf, MAX_INPUT_LENGTH); load_project_from_folder(path_buf); return 0; } -- cgit v1.2.3-70-g09d2