Skip to content

Commit

Permalink
natvis moved; minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nem0 committed Sep 23, 2024
1 parent d56b2bd commit 9b5fa79
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 26 deletions.
22 changes: 11 additions & 11 deletions docs/3rdparty.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
On Windows all 3rd party libraries are vendored in the LumixEngine repository, either as a binary, or in form of a source code. Everything should work out of the box.
On Windows, all 3rd party libraries are vendored in the LumixEngine repository, either as a binary or in the form of source code. Everything should work out of the box.

## Recast

We utilize [Recast & Detour](https://github.com/recastnavigation/recastnavigation) for navigation purposes. The source code for Recast is included in our repository under [external/recast/src](../external/recast/src). To update Recast, you can run the provided [batch script](../scripts/download_deploy_recast.bat) which will download the latest version and copy it to the appropriate directory. Recast is included as a [unity build](https://en.wikipedia.org/wiki/Unity_build). Recast is build as a part of *navigation* plugin.
We utilize [Recast & Detour](https://github.com/recastnavigation/recastnavigation) for navigation purposes. The source code for Recast is included in our repository under [external/recast/src](../external/recast/src). To update Recast, you can run the provided [batch script](../scripts/download_deploy_recast.bat), which will download the latest version and copy it to the appropriate directory. Recast is included as a [unity build](https://en.wikipedia.org/wiki/Unity_build). Recast is built as a part of the *navigation* plugin.

## FreeType2

We utilize [FreeType2](https://github.com/nem0/freetype2.git) for text rendering. On Windows, prebuilt static library is included in [external/freetype/lib/win](../external/freetype/lib/win/) and is used by default. If you want to build FreeType from source code, use following steps:
1. Run [download_freetype.bat](../scripts/download_freetype.bat) to download FreeType source code.
2. Regenerate project using *GENie*.
3. Build project.
We utilize [FreeType2](https://github.com/nem0/freetype2.git) for text rendering. On Windows, the prebuilt static library is included in [external/freetype/lib/win](../external/freetype/lib/win/) and is used by default. If you want to build FreeType from source code, use the following steps:
1. Run [download_freetype.bat](../scripts/download_freetype.bat) to download the FreeType source code.
2. Regenerate the project using *GENie*.
3. Build the project.

## Luau

We utilize [Luau](https://github.com/luau-lang/luau) for scripting. On Windows, prebuilt *dynamic* library is included in [external/luau/lib/win](../external/luau/lib/win/) and is used by default. We use dynamic library because it's much smaller (~100x on Windows) than a static library. If you want to build Luau from source code, use following steps:
1. Run [download_luau.bat](../scripts/download_luau.bat) to download Luau source code.
2. Regenerate project using *GENie*.
3. Build project.
We utilize [Luau](https://github.com/luau-lang/luau) for scripting. On Windows, the prebuilt *dynamic* library is included in [external/luau/lib/win](../external/luau/lib/win/) and is used by default. We use the dynamic library because it's much smaller (~100x on Windows) than a static library. If you want to build Luau from source code, use the following steps:
1. Run [download_luau.bat](../scripts/download_luau.bat) to download the Luau source code.
2. Regenerate the project using *GENie*.
3. Build the project.

If you build Luau from source code like this, it's built as a static library by default. To build a dynamic library, pass `--luau-dynamic` to GENie. Static library version of Luau includes Luau analysis, which is used by Studio to report type errors in Luau scripts. Dynamic library does not include this analysis.
If you build Luau from source code like this, it's built as a static library by default. To build a dynamic library, pass `--luau-dynamic` to GENie. The static library version of Luau includes Luau analysis, which is used by Studio to report type errors in Luau scripts. The dynamic library does not include this analysis.
5 changes: 4 additions & 1 deletion scripts/genie.lua
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ local use_basisu = _OPTIONS["with-basis-universal"]
local dynamic_plugins = _OPTIONS["dynamic-plugins"]
local build_luau = os.isdir("../external/_repos/luau")

if luau_dynamic and not build_luau then
printf("Luau source code not found, can't build Luau as dynamic library.")
end

local plugins = {}
local base_plugins = {}
Expand Down Expand Up @@ -263,7 +266,7 @@ function defaultConfigurations()

configuration {}
files {
path.join(ROOT_DIR, "scripts/lumix.natvis"),
path.join(ROOT_DIR, "src/lumix.natvis"),
path.join(ROOT_DIR, ".editorconfig")
}
defines { "_ITERATOR_DEBUG_LEVEL=0", "STBI_NO_STDIO" }
Expand Down
18 changes: 5 additions & 13 deletions scripts/main.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ setlocal
echo 3. Run Studio
echo 4. Open in VS
echo 5. Create bundle
echo 6. Open live help / discord chat
echo 7. 3rd party
echo 8. Plugins
echo 6. 3rd party
echo 7. Plugins
echo ===============================
choice /C 12345678 /N /M "Your choice:"
choice /C 1234567 /N /M "Your choice:"
echo.

if %errorlevel%==1 (
Expand All @@ -39,9 +38,8 @@ setlocal
if %errorlevel%==3 call :run_studio
if %errorlevel%==4 call :open_in_vs
if %errorlevel%==5 call :create_bundle
if %errorlevel%==6 call :open_discord
if %errorlevel%==7 call :third_party
if %errorlevel%==8 call :plugins
if %errorlevel%==6 call :third_party
if %errorlevel%==7 call :plugins
goto :begin

:plugins
Expand Down Expand Up @@ -494,9 +492,3 @@ exit /B 0
)
popd
exit /B 0

:open_discord
start "" "https://discord.gg/RgFybs6"
pause
exit /B 0

2 changes: 1 addition & 1 deletion scripts/plugin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function defaultConfigurations()

configuration {}
files {
path.join(ENGINE_ROOT, "./scripts/lumix.natvis"),
path.join(ENGINE_ROOT, "./src/lumix.natvis"),
path.join(ENGINE_ROOT, ".editorconfig")
}
defines { "_ITERATOR_DEBUG_LEVEL=0", "STBI_NO_STDIO" }
Expand Down
File renamed without changes.

0 comments on commit 9b5fa79

Please sign in to comment.