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

Wrong architecture into examples when build for mac #10

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 0 comments
Open

Wrong architecture into examples when build for mac #10

GoogleCodeExporter opened this issue Mar 14, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Hi everybody,
the SConstructor of the examples compiles the plugin only for the x86_64 
architecture. The issue is that chrome for mac is compiled for x86 architecture.

To resolve it I've edited the SContructor adding this lines:

universalFlags = "-arch i386 -arch x86_64"

and modifying the platform's check from 

elif sys.platform == 'darwin':
  env.Append(CODEGEN = 'codegen.sh',
             CPPDEFINES = ['XP_MACOSX', 'OS_MACOSX'],
             LINKFLAGS = ' -framework CoreFoundation -framework IOKit')

to

elif sys.platform == 'darwin':
  env.Append(CODEGEN = 'codegen.sh',
         CFLAGS = universalFlags + " -Wall -pedantic",
             CPPDEFINES = ['XP_MACOSX', 'OS_MACOSX'],
             LINKFLAGS = universalFlags + ' -framework CoreFoundation -framework IOKit')

Done!

In the end, the plugin must be incapsulated in a bundle 

libhelloworld.plugin/
  |
  `Contents/
      |
      `Info.plist 
      `MacOS/
         |
         `libhelloworld (the compiled plugin) 

an exemple of Info.plist is attached to this issue.

bye

Original issue reported on code.google.com by [email protected] on 24 Oct 2012 at 5:44

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant