|
| |||||
18.2 Windows |
There is a minimal version of emacs, version 19.34, supplied with rsltc. This was copied from the DJGPP distribution (http://www.delorie.com/djgpp/). It is better to get a full version of the latest version emacs from DJGPP, or from http://www.gnu.org/software/emacs/emacs.html. You can get it precompiled for Windows.
rsltc comes as a zip file rsltc.zip
.
You need WinZip or equivalent to unpack the zip files. The dos tool
pkunzip can be used with the -d option but you will afterwards need to
correct the following file names in gnu\emacs\lisp
, because the base
names will have been truncated to 8 characters:
backquote.elc case-table.elc cc-compat.elc dired-aux.elc help-macro.elc
If you have a directory c:\raise
you might want to rename it or vary
the instructions below to avoid the possibility of overwriting files in
it.
Extract rsltc.zip into c:
, using the "Use folder names" option. This
will create a directory c:\raise
.
If you don't already have emacs:
c:\raise
,
again using the "Use folder names" option. Note that rsltc.zip was
unpacked into c:
: now you are unpacking into a folder created
by the first unpack.
C:\raise\gnu\emacs\bin
and
select emacs.exe.
C:\raise\gnu\emacs\lisp\rsltc.el
needs to know where the
executable rsltc.exe is. If you have followed the directions above exactly it
will be right: "/raise/rsl/rsltc"
. Otherwise, start emacs with the
shortcut you made and use it to edit C:\raise\gnu\emacs\lisp\rsltc.el
so that rsltc-command
is set correctly. Save rsltc.el. Exit emacs
(Files menu) and start it again.
If you already have emacs, or have installed a version from elsewhere:
C:\raise\gnu\emacs\lisp
to the
emacs site-lisp directory (probablyC:\emacs\site-lisp
).
_emacs
from C:\raise\gnu\emacs
to your
"home" directory. The simplest method is to find out where emacs
thinks "home" is and put it there. You can use the sequence
Esc-x getenv Enter HOME Enter
(where "Enter" means the Enter or Return key)
in emacs to find out. Otherwise, see the section "Where do I put my .emacs,
(or _emacs), file?" in emacs_windows_faq.html
.
C:\emacs\site-lisp\rsltc.el
needs to know where
the executable rsltc.exe is. If you have followed the directions
above exactly it will be right: "/raise/rsl/rsltc"
.
Otherwise, use to edit C:\emacs\site-lisp\rsltc.el
so that
rsltc-command
is set correctly. Save rsltc.el. Exit emacs
and start it again.
C:/sml
as suggested.
In Windows 9X, include in autoexec.bat
SET RSLML_PATH=c:\raise\sml
In Windows NT, or later versions, get your system administrator to set this variable.
Make a folder c:\raise\sml
and copy the files rslml.sml and rslml.cm
from rsltc.zip file to there.
The files
RSL_comp.h RSL_list.cc RSL_list.h RSL_map.cc RSL_map.h RSL_prod.h RSL_set.cc RSL_set.h RSL_text.h RSL_typs.cc RSL_typs.h cpp_RSL.cc cpp_RSL.h cpp_io.cc cpp_io.h cpp_list.cc cpp_list.h cpp_map.h cpp_set.cc cpp_set.hshould be placed in a directory, and the file
rslcomp.bat
edited to
set CPP_DIR to that directory.
Put rslcomp.bat
somewhere on your path.
rslcomp.bat
assumes that you are using
the DJGPP (http://www.delorie.com/djgpp/) port of g++ (called
gxx
). If your C++ compiler is called something else rslcomp.bat
is easy to change.
The translator output has been tested using DJGPP and also the Cygwin
port of GNU tools to Windows:
http://sources.redhat.com/cygwin/.
If you are using Cygwin with emacs 20 you might like to use the Cygwin bash shell within emacs. You should add to your _emacs file the following (taken from the Cygwin FAQ):
;; This assumes that Cygwin is installed in C:\cygwin (the ;; default) and that C:\cygwin\bin is not already in your ;; Windows Path (it generally should not be). ;; (setq exec-path (cons "C:/cygwin/bin" exec-path)) (setenv "PATH" (concat "C:\\cygwin\\bin;" (getenv "PATH"))) ;; ;; NT-emacs assumes a Windows command shell, which you change ;; here. ;; (setq process-coding-system-alist '(("bash" . undecided-unix))) (setq w32-quote-process-args ?\") (setq shell-file-name "bash") (setenv "SHELL" shell-file-name) (setq explicit-shell-file-name shell-file-name) ;; ;; This removes unsightly ^M characters that would otherwise ;; appear in the output of java applications. ;; (add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m)
You should also change the definition of rsltc-command
in
rsltc.el to "/cygdrive/c/raise/rsl/rsltc"
, and change
vcg-command
similarly.
Limited tests have been done using Microsoft's Visual C++ compiler.
The translator's output needs to be different, making much less use of
templates. If you use this compiler you should use
the rsltc option -cpp instead of -c++. The
C++ output file will have extension .cpp instead of
.cc. You can select this option in emacs by using the RSL menu
item Translate to Visual C++
.
We would be interested to hear of people using the translator with other C++ compilers.
vcg_p1.zip
and vcg_p2.zip
. Unpack them in that order
using WinZip or pkunzip -d and just follow the instructions in the
readme file in the first. You can place vcg where you like, but
unless you unpack the two zip files into C:\raise
you will
need to edit the definition of vcg-command in
rsltc.el in site-lisp.
See section 12.4.
18.2 Windows | ||||||
|
|