Page 1 of 1

Create a native bundle for os x.

PostPosted: Thu Apr 05, 2012 9:08 am
by vivian_maes
On mac os x towns start with a command file. But with this solution a terminal window remains open.
I have created a native bundle to start Towns.
For this you must install the developer tools.

first create a icon file.

start the icon composer. You can find this with spotlight.

drag and drop the file townslogo.png and the icon.png from graphics folder into the composer.
The file can find in the towns directory.

Image

Normaly you composer like this print screen.

Image

save you icon.

Create a basic bundle for java application

start the jar bundler application. You can find this with spotlight.

In "Build Information" tab

Image

For the main class select the file [towns]/lib/xaos.jar. note xaos.Towns is the name of the mainClass
type -jar lib/xaos.jar on the fiedl "Argument to main".

chose the 1.5+ version for the JVM version

chose your icon created on the step one

in the "Classpath and file" tab

Image

add all file from the directory [towns]/lib/ in the section "File and resource", the section classpath is filled automatically.

in the "Properties" tab

Image

Add -Djava.library.path=$JAVAROOT/native/ on the "VM Option"

check the box "Set Working Directory to Inside Application Path"

Set 512 for the Heap memory ( I use 1Gb for my bundle, but on the command file is 512Mb)

Now create your Apps

Last step modify your bundle

Right click on the the bundle and select show the package content. You can see this file structure.

Image

Copy the file from town game into your bundle. After this the bundle look like this.

Image

double click on the Info.plist file, a plist editor appear and show this.

Image

modify the plist file to have this and save

Image

Now you can copy your bundle into you application directory.
The Game appear into your launchPad, and it run like a native Os X application

Image

Vivian

Re: Create a native bundle for os x.

PostPosted: Thu Apr 05, 2012 10:59 am
by supermalparit
Cool! Sticked!

Re: Create a native bundle for os x.

PostPosted: Thu Apr 05, 2012 1:36 pm
by vivian_maes
Whaaa TKZ

Re: Create a native bundle for os x.

PostPosted: Wed Apr 18, 2012 1:12 am
by Deedasmi
Why are the mac threads in screens instead of support?

Re: Create a native bundle for os x.

PostPosted: Sat May 12, 2012 4:15 pm
by wizardjian
lol nice

Re: Create a native bundle for os x.

PostPosted: Tue Jul 10, 2012 4:25 pm
by rickyjack
On Mac I use Apples native packaging as an application bundle. Either take the latest released Coccinella, open the application bundle by control clicking, replace the coccinella folder with your own.
Image

You can also get any other later TkAqua. Pick the self contained one (TclTkAquaStandalone). You need to copy the Info.plist file, the icon and the PkgInfo file from the original released Coccinella. Replace also the Contents/lib folder with the one in the Coccinella bundle since you do not need all of them. You can also get more detailed info from (broken URL).

Re: Create a native bundle for os x.

PostPosted: Sat Sep 29, 2012 3:56 am
by GeTheFunkOut
You are a genius I have been looking how to do this for sooo soo long so I could play with the steam overlay. I had to mess around with it for a while because coding is stubborn and i kept on forgetting / or other stupid things. But i hm so happy you have bestowed this knowledge onto me