update examples and readme

This commit is contained in:
Joseph Aquino 2025-12-30 21:58:25 -05:00
parent aa8e9655a8
commit c5f24004d5
3 changed files with 21 additions and 21 deletions

View File

@ -14,13 +14,13 @@ git submodule update --init --recursive
```
2. Add this to the top of the script that contains the workspace, replace 'path/to' with the directory that you cloned this repo to
```lua
local ogg = require("path/to/ogg/build-ogg")
local imgui = require("path/to/build-imgui")
local sfml = require("path/to/sfml/build-sfml")
local flac = require("path/to/flac/build-flac")
local vorbis = require("path/to/vorbis/build-vorbis")
local freetype = require("path/to/freetype/build-freetype")
local imguisfml = require("path/to/imgui-sfml/build-imgui-sfml")
local ogg = require("path/to/premake-scripts/build-ogg")
local imgui = require("path/to/premake-scripts/build-imgui")
local sfml = require("path/to/premake-scripts/sfml/build-sfml")
local flac = require("path/to/premake-scripts/flac/build-flac")
local vorbis = require("path/to/premake-scripts/vorbis/build-vorbis")
local freetype = require("path/to/premake-scripts/freetype/build-freetype")
local imguisfml = require("path/to/premake-scripts/imgui-sfml/build-imgui-sfml")
```
3. In the workspace, add these lines
```lua
@ -44,9 +44,9 @@ imguisfml.generateproject(<target-directory>, <obj-directory>)
```
5. At the top of each lua file containing a project that needs imgui or sfml, add these lines, replace 'path/to' with the directory that you cloned this repo to. if the project is in the same file as the workspace you can skip this
```lua
local sfml = require("path/to/build-sfml")
local imgui = require("path/to/build-imgui")
local imguisfml = require("path/to/build-imgui-sfml")
local sfml = require("path/to/premake-scripts/build-sfml")
local imgui = require("path/to/premake-scripts/build-imgui")
local imguisfml = require("path/to/premake-scripts/build-imgui-sfml")
```
6. Inside of the projects that need sfml or imgui add these lines
```lua

View File

@ -2,9 +2,9 @@ local m = {}
local scriptdir = path.getabsolute(path.getdirectory(_SCRIPT))
local sfml = require("path/to/build-sfml")
local imguisfml = require("path/to/build-imgui-sfml")
local imgui = require("path/to/build-imgui")
local sfml = require("path/to/premake-scripts/build-sfml")
local imguisfml = require("path/to/premake-scripts/build-imgui-sfml")
local imgui = require("path/to/premake-scripts/build-imgui")
function m.generateproject(bindir, intdir)
project "example"

View File

@ -1,12 +1,12 @@
local ogg = require("path/to/ogg/build-ogg")
local imgui = require("path/to/build-imgui")
local sfml = require("path/to/sfml/build-sfml")
local flac = require("path/to/flac/build-flac")
local vorbis = require("path/to/vorbis/build-vorbis")
local freetype = require("path/to/freetype/build-freetype")
local imguisfml = require("path/to/imgui-sfml/build-imgui-sfml")
local ogg = require("path/to/premake-scripts/ogg/build-ogg")
local imgui = require("path/to/premake-scripts/build-imgui")
local sfml = require("path/to/premake-scripts/sfml/build-sfml")
local flac = require("path/to/premake-scripts/flac/build-flac")
local vorbis = require("path/to/premake-scripts/vorbis/build-vorbis")
local freetype = require("path/to/premake-scripts/freetype/build-freetype")
local imguisfml = require("path/to/premake-scripts/imgui-sfml/build-imgui-sfml")
local exampleproject = require("path/to/project")
local exampleproject = require("path/to/premake-scripts/project")
-- assuming you are using the modules I provided with premake
require ("ecc/ecc")