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 build error after embedded framework changed #192

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

philippm
Copy link

Say you have an app that uses an embedded framework:

# Rakefile
Motion::Project::App.setup do |app|
  app.name = 'ABC'
  app.embedded_frameworks << "vendor/XYZ.framework"
end

When you run rake it copies the framework folder into the app bundle:

build/.../ABC.app/Contents/Frameworks/XYZ.framework/

But when the framework changes -- for example when its recompiled, or
updated to a newer version -- running rake again copies the newer
version into a subfolder:

build/.../ABC.app/Contents/Frameworks/XYZ.framework/XYZ.framework

The result is that the app still links against the older version.

Now when you run rake a third time, you get an error message along the
lines of:

Errno::EEXIST: File exists @ sys_fail2 - (Versions/Current/Headers,
./build/.../ABC.app/Contents/Frameworks/XYZ.framework/XYZ.framework/Headers)

This commit fixes this problem by removing the old framework if a newer
version is available.

Say you have an app that uses an embedded framework:

    # Rakefile
    Motion::Project::App.setup do |app|
      app.name = 'ABC'
      app.embedded_frameworks << "vendor/XYZ.framework"
    end

When you run `rake` it copies the framework folder into the app bundle:

    build/.../ABC.app/Contents/Frameworks/XYZ.framework/

But when the framework changes -- for example when its recompiled, or
updated to a newer version -- running `rake` again copies the newer
version into a subfolder:

    build/.../ABC.app/Contents/Frameworks/XYZ.framework/XYZ.framework

The result is that the app still links against the older version.

Now when you run `rake` a third time, you get an error message along the
lines of:

    Errno::EEXIST: File exists @ sys_fail2 - (Versions/Current/Headers,
    ./build/.../ABC.app/Contents/Frameworks/XYZ.framework/XYZ.framework/Headers)

This commit fixes this problem by removing the old framework if a newer
version is available.
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.

1 participant