diff options
| -rw-r--r-- | build-win.bat | 4 | ||||
| -rw-r--r-- | data/translations/en-English.mo | bin | 1869 -> 2036 bytes | |||
| -rw-r--r-- | data/translations/nl-Dutch.mo | bin | 1958 -> 2135 bytes | |||
| -rw-r--r-- | install.sh | 2 | ||||
| -rwxr-xr-x | release.sh | 2 | ||||
| -rw-r--r-- | src/mo_edit.c | 8 | ||||
| -rw-r--r-- | src/save.c | 3 | ||||
| -rw-r--r-- | src/settings.c | 10 |
8 files changed, 19 insertions, 10 deletions
diff --git a/build-win.bat b/build-win.bat index 1ae96f2..c7a65c6 100644 --- a/build-win.bat +++ b/build-win.bat @@ -9,11 +9,11 @@ ld -r -b binary -o ../bin/data.o ../data/imgs/en.png ../data/imgs/nl.png ../dat if "%1"=="-w" (SET defs=-DMODE_DEVELOPER -DMODE_GDBDEBUG) else (SET defs=-DMODE_DEVELOPER) -x86_64-w64-mingw32-gcc -m64 -Wall -g %defs% -Wno-unused-label -Wno-unused-variable mo_edit.c ../bin/data.o -o ../bin/mo-edit.exe ../misc/icon.res -lopengl32 -lkernel32 -lglu32 -lgdi32 -lcomdlg32 -lgdiplus -lole32 -lshlwapi +x86_64-w64-mingw32-gcc -m64 -Wall -g %defs% -Wno-unused-label -Wno-unused-variable mo_edit.c ../bin/data.o -o ../bin/mo-edit.exe ../misc/icon.res -lopengl32 -lkernel32 -lglu32 -lgdi32 -lcomdlg32 -lgdiplus -lole32 -lshlwapi -lwininet DEL /Q "../bin/data.o" -FOR %%A IN ("../bin/moedit.exe") DO set size=%%~zA +FOR %%A IN ("../bin/mo-edit.exe") DO set size=%%~zA echo size = %size% cd ../ diff --git a/data/translations/en-English.mo b/data/translations/en-English.mo Binary files differindex e56e0da..101b030 100644 --- a/data/translations/en-English.mo +++ b/data/translations/en-English.mo diff --git a/data/translations/nl-Dutch.mo b/data/translations/nl-Dutch.mo Binary files differindex 20c54fc..100e605 100644 --- a/data/translations/nl-Dutch.mo +++ b/data/translations/nl-Dutch.mo @@ -48,7 +48,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 -x86_64-w64-mingw32-gcc -Wall -m64 -O3 -Wno-unused-label -Wno-unused-variable mo_edit.c ../bin/data.o -o ../bin/mo-edit.exe ../misc/icon.res -lopengl32 -lkernel32 -lglu32 -lgdi32 -lcomdlg32 -lgdiplus -lole32 -lshlwapi +x86_64-w64-mingw32-gcc -Wall -m64 -O3 -Wno-unused-label -Wno-unused-variable mo_edit.c ../bin/data.o -o ../bin/mo-edit.exe ../misc/icon.res -lopengl32 -lkernel32 -lglu32 -lgdi32 -lcomdlg32 -lgdiplus -lole32 -lshlwapi -lwininet rm -f ../bin/data.o @@ -31,7 +31,7 @@ cd src x86_64-w64-mingw32-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 -x86_64-w64-mingw32-gcc -Wall -m64 -O3 -Wno-unused-label -Wno-unused-variable mo_edit.c ../bin/data.o -o ../bin/mo-edit.exe ../misc/icon.res -lopengl32 -lkernel32 -lglu32 -lgdi32 -lcomdlg32 -lgdiplus -lole32 -lshlwapi +x86_64-w64-mingw32-gcc -Wall -m64 -O3 -Wno-unused-label -Wno-unused-variable mo_edit.c ../bin/data.o -o ../bin/mo-edit.exe ../misc/icon.res -lopengl32 -lkernel32 -lglu32 -lgdi32 -lcomdlg32 -lgdiplus -lole32 -lshlwapi -lwininet rm -f ../bin/data.o cp --remove-destination ../bin/mo-edit.exe ../release/windows/mo-edit.exe diff --git a/src/mo_edit.c b/src/mo_edit.c index 91cc919..ded4c05 100644 --- a/src/mo_edit.c +++ b/src/mo_edit.c @@ -415,7 +415,7 @@ int main(int argc, char **argv) platform_window window = platform_open_window("mo-edit", window_w, window_h, 0, 0, 800, 600); main_window = &window; - + validate_license(); settings_page_create(); @@ -462,10 +462,12 @@ int main(int argc, char **argv) settings_page_update_render(); platform_window_make_current(&window); - + if (!license_is_valid) { - platform_show_message(main_window, localize("invalid_license"), localize("license_error")); + char message[200]; + sprintf(message, localize("invalid_license"), license_key); + platform_show_message(main_window, message, localize("license_error")); window.is_open = false; } @@ -268,9 +268,8 @@ static void* load_project_d(void *arg) args->default_save_file_extension = default_save_file_extension; platform_open_file_dialog_block(args); - if (string_equals(path_buf, "")) return 0; - if (!platform_file_exists(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); diff --git a/src/settings.c b/src/settings.c index 3dd16b3..31e3052 100644 --- a/src/settings.c +++ b/src/settings.c @@ -102,6 +102,14 @@ void settings_page_update_render() } } ui_block_end(); + + ui_block_begin(LAYOUT_HORIZONTAL); + { + char license_text[30]; + sprintf(license_text, "%s: %s", localize("license"), license_key); + ui_push_text(license_text); + } + ui_block_end(); } global_ui_context.layout.offset_y = global_settings_page.window.height - 33; @@ -143,7 +151,7 @@ void settings_page_show() load_current_settings_into_ui(); global_settings_page.window = platform_open_window(localize("mo_edit_settings"), - 350, 200, 350, 200, 350, 200); + 350, 220, 350, 220, 350, 220); settings_window = &global_settings_page.window; |
