[futurebasic] Re: [FB] Incorporating External Frameworks into an FB Project

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2013 : Group Archive : Group : All Groups

From: Deep <Info@...>
Date: Mon, 06 May 2013 21:20:35 +0100
On 06/05/2013 19:57, Brian S wrote:
> On May 6, 2013, at 11:49 AM, Ken Shmidheiser <kshmidheiser@...> wrote:
>
>> You need X11 installed. Info at this link:
> Thanks,  Ill check out the link.
>
> Brian S.
>

Hi BrianS, KenS, RobertC, SteveVV,

Saw the postings regarding external frameworks as well as the link to 
"qrencode 3.4.2" source.

Attached is an Xcode4 project for those who may want it. This executes 
on 10.8 Mountain Lion without the need for X11 to be installed, just 
normal Xcode4 is enough. The only real functional change is that it will 
not produce PNG files since the PNG libraries are not included in a 
standard MacOS X computer. However, the other formats are supported.

If you choose to use it in early versions that support PPC, you can add 
the PPC 32/64 to the build settings. It will then build a quad universal 
binary including 32/64 bit Intel.

To make it compile, some tweaks have been made to the source code and 
these have been listed in the ReadMe in case anyone wants to see what 
has been changed.

After it has been compiled, move the "qrcode" executable to your Desktop 
for simplicity of testing. You would normally open Terminal and use 
something like:

~/Desktop/qrcode -t ASCII 'hello world'

This will generate a QRCode using "#" for the dots.

Other formats exist which you can use. See the documentation included.

Depending on your project, you could (subject to legal requirements of 
the original source being met) use this binary inside your FB app. You 
can access it via FB for testing using:


dim as Str255 myinput
dim as Str255 myresult

myinput = "~/Desktop/qrcode -t ASCII " + "'hello world'"

window 1
text _courier

open "Unix", 1, myinput
do
line input #1, myresult
print myresult
until eof(1)
close 1

RunApplicationEventLoop()


In a live example, you would probably embed the binary inside your 
application bundle, or place the C source inside BeginC/EndC statements 
in yor FB project?

Notice that a mono-proportional font has been used so that it renders 
properly.

Hope it helps,

Deep



PS: Hope the attachment makes it to the list!