diff --git a/.gitignore b/.gitignore index 1cc283c..0a71ab3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ -Bin/ -Exe/ -Release/ +Build/ +__history/ Src/GUI/PasHiGUI.cfg Src/PasHi.cfg +*.local +*.identcache +*.todo diff --git a/Build.html b/Build.html index 5557911..f3c8889 100644 --- a/Build.html +++ b/Build.html @@ -6,7 +6,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2009-2016, Peter Johnson (www.delphidabbler.com). * * Instructions for building PasHi and PasHiGUI. --> @@ -80,42 +80,20 @@

- The programs are written in Object Pascal and are targetted at Delphi 2010. + The programs are written in Object Pascal and are targeted at Delphi XE.

The Delphi IDE can be used to modify the source and to perform test builds. - Final builds should be built using the provided makefiles, but you can get - away with using the IDE if you don't change any resources. + Final builds should be built using the provided makefiles.

Note: - These instructions do not apply to the following versions of the program: -

- - - -

- PasH - and PasHGUI are the old names for PasHi and - PasHiGUI. + These instructions do not apply to versions of the program before release + v2.0.0.

@@ -133,7 +111,7 @@

- No libraries are required to build PasHi + No libraries are required to build PasHi

@@ -141,7 +119,10 @@

- No libraries are required to build PasHiGUI + PasHiGUI requires PJWdwState.pas from the DelphiDabbler + Window State Components, v5.6.1 or later. A copy of the required file is + included in the Src\GUI\Imported directory. There is no need to + install the components into the DelphiIDE.

@@ -165,15 +146,15 @@

- A copy of Delphi is required to build the object Pascal code. Delphi 2010 - is the preferred compiler. + A copy of Delphi is required to build the object Pascal code. Delphi XE is the + preferred compiler.

The code should be able to compile with Delphi XE and later. It is possible - that Delphi 2009 may compile the code, but it hasn't been tested. Versions - earlier than Delphi 2009 are not suitable due to their lack of Unicode - support. + that Delphi 2009 and 2010 may compile the code, but it hasn't been tested. + Versions earlier than Delphi 2009 are not suitable due to their lack of + Unicode support.

@@ -186,39 +167,65 @@

DCC32
- The Delphi command line compiler. +

+ The Delphi command line compiler. +

+
+ Not available with starter editions of Delphi. +
+
+
+ RC +
+
+

+ The Microsoft resource compiler. Used to compile the main resource file. +

BRCC32
- The Borland resource compiler. Used to compile various resource source - (.rc) files. +

+ The Borland resource compiler. Used to compile version information + resources from temporary resource files emitted by VIEd (see below). +

+
+ We use two different resource compilers because RC fails to + compile resource files emitted by the Version Information Editor while + BRCC32 can fail to compile .manifest files + correctly. +
+

The following environment variables are associated with these tools:

- DELPHIROOT - required unless DELPHI2010 is - set. + DELPHIROOT - required unless DELPHIXE is set.
- Should be set to the install directory of the version of Delphi being - used. DCC32 and BRCC32 are expected to be in - the Bin sub-directory of DELPHIROOT. +

+ Should be set to the install directory of the version of Delphi being + used. DCC32, BRCC32 and RC are + expected to be in the Bin sub-directory of + DELPHIROOT. +

- DELPHI2010 - optional + DELPHIXE - optional
- If you are using Delphi 2010 this environment variable should be set - to the Delphi install directory. When DELPHI2010 is specified - DELPHIROOT will ignore its own value and use the value of - DELPHI2010 instead. +

+ If you are using Delphi XE this environment variable may be set to its + install directory. When DELPHIXE is specified + DELPHIROOT will be ignored and DELPHIXE will be + used instead. +

@@ -240,8 +247,8 @@

into intermediate resource source (.rc) files. Version 2.11.2 or later is required. Version Information Editor can be obtained from http://www.delphidabbler.com/software/vied. + href="http://delphidabbler.com/software/vied" + >http://delphidabbler.com/software/vied.

@@ -254,7 +261,7 @@

- The Unicode version on the Inno setup command line compiler is needed to + The Unicode version of the Inno setup command line compiler is needed to create CodeSnip's install program. v5.4.0 (u) or later is required as is a compatible version of the ISPP pre-processor. You can get Inno Setup with ISPP at

The first step is to configure the required DELPHIROOT or - DELPHI2010 environment variables. + DELPHIXE environment variables.

@@ -316,65 +323,29 @@

- If you don't already have it, download or checkout the PasHi source - code, which should include the source for PasHiGUI. There are - several options: + If you don't already have it, you need to get the PasHi source code, + (which includes the source for PasHiGUI).

-
    -
  1. -
    - If you are a Subversion user you can: -
    -
      -
    • -
      - Check out the source using the following command: -
      -
      > svn checkout http://pas-hi.googlecode.com/svn/trunk/ PATH
      -
      - Where PATH is the directory where you want to - place the working copy. You will not be able to commit - changes unless you join the project as a contributor. -
      -
    • -
    • -
      - Export the code using this command: -
      -
      > svn export http://pas-hi.googlecode.com/svn/trunk/ PATH
      -
      - where PATH is the directory where you wish to - store the code. -
      -
    • -
    -
    - These commands get code from the current development tree. To get - the code of a suitable stable release replace trunk - with tags/XXXX where XXX specifies the - version. -
    -
  2. -
  3. - Download a suitable source zip file from Google Code. -
  4. -
  5. - Grab the source code of the latest release from DelphiDabbler.com. -
  6. -
+

+ The source code is maintained in the delphidabbler/pashi Git repository on GitHub. Either clone or fork the + repo into a directory on your computer. +

+ +

+ Source code for PasHi's latest release can be found in the + master branch while development code is maintained in the + develop branch. New features are developed in branches whose name + begins with feature. You can also download the code of one of the + releases by selecting the relevant tag. +

- If you modify the code and want to submit it for inclusion in the repository - please raise a new issue in the issue tracker, select a type (defect, enhancement etc.) and attach a - zip file or tarball containing your enhancment, preferably including a patch - file. + If you want to submit any modifications to the source code, please create a + new feature branch off the develop branch, commit your modifications + to it and then submit a pull request on GitHub.

@@ -382,8 +353,8 @@

- After checking out or downloading and extracting the source code you should - have the following directory structure: + After obtaining the source code you should have the following directory + structure:

./
@@ -392,34 +363,30 @@ 

| +-- Docs - documentation | - +-- Masters - documents used to generate some project files - | +-- Src - source code for PasHi | | - | +-- 3rdParty - any third party source code required by PasHi - | | | +-- Assets - assets required to build PasHi's resources | | | +-- GUI - source code of the GUI application, PasHiGUI | | | - | | +-- Resources - assets required to build PasHiGUI's resources + | | +-- Assets - assets required to build PasHiGUI's resources + | | | + | | +-- Imported - 3rd party source code used for GUI application | | | +-- Install - install program scripts | +-- Test - contains test file

