[Sugar-devel] [support-gang] Clarifications: Help package a 3D activity

Bert Freudenberg bert at freudenbergs.de
Thu May 17 09:11:20 EDT 2012


On 17.05.2012, at 03:36, Mikus Grinbergs wrote:

>>>>> This is not going to work on ARM; the target was said to be XO-1
>> Feedback for <activity_developer> to ensure that it does something
>> sensible on ARM, like "sorry, your computer is too new for this
>> activity"
> 
> On 05/16/2012 07:42 PM, James Cameron wrote:
>> I think Sugar leans toward architecture independence in the .xo files,
>> but it's something that could be raised again with Sugar Labs.
> 
> It should be feasible to "test before you run" -- but this Activity includes a binary, and as far as I know ARM machine instructions are not the same as x86 machine instructions -- and including TWO binaries (one for each architecture) leads to ".xo bloat".
> 
> And, from my limited knowledge (I haven't kept up), the design for Activities does NOT include a way for Activities to __test__ whether dependent RPMs are provided by the runtime environment.  Dependencies have traditionally been addressed by __including__ them in the .xo package -- but that just means *more* architecture-dependent files.
> 
> mikus


Executables tend to be small compared to data files. For users, a "fat" bundle containing multiple architectures is arguably simplest. You could use something like this:

ARCH=`uname -m`
BIN="$SUGAR_BUNDLE_PATH/bin-$ARCH"
exec $BIN/myexecutable

... and have both a "bin-i686" and "bin-arm7vl" directory (and lib dirs if needed).

As an example, there is a DrGeo activity bundle that supports both architectures (last time I looked, the ARM part included way too many files, but it appears to work):
	http://people.sugarlabs.org/rafael/UY/
(the proper way here would have been installing a newer Squeak VM in the system, but bundling it inside the activity is a good short-term workaround).


- Bert -




More information about the Sugar-devel mailing list