Skip to content

Instantly share code, notes, and snippets.

View yagitoshiro's full-sized avatar

yagi_ yagitoshiro

View GitHub Profile
@hansemannn
hansemannn / ti.dynamiclib.js
Last active July 10, 2017 15:49
Support embedded binaries (aka dynamic libraries) in Titanium modules and Hyperloop
/**
* Ti.DynamicLib
* @abstract Support embedded binaries (aka dynamic libraries) in Titanium modules and Hyperloop.
* @version 1.1.0
*
* Install:
* 1) Search and replace '../../src/<YourFramework>.framework' with your framework location.
The path is relative to the `build/iphone` directory.
* 2a) For classic modules:
* - Add 'LD_RUNPATH_SEARCH_PATHS=$(inherited) "@executable_path/Frameworks" $(FRAMEWORK_SEARCH_PATHS)'
@billdawson
billdawson / android_scons_speedups.md
Created January 11, 2012 21:41
Speeding up Titanium Build

Speeding up Titanium Mobile Build

(The command examples assume OS X).

Just about everything that happens when you enter scons is for Android. So anything you can do to speed up the Android part of our build will be useful.

  • Android NDK r7 can use ccache. We get huge improvements in build time with it. So install it (if you have HomeBrew, brew install ccache) then set a shell variable NDK_CCACHE to point to it. I.e., for me, having installed it with brew, it would be export NDK_CCACHE=/usr/local/bin/ccache.

  • NDK can also parallelize while compiling. Set a shell variable NUM_CPUS to (according to Opie) 2x the number of cores in your machine. A quick way to get the # cores on your machine in OS X is system_profiler | grep "Number Of Cores" in terminal. I have 2 cores, so my shell var setting is export NUM_CPUS=4.