Check-in [4fa3b7d3ea]
Overview
Comment:Updated to pull user-specified (or default) kit.ico and kit.rc into Tk, if built and not include KitSH's own resource file when including Tk's since they conflict
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4fa3b7d3ea98c865359c6813f3b0a62b0addc04c
User & Date: rkeene on 2011-05-17 01:33:09
Other Links: manifest | tags
Context
2011-05-19
23:00
Updated to try harder to look for a working Tcl interpreter for building KitDLL

Updated to return in failure if installvfs fails check-in: 3f354ca762 user: rkeene tags: trunk

18:04
Merged trunk check-in: b7c6c8232c user: rkeene tags: merge-kitdll-kitsh-common
2011-05-17
01:33
Updated to pull user-specified (or default) kit.ico and kit.rc into Tk, if built and not include KitSH's own resource file when including Tk's since they conflict check-in: 4fa3b7d3ea user: rkeene tags: trunk
2011-05-08
19:16
Added basic Incr Tcl test check-in: 36e900cf16 user: rkeene tags: trunk
Changes

Modified kitcreator from [0663f6ccec] to [fb76c24536].

82
83
84
85
86
87
88













89
90
91
92
93
94
95
			echo '         Set STATICMK4 to 1 if you really want to link Mk4tcl statically.' >&2

			STATICMK4="0"
			export STATICMK4
		fi
	fi
fi














failedpkgs=""
buildfailed="0"
for pkg in tcl tclvfs zlib ${KITCREATOR_PKGS} "${KITTARGET}"; do
	echo -n "Building ${pkg} ..."

	failed="0"







>
>
>
>
>
>
>
>
>
>
>
>
>







82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
			echo '         Set STATICMK4 to 1 if you really want to link Mk4tcl statically.' >&2

			STATICMK4="0"
			export STATICMK4
		fi
	fi
fi

# Find Windows resource-related files
if [ -f "kit.ico" ]; then
	KITCREATOR_ICON="$(pwd)/kit.ico"
else
	KITCREATOR_ICON="$(echo "$(pwd)/kitsh/buildsrc"/kitsh-*/kit.ico)"
fi
if [ -f "kit.rc" ]; then
	KITCREATOR_RC="$(pwd)/kit.rc"
else
	KITCREATOR_RC="$(echo "$(pwd)/kitsh/buildsrc"/kitsh-*/kit.rc)"
fi
export KITCREATOR_ICON KITCREATOR_RC

failedpkgs=""
buildfailed="0"
for pkg in tcl tclvfs zlib ${KITCREATOR_PKGS} "${KITTARGET}"; do
	echo -n "Building ${pkg} ..."

	failed="0"

Modified kitsh/build.sh from [2be7df7f4b] to [9ac6c7313f].

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61




62
63
64
65
66
67
68
	ZLIBDIR="$(cd "${OTHERPKGSDIR}/zlib/inst" 2>/dev/null && pwd)"
	export ZLIBDIR
	if [ -z "${ZLIBDIR}" -o ! -f "${ZLIBDIR}/lib/libz.a" ]; then
		unset ZLIBDIR
	fi

	# Copy user specified kit.rc and kit.ico in to build directory, if found
	if [ -f "${OTHERPKGSDIR}/kit.rc" ]; then
		cp "${OTHERPKGSDIR}/kit.rc" "${BUILDDIR}"
	fi
	if [ -f "${OTHERPKGSDIR}/kit.ico" ]; then
		cp "${OTHERPKGSDIR}/kit.ico" "${BUILDDIR}"
	fi

	# Include extra objects as required
	## Initialize list of extra objects
	EXTRA_OBJS=""

	## Tk Resources (needed for Win32 support)
	TKDIR="$(cd "${OTHERPKGSDIR}/tk/inst" && pwd)"
	TKRSRC="${TKDIR}/lib/tkbase.res.o"
	if [ -n "${TKDIR}" -a -f "${TKRSRC}" ]; then
		EXTRA_OBJS="${EXTRA_OBJS} ${TKRSRC}"




	fi

	## Export to the environment, to be picked up by the "configure" script
	export EXTRA_OBJS

	# Compile Kitsh
	if [ -z "${ZLIBDIR}" ]; then







<
|
<
<
|
<





|




>
>
>
>







39
40
41
42
43
44
45

46


