Jelajahi Sumber

Move ISPP topics into main help file.

Martijn Laan 1 tahun lalu
induk
melakukan
cddf72eb57

+ 9 - 23
ISHelp/ISHelpGen/ISHelpGen.dpr

@@ -13,7 +13,7 @@ uses
   UIsxclassesParser in 'UIsxclassesParser.pas';
 
 const
-  Version = '1.14';
+  Version = '1.15';
 
   XMLFileVersion = '1';
 
@@ -71,7 +71,6 @@ type
 
 var
   SourceDir, OutputDir, Postfix: String;
-  ISPP: Boolean;
   Keywords, DefinedTopics, TargetTopics, SetupDirectives: TStringList;
   TopicsGenerated: Integer = 0;
   CurrentTopicName: String;
@@ -672,11 +671,6 @@ var
       Node := Node.NextSibling;
     end;
     SL.Add('</ul>');
-    if not ISPP and (ParentNode = ContentsNode) then begin
-      { Don't put next 2 lines on 1 line or hhc will hang... }
-      SL.Add('<object type="text/sitemap">');
-      SL.Add('<param name="Merge" value="ispp' + Postfix + '.chm::\hh_generated_contents.hhc"></object>');
-    end;
   end;
 
 begin
@@ -965,11 +959,9 @@ procedure Go;
 var
   I: Integer;
 begin
-  if not ISPP then begin
-    TransformFile('isxfunc.xml', 'isxfunc.xsl', 'isxfunc_generated.xml');
-    GenerateIsxClassesFile;
-  end else
-    TransformFile('ispp.xml', 'ispp.xsl', 'ispp_generated.xml');
+  TransformFile('isxfunc.xml', 'isxfunc.xsl', 'isxfunc_generated.xml');
+  GenerateIsxClassesFile;
+  TransformFile('ispp.xml', 'ispp.xsl', 'ispp_generated.xml');
 
   Keywords := TStringList.Create;
   Keywords.Duplicates := dupAccept;
@@ -982,13 +974,11 @@ begin
   SetupDirectives.Duplicates := dupError;
   SetupDirectives.Sorted := True;
   try
-    if not ISPP then begin
-      DoDoc('isetup.xml');
-      DoDoc('isx.xml');
-      DoDoc('isxfunc_generated.xml');
-      DoDoc('isxclasses_generated.xml');
-    end else
-      DoDoc('ispp_generated.xml');
+    DoDoc('isetup.xml');
+    DoDoc('isx.xml');
+    DoDoc('isxfunc_generated.xml');
+    DoDoc('isxclasses_generated.xml');
+    DoDoc('ispp_generated.xml');
 
     CheckForNonexistentTargetTopics;
 
@@ -1022,10 +1012,6 @@ begin
     Postfix := ParamStr(2);
     OutputDir := SourceDir + 'Staging' + Postfix + '\';
 
-    ISPP := FileExists(SourceDir + 'ispp.xml');
-    if ISPP then
-      Writeln('Running in ISPP mode');
-
     OleCheck(CoInitialize(nil));  { for MSXML }
 
     StartTime := GetTickCount;

+ 15 - 0
ISHelp/isetup.xml

@@ -56,6 +56,21 @@
     <contentstopic title="Using COM Automation objects" topic="scriptautomation" />
     <contentstopic title="Debugging" topic="scriptdebug" />
   </contentsheading>
+  <contentsheading title="Inno Setup Preprocessor">
+    <contentstopic title="Introduction" topic="isppoverview" />
+    <contentstopic title="Directives Reference" topic="directives" />
+    <contentstopic title="Support Functions Reference" topic="funcs" />
+    <contentstopic title="User Defined Functions" topic="macros" />
+    <contentstopic title="Expression Syntax" topic="expressions" />
+    <contentstopic title="Predefined Variables" topic="predefinedvars" />
+    <contentstopic title="Line Spanning" topic="linespan" />
+    <contentsheading title="Other Information">
+      <contentstopic title="Visibility of Identifiers" topic="visibility" />
+      <contentstopic title="Example Script" topic="example" />
+      <contentstopic title="ISPPBuiltins.iss" topic="builtinsiss" />
+      <contentstopic title="Extended Command Line Compiler" topic="isppcc" />
+    </contentsheading>
+  </contentsheading>
   <contentsheading title="Other Information">
     <contentstopic title="Support Inno Setup" topic="donate" />
     <contentstopic title="Unicode Inno Setup" topic="unicode" />

+ 0 - 0
ISPPHelp/ispp.dtd → ISHelp/ispp.dtd


+ 0 - 0
ISPPHelp/ispp.xml → ISHelp/ispp.xml


+ 1 - 23
ISPPHelp/ispp.xsl → ISHelp/ispp.xsl

@@ -10,7 +10,7 @@
   <xsl:comment>
     Inno Setup Preprocessor Reference
     Copyright (C) 1997-2024 Jordan Russell
-    Portions Copyright (C) 2000-2020 Martijn Laan
+    Portions Copyright (C) 2000-2024 Martijn Laan
     For conditions of distribution and use, see LICENSE.TXT.
     Portions Copyright (C) 2001-2004 Alex Yackimoff
 
@@ -19,28 +19,6 @@
 
   <ishelp version="1">
 
-  <xsl:comment>Table of contents</xsl:comment>
-
-  <contents>
-    <contentsheading title="Inno Setup Preprocessor">
-      <contentstopic title="Introduction" topic="isppoverview" />
-      <contentstopic title="Directives Reference" topic="directives" />
-      <contentstopic title="Support Functions Reference" topic="funcs" />
-      <contentstopic title="User Defined Functions" topic="macros" />
-      <contentstopic title="Expression Syntax" topic="expressions" />
-      <contentstopic title="Predefined Variables" topic="predefinedvars" />
-      <contentstopic title="Line Spanning" topic="linespan" />
-      <contentsheading title="Other Information">
-        <contentstopic title="Visibility of Identifiers" topic="visibility" />
-        <contentstopic title="Example Script" topic="example" />
-        <contentstopic title="ISPPBuiltins.iss" topic="builtinsiss" />
-        <contentstopic title="Extended Command Line Compiler" topic="isppcc" />
-      </contentsheading>
-    </contentsheading>
-  </contents>
-
-  <xsl:comment>Topics</xsl:comment>
-
   <xsl:apply-templates/>
 
   </ishelp>

+ 0 - 2
ISPPHelp/.gitignore

@@ -1,2 +0,0 @@
-isetup.dtd
-ispp_generated.xml

+ 0 - 17
ISPPHelp/Staging-dark/.gitignore

@@ -1,17 +0,0 @@
-#copied from Staging
-contents-template.htm
-index.htm
-index.php
-#copied from ISHelp
-contents.css
-contents.js
-stoplist.stp
-styles.css
-topic.js
-#generated
-contents.htm
-contentsindex.js
-hh_generated_contents.hhc
-hh_generated_index.hhk
-ispp-dark.chm
-topic_*.htm

+ 0 - 19
ISPPHelp/Staging-dark/hh_project.hhp

@@ -1,19 +0,0 @@
-[OPTIONS]
-Compatibility=1.1 or later
-Compiled file=ispp-dark.chm
-Contents file=hh_generated_contents.hhc
-Default Window=$global_ismain
-Default topic=topic_isppoverview.htm
-Display compile progress=Yes
-Full-text search=Yes
-Full text search stop list file=stoplist.stp
-Index file=hh_generated_index.hhk
-Language=0x409 English (United States)
-Title=Inno Setup Preprocessor Help
-
-[WINDOWS]
-$global_ismain=,"hh_generated_contents.hhc","hh_generated_index.hhk",,,,,,,0x22520,,0x300e,,,,,,,,0
-
-
-[INFOTYPES]
-

+ 0 - 4
ISPPHelp/Staging-dark/images/.gitignore

@@ -1,4 +0,0 @@
-contentsheadclosed.png
-contentsheadopen.png
-contentstopic.png
-extlink.png

+ 0 - 13
ISPPHelp/Staging/.gitignore

@@ -1,13 +0,0 @@
-#copied from ISHelp
-contents.css
-contents.js
-stoplist.stp
-styles.css
-topic.js
-#generated
-contents.htm
-contentsindex.js
-hh_generated_contents.hhc
-hh_generated_index.hhk
-ispp.chm
-topic_*.htm

+ 0 - 37
ISPPHelp/Staging/contents-template.htm

@@ -1,37 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta http-equiv="X-UA-Compatible" content="IE=8" />
-<title>Inno Setup Preprocessor Help Contents</title>
-<!--[if IE 6]><style type="text/css">html{overflow-y:scroll}</style><![endif]-->
-<link rel="stylesheet" type="text/css" href="contents.css" />
-<script type="text/javascript" src="contents.js"></script>
-</head>
-<body onload="init_contents(2);">
-
-<div id="tabbar">
-<table cellspacing="0">
-<tr>
-<td><div style="width: 4px"></div></td>
-<td id="tab-contents" class="selectedtab" onmousedown="select_tab('contents');"><a href="javascript:select_tab('contents');">Contents</a></td>
-<td id="tab-index" class="unselectedtab" onmousedown="select_tab('index');"><a href="javascript:select_tab('index');">Index</a></td>
-<td style="width: 100%">&nbsp;</td>
-</tr>
-</table>
-</div>
-
-<div style="padding: 4px 2px 2px 2px">
-
-<div id="tabbody-contents">
-%CONTENTSTABLES%
-</div>
-
-<div id="tabbody-index" style="display: none">
-<div style="margin-top: 1em; text-align: center; color: GrayText">Loading...</div>
-</div>
-
-</div>
-
-</body>
-</html>

+ 0 - 19
ISPPHelp/Staging/hh_project.hhp

@@ -1,19 +0,0 @@
-[OPTIONS]
-Compatibility=1.1 or later
-Compiled file=ispp.chm
-Contents file=hh_generated_contents.hhc
-Default Window=$global_ismain
-Default topic=topic_isppoverview.htm
-Display compile progress=Yes
-Full-text search=Yes
-Full text search stop list file=stoplist.stp
-Index file=hh_generated_index.hhk
-Language=0x409 English (United States)
-Title=Inno Setup Preprocessor Help
-
-[WINDOWS]
-$global_ismain=,"hh_generated_contents.hhc","hh_generated_index.hhk",,,,,,,0x22520,,0x300e,,,,,,,,0
-
-
-[INFOTYPES]
-

+ 0 - 4
ISPPHelp/Staging/images/.gitignore

@@ -1,4 +0,0 @@
-contentsheadclosed.png
-contentsheadopen.png
-contentstopic.png
-extlink.png

+ 0 - 48
ISPPHelp/Staging/index.htm

@@ -1,48 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta http-equiv="X-UA-Compatible" content="IE=8" />
-<title>Inno Setup Preprocessor Help</title>
-<script type="text/javascript"><!--
-
-var contentsFrameLoaded = false;
-var bodyFrameLoaded = false;
-
-// When this page is first loaded, trigger_sync_contents() isn't called
-// until both contentsframe.onload and bodyframe.onload have fired
-// (order does not matter). After that, trigger_sync_contents() is
-// called whenever further onload events come in on either frame (as
-// a result of refreshing, clicking a link, or clicking Back/Forward).
-
-function trigger_sync_contents()
-{
-	window.frames["contentsframe"].sync_contents();
-}
-
-function bodyframe_loaded()
-{
-	bodyFrameLoaded = true;
-	if (contentsFrameLoaded) trigger_sync_contents();
-}
-
-function contentsframe_loaded()
-{
-	contentsFrameLoaded = true;
-	if (bodyFrameLoaded) trigger_sync_contents();
-}
-
---></script>
-</head>
-<frameset cols="242, *">
-  <frame name="contentsframe" src="contents.htm" onload="contentsframe_loaded();" />
-  <frame name="bodyframe" src="topic_isppoverview.htm" onload="bodyframe_loaded();" />
-  <noframes>
-    <body>
-      <p>Your browser does not support frames.</p>
-      <p><a href="contents.htm">View the table of contents</a></p>
-    </body>
-  </noframes>
-</frameset>
-</html>

+ 0 - 17
ISPPHelp/Staging/index.php

@@ -1,17 +0,0 @@
-<?php
-
-$topic = @$_GET['topic'];
-if (!preg_match('/^[a-z0-9_\-]+\z/', $topic))
-  $topic = 'isppoverview';
-
-$anchor = '#' . @$_GET['anchor'];
-if (!preg_match('/^#[a-zA-Z0-9_\-.]+\z/', $anchor))
-  $anchor = '';
-
-$text = @file_get_contents('index.htm');
-if (!$text) die('Error reading file');
-
-$text = str_replace('topic_isppoverview.htm', htmlspecialchars("topic_$topic.htm$anchor"), $text);
-echo $text;
-
-?>

+ 0 - 155
ISPPHelp/Staging/styles.css

@@ -1,155 +0,0 @@
-/*
-  Inno Setup
-  Copyright (C) 1997-2010 Jordan Russell
-  Portions by Martijn Laan
-  For conditions of distribution and use, see LICENSE.TXT.
-*/
-
-BODY {
-	font: small arial, sans-serif;
-	margin: 0;
-}
-PRE, TT {
-	font: small "courier new", monospace;
-}
-P, H1, H2, H3, H4, H5, BLOCKQUOTE, PRE, FORM, OL, UL, LI, DL, DD, TABLE, .examplebox, DIV.margined {
-	/* only the end of paragraphs etc. has a margin */
-	margin-top: 0;
-	margin-bottom: 0.6em;
-}
-UL, DD {
-	/* specify both of these for firefox compat. */
-	margin-left: 0;
-	padding-left: 2em;
-}
-TABLE {
-	/* equivalent of cellspacing="0" */
-	border-collapse: collapse;
-}
-TD {
-	/* equivalent of cellpadding="0" */
-	padding: 0;
-	/* note: "baseline" is broken on IE6; it only aligns correctly when there's
-	   a single line of text, and that text is directly inside the <TD> tag
-	   (not inside a <DIV>). otherwise it behaves more like "top".
-           (firefox 1.5 and opera 9 don't have this problem) */
-	vertical-align: baseline;
-}
-A {
-	text-decoration: none;
-}
-A:hover {
-	text-decoration: underline;
-}
-A:link {
-	color: #264b99;
-}
-A:visited {
-	color: #5e85d7;
-}
-A:active {
-	color: #7799dd;
-}
-A.highlighted {
-	background-color: #ffff00;
-	color: black;
-}
-
-.small {
-	/* what we want is an 8pt font. 8pt/10pt = 80%, but on firefox that
-	   actually creates a font smaller than 8pt, so use 82% */
-	font-size: 82%;
-}
-.heading {
-	margin-top: 0.6em;
-	font-size: 120%;
-	font-weight: bold;
-}
-.notopmargin {
-	margin-top: 0;
-}
-.indent {
-	margin-left: 2em;
-}
-PRE.nomargin {
-	margin: 0;
-}
-LI.compact {
-	margin-bottom: 2px;
-}
-
-.topicheading {
-	background: ButtonFace;
-	color: WindowText;
-	padding: 4px 8px;
-	margin: 0;
-	font-size: 120%;
-	font-weight: bold;
-}
-.topicbody {
-	padding: 8px;
-}
-
-.examplebox {
-	background: #f8f8f8;
-	color: black;
-	padding: 4px;
-	border: 1px solid #e0e0e0;
-	/* on IE6, if the content of the box is wider than the page,
-	   the width of the box is increased. on firefox 1.5, by default
-	   the box width stays the same, and the content is drawn outside
-	   the box. that looks ugly. "overflow: auto" tells it to put a
-	   scroll bar on the box when the content is too wide. (IE6
-	   apparently ignores "overflow: auto", at least here.) */
-	overflow: auto;
-}
-.exampleheader {
-	font-size: 82%;
-	font-weight: bold;
-	margin-bottom: 0.6em;
-}
-
-
-DT.paramlist {
-	margin-bottom: 0.6em;
-}
-DD.paramlist {
-	/* give a little extra spacing between items */
-	margin-bottom: 1.2em;
-}
-
-DT.flaglist {
-	font-weight: bold;
-}
-
-TD.cellleft {
-	white-space: nowrap;
-}
-TD.cellright {
-	padding-left: 2em;
-}
-
-TABLE.setuphdr {
-	margin: 0;
-}
-TD.setuphdrl {
-	font-weight: bold;
-	white-space: nowrap;
-}
-TD.setuphdrr {
-	padding-left: 1em;
-}
-
-
-#redirectbox {
-	position: absolute;
-	background: InfoBackground;
-	color: InfoText;
-	padding: 16px 24px;
-	border: 1px solid ThreeDDarkShadow;
-	font-size: 120%;
-	font-weight: bold;
-	        box-shadow: #808080 0 0 12px;
-	   -moz-box-shadow: #808080 0 0 12px;	/* for Firefox 3.6 */
-	-webkit-box-shadow: #808080 0 0 12px;	/* for Chrome 6.0 */
-}

