Skip to content

Commit

Permalink
adding from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
l3iggs committed Mar 13, 2015
1 parent 570372a commit ab6ac70
Show file tree
Hide file tree
Showing 63 changed files with 9,385 additions and 0 deletions.
89 changes: 89 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
This is Cookit binary build system. For additional information see

http://www.endorser.org/cookit

UNIX BUILD
==========

Building under UNIX systems requires having tclsh command in PATH. Cookit
build system uses Tcl to build in the first place, so you can either build
any Tcl version (8.4 and up) or choose existing cookit/tclkit binaries
to build.

All that is needed then is running the following steps:

$ ./build.sh retrievesource tcl vfs cookfs
$ ./build.sh build-cookit

If you are building off a network drive, retrievesource command can be invoked
on any machine. This step downloads sources over CVS and HTTP and requires cvs
command as well as tclsh.

Command build-cookit needs to be invoked on target system as it creates cookit.
In case UPX is installed and should be used, it should be run as follows:

$ ./build.sh -upx best build-cookit

Upon successful build directory _output/<platform> should contain a cookit binary.

If you run into "Unknown platform ..." error or encounter a problem with build on
a platform, please refer to UNKNOWN PLATFORM section.

Building Tk as dynamic library can be achieved by doing:

$ ./build.sh retrievesource tk
$ ./build.sh build-dynamic tk

The first command can be invoked on any host in case of network drives.
Second command has to be run on target machine.

This will create _install_dynamic/<hostname>/lib/tk* to be created. It will also
create _output/<platform>/packages/tk*.cfspkg package file. Such package can be
used with TABS system (http://sourceforge.net/projects/tabs/).

Libraries in _install_dynamic/<hostname>/lib can be embedded as part of your
application as well - which might seem an easier option for less advanced users.

WINDOWS PLATFORM
================

Building on Windows is relatively easy. All that is needed is tclsh. All required
tools such as MinGW/MSys and CVS/SVN tools are automatically downloaded from
sourceforge on first run.

All that is needed then is running the following steps:

C> tclsh build.tcl -usemingw retrievesource tcl vfs cookfs
C> tclsh build.tcl -usemingw build-cookit

We can also use upx command (which is also downloaded as part of win32 tools):

C> tclsh build.tcl -usemingw -upx best build-cookit

Building a cookit with Tk requires running the following commands:

C> tclsh build.tcl -usemingw retrievesource tk
C> tclsh build.tcl -usemingw -tk latest build-cookit

This will cause Cookit with Tk embeded to be built. It will also run as Windows
GUI application rather than Windows console application.

Flag -usemingw causes build system to retrieve and use its own copy of MinGW.
It uses MinGW/MSys binaries that were specifically tested to work properly for
building cookit.

UNKNOWN PLATFORM
================

Cookit is currently regularly built on Solaris x86, Windows x86 and Linux x86. It is
occassionally built on Mac OS X. Some platforms such as AIX or HP-UX are not tested
remotely often enough.

If your platform is not currently known, file build/platform.tcl needs to
have your platform added. It should involve adding a condition line similar to:

} elseif {[string match "Power*-Darwin-*" $p]} {
set platform macosx-ppc

If you have encountered such a platform, please contact me and I will be sure to add it.

4 changes: 4 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

tclsh "`dirname "$0"`/build/build.tcl" $*

4 changes: 4 additions & 0 deletions build.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env tclsh

cd [file dirname [info script]]
source build/build.tcl
39 changes: 39 additions & 0 deletions build/build.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
namespace eval cookit {}

package require Tcl 8.3

cd [file dirname [info script]]
cd ..

set cookit::rootdirectory [pwd]
set ::env(LANG) C

source [file join $cookit::rootdirectory build libs cmdline.tcl]
source [file join $cookit::rootdirectory build libs md5.tcl]

source [file join $cookit::rootdirectory build init.tcl]
source [file join $cookit::rootdirectory build os.tcl]
source [file join $cookit::rootdirectory build platform.tcl]
source [file join $cookit::rootdirectory build log.tcl]
source [file join $cookit::rootdirectory build versioncontrol.tcl]
source [file join $cookit::rootdirectory build download.tcl]
source [file join $cookit::rootdirectory build parts.tcl]
source [file join $cookit::rootdirectory build common.tcl]
source [file join $cookit::rootdirectory build ui.tcl]
source [file join $cookit::rootdirectory build extproc.tcl]
source [file join $cookit::rootdirectory build commands.tcl]
source [file join $cookit::rootdirectory build solution.tcl]
source [file join $cookit::rootdirectory build operations.tcl]

cookit::preInitOS
cookit::initParts
cookit::parseArguments
cookit::initOS
cookit::initAvailablePartVersions

cookit::fixPartVersions

cookit::initDirectories

cookit::partInitializeAllVersions
cookit::runCommand
Loading

0 comments on commit ab6ac70

Please sign in to comment.