diff --git a/.gitignore b/.gitignore index 4945e2c..68703c3 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ releases/ *.log* memory_scan* *_report* +*.key +*.src.rock diff --git a/FlexLove.lua b/FlexLove.lua index 31edf27..ef3705f 100644 --- a/FlexLove.lua +++ b/FlexLove.lua @@ -1,4 +1,10 @@ -local modulePath = (...):match("(.-)[^%.]+$") -- Get the module path prefix (e.g., "libs." or "") +local packageName = ... or "FlexLove" +local modulePath = packageName:match("(.-)[^%.]+$") -- Get the module path prefix (e.g., "libs." or "") +-- If modulePath is empty (e.g., require("FlexLove")), use the package name +if modulePath == "" then + modulePath = packageName .. "." +end + local function req(name) return require(modulePath .. "modules." .. name) end diff --git a/README.md b/README.md index 6075148..feabdf3 100644 --- a/README.md +++ b/README.md @@ -31,16 +31,30 @@ This library is under rapid, active development. While many features are functio ## Quick Start -Add the `modules` directory and `FlexLove.lua` into your project. I recommend going to the -RELEASES page, but you can clone the repo if you want the latest features, but bugs are more -likely. +[Recommended] Go to the [releases](https://github.com/mikefreno/FlexLove/releases) page and download the latest release, +there are a few different options for different build profiles, I recommend the "default" build. Then add the `modules` directory and `FlexLove.lua` into your project. + +Or, if you can also try will luarocks: + +```bash +luarocks install flexlove +``` + +Going this route, you will need to link the luarocks path to your project: +(for mac/linux) +```lua +package.path = package.path .. ";/Users//.luarocks/share/lua/5.1/?.lua" +package.path = package.path .. ";/Users//.luarocks/share/lua/5.1/?/init.lua" +package.cpath = package.cpath .. ";/Users//.luarocks/lib/lua/5.1/?.so" +``` + ```lua local FlexLove = require("FlexLove") -- (Optional) Initialize with a theme and immediate mode FlexLove.init({ - theme = "space" + theme = "space", immediateMode = true }) diff --git a/RELEASE.md b/RELEASE.md index 88bd156..4b24e37 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -172,10 +172,12 @@ Each profile package includes: | Profile | Modules | Approximate Size | |---------|---------|------------------| -| **Minimal** | 16 core modules | ~60% of full | -| **Slim** | 21 modules | ~80% of full | -| **Default** | 23 modules + themes | ~95% of full | -| **Full** | 24 modules + themes | 100% | +| **Minimal** | 19 core modules | ~70% of full | +| **Slim** | 24 modules | ~80% of full | +| **Default** | 27 modules + themes | ~95% of full | +| **Full** | 29 modules + themes | 100% | + +**Note:** All profiles now include UTF8.lua for Lua 5.1+ compatibility. Users who want examples, documentation source, or development tools should clone the full repository. diff --git a/docs/index.html b/docs/index.html index aa02326..064f399 100644 --- a/docs/index.html +++ b/docs/index.html @@ -241,7 +241,7 @@ -- (Optional) Initialize with a theme and immediate mode FlexLove.init({ - theme = "space" + theme = "space", immediateMode = true }) diff --git a/flexlove-0.5.4-1.rockspec b/flexlove-0.5.4-1.rockspec index 8839414..bc709d2 100644 --- a/flexlove-0.5.4-1.rockspec +++ b/flexlove-0.5.4-1.rockspec @@ -31,8 +31,8 @@ description = { } dependencies = { - "lua >= 5.1", - "luautf8 >= 0.1.3" + "lua >= 5.1", + "luautf8 >= 0.1.3", } build = { @@ -67,7 +67,7 @@ build = { ["FlexLove.modules.types"] = "modules/types.lua", ["FlexLove.modules.Units"] = "modules/Units.lua", ["FlexLove.modules.UTF8"] = "modules/UTF8.lua", - ["FlexLove.modules.utils"] = "modules/utils.lua" + ["FlexLove.modules.utils"] = "modules/utils.lua", }, copy_directories = { "docs",