+ 0 - 72
ISPPHelp/compile.bat

@@ -1,72 +0,0 @@
-@echo off
-
-rem  Inno Setup Preprocessor
-rem  Copyright (C) 2001-2004 Alex Yackimoff
-rem  Portions by Martijn Laan
-rem
-rem  Batch file to compile the help file
-
-setlocal
-
-cd /d %~dp0
-
-if exist compilesettings.bat goto compilesettingsfound
-:compilesettingserror
-echo ISPPHelp\compilesettings.bat is missing or incomplete. It needs
-echo to be created with the following lines, adjusted for your system:
-echo.
-echo   set HHCEXE=%%ProgramFiles%%\HTML Help Workshop\hhc.exe   [Path to help compiler]
-goto failed2
-
-:compilesettingsfound
-set HHCEXE=
-call .\compilesettings.bat
-if "%HHCEXE%"=="" goto compilesettingserror
-
-rem -------------------------------------------------------------------------
-
-echo Synching IS files:
-echo.
-call synch-isfiles.bat nopause
-if errorlevel 1 goto failed
-
-echo Synching dark files:
-echo.
-call synch-darkfiles.bat
-if errorlevel 1 goto failed
-
-call :generate_help
-if errorlevel 1 goto failed
-call :generate_help -dark
-if errorlevel 1 goto failed
-
-echo Success!
-exit /b 0
-
-:generate_help
-echo Generating help files using ISHelpGen:
-echo.
-..\ISHelp\ISHelpGen\ISHelpGen.exe . %1
-if errorlevel 1 exit /b 1
-
-echo.
-echo Running HTML Help Compiler (hhc.exe):
-echo.
-del Staging%1\ispp%1.chm
-if exist Staging%1\ispp%1.chm exit /b 1
-"%HHCEXE%" Staging%1\hh_project.hhp
-if %errorlevel% neq 1 exit /b 1
-if not exist Staging%1\ispp%1.chm exit /b 1
-
-rem  HHC leaves behind a temporary file each time it runs...
-if exist "%TEMP%\~hh*.tmp" del /q "%TEMP%\~hh*.tmp"
-
-copy Staging%1\ispp%1.chm ..\Files\ISPP%1.chm
-if not exist ..\Files\ISPP%1.chm exit /b 1
-
-exit /b 0
-
-:failed
-echo *** FAILED ***
-:failed2
-exit /b 1

+ 0 - 15
ISPPHelp/synch-darkfiles.bat

@@ -1,15 +0,0 @@
-@echo off
-
-cd /d %~dp0
-
-echo - Synching files from Staging to Staging-dark
-
-copy Staging\contents-template.htm Staging-dark
-copy Staging\index.htm Staging-dark
-copy Staging\index.php Staging-dark
-
-echo - Synching files done
-
-if "%1"=="nopause" goto :eof
-
-pause

+ 0 - 31
ISPPHelp/synch-isfiles.bat

@@ -1,31 +0,0 @@
-@echo off
-
-cd /d %~dp0
-
-echo - Synching files from ISHelp to ISPPHelp
-
-copy ..\ISHelp\isetup.dtd
-call :synch_files
-call :synch_files -dark
-
-echo - Synching files done
-
-if "%1"=="nopause" goto :eof
-
-pause
-
-exit /b 0
-
-:synch_files
-
-copy ..\ISHelp\Staging%1\contents.css Staging%1
-copy ..\ISHelp\Staging%1\contents.js Staging%1
-copy ..\ISHelp\Staging%1\stoplist.stp Staging%1
-copy ..\ISHelp\Staging%1\styles.css Staging%1
-copy ..\ISHelp\Staging%1\topic.js Staging%1
-copy ..\ISHelp\Staging%1\images\contentsheadclosed.png Staging%1\images
-copy ..\ISHelp\Staging%1\images\contentsheadopen.png Staging%1\images
-copy ..\ISHelp\Staging%1\images\contentstopic.png Staging%1\images
-copy ..\ISHelp\Staging%1\images\extlink.png Staging%1\images
-
-exit /b 0