Skip to content
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

fix: add IL2CPP_ADDITIONAL_ARGS for 2019.3.x-linux-il2cpp #63

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions editor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,15 @@ RUN [ `echo $module | grep -v '\(webgl\|linux-il2cpp\)'` ] && exit 0 || : \
clang \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

#=======================================================================================
# [2019.3.x-linux-il2cpp] IL2CPP_ADDITIONAL_ARGS='--sysroot-path=/ --tool-chain-path=/'
# https://forum.unity.com/threads/unity-2019-3-linux-il2cpp-player-can-only-be-built-with-linux-error.822210/#post-5633977
#=======================================================================================
RUN [ `echo $version-$module | grep -v '^2019.3.*-linux-il2cpp'` ] && exit 0 || : \
&& { \
echo '#!/bin/bash'; \
echo 'export IL2CPP_ADDITIONAL_ARGS="--sysroot-path=/ --tool-chain-path=/"'; \
echo 'xvfb-run -ae /dev/stdout "$UNITY_PATH/Editor/Unity" -batchmode "$@"'; \
} > /usr/bin/unity-editor \
&& chmod +x /usr/bin/unity-editor
Copy link
Member

@webbertakken webbertakken Jan 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this seems to be the only correct workaround, I would consider this not an "extra step".

Instead I think this should be part of the run command at line 38 if possible. Otherwise, perhaps immediately after.

My suggestion would be to use some kind of if-elseif-else clause where we can customise /usr/bin/unity-editor and default to the existing one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'll follow your suggestion. 👍

Copy link
Contributor Author

@mob-sakai mob-sakai Jan 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example:

RUN { \
        echo '#!/bin/bash'; \
        echo ''; \
        \
        [ `echo $version-$module | grep -e '^2019.3.*-linux-il2cpp'` ] \
            && echo '# [2019.3.x-linux-il2cpp] https://forum.unity.com/threads/unity-2019-3-linux-il2cpp-player-can-only-be-built-with-linux-error.822210/#post-5633977' \
            && echo 'export IL2CPP_ADDITIONAL_ARGS="--sysroot-path=/ --tool-chain-path=/"' \
            && echo ''; \
        \
        echo 'xvfb-run -ae /dev/stdout "$UNITY_PATH/Editor/Unity" -batchmode "$@"'; \
    } > /usr/bin/unity-editor \
    && chmod +x /usr/bin/unity-editor
Generated unity-editor for 2019.3.x-linux-il2cpp

#!/bin/bash

# [2019.3.x-linux-il2cpp] https://forum.unity.com/threads/unity-2019-3-linux-il2cpp-player-can-only-be-built-with-linux-error.822210/#post-5633977
export IL2CPP_ADDITIONAL_ARGS="--sysroot-path=/ --tool-chain-path=/"

xvfb-run -ae /dev/stdout "$UNITY_PATH/Editor/Unity" -batchmode "$@"

Otherwise

#!/bin/bash

xvfb-run -ae /dev/stdout "$UNITY_PATH/Editor/Unity" -batchmode "$@"

Tested with #60 (in my repo)