I am porting these days a Windows/Linux app into MacOSX. The process
is going reasonably well. However, there are a few point where I would
highly appreciate the help of the MAC-TCL experts.
1. The most important one. How can I change the name and contents of
the first-left menu that is automatically created with name "Wish" or
"Tclkit". I know about the $menu.apple trick, but I have not been able
to change the name of the menu from "Tclkit" to my app name.
2- For testing, I have instaled ActiveTCL, however, when I double-
click a TCL file, it does not open. If I use the "Open with" and
select wish, Wish open but does not load the TCL file. What to do?
3- I understand that, to create a MacOSX app, I neead to create a
directory named "MYAPP.app" and recreate manually inside the files/
directory structure similar to other apps. Is there a better/simpler
method to do it?
4- Once the app is created, I want to create a dmg virtual disk
with hditool. It is very similar to a ZIP file and will contain the
MYAPP.app, a README and the license. The user will have to copy
manually the app to /Applications. Is this the best way to distribute
and app? Does it respond to user expectations?
5- In Windows/Linux the drag&drop can be made with tkdnd. The copy/
paste of images with several tricks. Access to the tray with other
packages. How can these things be done in MacOSX?
I think that the most important points are listed here. I shall
really appreciate some help for some/all these points and/or any other
point that someone can consider important for porting an app into
MacOSX.
PS: As a nice off-topic point, recently I have been testing strongly
Ubuntu and MacOSX. Of course, Mac is better in avoiding the strange
problems about hardware compatibility typical of Linux but only
judging the user interface, I would say that the gnome in Ubuntu is
going close or even imporoving the nice MAC GUI.
The name will change to your application if you us TclApp from ActiveState's
TDK to build it or when you define you Info.plist when you build the app
directory by hand.
> 2- For testing, I have instaled ActiveTCL, however, when I double-
> click a TCL file, it does not open. If I use the "Open with" and
> select wish, Wish open but does not load the TCL file. What to do?
Never when there as I want .tcl files to be opened by my editor not wish.
This because on my Mac I run applications, which need a bit more.
> 3- I understand that, to create a MacOSX app, I neead to create a
> directory named "MYAPP.app" and recreate manually inside the files/
> directory structure similar to other apps. Is there a better/simpler
> method to do it?
Buy the TDK from ActiveState and use its TclApp -- makes it easy.
> 4- Once the app is created, I want to create a dmg virtual disk
> with hditool. It is very similar to a ZIP file and will contain the
> MYAPP.app, a README and the license. The user will have to copy
> manually the app to /Applications. Is this the best way to distribute
> and app? Does it respond to user expectations?
Almost. Somewhat.
A lot of the nicer applications either show their app, Applications and
arrow pointing to Applications (telling you to drag it over there) -- not
sure how this is done as I've never dug that deep.
Others use an installer that autoruns when you open the dmg -- I suggest
IntallJammer.
> 5- In Windows/Linux the drag&drop can be made with tkdnd. The copy/
> paste of images with several tricks. Access to the tray with other
> packages. How can these things be done in MacOSX?
Yes, search the wiki (see http://wiki.tcl.tk/12512) and the net. You may
also want to subscribe to the MacTcl mailing list and ask your questions there.
> I think that the most important points are listed here. I shall
> really appreciate some help for some/all these points and/or any other
> point that someone can consider important for porting an app into
> MacOSX.
You may want to consider adding the answers what you found the wiki.
--
+------------------------------------------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
On 8/20/09 5:09 AM, Ramon Ribó wrote:
>
> 1. The most important one. How can I change the name and contents of
> the first-left menu that is automatically created with name "Wish" or
> "Tclkit". I know about the $menu.apple trick, but I have not been able
> to change the name of the menu from "Tclkit" to my app name.
If you've build an app bundle, then set the "bundle name" property in
the Info.plist file to your application name along with the
$menu.apple setting in your code. If you're running a starpack/
starkit from the command-line, I don't think you can change the app
name in the menu.
>
> 2- For testing, I have instaled ActiveTCL, however, when I double-
> click a TCL file, it does not open. If I use the "Open with" and
> select wish, Wish open but does not load the TCL file. What to do?
Try installing Daniel Steffen's "launcher" utility--that might help.
Otherwise, run the script from the command line. That's how I test all
my stuff.
>
> 3- I understand that, to create a MacOSX app, I neead to create a
> directory named "MYAPP.app" and recreate manually inside the files/
> directory structure similar to other apps. Is there a better/simpler
> method to do it?
I provide an overview here.
http://www.codebykevin.com/opensource/tutorial.html
>
> 4- Once the app is created, I want to create a dmg virtual disk
> with hditool. It is very similar to a ZIP file and will contain the
> MYAPP.app, a README and the license. The user will have to copy
> manually the app to /Applications. Is this the best way to distribute
> and app? Does it respond to user expectations?
Yes, it does. I have a shell script package that creates a DMG with a
nice background--write me off-list if you would like to see it.
>
> 5- In Windows/Linux the drag&drop can be made with tkdnd. The copy/
> paste of images with several tricks. Access to the tray with other
> packages. How can these things be done in MacOSX?
TkDND doesn't work on the Mac, no one has ever ported it. Any port of
TkDND at this point should be done against the new Tk-Cocoa
implementation which will be standard in 8.6.
As far as "system tray," what did you have in mind? Tk apps on the Mac
show up in the Dock, and have menus, notifications, bouncing icons,
etc. I also have some packages to manipulate the Dock icon (change it,
add a badge to it, etc.)--some of these have been released, and some
are still in beta state.
If by "system tray" you mean the top bar on the right-hand-side of the
screen, where the time, battery life, Spotlight is displayed, no
package currently exists to provide Tk access to this. It can be done,
and I might put this together at some point, but not right now.
>
> I think that the most important points are listed here. I shall
> really appreciate some help for some/all these points and/or any other
> point that someone can consider important for porting an app into
> MacOSX.
Hope this helps,
Kevin
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
If everything goes well, I shall release shortly a new version of
RamDebugger (the open source TCL debugger and IDE) for
MacOSX.