Skip to content

Commit

Permalink
Added LuaMachine
Browse files Browse the repository at this point in the history
* Implemented LuaMachine for Lua and Mod support.
* Added Lua Scripting to DataWidgets and DataLists
* Added LerpCurve AsyncAction
  • Loading branch information
StudioSyndiCatCaius committed Mar 4, 2024
1 parent 90626c8 commit a0a9d66
Show file tree
Hide file tree
Showing 288 changed files with 12,984 additions and 89 deletions.
54 changes: 54 additions & 0 deletions OmegaGameFramework/BuildingNotes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Building Lua static library for Mac

```sh
# edit src/Makefile and set MYCFLAGS to -mmacosx-version-min=10.12 -arch arm64 -arch x86_64
make macosx
```

# Building Lua static library for Linux x86_64

```sh
# after having added -fPIC to MYCFLAGS in src/Makefile
make linux
```

# Building Lua static library for Win64

```sh
# open visual studio shell for x64 and move to the src/ directory (change cl.exe and lib.exe with their arm64 version for hololens)
cl /MD /O2 /c /DLUA_BUILD_AS_DLL /DLUA_COMPAT_5_2 *.c
del lua.obj
del luac.obj
lib /OUT:liblua53_win64.lib *.obj
```

# Building Lua static library for Android

```sh
# assume ndk is installed in home with api 24
~/ndk/bin/clang -O2 -Wall -Werror -Wextra -DLUA_USE_POSIX -DLUA_USEDLOPEN -DLUA_COMPAT_5_2 -std=gnu99 -c *.c
rm lua.o
rm luac.o
~/ndk/bin/arm-linux-androideabi-ar.exe rcu liblua53_android.a *.o
```

# Building Lua static library for iOS

Comment the os_execute function in loslib.c and its mapping in the syslib array

```sh
clang -arch arm64 -mios-version-min=7.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/ -O2 -Wall -Werror -Wextra -DLUA_USE_POSIX -DLUA_USEDLOPEN -DLUA_COMPAT_5_2 -std=gnu99 -c *.c
rm lua.o luac.o
ar rcu liblua53_ios.a *.o
```


# Building Lua static library for Linux AArch64

```sh
# assume cross compiler for aarch64 is available
aarch64-linux-gnu-gcc -O2 -Wall -Werror -Wextra -DLUA_USE_POSIX -DLUA_USEDLOPEN -DLUA_COMPAT_5_2 -std=gnu99 -c *.c
rm lua.o
rm luac.o
aarch64-linux-gnu-ar rcD liblua53_linux_aarch64.a *.o
```
Binary file not shown.
Binary file not shown.
Binary file modified OmegaGameFramework/Content/Blueprints/Actors/OmegaBulletBase.uasset
Binary file not shown.
Binary file not shown.
Binary file modified OmegaGameFramework/Content/Blueprints/Actors/OmegaPickup.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified OmegaGameFramework/Content/Blueprints/Components/Player_HUD.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified OmegaGameFramework/Content/Blueprints/Macros/mac_Assets.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified OmegaGameFramework/Content/Blueprints/OmegaGameFunctions.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified OmegaGameFramework/Content/DEMO/Abilities/DemoAbility_Jump.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified OmegaGameFramework/Content/DEMO/Attributes/DemoAtb_Health.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified OmegaGameFramework/Content/DEMO/DemoSky.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified OmegaGameFramework/Content/DEMO/Game/Book/OmegaDemo_Book.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified OmegaGameFramework/Content/DEMO/Game/OmegaDemoMap.umap
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified OmegaGameFramework/Content/DEMO/LinearEvents/LE_BGM_Play.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified OmegaGameFramework/Content/DEMO/OmegaDemoCharacter.uasset
Binary file not shown.
Binary file modified OmegaGameFramework/Content/DEMO/OmegaGameMode_Demo.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified OmegaGameFramework/Content/Materials/Shaders/Flats/M_Flat.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified OmegaGameFramework/Content/Materials/m_OmegaShader.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
23 changes: 23 additions & 0 deletions OmegaGameFramework/OmegaGameFramework.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,29 @@
"CanContainContent": true,
"Installed": true,
"Modules": [
{
"Name": "LuaMachine",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Mac",
"Win64",
"Linux",
"LinuxArm64",
"Android",
"IOS",
]
},
{
"Name": "LuaMachineEditor",
"Type": "Editor",
"LoadingPhase": "Default",
"WhitelistPlatforms": [
"Linux",
"Mac",
"Win64"
]
},
{
"Name": "FileSDK",
"Type": "Runtime",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OmegaGameFramework/Resources/ico_LuaAsset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OmegaGameFramework/Resources/ico_LuaTable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
102 changes: 102 additions & 0 deletions OmegaGameFramework/Source/LuaMachine/LuaMachine.Build.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// Copyright 2018-2023 - Roberto De Ioris

using UnrealBuildTool;

public class LuaMachine : ModuleRules
{
public LuaMachine(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
bUseUnity = false;

PublicIncludePaths.AddRange(
new string[] {
// ... add public include paths required here ...
}
);


PrivateIncludePaths.AddRange(
new string[] {
// ... add other private include paths required here ...
}
);


PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"HTTP",
"Json",
"DeveloperSettings",
"PakFile"
// ... add other public dependencies that you statically link with here ...
}
);


PrivateDependencyModuleNames.AddRange(
new string[]
{
"CoreUObject",
"Engine",
"Slate",
"SlateCore",
"UMG",
"InputCore",
// ... add private dependencies that you statically link with here ...
}
);


DynamicallyLoadedModuleNames.AddRange(
new string[]
{
// ... add any modules that your module loads dynamically here ...
}
);

if (Target.bBuildEditor)
{
PrivateDependencyModuleNames.AddRange(new string[]{
"UnrealEd",
"Projects"
});
}

string ThirdPartyDirectory = System.IO.Path.Combine(ModuleDirectory, "..", "ThirdParty");

if (Target.Platform == UnrealTargetPlatform.Win64)
{
PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyDirectory, "x64", "liblua53_win64.lib"));
}

else if (Target.Platform == UnrealTargetPlatform.Mac)
{
PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyDirectory, "x64", "liblua53_mac.a"));
}

else if (Target.Platform == UnrealTargetPlatform.Linux)
{
PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyDirectory, "x64", "liblua53_linux64.a"));
}

else if (Target.Platform == UnrealTargetPlatform.LinuxArm64)
{
PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyDirectory, "ARM64", "liblua53_linux_aarch64.a"));
}

else if (Target.Platform == UnrealTargetPlatform.Android)
{
PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyDirectory, "ARMv7", "liblua53_android.a"));
PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyDirectory, "ARM64", "liblua53_android64.a"));
}

else if (Target.Platform == UnrealTargetPlatform.IOS)
{
PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyDirectory, "ARM64", "liblua53_ios.a"));
}

}
}
Loading

0 comments on commit a0a9d66

Please sign in to comment.