Have the processing of the toc output to the log file too.
[maxima.git] / crosscompile-windows / lispselector.tcl
blobe91b8d9e74998e605ffd0e2162271c960846193b
1 #!/usr/bin/wish
2 # SPDX-License-Identifier: GPL-2.0-or-later
3 # Simple GUI for selecting the default Lisp for Windows users.
5 # @ABCL_ENABLED@ will be replaced by 0 or 1 in the final program.
6 set abcl @ABCL_ENABLED@
8 proc selectclisp {} {
9 set maximarc [file join $::env(USERPROFILE) maxima maximarc]
10 file mkdir [file dirname $maximarc]
11 set f [open $maximarc "w"]
12 puts $f "MAXIMA_LISP=clisp"
13 close $f
14 tk_messageBox -type ok -message "CLISP was selected as default Lisp interpreter for Maxima." -icon info
17 proc selectsbcl {} {
18 set maximarc [file join $::env(USERPROFILE) maxima maximarc]
19 file mkdir [file dirname $maximarc]
20 set f [open $maximarc "w"]
21 puts $f "MAXIMA_LISP=sbcl"
22 close $f
23 tk_messageBox -type ok -message "SBCL was selected as default Lisp interpreter for Maxima." -icon info
26 proc selectabcl {} {
27 set maximarc [file join $::env(USERPROFILE) maxima maximarc]
28 file mkdir [file dirname $maximarc]
29 set f [open $maximarc "w"]
30 puts $f "MAXIMA_LISP=abcl"
31 close $f
32 tk_messageBox -type ok -message "ABCL was selected as default Lisp interpreter for Maxima." -icon info
35 set binpath [file dirname [file normalize [info script]]]
37 set documentation "One can use different LISP (the programming language, in which Maxima is (mostly) written) compilers for running Maxima.
39 Currently this Windows installer supports:
40 - CLISP (http://www.clisp.org)
41 - SBCL (https://www.sbcl.org).
44 if {$abcl == 1} { append documentation "- ABCL (https://www.abcl.org)" }
46 append documentation "
47 Which Lisp you select, may depend on your needs:
49 SBCL is usually faster, but there were issues with DEP (data execution prevention) reported.
50 It might be necessary to disable DEP for $binpath/sbcl.exe.
51 Due to memory problems, some packages (e.g. Lapack) may not work.
53 CLISP may be slower, but these problems do not occur there. In command line Maxima CLISP
54 provides advanced editing features (a history of previous commands is accessible with the cursor keys).
58 if {$abcl == 1} { append documentation "Armed Bear Common Lisp (ABCL) is a full implementation of the Common Lisp language running in the JVM.
59 Java must be installed, if you use ABCL.
61 " }
63 append documentation "If you select a Lisp, a configuration file 'maximarc' will be created
64 in the 'maxima' directory of your user profile directory with your default Lisp selection.
65 If the configuration file already exists, it will be overwritten.
68 # Buttons (clisp, sbcl, exit)
69 frame .toolbar
70 button .toolbar.clisp -text "Select CLISP" -command "selectclisp"
71 button .toolbar.sbcl -text "Select SBCL" -command "selectsbcl"
72 if {$abcl == 1} { button .toolbar.abcl -text "Select ABCL" -command "selectabcl" }
73 button .toolbar.exit -text "Exit" -command "exit"
74 pack .toolbar.clisp -side left
75 pack .toolbar.sbcl -side left
76 if {$abcl == 1} { pack .toolbar.abcl -side left }
77 pack .toolbar.exit -side right
79 # Documentation area
80 frame .docu
81 label .docu.label -text $documentation
82 pack .docu.label -padx 50 -pady 50
85 wm title . "Maxima Open Source Computer Algebra System - Select LISP Compiler"
86 grid config .toolbar -column 0 -row 1 -sticky "snew"
87 grid config .docu -column 0 -row 2