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

Add support for MacOS X #2

Closed
myselfhimself opened this issue Mar 17, 2020 · 31 comments
Closed

Add support for MacOS X #2

myselfhimself opened this issue Mar 17, 2020 · 31 comments
Assignees

Comments

@myselfhimself
Copy link
Collaborator

We need this for gmic-py x blender :)

Failing build at: https://github.com/myselfhimself/gmic-blender/runs/513968946?check_suite_focus=true

raise Exception(f"dmg Unsupported")

@douglaskastle
Copy link
Member

@myselfhimself I don't have access to an Mac anything here. I have written it so that it should download the dmg for a mac if the operating system is detected. I have no experience with mounting and then using a dmg image. I am hoping it is as simple as the other two

@myselfhimself
Copy link
Collaborator Author

I have not mac too but will run blender in the blind using Github Actions and fix it progressively

@myselfhimself
Copy link
Collaborator Author

@douglaskastle
Copy link
Member

@myselfhimself those are some good notes. If you don't get to it I'll have a look at getting that to work. Once the location of blender can be found somewhere it should all just all into place after that.

douglaskastle referenced this issue in nangtani/blender-fake-addon Mar 19, 2020
#4 #7 Blender addon tester - Windows & Mac OSX Github Actions compatibility
@douglaskastle douglaskastle transferred this issue from nangtani/blender-fake-addon Mar 20, 2020
@myselfhimself
Copy link
Collaborator Author

Continuing work on this today

@myselfhimself
Copy link
Collaborator Author

douglaskastle added a commit that referenced this issue Mar 23, 2020
@douglaskastle
Copy link
Member

@myselfhimself how do I contact you outside of issues?

my email address is douglas.kastle gmail com

@myselfhimself
Copy link
Collaborator Author

My PR was merged too early, but I now have comitter access to the repository.
Look I will just work in a branch and delete my fork.
NP
:)

myselfhimself added a commit that referenced this issue Mar 23, 2020
myselfhimself added a commit that referenced this issue Mar 23, 2020
@myselfhimself
Copy link
Collaborator Author

myselfhimself added a commit that referenced this issue Mar 26, 2020
myselfhimself added a commit that referenced this issue Mar 26, 2020
@myselfhimself
Copy link
Collaborator Author

The MacOS archives inner files layout vary too much, this is very painful to code..:

  • .tar.gz (extract)
  • .dmg (to mount)
  • .zip (extract)
    Inside there can be a parent directory like Blender or blender-NNnNN (same name as the archive)
    Then the blender.app directory can have an upper case first Blender.app
    The blender executable is at blender.app/Contents/MacOS/blender
    Then the python executable is python with or without numbers with m suffix or not
    All executables must have +x permission added (I added x for owner, group, others for now)
    In order to work once the archive is mounted or extracted, one must find the Contents directory and move to the cache dir or working directory outside any read-only macos mounting space. Then that Contents directory can be renamed to a cacheable name eg. blender-2.79b.
    With macos at hand to work, in case of troubleshooting mountable dmgs on Github Actions... the easiest after a dmglib mount to os.walk or something similar into the archive and look at its contents in the logs.
    MacOS blender 2.7x python executable tends to use pip 9.0.1, which has TLS issues and cannot fetch pytest from pypi.org for example, so tests will not even start. The fix is to install pip by hand as was done for Windows already (Doug, thanks for that golden piece of code!!) here.
    This was very tedious!! Maybe in the future, blender's macos releases files layout could be uniformized.. we should report that blender.org if we want a solid blender package manager some day.

@myselfhimself
Copy link
Collaborator Author

Linux and blender 2.79b do not get on well together:
2020-03-26T00:51:00.1362624Z /home/runner/work/blender-addon-tester/blender-addon-tester/.blender_releases_cache/blender-2.79b/blender: error while loading shared libraries: libGLU.so.1: cannot open shared object file: No such file or directory
https://github.com/douglaskastle/blender-addon-tester/runs/535156496?check_suite_focus=true

linux and 2.78c as well (bundled python permissions)

@myselfhimself
Copy link
Collaborator Author

Nightlies have new compression formats:

2020-03-26T01:00:08.5386735Z Downloading https://builder.blender.org/download/blender-2.83-188ccfb0dd67-linux64.tar.xz
2020-03-26T01:00:08.5387157Z Error, unknown archive extension: {blender_zipfile}. Will not extract it.}

myselfhimself added a commit that referenced this issue Mar 26, 2020
@myselfhimself
Copy link
Collaborator Author

tar.xz support added
It seems we are now all green for all OSes, all pytest cases, all blender >=2.80 versions including nightlies, on both Travis CI and github actions

@douglaskastle
Copy link
Member

Linux and blender 2.79b do not get on well together:
2020-03-26T00:51:00.1362624Z /home/runner/work/blender-addon-tester/blender-addon-tester/.blender_releases_cache/blender-2.79b/blender: error while loading shared libraries: libGLU.so.1: cannot open shared object file: No such file or directory
https://github.com/douglaskastle/blender-addon-tester/runs/535156496?check_suite_focus=true

linux and 2.78c as well (bundled python permissions)

I had this problem on Linux too. To get around it I did an apt-get of blender, this installed blender and all its dependacies, which are what's missing.

I have no macosx experience, I don't know if there is a apt equivalent.

I would recommend getting 2.79 support, as this is a massive inflection point, there will be a group of people stuck on it for years.

However, that's up to you if you want to complete, if not, I'll take it over and try and get out working.

I would still try and keep 2.79 operational for windows and Linux and have a pass for macosx.

Thoughts?

@myselfhimself
Copy link
Collaborator Author

for clarification
2.78 and 2.79 do work on mac os x as shown here

I will try to add your 2.79 technique for linux only. For 2.78 I do not know yet.
Thanks

@douglaskastle
Copy link
Member

yes remove 2.78, thats fine

@myselfhimself
Copy link
Collaborator Author

Good for me

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

No branches or pull requests

2 participants