- If, by chance, you also have Bin, Exe and - Release directories don't worry - all will become clear. - Subversion users may also see the usual .svn "hidden" - directories or directory. If you have done some editing you may also have - occasional "hidden" __history folders. + Don't worry if you also have a Build directory and + sub-directories - all will become clear.

Before you can get hacking, you need to prepare the source code tree. Open a - command console and navigate into the Src sub-folder. Run any - script you have created to set the required environment variables then do: + command console and run any script you have created to set the required + environment variables. Then navigate into the Src sub-folder and + do:

Src> Make config
@@ -427,16 +394,17 @@

You may need to replace Make with the full path to Make if it isn't on the path, or if the Make that - runs isn't the Borland / CodeGear version. If this is the case try: + runs isn't the Borland / CodeGear / Embarcadero version. If this is the case + try:

-
Src> %DELPHIROOT%\Bin\Make config
+
Src> "%DELPHIROOT%\Bin\Make" config

or

-
Src> %DELPHI2010%\Bin\Make config
+
Src> "%DELPHIXE%\Bin\Make" config

depending on which environment variable you have set. @@ -444,31 +412,32 @@

Once Make config has completed, your folder structure should - have acquired the following new folders: + have acquired a Build folder and sub-folders and now look like + this:

./
-  +-- Bin                   - receives object files and .res files for PasHi
+  +-- Build                 - receives all files created by the build process
+  |   |
+  |   +-- Bin               - receives object files and .res files for PasHi
+  |   |
+  |   +-- Exe               - receives executable code
+  |   |
+  |   +-- Release           - receives release files
   |
   +-- Config                - config files to be installed with PasHi
   |
   +-- Docs                  - documentation
-  |
-  +-- Exe                   - receives executable code
-  |
-  +-- Masters               - documents used to generate some project files
-  |
-  +-- Release               - receives release files
-  |
+  |
   +-- Src                   - source code for PasHi
   |   |
-  |   +-- 3rdParty          - any third party source code required by PasHi
-  |   |
   |   +-- Assets            - assets required to build PasHi's resources
   |   |
   |   +-- GUI               - source code of the GUI application, PasHiGUI
   |   |   |
-  |   |   +-- Resources     - assets required to build PasHiGUI's resources
+  |   |   +-- Assets        - assets required to build PasHiGUI's resources
+  |   |   |
+  |   |   +-- Imported      - 3rd party source code used for GUI application
   |   |
   |   +-- Install           - install program scripts
   |
@@ -477,7 +446,7 @@ 

Make will have created a .cfg file from the template in the Src folder. .cfg files are needed for DCC32 - to run correctly. This new file will be ignored by Subversion. + to run correctly. This new file will be ignored by Git.

@@ -489,49 +458,48 @@

Src\GUI> cd ..

- This runs a separate makefile in the GUI directory and further configures - the source tree to enable PasHiGUI to be compiled. The source tree - should have been changed slightly to look like this: + This runs a separate makefile in the Src\GUI sub-directory and + further configures the source tree to enable PasHiGUI to be compiled. + The source tree should have been changed slightly to look like this:

./
-  +-- Bin                   - receives object files and .res files for PasHi
-  |   |
-  |   +-- GUI               - receives object files and .res files for PasHiGUI
-  |
+  +-- Build                 - receives all files created by the build process
+  |   |
+  |   +-- Bin               - receives object files and .res files for PasHi
+  |   |   |
+  |   |   +-- GUI           - receives object files and .res files for PasHiGUI
+  |   |
+  |   +-- Exe               - receives executable code
+  |   |
+  |   +-- Release           - receives release files
+  |
   +-- Config                - config files to be installed with PasHi
   |
   +-- Docs                  - documentation
   |
-  +-- Exe                   - receives executable code
-  |
-  +-- Masters               - documents used to generate some project files
-  |
-  +-- Release               - receives release files
-  |
   +-- Src                   - source code for PasHi
   |   |
-  |   +-- 3rdParty          - any third party source code required by PasHi
-  |   |
   |   +-- Assets            - assets required to build PasHi's resources
   |   |
   |   +-- GUI               - source code of the GUI application, PasHiGUI
   |   |   |
-  |   |   +-- Resources     - assets required to build PasHiGUI's resources
+  |   |   +-- Assets        - assets required to build PasHiGUI's resources
+  |   |   |
+  |   |   +-- Imported      - 3rd party source code used for GUI application
   |   |
   |   +-- Install           - install program scripts
   |
   +-- Test                  - contains test file
-

Make will also have created the required .cfg file in the Src\GUI directory.

- If you are intending to use the Delphi IDE to compile code, you should also - do: + If you are intending to use the Delphi IDE to compile PasHi, you + should also do:

Src> Make resources
@@ -607,8 +575,8 @@

So, to build PasHi and PasHiGUI and place - PasHi.exe and PasHiGUI.exe in the Exe - folder do this: + PasHi.exe and PasHiGUI.exe in the + Build\Exe folder do this:

Src> Make
@@ -658,8 +626,8 @@ 

Src> Make -DRELEASEFILENAME=MyRelease release

- Release zip files are always placed in the Release - directory. The directory is created if it doesn't exist. + Release zip files are always placed in the Build\Release + directory.

@@ -712,18 +680,38 @@

Src> Make deepclean

- Once again this command deep operates on both the Src and + Once again this command operates on both the Src and Src\GUI directories.

- Copyright + Testing +

+ +

+ A test file, named Test.pas, is provided in the Test + directory. This file can be used to test the output of PasHi. It + contains some unusual but valid constructs that push the program to its + limits. +

+ +

+ Test.pas was not designed to compile, so do not add it to the + project. +

+ +

+ License & Copyright

If you are planning to re-use or modify any of the code, please see the - SourceCodeLicenses.txt file in the Docs directory - for an overview of the open source licenses that apply to the source code. + LICENSE file for an overview of the open source licenses that + apply to the source code. +

+ +

+ LICENSE also provides copyright information.

