Check-in [095125b887]
Overview
Comment:Updated to set encoding from system (untested)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 095125b8871aec253246fa22027fa51ab0ce2fd3
User & Date: rkeene on 2010-09-26 04:45:24
Other Links: manifest | tags
Context
2010-09-26
04:45
Updated to check to see if required before building check-in: 0ed07039ad user: rkeene tags: trunk
04:45
Updated to set encoding from system (untested) check-in: 095125b887 user: rkeene tags: trunk
04:45
Corrected typo in ZipVFS check-in: 6e6c5fd01a user: rkeene tags: trunk
Changes

Modified kitsh/buildsrc/kitsh-0.0/boot.tcl from [fad62aecf7] to [877050aa4b].

85
86
87
88
89
90
91



92
93
94
95
96



97
98
99
100
101
102
103
			librarypath [info library]
		} else {
			encoding dirs [list [file join [info library] encoding]] ;# TIP 258
		}

		# fix system encoding, if it wasn't properly set up (200207.004 bug)
		if {[encoding system] eq "identity"} {



			switch $::tcl_platform(platform) {
				windows		{ encoding system cp1252 }
				macintosh	{ encoding system macRoman }
			        default		{ encoding system iso8859-1 }
			}



		}

		# now remount the executable with the correct encoding
		vfs::filesystem unmount [lindex [::vfs::filesystem info] 0]

		set noe [info nameofexecutable]








>
>
>
|
|
|
|
|
>
>
>







85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
			librarypath [info library]
		} else {
			encoding dirs [list [file join [info library] encoding]] ;# TIP 258
		}

		# fix system encoding, if it wasn't properly set up (200207.004 bug)
		if {[encoding system] eq "identity"} {
			if {[info exists ::tclkit_system_encoding] && $::tclkit_system_encoding != ""} {
				encoding system $::tclkit_system_encoding
			} else {
				switch $::tcl_platform(platform) {
					windows		{ encoding system cp1252 }
					macintosh	{ encoding system macRoman }
				        default		{ encoding system iso8859-1 }
				}
			}

			unset -nocomplain ::tclkit_system_encoding
		}

		# now remount the executable with the correct encoding
		vfs::filesystem unmount [lindex [::vfs::filesystem info] 0]

		set noe [info nameofexecutable]

Modified kitsh/buildsrc/kitsh-0.0/configure.ac from [f480293811] to [77ec27d4ef].

28
29
30
31
32
33
34
35
36
37

38


39
40
41
42
43
44
45
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 Determine if we have "Tcl_SetStartupScript" (8.6.x) or "TclSetStartupScriptPath" (8.4.x)
SAVE_LIBS="${LIBS}"
LIBS="${ARCHS} ${LIBS}"

AC_CHECK_FUNCS(Tcl_SetStartupScript TclSetStartupScriptPath)


LIBS="${SAVE_LIBS}"

