<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://community.activestate.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>ActiveState Community Site - Creating an executable for Mac from Windows  - Comments</title>
 <link>http://community.activestate.com/forum-topic/creating-executable-mac-windows</link>
 <description>Comments for &quot;Creating an executable for Mac from Windows &quot;</description>
 <language>en</language>
<item>
 <title>Thank you for your</title>
 <link>http://community.activestate.com/forum-topic/creating-executable-mac-windows#comment-4423</link>
 <description>&lt;p&gt;Thank you for your answer.&lt;/p&gt;
&lt;p&gt;Img :&lt;br /&gt;
The &quot;-follow&quot; option did not solve the problem.&lt;br /&gt;
Instead, the other option of explicitely adding the&lt;br /&gt;
packages to the list worked fine.&lt;br /&gt;
I modified the .tpj so that it contained the lines :&lt;/p&gt;
&lt;p&gt;Pkg/Reference img::window&lt;br /&gt;
Pkg/Reference img::tga&lt;br /&gt;
Pkg/Reference img::ico&lt;br /&gt;
Pkg/Reference img::pcx&lt;br /&gt;
Pkg/Reference img::sgi&lt;br /&gt;
Pkg/Reference img::sun&lt;br /&gt;
Pkg/Reference img::xbm&lt;br /&gt;
Pkg/Reference img::xpm&lt;br /&gt;
Pkg/Reference img::ps&lt;br /&gt;
Pkg/Reference img::jpeg&lt;br /&gt;
Pkg/Reference img::png&lt;br /&gt;
Pkg/Reference img::tiff&lt;br /&gt;
Pkg/Reference img::bmp&lt;br /&gt;
Pkg/Reference img::ppm&lt;br /&gt;
Pkg/Reference img::gif&lt;br /&gt;
Pkg/Reference img::pixmap&lt;br /&gt;
Pkg/Reference zlibtcl&lt;br /&gt;
Pkg/Reference pngtcl&lt;br /&gt;
Pkg/Reference tifftcl&lt;br /&gt;
Pkg/Reference jpegtcl&lt;br /&gt;
Pkg/Reference img::base&lt;/p&gt;
&lt;p&gt;At it worked, by creating one directory for each package.&lt;br /&gt;
Now I will be able to expand the executable&lt;br /&gt;
and pick each .dylib so that I can re-create a full Img package, Mac ready.&lt;br /&gt;
This is because the computer on which I create the release is&lt;br /&gt;
offline, so that I cannot use the default online Tea system. &lt;/p&gt;
&lt;p&gt;That workaround will work, but it is clearly made complicated because&lt;br /&gt;
of that limitation of TclApp.&lt;/p&gt;
&lt;p&gt;Considering the Tclx problem, I submitted the bug to the&lt;br /&gt;
sourceforge Tclx project.&lt;/p&gt;
&lt;p&gt;Thank you for your help !&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;MichaÃ«l&lt;/p&gt;
</description>
 <pubDate>Wed, 05 Mar 2008 10:40:24 +0000</pubDate>
 <dc:creator>relaxmike</dc:creator>
 <guid isPermaLink="false">comment 4423 at http://community.activestate.com</guid>
</item>
<item>
 <title>Re: Partially worked</title>
 <link>http://community.activestate.com/forum-topic/creating-executable-mac-windows#comment-4412</link>
 <description>&lt;p&gt;Img:&lt;/p&gt;
