-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux & Macos support for the Unreal Engine plugin #873
Conversation
I'd suggest doing a separate PR to remove the code from |
All right, I'm preparing a new PR with the code removed |
OK I've submitted an new PR #874 . When it's merged I'll update this one. |
The branch was updated, the hack removed and merged with master. |
Codecov Report
@@ Coverage Diff @@
## master #873 +/- ##
=======================================
Coverage 24.89% 24.89%
=======================================
Files 168 168
Lines 18887 18887
=======================================
Hits 4701 4701
Misses 14186 14186 |
@gallonmate, @AlbanBERGERET-Epic does this PR look good to you ? |
The UE changes seem to be legit, but I can't test them because I don't have these platforms. But I guess Yannick did so and did not break anything on the Windows platform. |
@AlbanBERGERET-Epic here is a screenshot of the plugin working on the mac editor. As explained in the description, this PR is for Macos support only for now because I've an issue with the linker on Linux. A separate PR will add Linux and probably Android support in few days/weeks. @bcoconni I found a potential bug, please do not merge the PR until it's sure to be fixed |
Hey there, |
Don't bother polishing your PR history as we are squashing PR commits into one single commit anyway. |
OK I've reopened the PR and will change the status when it's ready then |
@demonixis, @finger563 |
@bcoconni I did switch over to @demonixis' mainline branch and did a full re-build of the dynamic library, unreal engine project (in xcode), and played the example map in the editor in UE 5.2.1 - everything worked as expected. Edit: #!/bin/bash
# make build folder and cd into it
mkdir -p build
cd build
# build the jsbsim library with cmake
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS="-stdlib=libc++" ..
make -j4
# cd back to the root directory
cd ..
# set the unreal plugin folder for use in the script
UNREAL_PLUGIN_FOLDER=./UnrealEngine/Plugins/JSBSimFlightDynamicsModel
UNREAL_PLUGIN_INCLUDE_FOLDER=$UNREAL_PLUGIN_FOLDER/Source/ThirdParty/JSBSim/Include
UNREAL_PLUGIN_LIB_FOLDER=$UNREAL_PLUGIN_FOLDER/Source/ThirdParty/JSBSim/Lib/Mac
UNREAL_PLUGIN_RESOURCES_FOLDER=$UNREAL_PLUGIN_FOLDER/Resources/JSBSim
echo "Copying JSBSim header files to Unreal plugin folder: $UNREAL_PLUGIN_INCLUDE_FOLDER"
# make the unreal plugin thirdparty/jsbsim/include folder
rm -rf $UNREAL_PLUGIN_INCLUDE_FOLDER
mkdir -p $UNREAL_PLUGIN_INCLUDE_FOLDER
# copy the include files (.h,.hxx) from src (and its subdirectories) into unreal
# plugin thirdparty/jsbsim/include folder, keeping the same directory structure
# as in src. Since we're on macos, we use rsync instead of cp to preserve the
# directory structure
# Copy headers
rsync -avm --include='*.h' --include='*.hpp' --include='*.hxx' -f 'hide,! */' src/ UnrealEngine/Plugins/JSBSimFlightDynamicsModel/Source/ThirdParty/JSBSim/Include/
echo "Copying JSBSim library to Unreal plugin folder: $UNREAL_PLUGIN_LIB_FOLDER"
# make the unreal plugin thirdparty/jsbsim/lib folder
mkdir -p $UNREAL_PLUGIN_LIB_FOLDER
# copy the jsbsim library from the build folder into the unreal plugin
# thirdparty/jsbsim/lib folder
# cp ./build/src/libJSBSim.a $UNREAL_PLUGIN_LIB_FOLDER/.
cp ./build/src/*.dylib $UNREAL_PLUGIN_LIB_FOLDER/.
echo "Copying JSBSim resources to Unreal plugin folder: $UNREAL_PLUGIN_RESOURCES_FOLDER"
# make the unreal plugin resources folder
mkdir -p $UNREAL_PLUGIN_RESOURCES_FOLDER
# copy the aircraft, engine, and systems folders into the unreal plugin resources folder
cp -r ./aircraft $UNREAL_PLUGIN_FOLDER/Resources/JSBSim/.
cp -r ./engine $UNREAL_PLUGIN_FOLDER/Resources/JSBSim/.
cp -r ./systems $UNREAL_PLUGIN_FOLDER/Resources/JSBSim/. |
That great to read, note it adds Linux (and Android) too. However I wasn't able to run it on my M2 mac. Have you tried on an Apple Silicon or an Intel based one? |
This time it's ready :) |
* Test tied properties. * Add the ability to untie `FGAtmosphere` properties
* Add a new `LoadPlanet` method * Fix the help messages.
…#908) * Do not store the result of `FGFDMExec::GetAtmosphere()`. * Constification to clarify the intent.
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.12.3 to 2.13.0. - [Release notes](https://github.com/pypa/cibuildwheel/releases) - [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md) - [Commits](pypa/cibuildwheel@v2.12.3...v2.13.0) --- updated-dependencies: - dependency-name: pypa/cibuildwheel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.13.0 to 2.13.1. - [Release notes](https://github.com/pypa/cibuildwheel/releases) - [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md) - [Commits](pypa/cibuildwheel@v2.13.0...v2.13.1) --- updated-dependencies: - dependency-name: pypa/cibuildwheel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump pypa/cibuildwheel from 2.13.1 to 2.14 Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.13.1 to 2.14.0. - [Release notes](https://github.com/pypa/cibuildwheel/releases) - [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md) - [Commits](pypa/cibuildwheel@v2.13.1...v2.14.0) --- updated-dependencies: - dependency-name: pypa/cibuildwheel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Remove the patch version number. --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bertrand Coconnier <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
Hello,
This PR adds build support for Macos as well as foundations for Linux and Android.
I've update the readme located into the UnrealEngine folder with everything required to compile it.
Linux / Android support is on its way, just few compilation error to fix on Android and a linking issue with Linux. Other PR will come later to fix that.