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

Conversation

mob-sakai
Copy link
Contributor

Changes

Checklist

  • Read the contribution guide and accept the code of conduct
  • Readme (updated or not needed)

Versions and modules to be fixed

Tested with #60 (in my repo)

Module Fixed?
Linux-IL2CPP ❌ -> ✅

Increased image size

< 1 KB

Comment on lines 57 to 67
#=======================================================================================
# [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)

@webbertakken webbertakken merged commit 0490cc8 into game-ci:main Jan 20, 2021
@mob-sakai mob-sakai deleted the fix/extra_dependencies_2019.3_il2cpp branch January 24, 2021 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not find valid clang executable at clang (2019.3.x-linux-il2cpp)
2 participants