Documenting the building of Ktoon for FreeBSD

By David Southern

COS 233 Flash creation

Instructor: Dawn Susse

This capstone project of mine was quite challenging, as I have started using a FreeBSD derivative

for my Operating System. Unfortunately, FreeBSD does not by default have any real Flash IDE's

available for it. Well, instead of giving up in defeat, I elected to accept the challenge of building and

porting a Linux Flash IDE over to FreeBSD. This turned out quite time consuming, with a lot of trial

and error. I hope you enjoy this documention.

When I first decide to try to build a Ktoon, which is a Linux graphics program that will create Flash

.swf files, the builds would stop at approximately 90% completion due to build problems with the

included libming.a (library to allow for the creation of .swf files). No amount of hacking, the included

libming.a would allow for my building of Ktoon. I then decided that I would try to build newer copy

of ming-0.3 and then try to build Ktoon. This also met with dismal failure.



When this also ended in failure, I then decided that I need a fresh plan of attack. I knew from previous

experience that both Ktoon, and Qflash used Ming-0.3, and that FreeBSD's version of Ming was

version 0.3Beta. So I kind of had an idea.

I decided that I'd unpack the sources for both Ktoon-0.7.2, and Qflash-0.1 and try to use part of the

Ming libraries of the version of Ming included with FreeBSD. Please note that the instruction on the

folllowing picture is my post on the DesktopBSD forum.


Now I need to copy the library development headers included in FreeBSD to my home directory to

work with them.


I next extracted or expanded the libming.a library from Qflash-0.1 and renamed the folder

the folder /home/mrmdls/libming.orig


I then repeated the exact same steps for the libming.a file that I had copied to my home directory, and

extracted or unpacked that as /home/mrmdls/libming and copied the gifdbl.o file from my folder that

we created called /home/mrmdls/libming.org to /home/mrmdls/libming (Kind of confusing, the similar

names isn't it)?


With the old gifdbl.o file(from the original libming.a library included on FreeBSD) now copied to the

the /home/mrmdls/libming folder. We'll creat a brand new libming.a package (it's actually a library).

Please note here, that in order to do this, you'll either have to know how to use your tab key effectively

or else you'll need to do a lot of typing.


Once that's done, you should have a package called lib.a....we'll have to rename that libming.a


After renaming the package libming.a we copy it to our /home/mrmdls/ktoon/src directory. And now

we begin our build of Ktoon in earnest. Please note depending on the speed of your computer, the build

can take anywhere from 15 to 30 minutes.... Now's a good time to go get a cup of coffee.





Once the build is completed, you should see the following in your ktoon/bin/ folder

OK, Now's The Moment of Truth....Let's fire up Ktoon. We'll create a simple flash program, and then

see if it will create a .SWF file for us. The following pictures tell the tale







Well this concludes my documentation. I hope you've enjoyed it, as you've followed along with me.

I'm also going to enclose an actual copy of my post on DesktopBSD forum, describing the exactly how

I did these steps;

Hello Everyone,

I was able to build an older version of ktoon (version 0.7.2) and I thought I'd share how I was able to do it. It does require a working knowledge of command line tools, and I'll try my best to explain the procedure. as I ended up having to create a new libming.a archieve file within ktoon. You will also need to have ming-0.3.0 installed.

First download the sources for both ktoon-0.7.2, and qflash-0.1 and untar both sources in your home directory. Next copy and replace ming.h, mingpp.h and ming_config.h from /usr/local/include/ming to your ktoon src directory that was created when you untarred it. Now go to the qflash directory that you created, and untar the libming.a file (I created a folder called libming.orginal) next copy your version of libming.a that's located in /usr/local/lib to your home directory. Now untar your version of libming.a (I created the folder libming). Copy and replace the gifdbl.o file from the libming.orignal folder to the libming folder that you just created. Now in a terminal as a normal user. type the following command:

ar cr lib.a <list all the .o files that are in your libming folder> this will create a lib.a file which after being created I renamed libming.a Copy the newly created libming.a to ktoon lib folder. and then

build ktoon using the following commands:

qmake ktoon.pro

make

after it's built

sudo make install <just press enter>

You should have ktoon executable file located in ktoon /bin folder.