Ok so sue me I took a day off 😛

Set up the mkXML function to create our *.desktop files which is a good thing because it shows me I have more testing to do with them. As well as editing the getInput function to make a few changes namely.

Should we run the app in a terminal ?
Do not create link option
Test a few entries in the file
Set MIME type(s?), using a real MIME not a *.ext !

I’ve added “/usr/ports/packages/All/” and the current directory to where to look for things entered on the CLI so hopefully we could call it as “program packageToAdd.tbz optionalBatchJobFile” and find it. I’ve set the foot holder code for the fkBuild function which makes the PBI file. Thats going to be a tough thing to do, hopefully Tim will be able to help me there. I’ve set up our little main loop to breach off into fkBuild + a comment that it should never return to our main loop of events. Because once fkBuild and sub-routines are finished it’s supposed to exit the program !

I need to add stuff to the getLibs function for binary hunting. Because what I want is for the user to be able to enter the binaries name as one would to run it. Which is easier on Joe Newbie and faster for a CLI without tab completion. Since getLibs relaies on the information gathered from getInput. We’ll then have to test it logically checking to see if it’s located in any of the usual spots in the path. Once we find where it is we append that and pass it to the section that actually gets the libs. If it’s some thing not in the standard path the user will have to give us full path which we will need to strip off at the start of mkXML.

Line of execution is pretty simple so far, I’ll worry about the world of Object Oriented Programming another time – like after this works. Every thing is done in seperated routines rather then a huge main function.

mkHome - prepair programs projects directory (/usr/local/Projects) if it does not exist.
mkProject - make the current projects directory if does not exist. Then copy our pkg over to the project directory.
mainLoop - ask how many K-Menu entries we need to make and loop that many times, then call fkBuild.
getInput - get all the information needed to write the *.desktop files and any script details
getLibs - gather all the libraries required from the program given to us by getInput
mkXML - using the data from getInput make our *.desktop file
fkBuild - make the *.pbi file

Of course its not done yet so its not all working yet. So far it looks quite promising as long as in the end I can make a working pbi file. I need to add greater error checking, path stripper code for getLibs, strighten up getInput for a few extras and colate with the mkXML routine. I don’t know if XML is the right word for the file style but hey its short, discriptive, and bloody close enough! I also need to get the stuff fixed up for creating the PBI.*.sh files.