Thank you Marcin, it is integrated.
But before I fully understood what you did, and after I patched the code with
yours, I wrote the following fallback code :
# detect the case where, under Linux, Scid is used without prior installation
# the fallback directory is Scid's exec dir
if {! [file isdirectory $::scidBasesDir] || ! [file isdirectory
$::scidBooksDir]} {
set scidShareDir $::scidExeDir
set scidBasesDir [file nativename [file join $::scidShareDir "bases"]]
set scidBooksDir [file nativename [file join $scidShareDir "books"]]
}
if {! [file isdirectory $::scidBasesDir] || ! [file isdirectory
$::scidBooksDir]} {
tk_messageBox -title "Scid" -type ok -icon warning -message "Bases or books
directory not found"
}
So, for people that don't issue a correct :
./configure BINDIR=$HOME/scid SHAREDIR=$HOME/scid
Scid will fallback to the "classical" directories, and this cannot hurt.
Pascal
Selon Marcin Kasperski <[EMAIL PROTECTED]>:
> The attached patch (due to my laziness it is in two parts as I just maintan
> it in this way, apply both in order)
> changes scid so it complies to the typical Linux way of organising data files
> (data files are separate from
> the binary, all paths in use are set-able by ./configure switches) - but it
> keeps windows behaviour (data files
> under binary dir) as it is.
>
> The result: after you run
> ./configure BINDIR=/usr/local/bin SHAREDIR=/usr/local/share/scid
> make
> make install
> the binaries will be installed to /usr/local/bin and books, eco files,
> databases etc
> to the given share directory
>
> Of course you can still run
> ./configure BINDIR=$HOME/scid SHAREDIR=$HOME/scid
> and install everything in one place.
>
> Details of what is changed:
>
> - Makefile.conf is rewritten, so instead of hardcoded destination directory,
> SHAREDIR configurable
> is used to install all the data files and BINDIR to install binaries and
> scripts
>
> - configure is patched, so it generates tiny bit of TCL (config.tcl.conf ->
> config.tcl), setting all
> the data paths there instead of hardcoding them (on windows it just sets
> data path to scidExeDir)
>
> - TCL code is patched, so instead of generating paths to books or bases
> according to the scid binary
> location, it uses the constants defined in config.tcl
>
> I haven't tested in on windows so it requires taking a look, but I believe
> that there should not be any problems.
>
> Note: I did not touch pocket, maybe there sth similar could be also
> considered. Or maybe not.
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Scid-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scid-users