pimanttr / nixysa

Automatically exported from code.google.com/p/nixysa
Apache License 2.0
0 stars 0 forks source link

Wrong architecture into examples when build for mac #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 boemianr...@gmail.com on 24 Oct 2012 at 5:44

Attachments: