Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Freewrap/TclKit/Other ?

Status
Not open for further replies.

fabien

Technical User
Sep 25, 2001
299
AU
Hi!

I would like to create standalone apps.

I have downloaded Freewrap but I can't compile it succesfully on my machine with Solaris 8 and gcc 2.95.3. Has anybody experienced this?

I also have binaries for TckKit but I did not find any CLEAR instructions on how to use it.

Any other free solutions?

Thanks!
 
Hi!

I finally managed to have Freewrap to work by playing with the Makefile. I had to explicitely call some libraries+ a few more modifs
Here it is:


# UNIX makefile for freeWrap
#
# Developed by Dennis R. LaBelle
#
# Edit the parameters to suit your configuration, then type "make".
#

# Name of the application program
#
## Name of the current extension to include
## FW_EXT=TCLSH for TCL only program
## FW_EXT= for TCL/TK only
## FW_EXT=BLT for TCL/TK plus BLT
#FW_EXT=TCLSH
FW_EXT=
#FW_EXT=BLT
#
## Full name of the application
PROG = freewrap$(FW_EXT)

# Current application program revision number
PROGREV =$(PROG) 5.3

###### The path for the top-level build directory
#
TOP = .

# Name of main program file.
MAINPRG = ../generic/main

# Location of previously compiled TCLSH program
TCLSH = /usr/local/bin/tclsh

# TCL/TK version info
TCLVERSIONDOT = 8.4
TCLPATCHLEVELDOT = 8.4
BLTVERSIONDOT = 2.4
TCLVERSION = 83
TCLPATCHLEVEL = 834
BLTVERSION = 24

# Locations of various directories
TCLDIR = /export/home/fabien/tcl$(TCLPATCHLEVELDOT)
TKDIR = /export/home/fabien/tk$(TCLPATCHLEVELDOT)
INSTALLDIR = /usr/local/lib

###### Some operating system specific commands
RM = rm -f
CAT = cat
CP = cp
MKDIR = mkdir
RENAME = mv
DELTREE = rm -rf

###### Select a C compiler
#
CC = gcc -DSTATIC_BUILD=1
#CC = gcc

###### Select standard command-line options for the C compiler.
#
#CFLAGS= -pipe -O -fPIC BUILD
CFLAGS= -pipe -O -fPIC -DSTATIC_BUILD

###### Add these options to CFLAGS when linking object files into
# an executable.
#
#LFLAGS = -static -Xlinker -S
LFLAGS =

###### Name of the ZIP archiver program
#
ZIP = zip

###### Extention for executable files on the target machine.
#
EXE =

###### A list of directory(s containing TCL header files "tcl.h" etc.
#
HDR_TCL = -I$(TCLDIR)/generic

###### The linker option used to link against the TCL library
#
LIB_TCL = $(INSTALLDIR)/libtcl$(TCLVERSIONDOT).a

###### The name of the top-level directory of the TCL script library
#
SCRIPT_TCL = $(INSTALLDIR)/tcl$(TCLVERSIONDOT)/tclIndex
ZSCRIPT_TCL = zipdir/tcl/tclIndex

###### A list of directory(s) containing TK header files "tk.h" etc.
# Leave undefined if not needed.
#
HDR_TK = -I$(TKDIR)/generic -I$(TKDIR)/xlib -I$(TKDIR)/unix -I/usr/openwin/include

###### The directory containing the zlib header files "zlib.h".
#
HDR_ZLIB = -I/usr/local/include/

###### The linker option used to link against the TCL library
#
LIB_TK = $(INSTALLDIR)/libtk$(TCLVERSIONDOT).a
OPT_TK =

###### The name of the top-level directory of the TK script library
#
SCRIPT_TK = $(INSTALLDIR)/tk$(TCLVERSIONDOT)/tclIndex
ZSCRIPT_TK = zipdir/tk/tclIndex

###### The linker option needed to include the Z compression library.
# This library is required by both the Img extension and the
# virtual file system.
#
LIB_Z = $(INSTALLDIR)/libz.a

###### Select which Tcl extensions to include.
#
# To include a Tcl extenions x, define LIB_x to be the linker options
# needed to link against that extension. To omit a Tcl extension,
# leave LIB_x undefined and supply a definition for OPT_x that defines
# the C preprocessor macro WITHOUT_x.
#
#### BLT
#
OPT_BLT = -DWITHOUT_BLT=1
SCRIPT_BLT=
ZSCRIPT_BLT=

#### Img
#
#LIB_IMG = /home/drh/tcltk/8.3.1win/libimg.a # /home/drh/tcltk/8.3.1win/libpng.a # /home/drh/tcltk/8.3.1win/libtiff.a # /home/drh/tcltk/8.3.1win/libjpeg.a
OPT_IMG = -DWITHOUT_IMG

#### Sqlite
#
#LIB_SQLITE = /home/drh/sqlite/win/libsqlite.a /home/drh/sqlite/win/libgdbm.a
OPT_SQLITE = -DWITHOUT_SQLITE

#### TkHtml
#
#LIB_TKHTML = /home/drh/tcltk/8.3.1win/libtkhtml.a
OPT_TKHTML = -DWITHOUT_TKHTML

#### TkTable
#
#LIB_TKTABLE = /home/drh/tcltk/8.3.1win/libtktable.a
OPT_TKTABLE = -DWITHOUT_TKTABLE=1

#### Tlink
# This extension must be disabled for unix. It only works for windows.
#
#LIB_TLINK = -lole32 -luuid
OPT_TLINK = -DWITHOUT_TLINK=1

