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

Improvements to MacOS packaging #2733

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

markreidvfx
Copy link
Contributor

  • ported over changes from appleseed-maya packaging
  • package script optionally builds a Application
  • package script builds dmg file instead of zip

Copy link
Member

@dictoon dictoon left a comment

Choose a reason for hiding this comment

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

Awesome!

I'm nitpicking but I wonder if the appleseed logo shouldn't be shown in perspective on the drive icon?

src/appleseed.shared/application/application.cpp Outdated Show resolved Hide resolved
src/appleseed.studio/main/main.cpp Outdated Show resolved Hide resolved
src/appleseed.studio/python/pythoninterpreter.cpp Outdated Show resolved Hide resolved
src/appleseed.studio/python/pythoninterpreter.cpp Outdated Show resolved Hide resolved
src/appleseed.studio/python/pythoninterpreter.cpp Outdated Show resolved Hide resolved
src/appleseed.studio/python/pythoninterpreter.cpp Outdated Show resolved Hide resolved
src/appleseed.studio/python/pythoninterpreter.cpp Outdated Show resolved Hide resolved
src/appleseed.studio/python/pythoninterpreter.cpp Outdated Show resolved Hide resolved
src/appleseed.studio/python/pythoninterpreter.cpp Outdated Show resolved Hide resolved
Copy link
Member

@dictoon dictoon left a comment

Choose a reason for hiding this comment

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

Some more comments.

scripts/appleseed.package.py Show resolved Hide resolved
scripts/appleseed.package.py Outdated Show resolved Hide resolved
safe_make_directory(macos)

# relative symlink for executable
os.symlink('../bin/appleseed-studio', os.path.join(macos, 'appleseed'))
Copy link
Member

Choose a reason for hiding this comment

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

So the story here is that on macOS we have to rename appleseed.studio to appleseed-studio in order to allow double-clicking on the file in the Finder to start the app. Is this workaround still necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah I see, I was wondering why. I was thinking of just moving the executable too. I was surprised that mac didn't complain about the main executable being a symlink.

Copy link
Member

Choose a reason for hiding this comment

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

So, we keep the workaround?

scripts/appleseed.package.py Outdated Show resolved Hide resolved
scripts/appleseed.package.py Outdated Show resolved Hide resolved
scripts/appleseed.package.py Outdated Show resolved Hide resolved
scripts/appleseed.package.py Outdated Show resolved Hide resolved
scripts/appleseed.package.py Outdated Show resolved Hide resolved
scripts/appleseed.package.py Outdated Show resolved Hide resolved
@@ -750,9 +935,34 @@ def get_dependencies_for_file(self, filepath, fix_paths=True, verbose=True):
lib = m.group(1)

# Ignore self-references (why do these happen?).
if lib == filename:
if lib == filepath:
Copy link
Member

Choose a reason for hiding this comment

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

This is a significant change, did you check that it still works?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll double check if this is correct, I know why these self references happen so I'll update the comments too.

Copy link
Member

Choose a reason for hiding this comment

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

Did you mean to fix/update the code and comment here? As far as I can tell, the situation hasn't changed since I've made the comment that this was a significant change.

@markreidvfx
Copy link
Contributor Author

@dictoon how is this for the drive icon instead? I rendered it with appleseed.

image

@dictoon
Copy link
Member

dictoon commented Nov 17, 2019

I rendered it with appleseed.

Ah, lovely touch :)

The logo is a bit washed out, maybe that can be fixed in post to approach the correct color?

@markreidvfx
Copy link
Contributor Author

markreidvfx commented Nov 18, 2019

The logo is a bit washed out

You are correct the texture is getting double srgb'd. Enabling CMS on the asTexure fixes it.

drive_icon_V2 0001

also keymixed in the albedo for the logo

@dictoon
Copy link
Member

dictoon commented Nov 18, 2019

Lovely!

@dictoon
Copy link
Member

dictoon commented Nov 19, 2019

Testing your script, I got the following error:

  Mac-specific: Adding dependencies to staging directory...
Traceback (most recent call last):
  File "./appleseed.package.py", line 1244, in <module>
    main()
  File "./appleseed.package.py", line 1238, in main
    package_builder.build_package()
  File "./appleseed.package.py", line 393, in build_package
    self.orchestrate()
  File "./appleseed.package.py", line 411, in orchestrate
    self.postprocess_stage()
  File "./appleseed.package.py", line 707, in postprocess_stage
    self.__add_dependencies_to_stage()
  File "./appleseed.package.py", line 734, in __add_dependencies_to_stage
    self.add_unix_dependencies_to_stage(self.get_paths_to_binaries())
  File "./appleseed.package.py", line 504, in add_unix_dependencies_to_stage
    libs = self.get_dependencies_for_file(path)
  File "./appleseed.package.py", line 993, in get_dependencies_for_file
    fatal("Unable to Resolve lib {}", lib)
TypeError: fatal() takes exactly 1 argument (2 given)

@markreidvfx
Copy link
Contributor Author

Guess there needs to be a .format(lib) there instead

@dictoon
Copy link
Member

dictoon commented Dec 21, 2019

Hi Mark,

I'd love to get this PR merged. Would you mind updating it? I'll also do some more tests in the coming days.

Thanks!

@markreidvfx
Copy link
Contributor Author

Sorry for the delay, a couple other projects came up. I'll try and get this finished up when I'm back from holidays in the new year!

Copy link
Member

@dictoon dictoon left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

Copy link
Member

@dictoon dictoon left a comment

Choose a reason for hiding this comment

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

Upon closer inspection, the self-references thing when iterating over dependencies is still pending.

@oktomus
Copy link
Member

oktomus commented Apr 10, 2021

Hi @markreidvfx, thanks your contribution :) Do you still plan on working on that PR? It seems there is very few changes to make before being able to merge it into master.

@markreidvfx
Copy link
Contributor Author

Sorry, I got really busy and must have forgotten about this. I'll try and find some time to finish it, just have too many ongoing projects at the moment. If anyone want to take it over, feel free too.

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.

3 participants