- This wiki is out of date, use the continuation of this wiki instead
Tutorial:Setting up Fenix with ConTEXT
From FenixWiki
Revision as of 21:24, 6 August 2007 (edit) Sandman (Talk | contribs) ← Previous diff |
Current revision (00:57, 25 December 2008) (edit) (undo) 217.136.63.215 (Talk) |
||
(21 intermediate revisions not shown.) | |||
Line 1: | Line 1: | ||
[[Category:general]] | [[Category:general]] | ||
[[Category:tutorials]] | [[Category:tutorials]] | ||
+ | [[Category:setting up Fenix]] | ||
- | Setting up Fenix with [http://www. | + | Setting up Fenix with [http://www.contexteditor.org/ ConTEXT]. |
+ | |||
+ | It is assumed [[Latest_Fenix_version|Fenix Binaries]] are downloaded in a certain folder, thus in which fxi.exe and fxc.exe will be. With the Run and Lookup setup sections, a file is required: [[Media:ContextBatches.zip|ConTEXTBatches.zip]]. It is required that this archive is extracted into the folder previously mentioned, the one containing fxi.exe and fxc.exe. | ||
+ | |||
+ | Here and there this folder will be denoted as <code>XXXXXX</code>. You will need to replace <code>XXXXXX</code> with the path to the directory you extracted the binaries to. | ||
+ | |||
+ | For example, you extracted the binaries to <code>D:\Fenix\Executables\</code>, then you will need to replace <code>XXXXXX</code> with <code>D:\Fenix\Executables</code> (watch that last <code>\</code>, there only needs to be one). | ||
+ | |||
+ | == Advantages == | ||
+ | ConTEXT is a pretty handy text editor. It has quite a range of possibilities and the highlighter file is very up to date. When it is setup like described below, certain files are only needed in one directory: the fxi/fxc directory. These certain files contain: include files (*.inc), Fenix header files (*.fh) and DLL's (*.dll). Actually, any file can be included/imported if it's in the fxi/fxc directory. This brings advantages like saving disk space, updating a certain file is much easier and automatically affects all programs using it, not just one. | ||
== Syntax Highlighter == | == Syntax Highlighter == | ||
Line 8: | Line 18: | ||
# Restart ConTEXT | # Restart ConTEXT | ||
# File -> New | # File -> New | ||
- | # Go to Tools -> Set Highlighter -> Customize Types..., select Foxpro, click on Edit and change "prg" to "prg2". | + | # Go to Tools -> Set Highlighter -> Customize Types..., select Foxpro, click on Edit and change "prg" to "prg2"; select Object Pascal, click on Edit and change "inc" to "inc2". |
- | + | You can meddle with the colours all you like: Options -> Environment Options -> Colors. You can also edit the colours in fenix.chl, if you find this easier. This can be handy for changing all backgrounds in a quick way. | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | == | + | Should you add native Fenix keywords to the highlighter, which were forgotten, be so kind as to notify of the addition on the [[Image_talk:Fenix.chl|Fenix.chl discussion page]]. |
- | [[ | + | |
- | # Setup | + | == Hotkeys == |
+ | The setting up here happens in Options -> Environment Options -> [Execute Keys]. To add hotkeys for Fenix, click on the button Add and enter <code>prg,inc,fh</code> for extensions. Noted are generally used hotkeys between brackets, but this can be altered. | ||
+ | |||
+ | === Lookup on this wiki (F9/F12) === | ||
+ | # Download fxw.bat ([[Media:ContextBatches.zip|ConTEXTBatches.zip]]: extract into fxi/fxc folder), if not done already. | ||
+ | # Setup Lookup hotkey: | ||
+ | ## Execute: <code>XXXXXX\fxw.bat</code>. | ||
+ | ## Parameters: <code>%w</code>. | ||
+ | ## Save: <code>Nothing</code>. | ||
+ | * Replace <code>XXXXXX</code> by the path to the directory you placed fxw.bat in, ''without'' (double)quotes. | ||
- | == Lookup on this wiki == | ||
- | [[Image:Lookupsetup.PNG]] | ||
- | # Download fxw.bat ([[Media:ContextBatches.zip|ConTEXTBatches.zip]]: extract into fxi/fxc folder). | ||
- | # Setup ConTEXT like on the screenshot. Replace <code>XXXXXX</code> by the directory you placed fxw.bat in, the fxc.bat. | ||
This will allow you to hit a button (F9-F12) to lookup the word currently under your cursor in ConTEXT on FenixWiki. Alternatively you can use <code>%?</code> instead of <code>%w</code>, to enter the word you're looking for. A possible setup is <code>%w</code> on F9 and <code>%?</code> on F12. | This will allow you to hit a button (F9-F12) to lookup the word currently under your cursor in ConTEXT on FenixWiki. Alternatively you can use <code>%?</code> instead of <code>%w</code>, to enter the word you're looking for. A possible setup is <code>%w</code> on F9 and <code>%?</code> on F12. | ||
- | == | + | === Compile (F10) === |
- | + | # Download the new fxc.bat ([[Media:ContextBatches.zip|ConTEXTBatches.zip]]: extract into fxi/fxc folder) and replace the old one by it, if not done already. | |
+ | # Setup Compile hotkey: | ||
+ | ## Execute: <code>XXXXXX\fxc.bat</code> (NOTE: for [[0.93|Bennu 0.93]] use <code>XXXXXX\bgdc.bat</code> instead) | ||
+ | ## Start in: <code>%p</code> | ||
+ | ## Parameters: <code>XXXXXX -g %n</code>. | ||
+ | ## Save: <code>All files before execution</code>. | ||
+ | ## Enable Use short DOS names (if you tend to use spaces in paths/filenames, so enabling is safest) | ||
+ | ## Enable Capture console output. | ||
+ | ## Compiler output parser rule: <code>Error in file %n at line %l:*</code>. | ||
+ | ## Enable Scroll console to the last line. | ||
+ | * Replace <code>XXXXXX</code> by the path to the directory containing fxc.bat and fxc.exe, ''without'' (double)quotes. | ||
+ | * Note that you can include codefiles and libraries located in the XXXXXX directory automatically now. | ||
+ | |||
+ | === Run (F11) === | ||
+ | # Setup Run hotkey: | ||
+ | ## Execute: <code>XXXXXX\fxi.exe</code>. (NOTE: for [[Bennu_WIP2|Bennu WIP2]] and later use <code>XXXXXX\bgdi.exe</code> instead) | ||
+ | ## Parameters: <code>"%p%F.dcb"</code>. | ||
+ | ## Save: <code>Nothing</code>. | ||
+ | ## Enable Use short DOS names (if you tend to use spaces in paths/filenames, so enabling is safest) | ||
+ | * Replace <code>XXXXXX</code> by the path to the directory containing fxi.exe, ''without'' (double)quotes. | ||
+ | |||
+ | == File Associations == | ||
+ | The setting up here happens in Options -> Environment Options -> [File Associations]. | ||
- | + | Repeat the following for the extensions wanted (prg, inc, fh): | |
- | + | # Click on the button Add and enter an extension. |
Current revision
Setting up Fenix with ConTEXT.
It is assumed Fenix Binaries are downloaded in a certain folder, thus in which fxi.exe and fxc.exe will be. With the Run and Lookup setup sections, a file is required: ConTEXTBatches.zip. It is required that this archive is extracted into the folder previously mentioned, the one containing fxi.exe and fxc.exe.
Here and there this folder will be denoted as XXXXXX
. You will need to replace XXXXXX
with the path to the directory you extracted the binaries to.
For example, you extracted the binaries to D:\Fenix\Executables\
, then you will need to replace XXXXXX
with D:\Fenix\Executables
(watch that last \
, there only needs to be one).
Contents |
[edit] Advantages
ConTEXT is a pretty handy text editor. It has quite a range of possibilities and the highlighter file is very up to date. When it is setup like described below, certain files are only needed in one directory: the fxi/fxc directory. These certain files contain: include files (*.inc), Fenix header files (*.fh) and DLL's (*.dll). Actually, any file can be included/imported if it's in the fxi/fxc directory. This brings advantages like saving disk space, updating a certain file is much easier and automatically affects all programs using it, not just one.
[edit] Syntax Highlighter
- Place fenix.chl in the folder ConTEXT\Highlighters
- Restart ConTEXT
- File -> New
- Go to Tools -> Set Highlighter -> Customize Types..., select Foxpro, click on Edit and change "prg" to "prg2"; select Object Pascal, click on Edit and change "inc" to "inc2".
You can meddle with the colours all you like: Options -> Environment Options -> Colors. You can also edit the colours in fenix.chl, if you find this easier. This can be handy for changing all backgrounds in a quick way.
Should you add native Fenix keywords to the highlighter, which were forgotten, be so kind as to notify of the addition on the Fenix.chl discussion page.
[edit] Hotkeys
The setting up here happens in Options -> Environment Options -> [Execute Keys]. To add hotkeys for Fenix, click on the button Add and enter prg,inc,fh
for extensions. Noted are generally used hotkeys between brackets, but this can be altered.
[edit] Lookup on this wiki (F9/F12)
- Download fxw.bat (ConTEXTBatches.zip: extract into fxi/fxc folder), if not done already.
- Setup Lookup hotkey:
- Execute:
XXXXXX\fxw.bat
. - Parameters:
%w
. - Save:
Nothing
.
- Execute:
- Replace
XXXXXX
by the path to the directory you placed fxw.bat in, without (double)quotes.
This will allow you to hit a button (F9-F12) to lookup the word currently under your cursor in ConTEXT on FenixWiki. Alternatively you can use %?
instead of %w
, to enter the word you're looking for. A possible setup is %w
on F9 and %?
on F12.
[edit] Compile (F10)
- Download the new fxc.bat (ConTEXTBatches.zip: extract into fxi/fxc folder) and replace the old one by it, if not done already.
- Setup Compile hotkey:
- Execute:
XXXXXX\fxc.bat
(NOTE: for Bennu 0.93 useXXXXXX\bgdc.bat
instead) - Start in:
%p
- Parameters:
XXXXXX -g %n
. - Save:
All files before execution
. - Enable Use short DOS names (if you tend to use spaces in paths/filenames, so enabling is safest)
- Enable Capture console output.
- Compiler output parser rule:
Error in file %n at line %l:*
. - Enable Scroll console to the last line.
- Execute:
- Replace
XXXXXX
by the path to the directory containing fxc.bat and fxc.exe, without (double)quotes. - Note that you can include codefiles and libraries located in the XXXXXX directory automatically now.
[edit] Run (F11)
- Setup Run hotkey:
- Execute:
XXXXXX\fxi.exe
. (NOTE: for Bennu WIP2 and later useXXXXXX\bgdi.exe
instead) - Parameters:
"%p%F.dcb"
. - Save:
Nothing
. - Enable Use short DOS names (if you tend to use spaces in paths/filenames, so enabling is safest)
- Execute:
- Replace
XXXXXX
by the path to the directory containing fxi.exe, without (double)quotes.
[edit] File Associations
The setting up here happens in Options -> Environment Options -> [File Associations].
Repeat the following for the extensions wanted (prg, inc, fh):
- Click on the button Add and enter an extension.