How to build Flac for BlackBerry Cascade? - blackberry-10

I want to build Flac for a project I'm working on in Cascades on a Mac in Mometics.
http://sourceforge.net/projects/flac/files/flac-src/
I have in the past successfully built LAME and Ogg by just dragging the c and h files into my Workspace src folder before but that's not working with Flac. I have no idea about using make files, config, building libraries, etc.
Does anyone know how I can build Flac so that I can use it in my project?
I'm on a Mac 10.8.3, want to use Flac 1.2.1,
Mometics
Version: 10.1.0
Build id: v201303191709 10

You need to cross-compile flac. Untar the sources somewhere, start a terminal and source the bbndk environment, should be something like:
. /opt/bbndk/bbndk-env.sh
depending on where you installed the sdk.
Then do the configure/make/make install dance,
./configure --prefix=/tmp/bbflac --host=arm-unknown-nto-qnx8.0.0eabi --disable-ogg
make
make install
(I had to disable ogg support as I don't have that cross-compiled, if you need it you must build the ogg library first)
You can now pick the shared (libFLAC.so / libFLAC++.so) or static (libFLAC.a / libFLAC++.a) library and required headers from /tmp/bbflac and copy into your project.

Related

Why does Unity 5.4 include the contents of Plugins/Android to iOS Project?

I have been working on building a standalone custom unitypackage comprising of combined libraries for both iOS and Android platforms. The folder structure after importing the package in a test project contains two folders inside Assets named IosLibrary and Plugins->Android. The folder IosLibrary contains all the resources and libraries required for iOS build and the content of Android folder consists of resources and libraries used for Android build.
I have tested the integration of our package with Unity 4.7 where everything worked fine; when I build the project for iOS platform, the Xcode project for iOS contains resources/headers/libraries required for iOS build. When I tried creating a test project with same package on 5.4, the Xcode project created by Unity started to include resources in Plugins/Android that results in bunch of build errors as shown below.
Has anyone come across this before ? I would appreciate if someone can point out if there is something I am missing or have done incorrectly.
CopyPNGFile /Users/mithleshkumarjha/Library/Developer/Xcode/DerivedData/Unity-iPhone-bftkjvxwavdurpcavvsvajdqxqcc/Build/Products/Debug-iphoneos/demo.app/hs___star_hollow.png Libraries/Plugins/Android/nester/res/drawable-xxhdpi-v4/hs___star_hollow.png
cd /Users/mithleshkumarjha/Projects/Unity/Unity-Test8/UnityTest8
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer![alt text][1]/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/usr/bin/copypng -compress /Users/mithleshkumarjha/Projects/Unity/Unity-Test8/UnityTest8/Libraries/Plugins/Android/nester/res/drawable-xxhdpi-v4/hs___star_hollow.png /Users/mithleshkumarjha/Library/Developer/Xcode/DerivedData/Unity-iPhone-bftkjvxwavdurpcavvsvajdqxqcc/Build/Products/Debug-iphoneos/demo.app/hs___star_hollow.png
While reading /Users/mithleshkumarjha/Projects/Unity/Unity-Test8/UnityTest8/Libraries/Plugins/Android/nester/res/drawable-xxhdpi-v4/hs___star_hollow.png pngcrush caught libpng error:
[00][00][0\310"\362\277\327`\351\217T\276\353\217
Command /Applications/Xcode.app/Contents/Developer/usr/bin/copypng emitted errors but did not return a nonzero exit code to indicate failure
you may check here: and make sure that all files in Plugins/Android are set to Android here

How to include FFMpeg library in iphone project

I am using iFrameExtractor to extract the frames. But when I clone the project I found that few files from ffmpeg framework was missing.
I tried hard to include the missing file, but was not able to do that..
Can anyone sort out this issue or give me the link of FrameExtractor class which contains all the lib files of FFMpeg.
I downloaded the project from this link
but when i open the project i gets the following missing file in the image.!
This are the missing files
Well you could have a look at the following links
FFMPEG Compiled Libraries And iOS
FFMPEG integration on iphone/ ipad project
And this tutorial
FFMPEG Integration

Build LIVE555 RTSP Library in a clean directory

Hi I'm wondering how to build the LIVE555 library in a new directory. My current method involves manually deleting the .o and configuration files, and I don't think thats very effective or smart.
Currently my workflow is:
./genMakeFiles iphoneos
make
But it builds it all in the same directory and it's so messy, can someone shine some light on an attribute I can change in configuration that will build the binaries and header files in a clean directory?
Thank you!
If you want to have 'clean' output with only libs and includes, then you have to modify build script. I'm not very good in writing scripts, but anyway - you may refer to this post and download already built libs with includes(link to zip in the last comment). The libs are fat, so they contains i386, x86_64, armv7, armv7s and arm64.
For adding everything into the Xcode project you have to specify OTHER_LDFLAGS:
"$(SRCROOT)/<path to live555>/UsageEnvironment/libUsageEnvironment.a"
"$(SRCROOT)/<path to live555>/liveMedia/libliveMedia.a"
"$(SRCROOT)/<path to live555>/groupsock/libgroupsock.a"
"$(SRCROOT)/<path to live555>/BasicUsageEnvironment/libBasicUsageEnvironment.a"
and HEADER_SEARCH_PATH:
"$(SRCROOT)/<path to live555>/UsageEnvironment/include"
"$(SRCROOT)/<path to live555>/liveMedia/include"
"$(SRCROOT)/<path to live555>/groupsock/include"
"$(SRCROOT)/<path to live555>/BasicUsageEnvironment/include"
And that is all. I hope it helps.
You could choose where to install include, libraries and executable setting the PREFIX variable (like the -prefix option of configure) like this :
make install PREFIX=<install root>
In order to remove *.o, *.a and executable just use :
make clean

How to add external java library to custom Android framework?

Can someone enlighten me on how to include an external java framework to android framework and compile it as a part of the custom android framework?
The idea is to make this external framework a part of my custom android framework and expose it as android service for other processes to use.
In essence what I did is -
checked for android port of the java framework
Copied the src dir (including all the external jar files) from the ported framework to framework/base/core/java/android/
Edited ActivityManager in the framework to call the copied library
run make
Is this the right approach to edit Android framework? Since, I am including the java files and associated external jars of the external project inside the Android framework I suspect make fails while converting the jars to dex.
Can somebody point me towards any available resources dealing with Android Framework internals and on how to edit Android framework?
I checked the Tutorial: Android Internals - Building a Custom ROM, Pt. 2 of 2 on youtube from this year's Marko Gargenta presentation in Beijing, China. But he didn't make it (i.e. adding external framework or jars) clear either.
First: I'm not very experienced in the Android build process, so there might be a better solution, but this one should work (at least for Android 2.2).
I assume, that you use Eclipse for the source code modification and already executed a successful make -j4...
Create a new source folder: external/<your-library>/src
Copy all Java source files into this folder.
Open the following make file: <android>/frameworks/base/Android.mk
Search for # Build ext.jar and add your library as follows:
[...]
ext_dirs := \
../../external/apache-http/src \
../../external/<your-library>/src \
../../external/gdata/src \
../../external/protobuf/src \
../../external/tagsoup/src
[...]
Now you should be able to access these libraries from the Android framework...
Finally execute make -j4 ext to build only the external module,
Or make -j4 to build all changed files (if a previous build exists in /out/).
README.txt from git repo in https://android.googlesource.com/platform/vendor/sample is a good example howto do it. It's good to clone it to see the examples.
Basically you need to create jar file and add it in filesystem, add xml configuration into /system/etc/permissions/ and declare <uses-library> in apk's AndroidManifest.xml.
In my case I had problem with adding <uses-library> on a wrong place (not in <application>).
So it's good to check the result with:
$ aapt dump badging Foo.apk | grep uses-library
uses-library:'android.foo'

AVR for Xcode 4?

Has anyone had success using xcode 4 as an IDE for AVR microcontrollers? Is it possible to have the same amount of integration as the plugin for eclipse?
Yes. I use Xcode 4 as IDE when writing AVR code.
But it only works as a "wrapper" for the avc-gcc command line tools. I have three Xcode targets in the project: build ("make all": compile only), fuse ("make fuse": program fuses) and flash ("make flash": compile and download to AVR). Just select the appropriate target and hit Cmd-B to build.
There is not much integration. I still have to edit the Makefile to set clock frequency, programmer and device model and fuse values. And if I add more .c files I also have to add the corresponding .o file to the Makefile. But at least I can do it from within Xcode.
I have created a minimal project template that will allow you to create a new AVR project in Xcode. Get the file here http://dl.dropbox.com/u/1194636/AVR_Xcode4_template.zip. Extract the archive and put the Atmel AVR® folder into ~/Library/Developer/Xcode/Templates (you might need to create the Templates folder).
Template from second answer (http://dl.dropbox.com/u/1194636/AVR_Xcode4_template.zip) works fine but with some tweaks.. You have to put these in file "makefile" in the template to be able to include multiple files in the project:
OBJECTS = main.o $(OBJ)
SRC = mynewfile.c
OBJDIR = .
OBJ = $(SRC:%.c=$(OBJDIR)/%.o)
LST = $(SRC:%.c=$(OBJDIR)/%.lst)
in SRC section you need to enter all files that are built in the project (for example mynewfile.c).
One more enhancement is to clear all the obj files from the project, after the linking ... Find the section main.hex in makefile and change rm -f line with following
rm -f main.hex $(OBJ) $(LST) main.o
Other then that, everything stays the same. What i couldnt find out is how i can enable code complete for this template. If anyone knows i would appreciate the help.