If you give no options (the project-file must be given), `gpr2mak.exe'
assumes the flags `-d- -r-' as default.
File: rhide.inf, Node: First steps with RHIDE, Next: Environment variables, Prev: The program GPR2MAK.EXE, Up: Introduction
1.7 First steps with RHIDE
==========================
Here I will give you some instructions for the first steps to get contact
with RHIDE.
* Menu:
* What are these so called projects::
* Creating your first project::
File: rhide.inf, Node: What are these so called projects, Next: Creating your first project, Prev: First steps with RHIDE, Up: First steps with RHIDE
1.7.1 What are these so called projects
---------------------------------------
A project for RHIDE is a file, where all the needed information are
stored, which are required to build a program or library from one or more
source files and also all the other options which belong to the look and
feel of your desktop are stored there.
In genereal RHIDE creates for each project 2 files. One for the project
itself (it has the suffix `.gpr') and one for the desktop related things
(it has the suffix `.gdt').
To create a new project either run rhide with a not existing project name
as argument or open within RHIDE a project by selecting a name which is
not existent.
File: rhide.inf, Node: Creating your first project, Prev: What are these so called projects, Up: First steps with RHIDE
1.7.2 Creating your first project
---------------------------------
For the next instructions I will assume, that you want to create a project
for the standard "Hello world" program in the current directory. Create now
the new project by running
rhide hello
and you will see an empty desktop and one window opened, the project
window. This window will show you, that there is no file defined for your
project. If the project window is selected (it has a double frame), then
hit there <Ins> and you will be prompted for adding an item to your
project.
Type in the inputline now `hello.c' and hit <ENTER>. Now hit <ESC> to
leave the dialog. You will see now, that the project window contains a
line with `hello.c'.
Now hit <ENTER> on that filename and you will get an empty editor window
named `hello.c' prepended by the current directory. In this editor window
you can type now the program:
#include <stdio.h>
int main()
{
printf("Hello world!\n");
exit(0);
}
Now you can select from the Run-menu the Run entry (or use the hotkey
<Ctrl-F9>) and RHIDE will do all the neccessary steps to compile, link and
execute the program.
If everything was correct (no typing errors) or some other error, you will
get a messagebox where RHIDE tells you, that the program exited with an
exit code of 0. (This is the value, which you have specified in your
program above in the `exit(0);' statement) This box you can close with
<ENTER> or <Esc>.
To see the output of the program, you can switch now to the user screen
with <Alt+F5> or from the menu (Windows/User screen). To return back to
RHIDE hit any key.
File: rhide.inf, Node: Environment variables, Prev: First steps with RHIDE, Up: Introduction
1.8 Environment variables
=========================
RHIDE uses many environment variables for it's configuration and
behaviour. This includes also some standard variables, which are used by
the in RHIDE linked libraries. These are:
$(LOCALEDIR)
This should point to the directory, where your locale files are
stored. If it is not set, RHIDE tries to get the system default
value, which is for linux `/usr/share/locale' and for DJGPP
`$(DJDIR)/share/locale'.
$(INFOPATH)
This is a pathlist of directories, where your INFO files are stored.
If not set, RHIDE tries the standard directory, which should for
linux `/usr/info' and for DJGPP `$(DJDIR)/info'.
$(RHIDEOPT)
This variable can be used, to define global RHIDE commandline
options. The value of this variable is used, as if the contents would
given on commandline before any of the real commandline options,
which means, they can be overwritten on commandline.
$(ESCDELAY)
This variable is used *ONLY* in the linux version, where it defines
the delay after pressing <ESC> to wait for an other keypress to
simulate an <Alt> keycode. The value is given in milliseconds and
defaults to 1000.
$(LANGUAGE)
This variable is used to specify the language, in which RHIDE should
communicate with you. The contents of this variable should be the ISO
2-character code of your country.
* Menu:
* Setting environment variables for RHIDE::
* Where to store the environment file::
File: rhide.inf, Node: Setting environment variables for RHIDE, Next: Where to store the environment file, Prev: Environment variables, Up: Environment variables
1.8.1 Setting environment variables for RHIDE
---------------------------------------------
There are some different ways for setting environment variables for RHIDE.
One of them is to set them in the way, like it is done for any other
environment variable on your system. But this means also, that these
variables are visible also for all the other programs.
When using the DJGPP version, you can set them also in your `djgpp.env'
file either at the beginning as global variables for any DJGPP program or
in a special section `[RHIDE]' only for RHIDE. Please read the doc about
the format of the `djgpp.env' file for more information.
Derived from the technique used on DJGPP for setting environment variables
which are visible only for DJGPP programs, I have added in RHIDE a similar
thing. RHIDE can read environment variables also from a file called
`rhide.env'.
The syntax of this file is very simple. Each line has one of the following
syntax:
VARIABLE=CONTENTS
Which means, that the environment variable `VARIABLE' should become
the contents `CONTENTS' where `CONTENTS' can be also a variable,
which is expanded at runtime.
.OTHER_ENV_FILE
Such a line (it begins with a dot) tells RHIDE to read in at that
point the file `OTHER_ENV_FILE' as environment file. The name
`OTHER_ENV_FILE' can be also an environment variable, which is
expanded before reading the file.
# comments
A line, which begins with a `#' means, that this line is ignored. It
can be used for you to write there some comments about that file.
RHIDE is very powerfull in handling the environment variables. Most of it
is taken from the behaviour of GNU make. On of this great things is, that
a variable name can consist also of other variables, which are computed
when the variable should be expanded.
As an example of this, you can take a look on the RHIDE sources in the
`rhide.env' files. There I'm using for instance the in RHIDE builtin
variable $(RHIDE_OS) to define the libraries, which are linked in RHIDE
depending on the operating system where RHIDE is built.
Here is a part of the environment file `rhide.var' in the main RHIDE
source directory (which is included by `rhide.env' with
File: rhide.inf, Node: Where to store the environment file, Prev: Setting environment variables for RHIDE, Up: Environment variables
1.8.2 Where to store the environment file
-----------------------------------------
RHIDE searches some known directories for the file `rhide.env' (and of
course also other there defined included files).
At first it searches for a global file in `/usr/local/share/rhide' (on
linux) or `$(DJDIR)/share/rhide'. Then it searches in `$(HOME)' and at
last in the current directory.
RHIDE does not only a search, it also loads the file, if it was found in
any of the above mentioned directories. That means, if in all these
directories `rhide.env' exists, it is loaded. This has the effect, that
you can define some global defaults which can be overwritten with a
`rhide.env' in the current or your home directory.
File: rhide.inf, Node: General information about how RHIDE works, Next: Description of the pull-down menus, Prev: Introduction, Up: Top
2. General information about how RHIDE works
********************************************
In this section I will give you some comments about the concept of RHIDE.
RHIDE works with the GNU compilers. As a result of this, most of the
options are fixed and they are mostly also specific only for these
compiler. If I speak about compilers, I mean GCC, which calls the right
compilers for you. (`cpp' for preprocessing your input files, `cc1' for
compiling C programs, `cc1plus' for compiling C++ programs and `as' for
compiling assembler files and so on)
Selecting the right compiler for a specific file is done by RHIDE in the
same way as GCC it does. It looks for the extension of the file and
determines the language of this file.
* Menu:
* Known suffixes::
* Syntax of arguments::
* Running under Windows 95::
* Running under OS/2::
* General use of RHIDE::
File: rhide.inf, Node: Known suffixes, Next: Syntax of arguments, Prev: General information about how RHIDE works, Up: General information about how RHIDE works
2.1 Known suffixes
==================
The list of the known suffixes is taken from gcc. Remember the fact, that
gcc and RHIDE check the suffixes in a case sensitive way especially when
running under Windows 95 (*Note Running under Windows 95::).
* Valid suffixes for C source files are
`.c'
Normal C source file
`.i'
C source file, which doesn't need the preprocessor
* Valid suffixes for C++ source files are
`.cc'
`.cpp'
`.cxx'
`.C'
Normal C++ source file
`.ii'
C++ source file, which doesn't need the preprocessor
* Valid suffixes for Objective C source files
`.m'
Normal Objective C source file
* Valid suffixes for Pascal source files
`.p'
`.pas'
Normal Pascal source file
* Valid suffixes for object files
`.o'
Normal object file
`'
any other suffix, which has no predefined meaning
* Valid suffixes for libraries
`.a'
Normal library file
* Valid suffixes for executable files
`.exe'
Normal executable file for MS-DOS
`.'
No suffix means the raw COFF image of an executable file. These
can be handled only by programs, which know about this format.
(DJGPP programs know this)
* Valid suffixes for include files
`.h'
Normal include files
`.hpp'
Some people telled me, that this suffix should be treated also
as a valid suffix for header files, so I applied it.
`'
Theoretically there is no restriction for such a suffix, but
RHIDE searches and finds only files with the above suffixes in
the specified directories (*Note Include directories::)
* Valid suffixes for Assembler source files
`.s'
Normal Assembler source file
`.S'
Assembler source file, which must be preprocessed by `cpp'. If
you have such files, there is a problem, when long filenames are
not enabled (default in MS-DOS), because RHIDE converts all
filenames in this situation to lower case. But you can add to
the local options for this item (*Note Local options::) the
commandline argument -X ASSEMBLER-WITH-CPP, to tell `gcc' to
preprocess this file first before assembling it.
File: rhide.inf, Node: Syntax of arguments, Next: Running under Windows 95, Prev: Known suffixes, Up: General information about how RHIDE works
2.2 Syntax of arguments
=======================
In RHIDE you can specify some arguments to other programs. These arguments
must be a space separated list of strings. If you want to have one or more
spaces as part of an argument, you have to enclose the whole argument in
single or double quotes.
File: rhide.inf, Node: Running under Windows 95, Next: Running under OS/2, Prev: Syntax of arguments, Up: General information about how RHIDE works
2.3 Running under Windows 95
============================
With DJGPP 2.01 were many bugs fixed, which caused problems under Windows
95 with the long (and case sensetive) filenames. Now all filenames are
shown in lower case, except they contain characters with different case.
That means, all normal 8+3 DOS filenames, which are normaly reported in
Windows 95 in upper cases, are automatically converted to lower case. For
more information about filename conversion look at the libc reference.
If you really need the filenames exactly as they are reported by the OS,
you can use the -C switch (*Note Getting started::).
You can also run more than one instance of RHIDE at once, in several
DOS-boxes, because RHIDE creates and uses its own temp directory every
time it starts to disable conflicts, when running multiple compilers at
the same time. This is done by creating a directory in the directory
pointed at by the environment variables %TMPDIR%, %TEMP% or %TMP%, in that
order, until one of them exists. If none of them exists, the current
directory is assumed. Then RHIDE puts the value of this directory into the
environment variable %TMPDIR%. After leaving RHIDE this directory will be
removed, if it is empty.
File: rhide.inf, Node: Running under OS/2, Next: General use of RHIDE, Prev: Running under Windows 95, Up: General information about how RHIDE works
2.4 Running under OS/2
======================
Because I have no access to OS/2, I cannot say anything about it. But some
people said that they run RHIDE under OS/2 successfully, but there must
be the exclusive mouse access to the DOS window disabled.
File: rhide.inf, Node: General use of RHIDE, Prev: Running under OS/2, Up: General information about how RHIDE works
2.5 General use of RHIDE
========================
* Menu:
* Creating a program::
* Creating a library::
* Saving/Loading the options::
File: rhide.inf, Node: Creating a program, Next: Creating a library, Prev: General use of RHIDE, Up: General use of RHIDE
2.5.1 Creating a program
------------------------
For creating a program, RHIDE allows you to define multiple source files
which should be compiled and linked to your final program. This is done by
creating a project. In this project you insert your source files (and not
all the include files).
After a source file (which is inserted in your project) compiled at least
once, RHIDE knows about all dependencies of this file, so this file will
be compiled again only, if one of the include files have changed.
* Menu:
* Creating a program without a project::
File: rhide.inf, Node: Creating a program without a project, Prev: Creating a program, Up: Creating a program
2.5.1.1 Creating a program without a project
............................................
Because of many requests of users I made RHIDE to work also without using
a project. This may be good, if you have a single file, but if your
program should be build from more than one file I suggest you to use a
project.
If you have only one editor window opened, the name of the resulting
program is taken from the name of the source file by removing the suffix
and appending `.exe'.
If you have more than one files opened, I saw no other way for determining
the name of the produced program, than naming it `aout.exe'.
File: rhide.inf, Node: Creating a library, Next: Saving/Loading the options, Prev: Creating a program, Up: General use of RHIDE
2.5.2 Creating a library
------------------------
You can also create libraries (a collection of object files, which can be
linked with other programs) with RHIDE. The way for doing this is very
simple. Because RHIDE knows about the meaning of file suffixes, you can
change the name of the main target (*Note Main targetname::) to have a
suffix `.a' and that's all. Now RHIDE will run `ar.exe' instead of linking
File: rhide.inf, Node: Saving/Loading the options, Prev: Creating a library, Up: General use of RHIDE
2.5.3 Saving/Loading the options
--------------------------------
RHIDE supports two different ways for saving the options which you have
customized.
The first one (which I prefer) is the use of the so called default
project. This is the project `rhide.gpr' and must be located in the same
directory where `rhide.exe' is. To create or modify this default project
change to that directory (normally %DJDIR%/bin) and type there
rhide rhide
Now chnage any options you want and exit RHIDE. From now on these options
are used for any newly created project or when running RHIDE without a
project.
The second way is to save your options to a project file (*Note Save
options::) or to load them from any existing project file (*Note Load
options::).
File: rhide.inf, Node: Description of the pull-down menus, Next: Detailed description of some parts of RHIDE, Prev: General information about how RHIDE works, Up: Top
3. Description of the pull-down menus
*************************************
This chapter describes the pull-down menus and all their sub-menus. The
main menu bar, the topmost line of the screen, is selected with the hotkey
<F10> or by clicking with the mouse at this line. You can walk through
the menu with the cursor keys and a menu entry is selected with <ENTER>
or by clicking with the mouse on it.
* Menu:
* System menu::
* File::
* Edit::
* Search::
* RUN::
* Compile menu::
* Debug::
* PROJECT::
* Options::
* Windows::
* Help submenu::
File: rhide.inf, Node: System menu, Next: File, Prev: Description of the pull-down menus, Up: Description of the pull-down menus
3.1 System menu
===============
This menu has its name only that one can speak about it. The symbol for
this menu is the leftmost symbol in the menu bar and can be selected by
<Alt+SPACE> .
* Menu:
* About::
* Bug report::
* FSDB::
* GREP::
* GDB::
* Refresh Desktop::
* Calculator::
* Puzzle::
* Calender::
* ASCII table::
File: rhide.inf, Node: About, Next: Bug report, Prev: System menu, Up: System menu
3.1.1 About
-----------
This brings up a window with information about the author and the version
of RHIDE.
File: rhide.inf, Node: Bug report, Next: FSDB, Prev: About, Up: System menu
3.1.2 Bug report
----------------
This menu entry opens an editor with some important information which
should be part of a bug report and where you can describe the problem.
File: rhide.inf, Node: FSDB, Next: GREP, Prev: Bug report, Up: System menu
3.1.3 FSDB
----------
With this menu item you can call the FSDB debugger, which comes with
DJGPP. But remember, this runs the debugger as an external program and it
is not integrated in RHIDE.
File: rhide.inf, Node: GREP, Next: GDB, Prev: FSDB, Up: System menu
3.1.4 GREP
----------
This is a very useful function. You can type the arguments for grep in the
input line, which will be shown, and after this the program grep is
called. The messages from grep are redirected to the message window (*Note
Message window::).
File: rhide.inf, Node: GDB, Next: Refresh Desktop, Prev: GREP, Up: System menu
3.1.5 GDB
---------
This is analog to the call of FSDB (*Note FSDB::).
File: rhide.inf, Node: Refresh Desktop, Next: Calculator, Prev: GDB, Up: System menu
3.1.6 Refresh Desktop
---------------------
This function is sometimes useful, if you had run your program and it
wrote some things to the screen (for redirecting `stdout' and `stderr'
from your program to a window in RHIDE (*Note Preferences::)).
File: rhide.inf, Node: Calculator, Next: Puzzle, Prev: Refresh Desktop, Up: System menu
3.1.7 Calculator
----------------
This brings up a dialog, where you can do some calcualtions. This dialog
is similar to the evaluate dialog (*Note Evaluate/Modify::), but it uses
not the feature of gdb, but it is a separate calculator.
There can be used also some of the standard functions like `log', `sin'
and so on and it can convert also integer values between different bases
(`hex', `oct', `dec').
File: rhide.inf, Node: Puzzle, Next: Calender, Prev: Calculator, Up: System menu
3.1.8 Puzzle
------------
This will open a small window, where you can play a little puzzle game.
The "stones" are moved with the cursor keys or by clicking with the mouse
on it.
File: rhide.inf, Node: Calender, Next: ASCII table, Prev: Puzzle, Up: System menu
3.1.9 Calender
--------------
This will open a little calender. With the cursor keys <Up> and <Down> you
can switch to the next/previous month or click with the mouse the small
symbols int the upper corners.
File: rhide.inf, Node: ASCII table, Prev: Calender, Up: System menu
3.1.10 ASCII table
------------------
This will open a window with all the ASCII characters. Move around with
the curser keys or press any key to select any wanted charcter. In the
bottom line you will see the the character and the value of it (decimal
and hexadecimal). The decimal value can be used to create that character
for instance in the editor by holding the <Alt> key down and typing the
value on the numeric key pad.
File: rhide.inf, Node: File, Next: Edit, Prev: System menu, Up: Description of the pull-down menus
3.2 File
========
In this menu you can find functions, which deal with files like open,