Development Team/Almanac/Activity Bundles: Difference between revisions
alternative way to add libraries |
|||
| Line 144: | Line 144: | ||
== Bundling Native Libraries == | == Bundling Native Libraries == | ||
Sometimes you need to include a native library or two with your activity. | Sometimes you need to include a native library or two with your activity. The strategy that [[Develop]] and [[Model]] use is specifying a shell script for the executable in the .info file: | ||
exec = ./model_startup.sh | exec = ./model_startup.sh | ||
The script, 'model_startup.sh', modifies the library path, python, or both paths (depending on the types of libraries you are including) to | The script, 'model_startup.sh', modifies the library path, python, or both paths (depending on the types of libraries you are including) to reference folders inside your bundle, then launches your application: | ||
#!/bin/sh | #!/bin/sh | ||
| Line 157: | Line 157: | ||
sugar-activity model_app.ModelActivity | sugar-activity model_app.ModelActivity | ||
Make sure to add your shell script and any native libraries to the MANIFEST before you package your bundle. You can also accomplish the same thing by throwing all your libraries in the root folder of the bundle, like the [[Map_(activity)|Map activity]] does, but | Make sure to add your shell script and any native libraries to the MANIFEST before you package your bundle. You can also accomplish the same thing by throwing all your libraries in the root folder of the bundle, like the [[Map_(activity)|Map activity]] does, but if you have more than a few libraries to include it can get quite cluttered. | ||
== Other Technologies Comparison == | == Other Technologies Comparison == | ||