Skip to content

Commit

Permalink
fix win32 compile script
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalgust committed Mar 3, 2024
2 parents b2ecfbe + 8ab8b77 commit b54ac17
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions binary/build_wini686.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ call :jvm_compile mini_jvm.exe ..\minijvm\c %TARGETDIR%
echo [INFO]build libgui.dll
call :gui_compile libgui.dll ..\desktop\glfw_gui\c %TARGETDIR%

copy %GCCHOME%\bin\libwinpthread*.dll %TARGETDIR%
copy %GCCHOME%\bin\libgcc*.dll %TARGETDIR%
copy %GCCHOME%\bin\libstdc*.dll %TARGETDIR%

echo completed.
pause

Expand Down
2 changes: 2 additions & 0 deletions binary/build_winx64.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ call :jvm_compile mini_jvm.exe ..\minijvm\c %TARGETDIR%
echo [INFO]build libgui.dll
call :gui_compile libgui.dll ..\desktop\glfw_gui\c %TARGETDIR%

copy %GCCHOME%\bin\libwinpthread*.dll %TARGETDIR%

echo completed.
pause

Expand Down
4 changes: 4 additions & 0 deletions minijvm/c/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ int main(int argc, char **argv) {
#endif
s32 dpos = utf8_last_indexof_c(startup_dir, "/");
if (dpos > 0)utf8_substring(startup_dir, 0, dpos);
else if (dpos < 0) {
utf8_clear(startup_dir);
utf8_append_c(startup_dir, "./");
}
if (utf8_char_at(startup_dir, startup_dir->length - 1) != '/')utf8_append_c(startup_dir, "/");
#if _JVM_DEBUG_LOG_LEVEL > 0
jvm_printf("App dir:%s\n", utf8_cstr(startup_dir));
Expand Down

0 comments on commit b54ac17

Please sign in to comment.