Artifact [34f0c1488d]

Artifact 34f0c1488d6fbe9d92ae9125457eafb0aa125f75:

Wiki page [KitCreator] by rkeene on 2010-09-26 06:47:33.
D 2010-09-26T06:47:33
L KitCreator
P 43eb5c5681fa170d96b28f70ea10a07e8efeead7
U rkeene
W 4072
<i>Tclkit Building Made Trivial</i>

<p>KitCreator is a simple build system for creating a <a href="http://www.equi4.com/tclkit/">Tclkit</a>.  It was created to ease creation of Tclkits.  If you just want to use Tcl on your platform, it is recommended that you use a <a href="http://www.equi4.com/tclkit/download.html">pre-existing Tclkit</a>.  See also locally built pre-built [Tclkits].</p>

<p>A <a href="http://www.equi4.com/tclkit/">Tclkit</a> is, briefly, a single-file executable that contains Tcl (both the interpreter, and all the resources it requires to operate) and other Tcl-related packages (Tk, Incr Tcl, etc).  A tclkit can be used to create a <i>Starpack</i>, which is the Tclkit plus the resources required for your Tcl-based application in a single file.  This makes application delivery easy and consistent as it will be a single file that the user runs to use the application.  Additionally, since a Tclkit is generic, any Tclkit from any platform can be used as the base for a Starpack.  That is, from GNU/Linux you can take the Tclkit for AIX and add your application to produce a native executable for AIX.</p>

<p>KitCreator can be used to cross-compile a Tclkit, however you may need to have a working Tclkit for your native system first.  KitCreator can be used to create this local boot-strap Tclkit.</p>

<p>Download:
  <ul>
    <li><a href="http://www.rkeene.org/devel/kitcreator-0.4.0.2408.tar.gz">KitCreator v0.4.0.2408</a> (<a href="http://www.rkeene.org/devel/kitcreator/kitbuild/0.4.0.2408/">Build Log</a>)</li>
  </ul>
</p>

<hr>

<p>
  <b>Some examples:</b>
  <ol type="1">
    <li>Create a Tclkit:
      <ol type="a">
        <li><tt>$ ./kitcreator</tt></li> 
      </ol>
    </li> 
    <li>Create a Tclkit for Tcl 8.5.9:
      <ol type="a">
        <li><tt>$ ./kitcreator 8.5.9</tt></li> 
      </ol>
    </li> 
    <li>Create a Tclkit for Tcl from CVS HEAD:
      <ol type="a">
        <li><tt>$ ./kitcreator cvs_HEAD</tt></li> 
      </ol>
    </li> 
    <li>Compile a 64-bit Tclkit:
      <ol type="a">
        <li><tt>$ ./kitcreator --enable-64bit</tt></li> 
      </ol>
    </li> 
    <li>Cross-compile a Tclkit:
      <ol type="a">
        <li>Bootstrap (optional, you can use an existing Tclkit):
          <ol type="i">
            <li><tt>$ ./kitcreator</tt></li> 
            <li><tt>$ mv tclkit-8.4.19 tclkit-local</tt></li> 
            <li><tt>$ TCLKIT=&quot;$(pwd)/tclkit-local&quot;</tt></li> 
            <li><tt>$ export TCLKIT</tt></li> 
          </ol>
        </li> 
        <li>Cross-compile:
          <ol type="i">
            <li><tt>$ CC=mipsel-linux-uclibc-gcc</tt></li> 
            <li><tt>$ CXX=false</tt></li> 
            <li><tt>$ AR=mipsel-linux-uclibc-ar</tt></li> 
            <li><tt>$ RANLIB=mipsel-linux-uclibc-ranlib</tt></li> 
            <li><tt>$ export CC CXX AR RANLIB</tt></li> 
            <li><tt>$ ./kitcreator --host=mipsel-linux-uclibc</tt></li> 
          </ol>
        </li>
      </ol>
    </li>
    <li>Compile a 64-bit Tclkit 8.5.8 using SunStudio 12.1 on Solaris/x86:
      <ol type="a">
        <li><tt>$ CC='/opt/sunstudio12.1/bin/cc -m64'</tt></li> 
        <li><tt>$ CXX='/opt/sunstudio12.1/bin/CC -m64'</tt></li> 
        <li><tt>$ PATCH='gpatch'</tt></li> 
        <li><tt>$ export CC CXX PATCH</tt></li> 
        <li><tt>$ ./kitcreator 8.5.8 --enable-64bit</tt></li> 
      </ol>
    </li> 
    <li>To clean up post-build:
      <ol type="a">
        <li><tt>$ ./kitcreator clean</tt></li> 
      </ol>
    </li> 
    <li>Create a Tclkit without Metakit4 support (falls back to Zip for storage):
      <ol type="a">
        <li><tt>$ KITCREATOR_PKGS='tk itcl'</tt></li> 
        <li><tt>$ export KITCREATOR_PKGS</tt></li> 
        <li><tt>$ ./kitcreator</tt></li> 
      </ol>
    </li> 
    <li>Create a Tclkit with Metakit4 support, but using Zip for storage:
      <ol type="a">
        <li><tt>$ ./kitcreator --enable-kit-storage=zip</tt></li>
      </ol>
    </li>
  </ol>
</p>
Z 5f1353553d87a46efb05332aecd2d050