&lt;p&gt;Use the -follow command line options to have TclApp follow the dependencies of Img.&lt;/p&gt;
&lt;p&gt;Or: Explicitly add -pkgref img::base -pkgref img::bmp ... etc. to the command line.&lt;/p&gt;
&lt;p&gt;Both will cause TclApp to pull the packages from teapot.activestate.com&lt;/p&gt;
&lt;p&gt;Installing into the local repository is not required for this.&lt;/p&gt;
&lt;p&gt;TclX:&lt;/p&gt;
&lt;p&gt;That is ... bad. IIRC Tclx uses the tcl_findLibrary command to locate its init.tcl file from within the shared library ... That command could very well have this limitation that it needs the Tclx8.4 directory :(&lt;/p&gt;
&lt;p&gt;A workaround would be to add&lt;/p&gt;
&lt;p&gt;set env(TCLX_LIBRARY) [file join [file dirname [info script]] lib P-macosx-universal-Tclx-8.4]&lt;/p&gt;
&lt;p&gt;to the initialization code (See panel &#039;Advanced&#039;).&lt;/p&gt;
&lt;p&gt;The proper fix would be to modify Tclx to not use tcl_findLibrary any more, but explicitly source its init.tcl file from its &#039;package ifneeded&#039; script.&lt;/p&gt;
&lt;p&gt;That is something we will have to do.&lt;/p&gt;
</description>
 <pubDate>Mon, 03 Mar 2008 23:05:22 +0000</pubDate>
 <dc:creator>AndreasK</dc:creator>
 <guid isPermaLink="false">comment 4412 at http://community.activestate.com</guid>
</item>
<item>
 <title>Partially worked</title>
 <link>http://community.activestate.com/forum-topic/creating-executable-mac-windows#comment-4411</link>
 <description>&lt;p&gt;Thank you very much for that tip.&lt;br /&gt;
But it did not work completely, so I have to make you scratch&lt;br /&gt;
your head you once again !&lt;/p&gt;
&lt;p&gt;I used the graphical TclApp from a web-connected Windows PC.&lt;br /&gt;
I tuned the preferences to add &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://teapot.activestate.com&quot; title=&quot;http://teapot.activestate.com&quot;&gt;http://teapot.activestate.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;into the &quot;TEAPOT Repositories&quot;.&lt;br /&gt;
I set the basekit to the file which was available from the&lt;br /&gt;
linked that you gave to me.&lt;br /&gt;
After unlocking the firewall because of TclApp accessing to the web,&lt;br /&gt;
the wrapping process went fine.&lt;br /&gt;
My script uses the packages Img, tbcload and Tclx.&lt;br /&gt;
This is the full report from TclApp :&lt;br /&gt;
******************************************&lt;/p&gt;
&lt;p&gt;| Tcl Dev Kit TclApp&lt;br /&gt;
| Copyright (C) 2001-2008 ActiveState Software Inc. All rights reserved.&lt;br /&gt;
| Standard license for Michaï¿½l Baudin .&lt;br /&gt;
|&lt;br /&gt;
| Embedding license information into wrap result as comments.&lt;br /&gt;
|&lt;br /&gt;
Command line:&lt;br /&gt;
	C:/TclDevKit4.0.2/bin/tclapp.exe  -prefix D:/Atelier/AtelierTcl/StarPackMac/SampleForMac/base-tk-thread-8.4.18-macosx-universal.exe -out D:/Atelier/AtelierTcl/StarPackMac/SampleForMac/sample-mac.exe -architecture macosx-universal -pkgref Img -pkgref Tcl -pkgref Tclx -pkgref Tk -pkgref &#039;tbcload 1.7&#039; -relativeto D:/Atelier/AtelierTcl/StarPackMac D:/Atelier/AtelierTcl/StarPackMac/SampleForMac/main.tcl -startup lib/application/SampleForMac/main.tcl&lt;br /&gt;
Wrapping ...&lt;br /&gt;
No known repository at C:/tap_help_repository&lt;br /&gt;
Expanding...&lt;br /&gt;
    Following only profile dependencies&lt;br /&gt;
    Accepting missing dependencies&lt;br /&gt;
    Accepting version changes made by fuzzy search&lt;/p&gt;
&lt;p&gt;P   package Tcl 8.4 macosx-universal ...&lt;br /&gt;
P   package Tk 8.4 macosx-universal ...&lt;br /&gt;
P   package Tk 8.4 tcl ...&lt;/p&gt;
&lt;p&gt;Issues...&lt;/p&gt;
&lt;p&gt;Packages ...&lt;br /&gt;
  Img     1.3 tcl              @ R &lt;a href=&quot;http://teapot.activestate.com&quot; title=&quot;http://teapot.activestate.com&quot;&gt;http://teapot.activestate.com&lt;/a&gt;&lt;br /&gt;
P Tcl     8.4 macosx-universal @&lt;br /&gt;
  Tclx    8.4 macosx-universal @ R &lt;a href=&quot;http://teapot.activestate.com&quot; title=&quot;http://teapot.activestate.com&quot;&gt;http://teapot.activestate.com&lt;/a&gt;&lt;br /&gt;
P Tk      8.4 macosx-universal @&lt;br /&gt;
P Tk      8.4 tcl              @&lt;br /&gt;
  tbcload 1.7 macosx-universal @ R &lt;a href=&quot;http://teapot.activestate.com&quot; title=&quot;http://teapot.activestate.com&quot;&gt;http://teapot.activestate.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Inserting TEApot metadata&lt;br /&gt;
  Nothing to insert&lt;/p&gt;
&lt;p&gt;  tbcload 1.7 (macosx-universal)&lt;br /&gt;
  Tclx 8.4 (macosx-universal)&lt;br /&gt;
  Img 1.3 (tcl)&lt;br /&gt;
  Extending the list of provided packages&lt;/p&gt;
&lt;p&gt;F   117B D:/Atelier/AtelierTcl/StarPackMac/SampleForMac/main.tcl&lt;/p&gt;
&lt;p&gt;Generated D:/Atelier/AtelierTcl/StarPackMac/SampleForMac/sample-mac.exe&lt;br /&gt;
Done&lt;/p&gt;
&lt;p&gt;| Embedded license information into wrap result as comments.&lt;br /&gt;
| Standard license for Michaï¿½l Baudin .&lt;br /&gt;
******************************************&lt;/p&gt;
&lt;p&gt;I looked inside the executable with TclApp to check that&lt;br /&gt;
the packages were correctly installed : it did not...&lt;br /&gt;
The packages tbcload and Tclx8.4 were fine, as far as I can see&lt;br /&gt;
from the presence of the *.dylib files.&lt;br /&gt;
But the Img package contained only two files :&lt;br /&gt;
- pkgIndex.tcl&lt;br /&gt;
- implementation.tcl&lt;br /&gt;
which does not match the list of files that I expect to&lt;br /&gt;
see : tkimg*.dylib files are not there.&lt;/p&gt;
&lt;p&gt;The content of the &quot;implementation.tcl&quot; file is :&lt;/p&gt;
&lt;p&gt;*****************************************&lt;br /&gt;
# ACTIVESTATE TEAPOT-PKG BEGIN TM -*- tcl -*-&lt;br /&gt;
# -- Tcl Module&lt;/p&gt;
&lt;p&gt;# ACTIVESTATE TEAPOT-PKG BEGIN REQUIREMENTS&lt;/p&gt;
&lt;p&gt;package require Tcl 8.4&lt;br /&gt;
package require Tk 8.4&lt;br /&gt;
package require img::bmp 1.3-2&lt;br /&gt;
package require img::gif 1.3-2&lt;br /&gt;
package require img::ico 1.3-2&lt;br /&gt;
package require img::jpeg 1.3-2&lt;br /&gt;
package require img::pcx 1.3-2&lt;br /&gt;
package require img::pixmap 1.3-2&lt;br /&gt;
package require img::png 1.3-2&lt;br /&gt;
package require img::ppm 1.3-2&lt;br /&gt;
package require img::ps 1.3-2&lt;br /&gt;
package require img::sgi 1.3-2&lt;br /&gt;
package require img::sun 1.3-2&lt;br /&gt;
package require img::tga 1.3-2&lt;br /&gt;
package require img::tiff 1.3-2&lt;br /&gt;
package require img::window 1.3-2&lt;br /&gt;
package require img::xbm 1.3-2&lt;br /&gt;
package require img::xpm 1.3-2&lt;/p&gt;
&lt;p&gt;# ACTIVESTATE TEAPOT-PKG END REQUIREMENTS&lt;/p&gt;
&lt;p&gt;# ACTIVESTATE TEAPOT-PKG BEGIN DECLARE&lt;/p&gt;
&lt;p&gt;package provide Img 1.3&lt;/p&gt;
&lt;p&gt;# ACTIVESTATE TEAPOT-PKG END DECLARE&lt;br /&gt;
# ACTIVESTATE TEAPOT-PKG END TM&lt;/p&gt;
&lt;p&gt;    # Compatibility hack. When asking for the old name of the package&lt;br /&gt;
    # then load all format handlers and base libraries provided by tkImg.&lt;br /&gt;
    # Actually we ask only for the format handlers, the required base&lt;br /&gt;
    # packages will be loaded automatically through the usual package&lt;br /&gt;
    # mechanism.&lt;/p&gt;
&lt;p&gt;    # When reading images without specifying it&#039;s format (option -format),&lt;br /&gt;
    # the available formats are tried in reversed order as listed here.&lt;br /&gt;
    # Therefore file formats with some &quot;magic&quot; identifier, which can be&lt;br /&gt;
    # recognized safely, should be added at the end of this list.&lt;/p&gt;
&lt;p&gt;    package require img::window&lt;br /&gt;
    package require img::tga&lt;br /&gt;
    package require img::ico&lt;br /&gt;
    package require img::pcx&lt;br /&gt;
    package require img::sgi&lt;br /&gt;
    package require img::sun&lt;br /&gt;
    package require img::xbm&lt;br /&gt;
    package require img::xpm&lt;br /&gt;
    package require img::ps&lt;br /&gt;
    package require img::jpeg&lt;br /&gt;
    package require img::png&lt;br /&gt;
    package require img::tiff&lt;br /&gt;
    package require img::bmp&lt;br /&gt;
    package require img::ppm&lt;br /&gt;
    package require img::gif&lt;br /&gt;
    package require img::pixmap&lt;/p&gt;
&lt;p&gt;    package provide Img 1.3&lt;br /&gt;
************************************************&lt;/p&gt;
&lt;p&gt;I think that this may be connected to the previous bug&lt;br /&gt;
(see my previous post in the TDK support forum) that I&lt;br /&gt;
had for the particular Img package.&lt;/p&gt;
&lt;p&gt;So I tried to use the command-line &quot;teacup.exe&quot; tool&lt;br /&gt;
to manually get the mac version of the Img package,&lt;br /&gt;
and I runned into more trouble.&lt;br /&gt;
It seems that the client locks the installation of&lt;br /&gt;
one package if the current architecture does not match&lt;br /&gt;
the required one :&lt;/p&gt;
&lt;p&gt;(StarPackMac) 73 % teacup install --arch macosx-universal img::base 1.3&lt;br /&gt;
	The requested architecture &quot;macosx-universal&quot; is not supported&lt;br /&gt;
	by the repository at&lt;br /&gt;
	&quot;D:/Atelier/AtelierTcl/StarPackMac/Repository/&quot;.&lt;/p&gt;
&lt;p&gt;This is wise in the general case, but my current problem&lt;br /&gt;
is specifically to make the executable on a system which I do&lt;br /&gt;
not have. I tried the &quot;--force&quot; option, which did not help.&lt;/p&gt;
&lt;p&gt;Thank you for your help !&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;MichaÃ«l&lt;/p&gt;
&lt;p&gt;PS-1&lt;br /&gt;
In fact, making the linux and unix based executable was really&lt;br /&gt;
so easy that I did not think that I used &quot;advanced&quot; features...&lt;/p&gt;
&lt;p&gt;PS-2&lt;br /&gt;
I had to solve a problem linked with the Tclx package, and&lt;br /&gt;
that is worth to mention, if anybody has the same problem.&lt;br /&gt;
In an automatically wrapped executable, the Tclx8.4 package&lt;br /&gt;
cannot be found : I think I got the reason for that.&lt;br /&gt;
When wrapping the application, TclApp creates the directories&lt;br /&gt;
associated with the required packages on the target platform.&lt;br /&gt;
For example, for the Tclx package and Mac, it creates&lt;br /&gt;
the directory :&lt;/p&gt;
&lt;p&gt;P-macosx-universal-Tclx-8.4&lt;/p&gt;
&lt;p&gt;The problem appears with the Tclx package when the following line&lt;br /&gt;
in the pkgIndex.tcl file of the Tclx package :&lt;/p&gt;
&lt;p&gt;load [file join {@} libtclx8.4.dylib] Tclx&lt;/p&gt;
&lt;p&gt;is triggered. The process inside the library searches for&lt;br /&gt;
a sub-directory name &quot;Tclx8.4&quot; in one directory&lt;br /&gt;
from the ::auto_path variable. When it comes to the target directory,&lt;br /&gt;
it instead searches for a &lt;/p&gt;
&lt;p&gt;P-macosx-universal-Tclx-8.4/Tclx8.4 &lt;/p&gt;
&lt;p&gt;directory, which of course does not exist ! The consequence is that&lt;br /&gt;
the package Tclx8.4 is not found and generates an error.&lt;br /&gt;
I don&#039;t think that the problem here is because of TclApp, which does&lt;br /&gt;
its job perfectly, but the problem is more on the side&lt;br /&gt;
of Tclx, because it makes no use of the &quot;$dir&quot; local variable&lt;br /&gt;
which is passed automatically with the &quot;package require&quot; system.&lt;/p&gt;
</description>
 <pubDate>Mon, 03 Mar 2008 21:53:45 +0000</pubDate>
 <dc:creator>relaxmike</dc:creator>
 <guid isPermaLink="false">comment 4411 at http://community.activestate.com</guid>
</item>
<item>
 <title>Creating an executable for Mac from Windows</title>
 <link>http://community.activestate.com/forum-topic/creating-executable-mac-windows#comment-4373</link>
 <description>&lt;p&gt;TclApp is actually designed for cross-platform flexibility through the use of the TEApot.  All you need is the basekit for the correct platform.  Ideally you should use on that you know works for your application.  You can retrieve one directly via the teapot, eg at this link:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://teapot.activestate.com/application/name/base-tk-thread/ver/8.5.1.1.284281/arch/macosx-universal/details&quot; title=&quot;http://teapot.activestate.com/application/name/base-tk-thread/ver/8.5.1.1.284281/arch/macosx-universal/details&quot;&gt;http://teapot.activestate.com/application/name/base-tk-thread/ver/8.5.1....&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Save that file as &#039;basekit-tk-8.5.1.1-thread-macosx-universal&#039; (or something appropriately descriptive).&lt;/p&gt;
&lt;p&gt;Use that as your basekit (&quot;Prefix file&quot;) in TclApp.  TclApp will recognize that it is for OS X.  If your project file is working correctly, TclApp should try and download the binaries for OS X from teapot for the correct platform.&lt;/p&gt;
&lt;p&gt;Note that this is a very advanced use case, so if it has issues, please let us know via the support at activestate email address.&lt;/p&gt;
</description>
 <pubDate>Fri, 29 Feb 2008 21:53:04 +0000</pubDate>
 <dc:creator>jeffh</dc:creator>
 <guid isPermaLink="false">comment 4373 at http://community.activestate.com</guid>
</item>
<item>
 <title>Creating an executable for Mac from Windows </title>
 <link>http://community.activestate.com/forum-topic/creating-executable-mac-windows</link>
 <description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am working on my windows PC to cross-compile a Tcl program&lt;br /&gt;
to make it available on several systems, including&lt;br /&gt;
Windows, Linux and Mac. I was succesful with windows and&lt;br /&gt;
linux, but I am not able to do that for Mac.&lt;/p&gt;
&lt;p&gt;The problem is that I use Tcl binary packages such as Img,&lt;br /&gt;
Tclx and tbcload.&lt;br /&gt;
I was able (after several days of hard and fun fight) to use TclApp&lt;br /&gt;
to make the win32 executable and to make the linux executable.&lt;br /&gt;
I did that following your recommandations, that is to say&lt;br /&gt;
that I unzipped the corresponding Active Tcl version for each&lt;br /&gt;
target platform, picking the binary packages that I needed and&lt;br /&gt;
gave them for TclApp to eat them : it made a crunch noise, but&lt;br /&gt;
it worked fine !&lt;br /&gt;
I tested both version and it works fine.&lt;br /&gt;
Sun, HP, etc... work the same way so I have no problem here.&lt;/p&gt;
&lt;p&gt;My problem is that I cannot open the .dmg file corresponding&lt;br /&gt;
to the Mac ActiveTcl distribution (I usually use 7zip).&lt;/p&gt;
&lt;p&gt;I tried to use dmg2iso executable, available here :&lt;br /&gt;
&lt;a href=&quot;http://vu1tur.eu.org/tools/&quot; title=&quot;http://vu1tur.eu.org/tools/&quot;&gt;http://vu1tur.eu.org/tools/&lt;/a&gt;&lt;br /&gt;
but it failed :&lt;/p&gt;
&lt;p&gt;(Atelier Tcl) 52 % exec dmg2img.exe ActiveTcl8.4.16.0.282109-macosx-universal-threaded.dmg ActiveTcl8.4.16.0.282109-macosx-universal-threaded.img&lt;br /&gt;
child killed: SIGABRT&lt;/p&gt;
&lt;p&gt;(Atelier Tcl) 53 % exec dmg2iso.exe ActiveTcl8.4.16.0.282109-macosx-universal-threaded.dmg ActiveTcl8.4.16.0.282109-macosx-universal-threaded.iso&lt;br /&gt;
dmg2iso v0.2c by vu1tur (&lt;a href=&quot;mailto:vu1tur@gmx.de&quot;&gt;vu1tur@gmx.de&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;reading property list...ok&lt;br /&gt;
found 4 partitions&lt;br /&gt;
decompressing:&lt;br /&gt;
partition 0...ok&lt;br /&gt;
partition 1...ERROR: Inflation failed&lt;/p&gt;
&lt;p&gt;Is there another way to get the Mac versions of the binary packages&lt;br /&gt;
that I need ?&lt;/p&gt;
&lt;p&gt;Thank you for your help !&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;MichaÃ«l&lt;/p&gt;
</description>
 <comments>http://community.activestate.com/forum-topic/creating-executable-mac-windows#comments</comments>
 <category domain="http://community.activestate.com/forums/tdk-support-0">TDK support</category>
 <category domain="http://community.activestate.com/os/windows">Windows</category>
 <pubDate>Fri, 29 Feb 2008 20:41:15 +0000</pubDate>
 <dc:creator>relaxmike</dc:creator>
 <guid isPermaLink="false">1984 at http://community.activestate.com</guid>
</item>
</channel>
</rss>
