Fix problem when launching from a different location

Should fix https://github.com/franko/lite-xl/issues/76 and https://github.com/franko/lite-xl/issues/67
This commit is contained in:
Francesco Abbate 2021-03-05 07:28:29 +01:00
parent 3506ff47fc
commit 1ea497deb4
1 changed files with 2 additions and 1 deletions

View File

@ -123,7 +123,8 @@ init_lua:
" HOME = os.getenv('HOME')\n"
#endif
" local prefix = EXEFILE:match(\"^(.+)[/\\\\]bin[/\\\\][^/\\\\]+$\")\n"
" dofile((prefix and prefix .. '/share/lite-xl' or 'data') .. '/core/start.lua')\n"
" local exedir = EXEFILE:match(\"^(.+)[/\\\\][^/\\\\]+$\")\n"
" dofile((prefix and prefix .. '/share/lite-xl' or exedir .. '/data') .. '/core/start.lua')\n"
" core = require('core')\n"
" core.init()\n"
" core.run()\n"