diff --git a/Config/ReadMe.txt b/Config/ReadMe.txt index 546aeac..dab2726 100644 --- a/Config/ReadMe.txt +++ b/Config/ReadMe.txt @@ -1,4 +1,4 @@ -All files in this directory, except this one, are installed into the +All files in this directory, except this one, are optionally installed into the %ProgramData%\DelphiDabbler\PasHi directory by the installer. PasHi then copies the files into each user's %AppData%\DelphiDabbler\PasHi directory, and updates them after each update is installed. diff --git a/Config/config-template b/Config/config-template index efb07de..96aa028 100644 --- a/Config/config-template +++ b/Config/config-template @@ -4,17 +4,17 @@ # PURPOSE # ------- # -# PasHi looks for a file named config in the %AppData%\DelphiDabbler\PasHi when -# it starts up. Any commands it finds in that file can be used to change the -# program's default state. By default there is no config: the user must provide -# one if needed. +# PasHi looks for a file named "config" in the %AppData%\DelphiDabbler\PasHi +# directory when it starts up. Any commands it finds in that file are used to +# override the program's defaults. No "config" file is provided as standard: the +# user must provide one if needed. # -# This file is provided as a template for creating a config file. As provided, -# it makes makes no changes to PasHi's default state. However it is fully +# This file is provided as a template for creating a "config" file. As supplied, +# this file makes makes no changes to PasHi's default state. However it is fully # commented and lists every available configuration option. # # Possible commands are noted below. For an explanation of each command, and its -# permitted parameters (if any) see the command reference in ReadMe.html. +# permitted parameters (if any) see the command reference in UserGuide.html. # # FILE FORMAT # ----------- @@ -37,10 +37,11 @@ # ----- # # To use this file you must copy it as "config", over-writing any existing file. +# "config" must be placed in the %AppData%\DelphiDabbler\PasHi directory. # # WARNING: Any changes to this file before renaming are likely to be overwritten # by PasHi, so do not run PasHi while editing the original file. Preferrably you -# should make changes to a copy of the file. +# should make changes to a copy of this file. # # Commands entered on PasHi's command line override commands in this file. @@ -54,7 +55,7 @@ # --- Input source trimming --- -# Commands +# Command: # trim # where ie either "yes" or "no" # Default: @@ -85,7 +86,7 @@ # --- Output document type --- # Command: # doc-type -# where is on of "xhtml", "html4", "html5" or "fragment" +# where is one of "xhtml", "html4", "html5" or "fragment" # Default: # doc-type xhtml @@ -99,9 +100,9 @@ # --- Output file language --- -# Command: +# Commands: # language -# where is either a valid language code recognised by HTML +# where is a valid language code recognised by HTML # language-neutral # Examples: # language en @@ -111,7 +112,7 @@ # --- Output document title --- -# Command: +# Commands: # title # where is the required title text # title-default @@ -135,7 +136,7 @@ # where is the name of a CSS file # default-css # link-css -# where is the name of a CSS file +# where is the absolute or relative URL of a CSS file # Examples: # embed-css C:\CSS\style.css # embed-css .\style.css diff --git a/Config/config-v1 b/Config/config-v1 index c546d4d..106469e 100644 --- a/Config/config-v1 +++ b/Config/config-v1 @@ -7,7 +7,7 @@ # This file reverts PasHi to as near as possible the default behaviour of PasHi # version 1, with the following exceptions: # -# - Output encoding is windows-1252 (nearest available option to older +# - Output encoding is windows-1252 (nearest available option to the older # program's use of system default ANSI encoding). # # - Generated HTML code differs from that generated by PasHi v1, although, @@ -16,10 +16,10 @@ # - Any input file encoding supported by PasHi v2 and later will be accepted: # PasHi v1 only accepted the default ANSI encoding. # -# - There may have been upper and / or lower margins in output HTML due to the -#
 block that contained all the output with PasHi v1. PasHi v2 uses a
-#    
block instead that has no margins. The difference will depend on your -# browser defaults. +# - There may have been upper and / or lower margins in the output HTML due to +# the
 block that contained all the output with PasHi v1. PasHi v2 uses
+#    a 
block instead that has no margins. The difference will depend on +# your browser defaults. # # FILE FORMAT # ----------- diff --git a/Config/notebook.css b/Config/notebook.css index 17f4ec6..cbb8f7f 100644 --- a/Config/notebook.css +++ b/Config/notebook.css @@ -11,9 +11,8 @@ need a modified version of the file, make a copy in a different directory or with a different name and edit that. - Note that some older browser, particularly IE <=7 and Safari<=3, do not - support the last-child pseudo classes and so may not render this output as - cleanly as conformant browsers. + Note that some older browsers, particularly IE <=7 and Safari <= 3, do not + support the CSS last-child pseudo class used in this style sheet. */ diff --git a/Config/version b/Config/version index d8263ee..e440e5c 100644 --- a/Config/version +++ b/Config/version @@ -1 +1 @@ -2 \ No newline at end of file +3 \ No newline at end of file diff --git a/Docs/ChangeLog.txt b/Docs/ChangeLog.txt index 9dc7e27..bd0a44f 100644 --- a/Docs/ChangeLog.txt +++ b/Docs/ChangeLog.txt @@ -2,6 +2,31 @@ ; Change Log for PasHi ; ------------------------------------------------------------------------------ +Release 2.0.0 - 22 September 2016 +This is a major release. Changes from v1.1.0 include the changes below along with all changes from releases 2.0 beta 1 and beta 2. +* PasHi v2.0.0 build 11 + + Help screen text corrected and clarified. + + Manifested program as being compatible with Windows Vista through to Windows 10 and updated program version number in manifest. +* PasHiGUI v1.0.0 build 5 + + Main window size and position now persists between runs. + + Hints are now displayed in main window. + + Help menu option to display online help replaced with option to display user guide that is installed with the program. + + Updates to About box: + - Program version number and copyright details are now extracted from program resources instead of being hard coded. + - The name of the license file was updated. + + Fixed potential bug in synchronising visibility of Options Bar with state of Show/Hide Options Bar menu option and toolbar button. + + Manifested program as being compatible with Windows Vista through to Windows 10. +* General changes + + Standardised format of version information for PasHi and PasHiGUI. + + Programs now compiled with Delphi XE instead of Delphi. + + Major overhaul of documentation including: + - Former read-me HTML file was split into two documents: an HTML user guide named UserGuide.html that is installed with the programs and a read-me text file that is included with the installer in the program download. + - All license information was consolidated in a new LICENSE file that is installed with the programs. This replaces License.txt and SourceCodeLicenses.txt. + - Minor modification were made to license summary displayed by installer. + - Many documents were updated re changes in v2 and were corrected and/or clarified. + + Corrections were made to config file templates and some of the optionally installed CSS files. Some comments were also clarified. + + Some code refactored and commenting standardised. + Release 2.0 beta 2 - 12 August 2014 * PasHi v1.99.2 build 10 (aka v2.0.0 beta 2) + Changed some parameters to --encoding command. @@ -52,7 +77,7 @@ Release 2.0 beta 1 - 11 April 2011 - Many new commands to control new options. - Some new commands to reinstate program defaults that may have been overridden by config file. - All commands now have a long form beginning with double dashes. Some commands also have a short form comprising a single dash and a single letter. - - Commands from earlier program versions retained as aliases to new commands. + - Commands from earlier program versions retained but made into aliases to relevant new commands. + Help screen completely re-written. + Bug fixes: - Exceptions are no longer raised on checking clipboard when another program has it open. @@ -72,7 +97,7 @@ Release 2.0 beta 1 - 11 April 2011 + Multiple file names can now be passed to PasHi via file open dialog box or by dragging and dropping from Explorer. + Input files are now passed directly to the PasHi command line rather than being opened and sent to PasHi via a pipe. (Text from clipboard or drag/drop is still piped to PasHi). + Interaction with PasHi changed to permit user defined options to be passed on command line. - + Options entered in Options Side Bar are persisted in a PasHiGUI's own config file. + + Options entered in Options Side Bar are persisted in PasHiGUI's own config file. + Errors returned from PasHi are now reported to user. + Online documentation can now be accessed from Help menu. + Some refactoring. @@ -103,9 +128,9 @@ Release 1.1.0 - 15 February 2010 PasH Release 1.0 - 31 May 2009 Build 7 -+ Added new -hidecss switch. Specifying it hides contents of @@ -233,7 +241,7 @@

