Compare commits
27 Commits
6b7ba5cc83
...
29dc009fda
Author | SHA1 | Date | |
---|---|---|---|
|
29dc009fda | ||
|
26350c197e | ||
|
9f700111f7 | ||
|
ddf8e4bfd7 | ||
|
1d415c00ed | ||
02985f5928 | |||
|
c344bdb3b4 | ||
c3c66ebaca | |||
2b6f510706 | |||
|
897f1a6b10 | ||
|
566a6fc59f | ||
|
e320ad185a | ||
|
0a9a9f153c | ||
|
3dcad847bf | ||
43a96553b4 | |||
594356189a | |||
|
db91b1f5c2 | ||
|
1fbe794f92 | ||
|
5be268c913 | ||
d9a5601439 | |||
|
121797d73f | ||
|
344174e4cd | ||
|
01e6d529cd | ||
449dcc96db | |||
|
f55ebca0d9 | ||
|
abc2ef731d | ||
|
31fb606d06 |
75
.gitea/workflows/create-release.yml
Normal file
75
.gitea/workflows/create-release.yml
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
name: Create Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: 'Version for this release (e.g. 1.0.0)'
|
||||||
|
required: true
|
||||||
|
default: ''
|
||||||
|
prerelease:
|
||||||
|
description: 'Is this a pre-release?'
|
||||||
|
required: true
|
||||||
|
default: 'false'
|
||||||
|
type: boolean
|
||||||
|
description:
|
||||||
|
description: 'Release description'
|
||||||
|
required: false
|
||||||
|
default: 'New release'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
create-release:
|
||||||
|
runs-on: macos
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
lfs: true
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Create Tag
|
||||||
|
run: |
|
||||||
|
# Set tag name
|
||||||
|
TAG="v${{ github.event.inputs.version }}"
|
||||||
|
echo "Creating git tag: $TAG"
|
||||||
|
|
||||||
|
# Configure git
|
||||||
|
git config --global user.email "actions@gitea.com"
|
||||||
|
git config --global user.name "Gitea Actions"
|
||||||
|
|
||||||
|
# Check if tag already exists
|
||||||
|
if git rev-parse "$TAG" >/dev/null 2>&1; then
|
||||||
|
echo "Tag $TAG already exists"
|
||||||
|
else
|
||||||
|
echo "Creating new tag $TAG"
|
||||||
|
git tag -a "$TAG" -m "Release $TAG"
|
||||||
|
# Push the tag explicitly
|
||||||
|
git push origin "$TAG"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Verify tag exists
|
||||||
|
git fetch --tags
|
||||||
|
echo "Checking out tag: $TAG"
|
||||||
|
git checkout "$TAG" || (echo "Failed to checkout tag" && exit 1)
|
||||||
|
|
||||||
|
# Verify we are on the tag, not on a branch
|
||||||
|
CURRENT_REF=$(git symbolic-ref -q HEAD || git rev-parse HEAD)
|
||||||
|
echo "Current ref: $CURRENT_REF"
|
||||||
|
if [[ "$CURRENT_REF" == *"refs/heads/"* ]]; then
|
||||||
|
echo "ERROR: Still on a branch, not on the tag"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Export tag name for later steps
|
||||||
|
echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
uses: https://gitea.com/actions/release-action@main
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
builds/**
|
||||||
|
api_key: '${{ secrets.GITEA_TOKEN }}'
|
||||||
|
title: 'Release ${{ env.RELEASE_TAG }}'
|
||||||
|
body: '${{ github.event.inputs.description }}'
|
||||||
|
prerelease: ${{ github.event.inputs.prerelease }}
|
||||||
|
tag_name: '${{ env.RELEASE_TAG }}'
|
@ -16,7 +16,7 @@ jobs:
|
|||||||
# fetch-depth: 0
|
# fetch-depth: 0
|
||||||
|
|
||||||
# - name: Setup Unreal Engine
|
# - name: Setup Unreal Engine
|
||||||
# run: |
|
# run: |
|
||||||
# # Ensure Unreal Engine is installed and set up
|
# # Ensure Unreal Engine is installed and set up
|
||||||
# # This assumes you have Unreal Engine installed on your runner
|
# # This assumes you have Unreal Engine installed on your runner
|
||||||
# # If not, you can add installation steps here
|
# # If not, you can add installation steps here
|
||||||
@ -56,175 +56,77 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Unreal Engine
|
- name: Setup Unreal Engine
|
||||||
timeout-minutes: 5 # Add timeout to prevent hanging
|
|
||||||
run: |
|
run: |
|
||||||
# Set environment variable with the correct Engine path
|
# Use the correct path where Unreal Engine is installed
|
||||||
UE_PATH="/Users/Shared/Epic Games/UE_5.5"
|
UE_PATH="/Users/Shared/Epic Games/UE_5.5"
|
||||||
echo "UE_ROOT=$UE_PATH/Engine" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
echo "UE_PATH=$UE_PATH" >> $GITHUB_ENV
|
|
||||||
source $GITHUB_ENV
|
|
||||||
|
|
||||||
echo "Unreal Engine paths:"
|
if [ ! -d "$UE_PATH" ]; then
|
||||||
echo "UE_ROOT=$UE_ROOT"
|
echo "Error: Unreal Engine is not installed in the expected location"
|
||||||
echo "UE_PATH=$UE_PATH"
|
echo "Please ensure Unreal Engine is installed at $UE_PATH"
|
||||||
|
|
||||||
# Set up MuJoCo library
|
|
||||||
MUJOCO_LIB_DIR="Plugins/LuckyMujoco/Source/ThirdParty/Mujoco/lib"
|
|
||||||
mkdir -p "$MUJOCO_LIB_DIR"
|
|
||||||
|
|
||||||
# Try to find mujoco.dylib in the repository
|
|
||||||
if [ -f "Plugins/UEMujoco.rar" ]; then
|
|
||||||
echo "Found UEMujoco.rar, attempting to extract..."
|
|
||||||
mkdir -p /tmp/mujoco_extract
|
|
||||||
unrar x "Plugins/UEMujoco.rar" /tmp/mujoco_extract || echo "Failed to extract UEMujoco.rar"
|
|
||||||
|
|
||||||
# Look for mujoco.dylib in extracted files
|
|
||||||
DYLIB_PATH=$(find /tmp/mujoco_extract -name "mujoco.dylib" | head -1)
|
|
||||||
if [ -n "$DYLIB_PATH" ]; then
|
|
||||||
echo "Found mujoco.dylib at $DYLIB_PATH"
|
|
||||||
cp "$DYLIB_PATH" "$MUJOCO_LIB_DIR/"
|
|
||||||
else
|
|
||||||
echo "Could not find mujoco.dylib in extracted files"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If still no dylib, try to download it
|
|
||||||
if [ ! -f "$MUJOCO_LIB_DIR/mujoco.dylib" ]; then
|
|
||||||
echo "Attempting to download mujoco.dylib..."
|
|
||||||
curl -L -o "$MUJOCO_LIB_DIR/mujoco.dylib" "https://github.com/deepmind/mujoco/releases/download/2.3.7/mujoco-2.3.7-macos-universal2.dmg"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Verify the library exists
|
|
||||||
if [ ! -f "$MUJOCO_LIB_DIR/mujoco.dylib" ]; then
|
|
||||||
echo "ERROR: Failed to set up mujoco.dylib"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure the library is executable
|
# Set environment variable with the correct Engine path
|
||||||
chmod +x "$MUJOCO_LIB_DIR/mujoco.dylib"
|
echo "UE_ROOT=$UE_PATH/Engine" >> $GITHUB_ENV
|
||||||
|
echo "Using Unreal Engine 5.5"
|
||||||
# Try multiple locations for the mujoco library
|
|
||||||
# 1. Create directory in Engine/Source
|
|
||||||
mkdir -p "$UE_ROOT/Source"
|
|
||||||
echo "Created directory: $UE_ROOT/Source"
|
|
||||||
|
|
||||||
# 2. Copy the library directly (don't rely on symlinks)
|
|
||||||
cp "$(pwd)/$MUJOCO_LIB_DIR/mujoco.dylib" "$UE_ROOT/Source/"
|
|
||||||
echo "Copied library to: $UE_ROOT/Source/mujoco.dylib"
|
|
||||||
|
|
||||||
# 3. Also copy to Binaries/Mac directory
|
|
||||||
mkdir -p "$UE_ROOT/Binaries/Mac"
|
|
||||||
cp "$(pwd)/$MUJOCO_LIB_DIR/mujoco.dylib" "$UE_ROOT/Binaries/Mac/"
|
|
||||||
echo "Copied library to: $UE_ROOT/Binaries/Mac/mujoco.dylib"
|
|
||||||
|
|
||||||
# 4. Add a fallback into /usr/local/lib
|
|
||||||
sudo mkdir -p /usr/local/lib
|
|
||||||
sudo cp "$(pwd)/$MUJOCO_LIB_DIR/mujoco.dylib" /usr/local/lib/
|
|
||||||
echo "Copied library to: /usr/local/lib/mujoco.dylib"
|
|
||||||
|
|
||||||
# Verify library files exist
|
|
||||||
echo "Verifying library placements:"
|
|
||||||
ls -la "$(pwd)/$MUJOCO_LIB_DIR"
|
|
||||||
ls -la "$UE_ROOT/Source" || echo "Failed to list Source directory"
|
|
||||||
ls -la "$UE_ROOT/Binaries/Mac" || echo "Failed to list Binaries/Mac directory"
|
|
||||||
ls -la /usr/local/lib/mujoco.dylib || echo "Failed to list library in /usr/local/lib"
|
|
||||||
|
|
||||||
# Set up environment for the build
|
|
||||||
export DYLD_LIBRARY_PATH="$(pwd)/Plugins/LuckyMujoco/Source/ThirdParty/Mujoco/lib:$UE_ROOT/Source:$UE_ROOT/Binaries/Mac:/usr/local/lib:$DYLD_LIBRARY_PATH"
|
|
||||||
export DYLD_FRAMEWORK_PATH="$UE_ROOT/Binaries/Mac:$DYLD_FRAMEWORK_PATH"
|
|
||||||
export DYLD_FALLBACK_LIBRARY_PATH="$UE_ROOT/Binaries/Mac:$UE_ROOT/Source:/usr/local/lib:$DYLD_FALLBACK_LIBRARY_PATH"
|
|
||||||
|
|
||||||
echo "Build environment:"
|
|
||||||
echo "DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH"
|
|
||||||
echo "DYLD_FRAMEWORK_PATH=$DYLD_FRAMEWORK_PATH"
|
|
||||||
echo "DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH"
|
|
||||||
|
|
||||||
|
|
||||||
- name: Build Unreal Project
|
- name: Build Unreal Project
|
||||||
run: |
|
run: |
|
||||||
# Debug information
|
chmod +x ./mac_build.sh
|
||||||
echo "=== Environment Information ==="
|
./mac_build.sh
|
||||||
echo "macOS Version:"
|
|
||||||
sw_vers
|
|
||||||
echo "Current working directory: $(pwd)"
|
|
||||||
echo "DYLD_LIBRARY_PATH: $DYLD_LIBRARY_PATH"
|
|
||||||
echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
|
|
||||||
|
|
||||||
# Find the project file
|
|
||||||
UPROJECT_PATH=$(find . -name "*.uproject" -type f | head -1)
|
|
||||||
if [ -z "$UPROJECT_PATH" ]; then
|
|
||||||
echo "Error: Could not find .uproject file"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get absolute path
|
|
||||||
UPROJECT_ABSOLUTE_PATH=$(realpath "$UPROJECT_PATH")
|
|
||||||
echo "Project path: $UPROJECT_ABSOLUTE_PATH"
|
|
||||||
|
|
||||||
# Ensure the MuJoCo library is in place
|
|
||||||
PROJECT_MUJOCO_DIR="Plugins/LuckyMujoco/Source/ThirdParty/Mujoco/lib"
|
|
||||||
PROJECT_MUJOCO_PATH="$PROJECT_MUJOCO_DIR/mujoco.dylib"
|
|
||||||
|
|
||||||
if [ ! -f "$PROJECT_MUJOCO_PATH" ]; then
|
|
||||||
echo "Recreating library in project directory..."
|
|
||||||
mkdir -p "$PROJECT_MUJOCO_DIR"
|
|
||||||
echo "/* Dummy MuJoCo library */" > "$PROJECT_MUJOCO_PATH"
|
|
||||||
chmod +x "$PROJECT_MUJOCO_PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Available libraries:"
|
|
||||||
ls -la "$PROJECT_MUJOCO_DIR"
|
|
||||||
ls -la /tmp/mujoco.dylib 2>/dev/null || echo "No library in /tmp"
|
|
||||||
|
|
||||||
# Set up environment explicitly for this command
|
|
||||||
export DYLD_LIBRARY_PATH="/tmp:$(pwd)/$PROJECT_MUJOCO_DIR:$DYLD_LIBRARY_PATH"
|
|
||||||
export LD_LIBRARY_PATH="/tmp:$(pwd)/$PROJECT_MUJOCO_DIR:$LD_LIBRARY_PATH"
|
|
||||||
|
|
||||||
|
|
||||||
# Run the build using absolute paths
|
|
||||||
chmod +x "$UE_ROOT/Build/BatchFiles/RunUAT.sh"
|
|
||||||
|
|
||||||
# Source environment variables again to ensure they are properly set
|
|
||||||
source $GITHUB_ENV
|
|
||||||
|
|
||||||
# Set up runtime environment for the build
|
|
||||||
export DYLD_LIBRARY_PATH="$(pwd)/Plugins/LuckyMujoco/Source/ThirdParty/Mujoco/lib:$UE_ROOT/Source:$UE_ROOT/Binaries/Mac:/usr/local/lib:$DYLD_LIBRARY_PATH"
|
|
||||||
export DYLD_FRAMEWORK_PATH="$UE_ROOT/Binaries/Mac:$DYLD_FRAMEWORK_PATH"
|
|
||||||
export DYLD_FALLBACK_LIBRARY_PATH="$UE_ROOT/Binaries/Mac:$UE_ROOT/Source:/usr/local/lib:$DYLD_FALLBACK_LIBRARY_PATH"
|
|
||||||
|
|
||||||
echo "Final build environment:"
|
|
||||||
echo "UE_ROOT=$UE_ROOT"
|
|
||||||
echo "UE_PATH=$UE_PATH"
|
|
||||||
echo "DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH"
|
|
||||||
|
|
||||||
echo "Checking for mujoco.dylib in key locations:"
|
|
||||||
ls -l "$UE_ROOT/Source/mujoco.dylib" || echo "Library not found in $UE_ROOT/Source"
|
|
||||||
ls -l "$UE_ROOT/Binaries/Mac/mujoco.dylib" || echo "Library not found in $UE_ROOT/Binaries/Mac"
|
|
||||||
ls -l "/usr/local/lib/mujoco.dylib" || echo "Library not found in /usr/local/lib"
|
|
||||||
|
|
||||||
# Run the build with additional debug output
|
|
||||||
echo "Running build command..."
|
|
||||||
|
|
||||||
|
|
||||||
"$UE_ROOT/Build/BatchFiles/RunUAT.sh" BuildCookRun \
|
|
||||||
-project="$UPROJECT_ABSOLUTE_PATH" \
|
|
||||||
-noP4 \
|
|
||||||
-platform=Mac \
|
|
||||||
-clientconfig=Development \
|
|
||||||
-cook -build -stage -pak -archive \
|
|
||||||
-archivedirectory="$(pwd)/Build" || {
|
|
||||||
echo "Build failed with status: $?"
|
|
||||||
echo "=== Error details ==="
|
|
||||||
if [ -f "/Users/m1/Library/Logs/Unreal Engine/LocalBuildLogs/UBA-LuckyrobotsEditor-Mac-Development.txt" ]; then
|
|
||||||
tail -n 100 "/Users/m1/Library/Logs/Unreal Engine/LocalBuildLogs/UBA-LuckyrobotsEditor-Mac-Development.txt"
|
|
||||||
fi
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: macos-build
|
name: macos-build
|
||||||
path: Build/
|
path: Builds/
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
|
- name: Create Tag
|
||||||
|
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
|
||||||
|
run: |
|
||||||
|
# Set tag name
|
||||||
|
TAG="v${{ github.run_number }}"
|
||||||
|
echo "Creating git tag: $TAG"
|
||||||
|
|
||||||
|
# Configure git
|
||||||
|
git config --global user.email "actions@gitea.com"
|
||||||
|
git config --global user.name "Gitea Actions"
|
||||||
|
|
||||||
|
# Check if tag already exists
|
||||||
|
if git rev-parse "$TAG" >/dev/null 2>&1; then
|
||||||
|
echo "Tag $TAG already exists"
|
||||||
|
else
|
||||||
|
echo "Creating new tag $TAG"
|
||||||
|
git tag -a "$TAG" -m "Release $TAG"
|
||||||
|
# Push the tag explicitly
|
||||||
|
git push origin "$TAG"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Verify tag exists
|
||||||
|
git fetch --tags
|
||||||
|
echo "Checking out tag: $TAG"
|
||||||
|
git checkout "$TAG" || (echo "Failed to checkout tag" && exit 1)
|
||||||
|
|
||||||
|
# Verify we are on the tag, not on a branch
|
||||||
|
CURRENT_REF=$(git symbolic-ref -q HEAD || git rev-parse HEAD)
|
||||||
|
echo "Current ref: $CURRENT_REF"
|
||||||
|
if [[ "$CURRENT_REF" == *"refs/heads/"* ]]; then
|
||||||
|
echo "ERROR: Still on a branch, not on the tag"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Export tag name for later steps
|
||||||
|
echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
|
||||||
|
uses: https://gitea.com/actions/release-action@main
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
Builds/**
|
||||||
|
api_key: '${{ secrets.GITEA_TOKEN }}'
|
||||||
|
title: 'Release ${{ env.RELEASE_TAG }}'
|
||||||
|
body: 'Automated release from CI build #${{ github.run_number }}'
|
||||||
|
prerelease: ${{ github.ref != 'refs/heads/main' }}
|
||||||
|
tag_name: '${{ env.RELEASE_TAG }}'
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -74,4 +74,5 @@ Intermediate/*
|
|||||||
Plugins/**/Intermediate/*
|
Plugins/**/Intermediate/*
|
||||||
|
|
||||||
# Cache files for the editor to use
|
# Cache files for the editor to use
|
||||||
DerivedDataCache/*
|
DerivedDataCache/*
|
||||||
|
.DS_Store
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
],
|
],
|
||||||
"TargetPlatforms": [
|
"TargetPlatforms": [
|
||||||
"Windows",
|
"Windows",
|
||||||
"Linux"
|
"Linux",
|
||||||
|
"Mac"
|
||||||
]
|
]
|
||||||
}
|
}
|
BIN
Plugins/AsyncLoadingScreen/Binaries/Mac/UnrealEditor-AsyncLoadingScreen.dylib
Normal file → Executable file
BIN
Plugins/AsyncLoadingScreen/Binaries/Mac/UnrealEditor-AsyncLoadingScreen.dylib
Normal file → Executable file
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"BuildId": "27405482",
|
"BuildId": "37670630",
|
||||||
"Modules":
|
"Modules":
|
||||||
{
|
{
|
||||||
"AsyncLoadingScreen": "UnrealEditor-AsyncLoadingScreen.dylib"
|
"AsyncLoadingScreen": "UnrealEditor-AsyncLoadingScreen.dylib"
|
||||||
|
BIN
Plugins/BlueprintJson/Binaries/Mac/UnrealEditor-BlueprintJson.dylib
Normal file → Executable file
BIN
Plugins/BlueprintJson/Binaries/Mac/UnrealEditor-BlueprintJson.dylib
Normal file → Executable file
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"BuildId": "27405482",
|
"BuildId": "37670630",
|
||||||
"Modules":
|
"Modules":
|
||||||
{
|
{
|
||||||
"BlueprintJson": "UnrealEditor-BlueprintJson.dylib"
|
"BlueprintJson": "UnrealEditor-BlueprintJson.dylib"
|
||||||
|
BIN
Plugins/FileHelperPlugin/Binaries/Mac/UnrealEditor-FileHelper.dylib
Normal file → Executable file
BIN
Plugins/FileHelperPlugin/Binaries/Mac/UnrealEditor-FileHelper.dylib
Normal file → Executable file
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"BuildId": "27405482",
|
"BuildId": "37670630",
|
||||||
"Modules":
|
"Modules":
|
||||||
{
|
{
|
||||||
"FileHelper": "UnrealEditor-FileHelper.dylib"
|
"FileHelper": "UnrealEditor-FileHelper.dylib"
|
||||||
|
BIN
Plugins/LuckyMujoco/Binaries/Mac/UnrealEditor-LuckyMujoco.dylib
Normal file → Executable file
BIN
Plugins/LuckyMujoco/Binaries/Mac/UnrealEditor-LuckyMujoco.dylib
Normal file → Executable file
Binary file not shown.
BIN
Plugins/LuckyMujoco/Binaries/Mac/UnrealEditor-LuckyMujocoEditor.dylib
Normal file → Executable file
BIN
Plugins/LuckyMujoco/Binaries/Mac/UnrealEditor-LuckyMujocoEditor.dylib
Normal file → Executable file
Binary file not shown.
@ -11,36 +11,17 @@ DEFINE_LOG_CATEGORY(LogMujoco);
|
|||||||
|
|
||||||
void FLuckyMujocoModule::StartupModule()
|
void FLuckyMujocoModule::StartupModule()
|
||||||
{
|
{
|
||||||
FString BaseDir = IPluginManager::Get().FindPlugin(TEXT("LuckyMujoco"))->GetBaseDir();
|
|
||||||
|
|
||||||
FString LibraryPath;
|
|
||||||
#if WITH_EDITOR
|
|
||||||
LibraryPath = FPaths::Combine(
|
|
||||||
*BaseDir, TEXT("Source/ThirdParty/Mujoco/bin/mujoco.dll"));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
FString Library;
|
|
||||||
#if PLATFORM_WINDOWS
|
#if PLATFORM_WINDOWS
|
||||||
Library = "mujoco.dll";
|
Library = "mujoco.dll";
|
||||||
#elif PLATFORM_MAC
|
MujocoHandle = !Library.IsEmpty() ? FPlatformProcess::GetDllHandle(*Library) : nullptr;
|
||||||
Library = "mujoco.dylib";
|
|
||||||
#elif PLATFORM_LINUX
|
|
||||||
Library = "libmujoco.so";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (WITH_EDITOR)
|
|
||||||
{
|
|
||||||
MujocoHandle = !LibraryPath.IsEmpty() ? FPlatformProcess::GetDllHandle(*LibraryPath) : nullptr;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MujocoHandle = !Library.IsEmpty() ? FPlatformProcess::GetDllHandle(*Library) : nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (MujocoHandle == nullptr)
|
if (MujocoHandle == nullptr)
|
||||||
{
|
{
|
||||||
FMessageDialog::Open(EAppMsgType::Ok, LOCTEXT("MujocoLibraryError", "Failed to load Mujoco library. Please make sure that Mujoco is installed and the library is in the correct path."));
|
FMessageDialog::Open(EAppMsgType::Ok, LOCTEXT("MujocoLibraryError", "Failed to load Mujoco library. Please make sure that Mujoco is installed and the library is in the correct path."));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void FLuckyMujocoModule::ShutdownModule()
|
void FLuckyMujocoModule::ShutdownModule()
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using UnrealBuildTool;
|
using UnrealBuildTool;
|
||||||
|
using System;
|
||||||
|
|
||||||
public class Mujoco : ModuleRules
|
public class Mujoco : ModuleRules
|
||||||
{
|
{
|
||||||
@ -16,16 +17,33 @@ public class Mujoco : ModuleRules
|
|||||||
}
|
}
|
||||||
else if (Target.Platform == UnrealTargetPlatform.Mac)
|
else if (Target.Platform == UnrealTargetPlatform.Mac)
|
||||||
{
|
{
|
||||||
PublicDelayLoadDLLs.Add("mujoco.dylib");
|
string DllPath = Path.Combine(ModuleDirectory, "lib", "mujoco.dylib");
|
||||||
PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory, "lib", "mujoco.dylib"));
|
string BinaryOutputDir = Path.Combine("$(BinaryOutputDir)", "lib");
|
||||||
RuntimeDependencies.Add(Path.Combine("$(TargetOutputDir)", "mujoco.dylib"), Path.Combine(ModuleDirectory, "lib", "mujoco.dylib"));
|
string TargetOutputDir = Path.Combine("$(TargetOutputDir)", "lib");
|
||||||
|
|
||||||
|
PublicDelayLoadDLLs.Add(DllPath);
|
||||||
|
PublicAdditionalLibraries.Add(DllPath);
|
||||||
|
|
||||||
|
RuntimeDependencies.Add(Path.Combine("$(TargetOutputDir)", "mujoco.dylib"), DllPath);
|
||||||
|
RuntimeDependencies.Add(Path.Combine("$(TargetOutputDir)", "libmujoco.3.2.7.dylib"), DllPath);
|
||||||
|
// RuntimeDependencies.Add(Path.Combine("$(TargetOutputDir)", "../../../../", "MacOS/libmujoco.3.2.7.dylib"), DllPath);
|
||||||
|
// RuntimeDependencies.Add("$(BinaryOutputDir)/UnrealEditor.app/Contents/MacOS/libmujoco.3.2.7.dylib", DllPath);
|
||||||
|
// Console.WriteLine("$BinaryOutputDir:"+ BinaryOutputDir);
|
||||||
|
// Console.WriteLine("$TargetOutputDir:" + TargetOutputDir);
|
||||||
|
// Console.WriteLine("$Target.Name:"+ Target.Name);
|
||||||
|
|
||||||
|
|
||||||
|
RuntimeDependencies.Add($"$(BinaryOutputDir)/libmujoco.3.2.7.dylib", DllPath);
|
||||||
|
// throw new Exception("test");
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (Target.Platform == UnrealTargetPlatform.Linux)
|
else if (Target.Platform == UnrealTargetPlatform.Linux)
|
||||||
{
|
{
|
||||||
PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory, "lib", "libmujoco.so"));
|
string DllPath = Path.Combine(ModuleDirectory, "lib", "libmujoco.so");
|
||||||
PublicDelayLoadDLLs.Add("libmujoco.so");
|
PublicAdditionalLibraries.Add(DllPath);
|
||||||
RuntimeDependencies.Add(Path.Combine("$(TargetOutputDir)", "libmujoco.so"), Path.Combine(ModuleDirectory, "lib", "libmujoco.so"));
|
PublicDelayLoadDLLs.Add(DllPath);
|
||||||
RuntimeDependencies.Add(Path.Combine("$(TargetOutputDir)", "libmujoco.so.3.2.7"), Path.Combine(ModuleDirectory, "lib", "libmujoco.so"));
|
RuntimeDependencies.Add(Path.Combine("$(TargetOutputDir)", "libmujoco.so"), DllPath);
|
||||||
|
RuntimeDependencies.Add(Path.Combine("$(TargetOutputDir)", "libmujoco.so.3.2.7"), DllPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
Plugins/VaRestPlugin/Binaries/Mac/UnrealEditor-VaRest.dylib
Normal file → Executable file
BIN
Plugins/VaRestPlugin/Binaries/Mac/UnrealEditor-VaRest.dylib
Normal file → Executable file
Binary file not shown.
BIN
Plugins/VaRestPlugin/Binaries/Mac/UnrealEditor-VaRestEditor.dylib
Normal file → Executable file
BIN
Plugins/VaRestPlugin/Binaries/Mac/UnrealEditor-VaRestEditor.dylib
Normal file → Executable file
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"BuildId": "27405482",
|
"BuildId": "37670630",
|
||||||
"Modules":
|
"Modules":
|
||||||
{
|
{
|
||||||
"VaRest": "UnrealEditor-VaRest.dylib",
|
"VaRest": "UnrealEditor-VaRest.dylib",
|
||||||
|
52
mac_build.sh
Executable file
52
mac_build.sh
Executable file
@ -0,0 +1,52 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Get the user's home directory
|
||||||
|
USER_HOME="$HOME"
|
||||||
|
|
||||||
|
# Set up Unreal Engine paths
|
||||||
|
UE_ROOT="/Users/Shared/Epic Games/UE_5.5"
|
||||||
|
UE_EDITOR="$UE_ROOT/Engine/Binaries/Mac/UnrealEditor.app/Contents/MacOS/UnrealEditor"
|
||||||
|
UE_UAT="$UE_ROOT/Engine/Build/BatchFiles/RunUAT.command"
|
||||||
|
|
||||||
|
# Set up project paths
|
||||||
|
PROJECT_ROOT="$(pwd)"
|
||||||
|
PROJECT_FILE="$PROJECT_ROOT/Luckyrobots.uproject"
|
||||||
|
ARCHIVE_DIR="$PROJECT_ROOT/Builds"
|
||||||
|
|
||||||
|
# Run the build command
|
||||||
|
"$UE_UAT" -ScriptsForProject="$PROJECT_FILE" Turnkey \
|
||||||
|
-command=VerifySdk \
|
||||||
|
-platform=Mac \
|
||||||
|
-UpdateIfNeeded \
|
||||||
|
-EditorIO \
|
||||||
|
-EditorIOPort=59484 \
|
||||||
|
-project="$PROJECT_FILE" \
|
||||||
|
BuildCookRun \
|
||||||
|
-nop4 \
|
||||||
|
-utf8output \
|
||||||
|
-cook \
|
||||||
|
-project="$PROJECT_FILE" \
|
||||||
|
-target=Luckyrobots \
|
||||||
|
-unrealexe="$UE_EDITOR" \
|
||||||
|
-platform=Mac \
|
||||||
|
-installed \
|
||||||
|
-stage \
|
||||||
|
-archive \
|
||||||
|
-package \
|
||||||
|
-build \
|
||||||
|
-iterativecooking \
|
||||||
|
-pak \
|
||||||
|
-iostore \
|
||||||
|
-compressed \
|
||||||
|
-prereqs \
|
||||||
|
-archivedirectory="$ARCHIVE_DIR" \
|
||||||
|
-CrashReporter \
|
||||||
|
-clientconfig=Shipping \
|
||||||
|
# -nocompile \
|
||||||
|
# -nocompileuat \
|
||||||
|
# -nocompileeditor \
|
||||||
|
# -skipbuildeditor \
|
||||||
|
|
||||||
|
# enable these if you want to test build without pak and iostore (you're just testing the build)
|
||||||
|
# -skipiostore \
|
||||||
|
# -skippak \ (disable -pak and -iostore)
|
6
xcode_build.log
Normal file
6
xcode_build.log
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Command line invocation:
|
||||||
|
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace Luckyrobots.xcworkspace -scheme LuckyrobotsEditor -configuration Development
|
||||||
|
|
||||||
|
User defaults from command line:
|
||||||
|
IDEPackageSupportUseBuiltinSCM = YES
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user