dnl Find zlib
AC_ARG_WITH(zlib, AC_HELP_STRING([--with-zlib], [directory containing zlib]), [
	CPPFLAGS="${CPPFLAGS} -I${with_zlib}/include -I${with_zlib}"
	CFLAGS="${CFLAGS} -I${with_zlib}/include -I${with_zlib}"
	LDFLAGS="${LDFLAGS} -L${with_zlib}/lib -L${with_zlib}"







|


>

>
>







28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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)
dnl Check for the ability to get the current system encoding
AC_CHECK_FUNCS(Tcl_GetEncodingNameFromEnvironment Tcl_SetSystemEncoding)
LIBS="${SAVE_LIBS}"

dnl Find zlib
AC_ARG_WITH(zlib, AC_HELP_STRING([--with-zlib], [directory containing zlib]), [
	CPPFLAGS="${CPPFLAGS} -I${with_zlib}/include -I${with_zlib}"
	CFLAGS="${CFLAGS} -I${with_zlib}/include -I${with_zlib}"
	LDFLAGS="${LDFLAGS} -L${with_zlib}/lib -L${with_zlib}"

Modified kitsh/buildsrc/kitsh-0.0/kitInit.c from [a26486a2c9] to [8565374f0c].

28
29
30
31
32
33
34










35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#endif /* _WIN32 */

#ifndef MB_TASKMODAL
#  define MB_TASKMODAL 0
#endif /* MB_TASKMODAL */

#include "tclInt.h"











#ifdef KIT_INCLUDES_ITCL
Tcl_AppInitProc	Itcl_Init;
#endif
#ifdef KIT_INCLUDES_MK4TCL
Tcl_AppInitProc	Mk4tcl_Init;
#endif
Tcl_AppInitProc Vfs_Init, Rechan_Init;
#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 85
Tcl_AppInitProc	Pwb_Init;
#endif
#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 86
Tcl_AppInitProc Zlib_Init;
#endif
#ifdef TCL_THREADS
Tcl_AppInitProc	Thread_Init;
#endif
#ifdef _WIN32
Tcl_AppInitProc	Dde_Init, Registry_Init;







>
>
>
>
>
>
>
>
>
>








|


|







28
29
30
31
32
33
34
35
36
37
38
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
#endif /* _WIN32 */

#ifndef MB_TASKMODAL
#  define MB_TASKMODAL 0
#endif /* MB_TASKMODAL */

#include "tclInt.h"

#if defined(HAVE_TCL_GETENCODINGNAMEFROMENVIRONMENT) && defined(HAVE_TCL_SETSYSTEMENCODING)
#  define TCLKIT_CAN_SET_ENCODING 1
#endif
#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 85
#  define KIT_INCLUDES_PWB 1
#endif
#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 86
#  define KIT_INCLUDES_ZLIB 1
#endif

#ifdef KIT_INCLUDES_ITCL
Tcl_AppInitProc	Itcl_Init;
#endif
#ifdef KIT_INCLUDES_MK4TCL
Tcl_AppInitProc	Mk4tcl_Init;
#endif
Tcl_AppInitProc Vfs_Init, Rechan_Init;
#ifdef KIT_INCLUDES_PWB
Tcl_AppInitProc	Pwb_Init;
#endif
#ifdef KIT_INCLUDES_ZLIB
Tcl_AppInitProc Zlib_Init;
#endif
#ifdef TCL_THREADS
Tcl_AppInitProc	Thread_Init;
#endif
#ifdef _WIN32
Tcl_AppInitProc	Dde_Init, Registry_Init;
160
161
162
163
164
165
166




167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197








198
199
200
201
202
203
204
		execNameObj = Tcl_FSJoinToPath(Tcl_FSGetCwd(interp), 1, lobjv);

		tclExecutableName = strdup(Tcl_GetStringFromObj(execNameObj, &len));
	}
}

int TclKit_AppInit(Tcl_Interp *interp) {




#ifdef KIT_INCLUDES_ITCL
	Tcl_StaticPackage(0, "Itcl", Itcl_Init, NULL);
#endif 
#ifdef KIT_INCLUDES_MK4TCL
	Tcl_StaticPackage(0, "Mk4tcl", Mk4tcl_Init, NULL);
#endif
#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 85
	Tcl_StaticPackage(0, "pwb", Pwb_Init, NULL);
#endif 
	Tcl_StaticPackage(0, "rechan", Rechan_Init, NULL);
	Tcl_StaticPackage(0, "vfs", Vfs_Init, NULL);
#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 86
	Tcl_StaticPackage(0, "zlib", Zlib_Init, NULL);
#endif
#ifdef TCL_THREADS
	Tcl_StaticPackage(0, "Thread", Thread_Init, NULL);
#endif
#ifdef _WIN32
	Tcl_StaticPackage(0, "dde", Dde_Init, NULL);
	Tcl_StaticPackage(0, "registry", Registry_Init, NULL);
#endif
#ifdef KIT_INCLUDES_TK
	Tcl_StaticPackage(0, "Tk", Tk_Init, Tk_SafeInit);
#endif

	/* the tcl_rcFileName variable only exists in the initial interpreter */
#ifdef _WIN32
	Tcl_SetVar(interp, "tcl_rcFileName", "~/tclkitrc.tcl", TCL_GLOBAL_ONLY);
#else
	Tcl_SetVar(interp, "tcl_rcFileName", "~/.tclkitrc", TCL_GLOBAL_ONLY);
#endif









	/* Hack to get around Tcl bug 1224888.  This must be run here and
	 * in LibraryPathObjCmd because this information is needed both
	 * before and after that command is run. */
	SetExecName(interp);

	TclSetPreInitScript(preInitCmd);







>
>
>
>






|




|



















>
>
>
>
>
>
>
>







170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
		execNameObj = Tcl_FSJoinToPath(Tcl_FSGetCwd(interp), 1, lobjv);

		tclExecutableName = strdup(Tcl_GetStringFromObj(execNameObj, &len));
	}
}

int TclKit_AppInit(Tcl_Interp *interp) {
#ifdef TCLKIT_CAN_SET_ENCODING
	Tcl_DString encodingName;
#endif

#ifdef KIT_INCLUDES_ITCL
	Tcl_StaticPackage(0, "Itcl", Itcl_Init, NULL);
#endif 
#ifdef KIT_INCLUDES_MK4TCL
	Tcl_StaticPackage(0, "Mk4tcl", Mk4tcl_Init, NULL);
#endif
#ifdef KIT_INCLUDES_PWB
	Tcl_StaticPackage(0, "pwb", Pwb_Init, NULL);
#endif 
	Tcl_StaticPackage(0, "rechan", Rechan_Init, NULL);
	Tcl_StaticPackage(0, "vfs", Vfs_Init, NULL);
#ifdef KIT_INCLUDES_ZLIB
	Tcl_StaticPackage(0, "zlib", Zlib_Init, NULL);
#endif
#ifdef TCL_THREADS
	Tcl_StaticPackage(0, "Thread", Thread_Init, NULL);
#endif
#ifdef _WIN32
	Tcl_StaticPackage(0, "dde", Dde_Init, NULL);
	Tcl_StaticPackage(0, "registry", Registry_Init, NULL);
#endif
#ifdef KIT_INCLUDES_TK
	Tcl_StaticPackage(0, "Tk", Tk_Init, Tk_SafeInit);
#endif

	/* the tcl_rcFileName variable only exists in the initial interpreter */
#ifdef _WIN32
	Tcl_SetVar(interp, "tcl_rcFileName", "~/tclkitrc.tcl", TCL_GLOBAL_ONLY);
#else
	Tcl_SetVar(interp, "tcl_rcFileName", "~/.tclkitrc", TCL_GLOBAL_ONLY);
#endif

#ifdef TCLKIT_CAN_SET_ENCODING
	/* Set the encoding from the Environment */
	Tcl_GetEncodingNameFromEnvironment(&encodingName);
	Tcl_SetSystemEncoding(NULL, Tcl_DStringValue(&encodingName));
	Tcl_SetVar(interp, "tclkit_system_encoding", Tcl_DStringValue(&encodingName), 0);
	Tcl_DStringFree(&encodingName);
#endif

	/* Hack to get around Tcl bug 1224888.  This must be run here and
	 * in LibraryPathObjCmd because this information is needed both
	 * before and after that command is run. */
	SetExecName(interp);

	TclSetPreInitScript(preInitCmd);