PasHi Pascal Highlighter
-
Read Me Document
+
User Guide

@@ -245,10 +253,7 @@

Introduction
  • - Why another Pascal highlighter? -
  • -
  • - Installation + Installation
  • Using PasHi @@ -262,12 +267,6 @@

  • Using PasHiGUI
  • -
  • - Bugs & Feature Requests -
  • -
  • - Source code -
  • @@ -288,7 +287,8 @@

    HTML 4, XHTML and HTML 5 are all supported. CSS is used for styling. Style sheets may be external or can be embedded in the HTML document. Several - predefined style sheets are installed with the program. You can also create your own.

    @@ -303,221 +303,23 @@

    - PasHiGUI, a GUI front end for PasHi, is included in the - release. This provides a point and click way of using PasHi. Most, - but not all, command line options are supported. Files and text can be dragged - and dropped onto the window to highlight them. -

    - -

    - Check Hallvard's Blog for an example of a site using PasHi. - PasHi has also been used to highlight example source code on the - DelphiDabbler Delphi Tips and - Articles pages. + PasHiGUI, an optional GUI front end for PasHi, is included + in the release. This provides a point and click way of using PasHi. + Most, but not all, command line options are supported. Files and text can be + dragged and dropped onto the program's window to highlight them.

    » Contents

    -

    - Why another Pascal highlighter? -

    - -

    - Simple, I wanted an easy to use tool to format Pascal code for the - DelphiDabbler website. I wanted the following: -

    - -
      -
    1. - Conformant XHTML and later HTML 5. -
    2. -
    3. - Styling by means of cascading style sheets. -
    4. -
    5. - Full control over the appearance of the output code. -
    6. -
    7. - Ability to highlight via the clipboard. -
    8. -
    9. - The option to generate HTML fragments for inserting into existing - documents. -
    10. -
    - -

    - On checking the available free tools I found that they were either too complex - or they didn't provide one or more of the features I wanted. -

    - -

    - I had already written highlighter code for my CodeSnip program, so I extracted that, tweaked it and wrapped it up - in a command line program. Having made it I thought I'd release it in case - anyone else found it useful. Since then it's been greatly enhanced. -

    - -

    - » Contents -

    - -

    +

    Installation

    -
    -

    - PasHi requires Windows 2000 or later to run. You need to have - administrative privileges to install it. Elevation may be required to - install on Windows Vista and later. -

    -

    - If you have PasHi v1.x or earlier you need to remove it before - installing this version. These early versions of the program have no setup - program, so you must uninstall manually. Simply find the program (and - PasHiGUI if you have it) and delete the executable file(s) along - with any support files you installed. If you included the v1.x install - directory on the system path you should remove it. -

    -
    - -

    - PasHi is provided in a zip file that contains a setup program, - PasHi-Setup-xxx.exe (where xxx is the program's version number). - The zip file also contains this read-me file. -

    - -

    - Extract the setup program from the zip file and run it, following the - on-screen instructions. -

    - -

    - You will need to accept the license before configuring and completing the - installation. The license is permissive and lets you copy and share - PasHi freely. You can also modify it providing you make the source - code of your changes freely available. -

    - -

    - After agreeing to the license the installer you choose the installation - directory followed by the name of the start menu program group. Following that - you have three options, all of which are selected by default: -

    - -
      - -
    1. - Add PasHi's directory to the system path for all users:
      - This lets - you run PasHi simply by typing its name on the command line, - without specifying the path to the program. The installer modifies the - system PATH environment variable. This option is recommended for everyone. -
    2. -
    3. - Install sample style sheets and config file templates:
      - This option installs various CSS style sheets and config file templates. These files will appear in your - %AppData%\DelphiDabbler\PasHi directly immediately after you - first run PasHi. The files take up very little disk space so this - option is recommended unless you are sure you will never need to use the - files. -
    4. -
    5. - Install GUI front end program, PasHiGUI:
      - This installs the PasHiGUI program alongside PasHi. This program is - worth installing if you prefer to use PasHi from a GUI rather than - mastering the command line. Most, but not all, of PasHi's options - are available from PasHiGUI. -
    6. -
    -

    - Once you have made your choices, you can review them then either go back to - make changes or commit to installing. Once installation is complete then the - last page is displayed. It gives an option to display this ReadMe file. If you - have installed PasHiGUI you are given the option to run it. -

    - -

    - The installer makes the following changes to your system: -

    - -
      -
    • - The main program's executable files and documentation are installed into the - chosen install folder (%ProgramFiles%\DelphiDabbler\PasHi by - default). If you chose to install it, PasHiGUI will also be placed - in this directory. -
    • -
    • - Files required by the uninstaller are stored in the main installation's - Uninst sub-folder. -
    • -
    • - The program's uninstall information is registered with the Add / Remove - Programs (aka Programs and Features) control panel applet. -
    • -
    • - The system path may be updated if you chose the relevant option. -
    • -
    • - A program group will be created in the start menu. -
    • -
    • - Sample .css and config files are installed in - %ProgramData%\DelphiDabbler\PasHi. The first time that - PasHi is run by each user, these files are also copied to that - users's %AppData%\DelphiDabbler\PasHi directory. -
    • -
    - -

    - Uninstallation -

    - -

    - Open the Add / Remove Programs (Programs and Features) applet from the Control - Panel, navigate to the DelphiDabbler PasHi entry and click the - Remove or Uninstall button. You will be asked to confirm - removal of the program. Click Yes to proceed. -

    - -

    - PasHi, PasHiGUI (if installed) and all documentation will - be removed. -

    - -

    - The directory %ProgramData%\DelphiDabbler\PasHi will be removed - but each user's %AppData%\DelphiDabbler\PasHi directory and all - its files will be left behind. -

    - -

    - PasHi's install directory will be removed from the system path if - present. -

    - -

    - » Contents + Details of how to install PasHi and PasHiGUI are provided in + the file ReadMe.txt that is included in the program download.

    @@ -529,7 +331,7 @@

    - By default PashHi reads input from standard input and writes + By default PasHi reads input from standard input and writes highlighted output to standard output. You can process a single file and write output to another file using shell redirection. For example, to highlight source.pas and output to source.html use: @@ -557,7 +359,7 @@

    - PashHi's behaviour can be modified by specifying one or more file + PahHi's behaviour can be modified by specifying one or more file names and / or commands on the command line. File names and commands can be intermixed.

    @@ -566,7 +368,7 @@

    If one or more file names are entered on the command line then input is taken from the files. Source code is read from each named file in turn and concatenated before being highlighted. Standard input is ignored. Specifying - one file name has the same effect as redirecting standard input from that + a single file name has the same effect as redirecting standard input from that file.

    @@ -581,7 +383,7 @@

    long form. They are explained in the following table.

    - +
    @@ -709,7 +511,7 @@

    follows this command. The code is not checked. If this command is not supplied then no language information is included in the output file.
    - This command has no effect if the --doc-type fragment + This command has no effect if the --doc-type fragment command is used.

    @@ -730,7 +532,7 @@

    Sets the title of the output document. The title text must be supplied in the parameter immediately follow the command. Titles containing spaces must be enclosed in double quotes.
    - This command has no effect if the --doc-type fragment + This command has no effect if the --doc-type fragment command is also used. @@ -743,7 +545,7 @@

    restore that behaviour if it has been overridden in the config file. This command has no effect if the - --doc-type fragment command is also used. + --doc-type fragment command is also used.

    @@ -756,13 +558,13 @@

    below.
    If the file name includes no path information, e.g. delphi2006.css, then the file will be expected to be found in - %AppData%\DelphiDabbler\PasHi. To read a file from the - working directory, prepend .\ to it, e.g. + the %AppData%\DelphiDabbler\PasHi directory. To read a file + from the working directory, prepend .\ to it, e.g. .\delphi2006.css.
    Do not combine this command with --link-css or - default-css because the commands are mutually exclusive. - --embed-css is ignored if the - --doc-type fragment command is also used. + --default-css because the commands are mutually exclusive and + the result will be unpredictable. --embed-css is ignored if + the --doc-type fragment command is also used.

    @@ -773,11 +575,12 @@

    HTML file. The URL must be given in the parameter immediately following this command. The URL can be relative or absolute. The linked CSS file must define the styles described below.
    - This command is ignored if --doc-type fragment is also - used. Since no CSS is embedded in the output file the + Since no CSS is embedded in the output file the --hide-css command does nothing if used with this command. - Do not combine -link-css with --embed-css or - default-css because the commands are mutually exclusive. + Do not combine --link-css with --embed-css or + --default-css because the commands are mutually exclusive and + the result will be unpredicatble. --link-css is ignored if + --doc-type fragment is also used.

    @@ -789,19 +592,19 @@

    mainly to restore that behaviour if it has been overridden in the config file.
    This command negates both the --embed-css and - --link-css commands and should not be combined with them. - --default-css is ignored if the - --doc-type fragment command is also used. + --link-css commands and should not be combined with them + because the result will be unpredictable. --default-css is + ignored if the --doc-type fragment command is also used.

    @@ -837,7 +640,7 @@

  • True, 1, Y, yes or on: - Use legacy (PasHi v1 style class names. + Use legacy (PasHi v1) style class names.
  • False, 0, N, no or @@ -845,11 +648,14 @@

    Use new CSS class names (the default).

  • - When using the --embed-css or --link-css you - should be careful to ensure that the class names in the CSS file you are - embedding or linking provides the correct class names.
    - This command is provided mainly when you are committed to using the old - CSS style names. + This command is provided for when you have to maintain code that uses the + old CSS style names. New code should use the new class names.
    + When using the --embed-css or --link-css + commands you should be careful to ensure that the CSS file you are + embedding or linking defines the correct class names. The CSS files that + are optionally installed with PasHi define both legacy and new + CSS classes. See below for information about the + required CSS class names.

    @@ -858,9 +664,7 @@

    @@ -916,8 +722,8 @@

    Specifies the number of blank lines to insert between the contents of each source file. The required number of lines is given in the following parameter and must be in the range 0..16. The default value is 1.
    - This command is ignored unless more than file is specified on the command - line. + This command is ignored unless more than one file is specified on the + command line.

    @@ -953,7 +759,8 @@

    Line numbers are padded to this width if necessary (but longer line numbers are not truncated). The required width is given in the following parameter and must be in the range 1..6. The default value is 3.
    - The command is ignored if line numbering is not enabled. + This command is ignored if line numbering is not enabled: see the + --line-numbering command.

    @@ -977,7 +784,8 @@

    dot: Pads with dots (.). - This command is ignored if line numbering is not enabled. + This command is ignored if line numbering is not enabled: see the + --line-numbering command.

    @@ -1005,7 +813,8 @@

    line. When striping is enabled the line class is replaced by odd-line and even-line on alternate lines. These classes must be defined differently in CSS otherwise no difference - between alternate lines will be visible. + between alternate lines will be visible. See below for + more information about the necessary CSS classes.

    @@ -1036,7 +845,7 @@

    @@ -1050,7 +859,8 @@

    There are some commands inherited from PasHi v1 that are not listed - above. They have now been superceded by other commands. They are: + above. They have now been superceded by other commands but are still supported + for compatibility reasons. They are:

    Command
    --hide-css -c - Determines if the CSS code embedded in a <style> tag is - wrapped in HTML comment tags (<!-- ... - -->). This command is provided because some old browsers - will render the CSS as text unless it is enclosed in comment tags.
    + Determines if embedded CSS code is wrapped in HTML comment tags + (<!-- ... -->). This command is provided + because some old browsers will render the CSS as text unless it is + enclosed in comment tags.
    In the case of --hide-css the parameter following the command determines whether the CSS is hidden in comments or not. This parameter must be one of the following: @@ -821,7 +624,7 @@

    -c+ and -c1 hide the CSS in comments while -c- and -c0 do not.
    --hide-css is ignored when either the - --doc-type fragment or --link-css commands + --doc-type fragment or --link-css commands are used.

    Sets the character encoding used for output to the encoding specified in next parameter. HTML documents are marked with the chosen format and the - resulting file may include byte order marks. This command is ignored if - the --output-clipboard command is specified, because data is - always written to the clipboard in Unicode. Valid encoding parameters are: + resulting file may include byte order marks. Valid encoding parameters are:
    • utf-8 or utf8: Encodes in Unicode using @@ -881,6 +685,8 @@

      latin1: Encodes in ISO-8859-1 format.

    + This command is ignored if the --output-clipboard command is + specified, because data is always written to the clipboard in Unicode.
    --quiet -q - Alias for the --verbosity quiet command. + Alias for the --verbosity quiet command.
    @@ -1080,13 +890,13 @@

    @@ -1118,7 +928,7 @@

    - PasHi uses the following exit code: + PasHi uses the following exit codes:

      @@ -1131,10 +941,6 @@

    -

    - When PasHi exits normally then the exit code is 0. -

    -

    Usage example

    @@ -1188,17 +994,17 @@

    - PasHi reads any config file that is present in the - %AppData%\DelphiDabbler\PasHi directory when it starts up. Any - commands it finds in that file can be used to change the program's default + If PasHi finds a file named config in the + %AppData%\DelphiDabbler\PasHi directory when it starts up, it is + read. Any commands found in that file are used to change the program's default state.

    - PasHi does not install a config file, so if you need one - you must create your own. You can do this either by creating a new file or by - copying and editing one of the sample scripts provided with PasHi - (providing you installed them). + PasHi does not install a config file by default, so if + you need one you must create your own. You can do this either by creating a + new file or by copying and editing one of the sample scripts provided with + PasHi (providing you installed them).

    @@ -1212,7 +1018,8 @@

  • Where a command takes a parameter the parameter should be placed on the same line as the command, separated from it by one or more spaces. Parameters - containing spaces should not be quoted (unlike on the command line). + containing spaces should not be quoted (unlike on the + command line).
  • All the long form commands listed in
  • Lines begining with "#" are treated as comments and ignored.
  • +
  • + Blank lines are ignored. +
  • Leading and trailing spaces are ignored.
  • @@ -1237,10 +1047,10 @@

    - Warning: Although PasHi accepts the help command in a - config file you should never use it or the program will do - nothing except display the help screen, no matter what commands you pass on - the command line. + Warning: Although PasHi accepts the + help command in a config file you should never + use it or the program will do nothing except display the help screen, no + matter what commands you pass on the command line.

    @@ -1248,10 +1058,8 @@

    - Some example config scripts are optionally installed in - %AppData%\DelphiDabbler\PasHi. (If you installed them you may - need to run PasHi once for the files to appear). The sample scripts - are: + Some example config scripts are optionally installed in the + %AppData%\DelphiDabbler\PasHi directory. The sample scripts are:

    @@ -1260,26 +1068,37 @@

    This script does nothing, but is copiously commented with all possible - commands. It is a good starting point for your own config script. + commands. Used in conjunction with the command reference above it is a good starting point for your own config + script.
    config-v1
    - Emulates, as far as possible the actions of PasHi. This script - requires that the file v1-default.css (provided) is present in - the same directory. + Emulates, as far as possible, the functioning of PasHi v1. This + script requires that the file v1-default.css (provided) is + present in the same directory.

    +

    + The example config files, where installed, may not appear in the + %AppData%\DelphiDabbler\PasHi directory until after + PasHi has been run once. +

    +

    Examples

    +

    + Example 1 +

    +

    - As mentioned in Using PasHi, a common use for PasHi is to highlight + As mentioned above, a common use for PasHi is to highlight source code from the clipboard as an HTML fragment and place the HTML back on the clipboard. Instead of using the necessary commands each time you run PasHi you can add the following to the config file: @@ -1297,34 +1116,49 @@

    on its own on the command line and it will perform the required actions by - default. Be warned that if you do this, you will need to use the + default.

    + +

    + Be warned that if you do this, you will need to specify the --input-stdin, --output-stdout and - --doc-type xhtml commands to revert to normal default behaviour. + --doc-type xhtml commands on the command line to revert to + default behaviour.

    +

    + Example 2 +

    +

    - Another useful example is if you provide your own CSS file containing your - desired highlighting style that you always want to use. To save you having - to specify this file on the command line each time, simply put a suitable - command in config. For example, to embed CSS use something like: + Another useful example is where you have a CSS file containing your desired + highlighting style that you always want to embed in your highlighted document. + To save you having to specify a --embed-css command each time you + run PasHi, simply put the command in config, something + like:

    embed-css C:\CSS\my-style.css

    - Or, in the special case of the CSS files provided with PasHi in - %AppData%\DelphiDabbler\PasHi, omit the path information and use, - for example: + Or, in the special case of the CSS files optionally installed with + PasHi in %AppData%\DelphiDabbler\PasHi, omit the path + information and use, for example:

    embed-css twilight.css

    - You can also link to your CSS file. For example: + If you prefer to link to your CSS file instead of embedding it, you can add + a line to config like:

    link-css http://example.com/css/my-style.css
    +

    + Should you now need to revert PasHi to using its default CSS you will + need to include --default-css on the command line. +

    +

    CSS styles used by PasHi

    @@ -1366,22 +1200,23 @@

    .odd-line
    - These classes are applied to <pre> tags in even and odd - numbered lines respectively when code striping is switched on (see the - --striping command above). .even-line and - .odd-line must be styled differently otherwise striping will - have no visible effect. The usual use is to provide a different background - colour for alternate lines – hence the name "striping". + These classes are applied to <pre> tags in place of the + .line class in even and odd numbered lines respectively when + code striping is switched on (see the --striping command + above). .even-line and .odd-line must be styled + differently otherwise striping will have no visible effect. It is usual to + provide a different background colour for alternate lines – hence the + name "striping".
    .linenum
    This class is applied to any line numbers that may be prepended to the start - of a line (see --line-numbering and related commands). - .linenum can be used to set line number font style and colour - along with the margin between the line number and source code, and any - separating border, for example. The font used should be mono spaced + of a line (see --line-numbering and related commands above). + .linenum can be used to set the font style and colour used for + the line number, along with the margin between the line number and source + code and any separating border. The font used should be mono spaced otherwise the numbers may not line up correctly.
    @@ -1492,7 +1327,7 @@

  • Include a code fragment generated by the - --doc-type fragment command in another HTML file. + --doc-type fragment command in another HTML file.
  • @@ -1502,9 +1337,16 @@

    To help you get started in defining your own classes, here are the default - definitions that are used by PasHi: + definitions that are used by PasHi.

    +
    +

    + Note that this example also includes some additional class names. These + relate to PasHi v1.x, as explained below the listing. +

    +
    +
    .code-pascal,
     .pas-source {
       background-color: transparent;
    @@ -1631,8 +1473,8 @@ 

    remaining classes had pas- prepended to the class name, for example .kwd was .pas-kwd. If you want PasHi to revert to using the old style names pass - "--legacy-css on" on the command line or place - "legacy-css on" in the config file + "--legacy-css on" on the command line or place + "legacy-css on" in the config file if you want to use the old style names by default.

    @@ -1753,7 +1595,7 @@

    PasHiGUI provides a GUI for PasHi and permits many of - PasHi features to be accessed graphically. + PasHi's features to be accessed via a point and click interface.

    @@ -1867,11 +1709,11 @@

    Displays or hides the Options Side Bar.
    - Help | Online Docs + Help | PasHi & PasHiGUI User Guide
    - Displays the online documentation for PasHiGUI in the default web - browser. + Displays the combined user guide for PasHi and PasHiGUI in + the default web browser.
    Help | About @@ -1892,11 +1734,11 @@

    • - Drag and drop one or more file names from Windows Explorer: this opens the - dropped file(s). Folders are ignored. + Drag and drop one or more file names from Windows Explorer: this highlights + the dropped file(s). Folders are ignored.
    • - Drag and drop selected text from a suitable text editor: the selected text + Drag and drop selected text from a compatible text editor: the selected text is syntax highlighted and is assumed to be valid Pascal source code.
    @@ -1906,79 +1748,18 @@

    - PasHiGUI will not work unless a suitable version of PasHi is - installed in the same directory and is the correct version. Using the - installer to install both programs is the best means of ensuring that - everything is set up correctly. -

    - -

    - » Contents -

    - -

    - Bugs & Feature Requests -

    - -

    - Please do report bugs and request new features. To do this please use the issue tracker. Do review any existing reports before raising a new - issue. -

    - -

    - » Contents -

    - -

    - Source code -

    - -

    - The source code for PasHi and PasHiGUI is hosted in - Subversion repository on GoogleCode. The repository can be viewed at http://code.google.com/p/pas-hi/source/browse/. -

    - -

    - Zip files containing source code are hosted on the project's GoogleCode download tab. -

    - -

    - Finally, the latest release of the source code is always available via the - PasHi home page. -

    - -

    - You will find a file named Build.html in the root directory of - each source code distribution that explains how to build the programs. + PasHiGUI will not work unless PasHi is installed in the same + directory and is the correct version. Using the installer to install both + programs is the best means of ensuring that everything is set up correctly.

    -
    - If you have any comments about this program please get in touch via my - website. But do please use the issue tracker - mentioned above to report bugs rather than contacting me direct. -
    -
    diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ae55843 --- /dev/null +++ b/LICENSE @@ -0,0 +1,53 @@ +Executable Programs +=================== + +DelphiDabbler PasHi is copyright (c) 2005-2016 by Peter D Johnson, +. + +DelphiDabbler PasHiGUI is copyright (c) 2006-2016 by Peter D Johnson, +. + +The executable version of the program is made available under the terms of the +Mozilla Public License v2.0 . This means you can +use, copy and distribute PasHi and PasHiGUI as you wish. + +You may also modify the programs as you wish and you may distribute copies of +your modified version under the terms of the Mozilla Public License v2.0. The +only exception is that you must not use the DelphiDabbler, PasHi and PasHiGUI +names or program icons in any modification you distribute unless you have the +explicit permission of the copyright holder. + +Source Code +=========== + +Source code for the current release of PasHi is available from the +delphidabbler/pashi project on GitHub . +All paths referenced below are relative to the root of the source tree that +relates to this release. + +With the exception of the files listed under "Exceptions" below, all of PasHi +and PasHiGUI's original source code is made available under the terms of the +Mozilla Public License v2.0. Most source files will contain a comment to this +effect. Any file without such a comment should be treated as being covered by +this license unless it is mentioned below. + +Exceptions +---------- + +* Third party code found in the `Src/GUI/Imported` directory may carry its own + license. Licensing information will be found in the `ReadMe.txt` file in the + same directory. All third party licenses are compatible with the Mozilla + Public License v2.0. + +* Icon files (with `.ico` extensions) must be neither copied nor modified nor + used in distributions of derived programs without explicit permission of the + copyright holder. + +* The files in the `Config` directory have any copyright dedicated to the Public + Domain. . + +* The file `Test.pas` in the `Test` directory has any copyright dedicated to the + Public Domain. . + +* `.gitgnore` in the root of the repository has any copyright dedicated to the + Public Domain. . diff --git a/Masters/PasH-Icon.icpr b/Masters/PasH-Icon.icpr deleted file mode 100644 index 05abb99..0000000 Binary files a/Masters/PasH-Icon.icpr and /dev/null differ diff --git a/Masters/READ-ME.txt b/Masters/READ-ME.txt deleted file mode 100644 index cf5ff78..0000000 --- a/Masters/READ-ME.txt +++ /dev/null @@ -1,25 +0,0 @@ -The purpose of the "Masters" directory is to store "master" documents that have -been used to generate some of the files used by the project. - -Files are listed below. - --------------------------------------------------------------------------------- -PasH-Icon.icpr --------------------------------------------------------------------------------- - -Description: - - The program's icon as SIB icon editor icon project containing four 32 bit - colour program icons in 16x16, 32x32, 48x48 and 256x256 sizes. - -Use: - - 1) To generate the main icons for PasHi (PasHi.ico) and PasHiGUI - (MainIcon.ico). - - 2) To generate the icon used on the project's GoogleCode pages. The 128x128 - icon was exported from SIB as a .png file. This was opened in Paint.Net and - resized to 55x55. This resized image was uploaded to GoogleCode. - - --------------------------------------------------------------------------------- diff --git a/README.md b/README.md index 0d9e83c..6fe6b40 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,40 @@ PasHi - Pascal Syntax Highlighter ================================= +Overview +-------- + PasHi is a Pascal syntax highlighter targetted at the Delphi Language. -For an overview of the program, installation and usage information see [`ReadMe.html`](Docs/ReadMe.html) in the `Docs` directory. +PasHi itself is a command line program. It has a help screen that can displayed from the command line by doing: + + > PasHi --help + +For users who prefer to use a GUI, PasHi's installer provides the option to install PasHiGUI. This program provides GUI access to many (but not all) of PasHi's features. + +For full details of how to install PasHi etc. see the file `ReadMe.txt` that is included in the program download. + +A comprehensive user guide, `UserGuide.html` is installed alongside PasHi. PasHiGUI provides a menu option to display the file. + +> **Note:** Both `ReadMe.txt` and `UserGuide.html` can also be found in the `Docs` directory in PasHi's [GitHub repository](https://github.com/delphidabbler/pashi). Source Code ----------- -Up to and including release 2.0 beta 2 of 12 August 2014 the project's source code was maintained in a Subversion repository on GoogleCode. That repo has now been converted to Git and imported to GitHub. Releases have been tagged. Consequently all changes up to release 2.0 beta 2 were made to `master`. Some later changes, up to and including the creation of this ReadMe file were also committed to directly to `master`. - -The [Git Flow](http://nvie.com/posts/a-successful-git-branching-model/) methodology has now been adopted. This means that all development work is now done on the `develop` branch or special `feature` branches, leaving `master` in a production ready state. +PasHi's source code is hosted on GitHub as part of the [delphidabbler/pashi](https://github.com/delphidabbler/pashi) project. -### Contributions +> **Note:** Up to and including release 2.0 beta 2 the project's source code was maintained in a Subversion repository on GoogleCode. That repo was later converted to Git and imported to GitHub. Consequently all changes up to release 2.0 beta 2 were made to `master`. Some later changes, up to and including the creation of this ReadMe file were also committed to directly to `master`. -Contributions are welcome. Just fork the repo and create a feature branch off the `develop` branch. Commit your changes to your feature branch and submit a pull request when ready. +The [Git Flow](http://nvie.com/posts/a-successful-git-branching-model/) methodology has now been adopted. This means that all development work is now done on the `develop` branch or special `feature` branches off it, leaving `master` in a production ready state. Change Log ---------- -The program's change log is recorded in [`ChangeLog.txt`](Docs/ChangeLog.txt) in the `Docs` directory. +The program's change log is recorded in `ChangeLog.txt` in the `Docs` directory of the GitHub project. The change log is not included in the program installation. License ------- -The program's EULA can be found in [`License.txt`](Docs/License.txt) in the `Docs` directory. +The program's EULA can be found in the file `LICENSE` that is installed with the program. This file can also be found in the root of the GitHub repository. Much of the source code is released under the [Mozilla Public License v2.0](http://mozilla.org/MPL/2.0/). diff --git a/Src/3rdParty/ReadMe.txt b/Src/3rdParty/ReadMe.txt deleted file mode 100644 index ca0f945..0000000 --- a/Src/3rdParty/ReadMe.txt +++ /dev/null @@ -1,4 +0,0 @@ -This directory contains 3rd party source code required to build PasHi, including -files from other DelphiDabbler projects. - -Currently it contains no files. diff --git a/Src/Assets/Default.css b/Src/Assets/Default.css index a35dbb3..55093fb 100644 --- a/Src/Assets/Default.css +++ b/Src/Assets/Default.css @@ -3,9 +3,9 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2009-2016, Peter Johnson (www.delphidabbler.com). * - * Contains default CSS applied to complete XHTML documents. + * Contains default CSS applied to complete HTML documents. * * Many classes have two names: the first name is that used by default in PasHi * v2 and later while the second name is the older PasHi v1 class name that is diff --git a/Src/Assets/Help.txt b/Src/Assets/Help.txt index a715aa9..cba2cbf 100644 --- a/Src/Assets/Help.txt +++ b/Src/Assets/Help.txt @@ -38,7 +38,7 @@ PasHi supports the following commands: tag in the output HTML document. The name of the CSS file must be supplied in the next parameter. File names containing no path information are read - from PasHi's application data directory. + from PasHi's per-user application data directory. --encoding -e Specifies the output encoding. The next parameter must provide one of the following values: utf-8 [default] @@ -70,7 +70,7 @@ PasHi supports the following commands: following values: yes - use PasHi v1 CSS class names no - use current CSS class names [default]. ---line-numbering -n Switches line numebring on or off. --line-numbering +--line-numbering -n Switches line numbering on or off. --line-numbering requires the next parameter to supply one of the following values: on - number each line of source code diff --git a/Src/Assets/PasHi.manifest b/Src/Assets/PasHi.manifest index e14ef56..9012cce 100644 --- a/Src/Assets/PasHi.manifest +++ b/Src/Assets/PasHi.manifest @@ -5,10 +5,10 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2014, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2014-2015, Peter Johnson (www.delphidabbler.com). * * Manifest file for PasHi Pascal Highlighter. Specifies required execution - * level. + * level and supported OSs. --> @@ -16,7 +16,7 @@ @@ -26,5 +26,19 @@ + + + + + + + + + + + + + + diff --git a/Src/Common.mak b/Src/Common.mak index d880347..2a1bc77 100644 --- a/Src/Common.mak +++ b/Src/Common.mak @@ -3,40 +3,63 @@ # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at http://mozilla.org/MPL/2.0/ # -# Copyright (C) 2010-2012, Peter Johnson (www.delphidabbler.com). +# Copyright (C) 2010-2015, Peter Johnson (www.delphidabbler.com). # # Common code for inclusion in all make files. Defines common macros and rules. # Files that require Common.mak must include it using the !include directive. # ------------------------------------------------------------------------------ -# The preferred compiler is Delphi 2010. If the DELPHI2010 evironment variable -# is set, it will be used and expected to reference the Delphi 2010 install +# The preferred compiler is Delphi XE. If the DELPHIXE environment variable is +# set, it will be used and expected to reference the Delphi XE install # directory. -# If DELPHI2010 is not set then the DELPHIROOT environment variable is examined. -# This can be set to any Delphi compiler. If neither DELPHI2010 nor DELPHIROOT -# is set then an error is reported -!ifdef DELPHI2010 -DELPHIROOT = $(DELPHI2010) +# If DELPHIXE is not set then the DELPHIROOT environment variable is examined. +# This can be set to any Delphi compiler. If neither DELPHIXE nor DELPHIROOT is +# set then an error is reported. +!ifdef DELPHIXE +DELPHIROOT = $(DELPHIXE) !endif # Requires the following macros: -# BIN - set to the directory that is to receive .res and .dcu output. -# DELPHIROOT - install directory of Delphi compiler to be used +# ROOT +# Set to the root project relative to current directory. Must not have +# trailing path delimiter. +# BINREL +# Set to the directory relative to the base Bin directory that is to +# receive .res and .dcu output. Must not have trailing path delimiter. May +# be empty, but must be defined. +# DELPHIROOT +# Install directory of Delphi compiler to be used. # Check for required macros + !ifndef DELPHIROOT !error DELPHIROOT environment variable required. !endif -!ifndef BIN -!error BIN macro must be defined in calling script. + +!ifndef ROOT +!error ROOT macro must be defined in calling script. +!endif + +!ifndef BINREL +!error BINREL macro must be defined in calling script. !endif +# Set required directory macros +SRC = $(ROOT)\Src +DOCS = $(ROOT)\Docs +BUILD = $(ROOT)\Build +EXE = $(BUILD)\Exe +BINBASE = $(BUILD)\Bin +BIN = $(BINBASE)\$(BINREL) +RELEASE = $(BUILD)\Release + # Define common macros that access required build tools MAKE = "$(MAKEDIR)\Make.exe" -$(MAKEFLAGS) DCC32 = "$(DELPHIROOT)\Bin\DCC32.exe" BRCC32 = "$(DELPHIROOT)\Bin\BRCC32.exe" +RC = "$(DELPHIROOT)\Bin\RC.exe" !ifdef VIEDROOT VIED = "$(VIEDROOT)\VIEd.exe" -makerc !else @@ -61,13 +84,20 @@ ZIP = Zip.exe @echo +++ Compiling Delphi Project $< +++ @$(DCC32) $< -B -# Resource files are compiled to the directory specified by BIN macro, which -# must have been set by the caller. +# Resource files are compiled to the Bin directory using RC. .rc.res: - @echo +++ Compiling Resource file $< +++ - @$(BRCC32) $< -fo$(BIN)\$(@F) + @echo +++ Compiling Resource file $< to $(@F) +++ + @$(RC) -fo$(BIN)\$(@F) $< + +# Temporary resource files with special extension .tmp-rcx are compiled to the +# Bin directory using BRCC32. +.tmp-rcx.res: + @echo +++ Compiling Resource file $< to $(@F) +++ + @$(BRCC32) -fo$(BIN)\$(@F) $< + -@del $( @@ -35,4 +35,18 @@ + + + + + + + + + + + + + + diff --git a/Src/GUI/Resources/fragment-tplt.html b/Src/GUI/Assets/fragment-tplt.html similarity index 95% rename from Src/GUI/Resources/fragment-tplt.html rename to Src/GUI/Assets/fragment-tplt.html index 0044af3..c463eee 100644 --- a/Src/GUI/Resources/fragment-tplt.html +++ b/Src/GUI/Assets/fragment-tplt.html @@ -7,7 +7,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2006-2016, Peter Johnson (www.delphidabbler.com). * * Page used as template for highlighted code fragments. --> @@ -15,7 +15,7 @@ - + PasHiGUI - Delphi Code Fragment

    -frag - Alias for the --doc-type fragment command. + Alias for the --doc-type fragment command.
    -hidecss - Alias for -c+ or the --hide-css yes + Alias for -c+ or the --hide-css yes command.