#!/bin/sh # \ exec wish "$0" ${1+"$@"} # see http://groups.google.com/groups?oi=djq&selm=an_369330108 ######################################################################################## # # Description # # savIRC is an open source, cross platform IRC client # This file contains all basic elements to start savIRC # #------------------------------------------------------------------------------- # # Contributors # # Copyright (C) 2001-2003 Saverio Castellano # Copyright (C) 2003-2006 Casey Ackels # Copyright (C) 2004-2007 Per Hansen # #------------------------------------------------------------------------------- # # License # # This file is distributed under the terms and conditions of the GPL v2 # See gpl.txt for more information # #------------------------------------------------------------------------------- # # Subversion # # $Revision$ # $LastChangedBy$ # $LastChangedDate$ # ######################################################################################## puts "Starting savIRC..." #catch { # tk::unsupported::ExposePrivateCommand tkTabToWindow # was unused # tk::unsupported::ExposePrivateCommand tkCancelRepeat # was unused # tk::unsupported::ExposePrivateCommand tkTextSetCursor # replaced by [$widget mark set insert $windex] #} package require Tcl 8.5 package require msgcat 1.4.2 ;# part of tcl since 8.2 namespace import msgcat::mc puts "TCL-Version: [info tclversion]" #set me(path) [file join [pwd] [file dirname "$::argv0"]] # resolve symlinks to get the savirc dir set s_savirc_base [info script] while {1} {if {[catch {set s_savirc_base [file join [file dirname $s_savirc_base] [file link $s_savirc_base]]}]} {break}} set s_savirc_base [file normalize [file dirname $s_savirc_base]] puts "Programdir: $s_savirc_base" # When removing [getRevision] set the variable, debug, to 0. #set debug 0 set l_packagenames [package names] if {!("tablelist_tile" in $l_packagenames)} { puts "The tcl-package \"tablelist_tile\" is not part of your distribution." } if {!("BWidget" in $l_packagenames)} { puts "The tcl-package \"BWidget\" is not part of your distribution." } if {!("cmdline" in $l_packagenames)} { puts "The tcl-package \"cmdline\" (part of tcllib) is not part of your distribution." } if {!("fileutil" in $l_packagenames)} { puts "The tcl-package \"fileutil\" (part of tcllib) is not part of your distribution." } # We need to add the paths to each package! lappend ::auto_path [file join $s_savirc_base] lappend ::auto_path [file join $s_savirc_base tcltk] lappend ::auto_path [file join $s_savirc_base tcltk savirc] lappend ::auto_path [file join $s_savirc_base tcltk BWidget1.8.0] lappend ::auto_path [file join $s_savirc_base tcltk mkWidgets1.3mod] lappend ::auto_path [file join $s_savirc_base tcltk savirc_misc] lappend ::auto_path [file join $s_savirc_base tcltk tablelist4.8] lappend ::auto_path [file join $s_savirc_base tcltk tcllib1.10_cmdline] lappend ::auto_path [file join $s_savirc_base tcltk tcllib1.10_fileutil] lappend ::auto_path [file join $s_savirc_base tcltk tkhelpbrowser_tile1.3mod] # This is not optimal, because if starkit fails then the loading of tile also fails. # However, in theory, starkits should also be supported since you can 'source if {"starkit" in [package names]} { puts "'starkits' are supported" if {!("tile" in [package names])} { if {[file readable "tile082.kit"] == 1} { source tile082.kit puts "The tcl package 'tile' has been provided by savIRC!" } else { puts "ERROR: Unable to read 'tile082.kit'. Loading tile will fail!" } } else { puts "Tile [package version tile] is part of your tcl distribution" } } else { puts "'starkits' are NOT supported" } package require savirc 0.1 # needed for ssl-ircd-connections if {"tls" in [package names]} { puts "The package 'tls' is available by your tcl installation!" } else { if {[::sav_platform::isPlatformUnix]} { package ifneeded tls 1.5 "[list load [file join $s_savirc_base platform unix lib libtls1.50.so] ] ; [list source [file join $s_savirc_base lib tls.tcl] ]" } if {[::sav_platform::isPlatformWindows]} { package ifneeded tls 1.5 "[list load [file join $s_savirc_base platform win32 lib tls15.dll] ] ; [list source [file join $s_savirc_base lib tls.tcl] ]" } puts "The tcl package 'tls' is available by savIRC!" } # This will be loaded by the modloader... #array set ::encryption "" #set encryption(enabled) 1 # needed for blowfish and other encryption #if {$encryption(enabled) == 1} { # source [file join $me(path) tcltk savirc mod_fishcrypt.tcl] # puts "Fish Addon loaded" #} # Are we FreeWrapped? (http://freewrap.sourceforge.net) if {![catch {set dummy $::freewrap::patchLevel} out]} { puts "We are in an freewrap environment." catch {console hide} } puts "All files sourced. Starting savIRC..." main #[EOF]