47

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
	ZLIBDIR="$(cd "${OTHERPKGSDIR}/zlib/inst" 2>/dev/null && pwd)"
	export ZLIBDIR
	if [ -z "${ZLIBDIR}" -o ! -f "${ZLIBDIR}/lib/libz.a" ]; then
		unset ZLIBDIR
	fi

	# Copy user specified kit.rc and kit.ico in to build directory, if found

	cp "${KITCREATOR_ICON}" "${BUILDDIR}/kit.ico"


	cp "${KITCREATOR_RC}" "${BUILDDIR}/kit.rc"


	# Include extra objects as required
	## Initialize list of extra objects
	EXTRA_OBJS=""

	## Tk Resources (needed for Win32 support) -- remove kit-found resources to prevent the symbols from being in conflict
	TKDIR="$(cd "${OTHERPKGSDIR}/tk/inst" && pwd)"
	TKRSRC="${TKDIR}/lib/tkbase.res.o"
	if [ -n "${TKDIR}" -a -f "${TKRSRC}" ]; then
		EXTRA_OBJS="${EXTRA_OBJS} ${TKRSRC}"

		echo ' *** Removing "kit.rc" since we have Tk with its own resource file'

		rm -f "${BUILDDIR}/kit.rc"
	fi

	## Export to the environment, to be picked up by the "configure" script
	export EXTRA_OBJS

	# Compile Kitsh
	if [ -z "${ZLIBDIR}" ]; then

Modified kitsh/buildsrc/kitsh-0.0/configure.ac from [d545ae6633] to [da08c3d389].

24
25
26
27
28
29
30

31

32

33
34
35
36
37
38
39
dnl Find extra objects we need to link as a part of "kit"
AC_SUBST(EXTRA_OBJS)

dnl Check for Windows Resource Compiler
AC_CHECK_TOOL([RC], [windres], [false])

dnl If we found the resource compiler, add "kit.res.o" to our list of objects to build

if ! test "$RC" = "false"; then

	EXTRA_OBJS="$EXTRA_OBJS kit.res.o"

fi

dnl Check for Tcl features
SAVE_LIBS="${LIBS}"
LIBS="${ARCHS} ${LIBS}"
dnl Determine if we have "Tcl_SetStartupScript" (8.6.x) or "TclSetStartupScriptPath" (8.4.x)
AC_CHECK_FUNCS(Tcl_SetStartupScript TclSetStartupScriptPath)







>

>
|
>







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
dnl Find extra objects we need to link as a part of "kit"
AC_SUBST(EXTRA_OBJS)

dnl Check for Windows Resource Compiler
AC_CHECK_TOOL([RC], [windres], [false])

dnl If we found the resource compiler, add "kit.res.o" to our list of objects to build
dnl (as long as the source for such an object exists)
if ! test "$RC" = "false"; then
	if test -f kit.rc; then
		EXTRA_OBJS="$EXTRA_OBJS kit.res.o"
	fi
fi

dnl Check for Tcl features
SAVE_LIBS="${LIBS}"
LIBS="${ARCHS} ${LIBS}"
dnl Determine if we have "Tcl_SetStartupScript" (8.6.x) or "TclSetStartupScriptPath" (8.4.x)
AC_CHECK_FUNCS(Tcl_SetStartupScript TclSetStartupScriptPath)

Modified tk/build.sh from [b1fd7e8b36] to [f374ed53cb].

164
165
166
167
168
169
170






171
172
173
174
175
176
177
		) || continue

		echo "Running: ${MAKE:-make} install"
		${MAKE:-make} install || continue

		# Update to include resources, if found
		if [ "${dir}" = "win" ]; then






			echo ' *** Creating tkbase.res.o to support Windows build'
			echo "\"${RC:-windres}\" -o tkbase.res.o  --define STATIC_BUILD --include \"./../generic\" --include \"${TCLCONFIGDIR}/../generic\" --include \"${TCLCONFIGDIR}\" --include \"./rc\" \"./rc/tk_base.rc\""
			"${RC:-windres}" -o tkbase.res.o  --define STATIC_BUILD --include "./../generic" --include "${TCLCONFIGDIR}/../generic" --include "${TCLCONFIGDIR}" --include "./rc" "./rc/tk_base.rc"

			if [ -f "tkbase.res.o" ]; then
				cp "tkbase.res.o" "${INSTDIR}/lib/"
			fi







>
>
>
>
>
>







164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
		) || continue

		echo "Running: ${MAKE:-make} install"
		${MAKE:-make} install || continue

		# Update to include resources, if found
		if [ "${dir}" = "win" ]; then
			echo ' *** Importing user-specified icon'
			cp "${KITCREATOR_ICON}" rc/tk.ico

			echo ' *** Importing user-specified resources'
			cat "${KITCREATOR_RC}" | grep -v '^ *tclsh  *ICON' >> "./rc/tk_base.rc"

			echo ' *** Creating tkbase.res.o to support Windows build'
			echo "\"${RC:-windres}\" -o tkbase.res.o  --define STATIC_BUILD --include \"./../generic\" --include \"${TCLCONFIGDIR}/../generic\" --include \"${TCLCONFIGDIR}\" --include \"./rc\" \"./rc/tk_base.rc\""
			"${RC:-windres}" -o tkbase.res.o  --define STATIC_BUILD --include "./../generic" --include "${TCLCONFIGDIR}/../generic" --include "${TCLCONFIGDIR}" --include "./rc" "./rc/tk_base.rc"

			if [ -f "tkbase.res.o" ]; then
				cp "tkbase.res.o" "${INSTDIR}/lib/"
			fi