#### Winico
# This extension is omitted for unix builds.
#
OPT_WINICO = -DWITHOUT_WINICO=1

###############################################################################
# You should not have to change anything below this line
###############################################################################
#

# All Include files directives.
#
OPT = $(HDR_TCL) $(HDR_TK) $(HDR_ZLIB) $(OPT_TK) $(OPT_BLT) $(OPT_IMG) $(OPT_SQLITE) $(OPT_TKHTML) $(OPT_TKTABLE) $(OPT_TLINK) $(OPT_WINICO)

# All library options to the linker
#
LIBS = $(WINLIBS) $(LIB_SQLITE) $(LIB_IMG) $(LIB_TKHTML) $(LIB_TKTABLE) $(LIB_TLINK) $(LIB_BLT) $(LIB_Z) $(LIB_TK) $(LIB_TCL) /usr/lib/libm.a /usr/lib/libc.a /usr/lib/libdl.so

# All object code modules
#
OBJ = $(TOP)/freelib.o $(TOP)/freewrap$(FW_EXT).o $(TOP)/zvfs.o

# All script directories
#
ZSCRIPTS = $(ZSCRIPT_TCL) $(ZSCRIPT_TK) $(ZSCRIPT_BLT)

all: zipdir/$(ZIP) null.zip $(PROG)$(EXE) freewish$(FW_EXT)$(EXE)

zipdir/$(ZIP): $(TOP)/$(ZIP)
$(MKDIR) zipdir
$(CP) $(TOP)/$(ZIP) zipdir

zipdir/freewrap.tcl: $(TOP)/../generic/freewrap.tcl
$(CP) $(TOP)/../generic/freewrap.tcl zipdir

zipdir/freewrapCmds.tcl: $(TOP)/../generic/freewrapCmds.tcl
$(CP) $(TOP)/../generic/freewrapCmds.tcl zipdir/freewrapCmds.tcl

$(PROG)$(EXE): $(PROG)_bare$(EXE) zipdir/freewrap.tcl zipdir/freewrapCmds.tcl $(ZSCRIPTS)
$(RM) $(PROG)$(EXE)

echo freewrap.tcl >zipdir/_freewrap_init.txt
echo $(PROGREV) >>zipdir/_freewrap_init.txt
$(CP) $(PROG)_bare$(EXE) $(PROG).zip
$(CAT) $(TOP)/null.zip >>$(PROG).zip
cd zipdir; pwd; $(TOP)/$(ZIP) -rA9 ../$(PROG).zip *; cd ..
$(RENAME) $(PROG).zip $(PROG)$(EXE)
$(RM) freewish$(FW_EXT)$(EXE)
$(CP) $(PROG)$(EXE) freewish$(FW_EXT)$(EXE)
./freewish$(FW_EXT)$(EXE) ../generic/setinfo.tcl freewrap$(FW_EXT)$(EXE)
$(CP) $(PROG)$(EXE) freewish$(FW_EXT)$(EXE)

null.zip:
echo . | $(ZIP) null.zip -
$(ZIP) null.zip -d -

zipdir/tcl/tclIndex: $(SCRIPT_TCL)
$(DELTREE) zipdir/tcl
$(MKDIR) zipdir/tcl
$(TCLSH) $(TOP)/../generic/shrink.tcl tcl $(SCRIPT_TCL) $(ZSCRIPT_TCL)

zipdir/tk/tclIndex: $(SCRIPT_TK)
$(DELTREE) zipdir/tk
$(MKDIR) zipdir/tk
$(TCLSH) $(TOP)/../generic/shrink.tcl tk $(SCRIPT_TK) $(ZSCRIPT_TK)

zipdir/blt/tclIndex: $(SCRIPT_BLT)
$(MKDIR) zipdir/blt
$(MKDIR) zipdir/blt/dd_protocols
$(TCLSH) $(TOP)/../generic/shrink.tcl blt $(SCRIPT_BLT) $(ZSCRIPT_BLT)

$(PROG)_bare$(EXE): $(OBJ)
$(CC) $(LFLAGS) -o $(PROG)_bare$(EXE) $(OBJ) $(LIBS) -lsocket -lnsl -L/usr/openwin/lib -lX11
# Comment out the following line if you do not want to compress the executable file with UPX.
# $(TOP)/upx -9 $(PROG)_bare$(EXE)

$(TOP)/freewrap$(FW_EXT).o: $(MAINPRG).c
$(CC) $(CFLAGS) $(OPT) -o freewrap$(FW_EXT).o -c $(TOP)/$(MAINPRG).c

$(TOP)/zvfs.o: $(TOP)/../generic/zvfs.c
$(CC) $(CFLAGS) $(OPT) -o zvfs.o -c $(TOP)/../generic/zvfs.c

$(TOP)/freelib.o : $(TOP)/../generic/freelib.c
$(CC) $(CFLAGS) $(OPT) -o freelib.o -c $(TOP)/../generic/freelib.c

clean:
$(RM) core
$(RM) *.o
$(RM) $(PROG)_bare$(EXE)
$(RM) $(PROG)$(EXE)
$(RM) *.zip
$(DELTREE) zipdir










 
I don't use Solaris but I think that your information is very usefull.

A good place to publish it is the Tcler's Wiki, a Tcl/Tk documentation cooperative web site:
First you can browse the site, searching from Second you can add your info inside an existing page or a new page.

Good luck

ulis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top