Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Makefile, update build instructions #257

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

deric
Copy link

@deric deric commented Feb 19, 2021

I've added a simple Makefile but I'm struggling a bit project structure.
E.g. when installing to /usr/local Lua files could be placed in /usr/local/share/lua/5.2/core.lua. It would be nicer to put also package name on path, so that Lite's files won't collide with some other Lua package, e.g. /usr/local/share/lua/5.2/lite/core.lua

Error: [string "local core..."]:8: module 'core' not found:
        no field package.preload['core']
        no file '/usr/local/bin/data/core/init.lua'
        no file '/usr/local/bin/data/core.lua'
        no file '/usr/local/share/lua/5.2/core.lua'
        no file '/usr/local/share/lua/5.2/core/init.lua'
        no file '/usr/local/lib/lua/5.2/core.lua'
        no file '/usr/local/lib/lua/5.2/core/init.lua'
        no file './core.lua'
        no file '/usr/local/lib/lua/5.2/core.so'
        no file '/usr/local/lib/lua/5.2/loadall.so'
        no file './core.so'

Also, fonts are currently hard-coded relatively to executable:

data/plugins/scale.lua:19:font_cache[style.code_font] = { EXEDIR .. "/data/fonts/monospace.ttf", 13.5 * SCALE }

but this would be for another PR. Is it ok to modify this path?

A Linux program structure might look like

/usr/local/bin/lite
/usr/local/share/lua/5.2/lite/core/...
/usr/local/share/lua/5.2/lite/fonts/...
/var/lib/lite/plugins/
/var/lib/lite/user/
~/.local/lite/plugins/
~/.local/lite/user/

Currently all files needs to be placed relatively to e.g. /usr/local/bin/lite file, in /usr/local/bin/lite/data/ directory which isn't nice.

@deric deric changed the title Update build instructions Add Makefile, update build instructions Feb 20, 2021
@deric deric mentioned this pull request Feb 20, 2021
@andrew-manger
Copy link

Hey, I am getting the error you included at the beginning of you post. How can I resolve this?

@deric
Copy link
Author

deric commented Mar 13, 2021

@andrew-manger As the message say, lua files aren't on any of searched location. You've probably moved the main binary lite out out project's main directory.

@andrew-manger
Copy link

I didn't move anything. I built the program and then copied 'lite' to /bin/bash/ and it gave me this error. I'm trying to figure out how to fix it, not what I did wrong.

@deric
Copy link
Author

deric commented Mar 15, 2021

That's pretty much the same, you can create a symlink to your build directory:

ln -s /home/yourdir/src/lite /usr/local/bin/lite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants