Still not made open source: The help project files :-)

Started by Monsieur OUXX, Wed 13/06/2012 14:48:50

Previous topic - Next topic

Monsieur OUXX

Chris, how could you do that to the community? How could you not release the most important part of the AGS source code? The most intricate and critical part of the project? Is this what you dare calling an open-source project?

At this stage, everybody has understood I was talking about the Help project files -- the files meant for Microsoft's HTML Help workshop.  :=
Well, I suppose that's the tool you used to generate the .chm file. Am I correct? If so, did I miss the subfolder where the files are kept?

With the current technology, a .chm file is easily decompiled, but not easily recompiled.
 

monkey0506

Liar. Stop spreading your filthy words against CJ. The manual has been open sourced for some time. Did you even bother looking in the SVN? :P

Calin Leafshade

The manual needs rewriting. CHM is lol.

Off you go frenchy.

Monsieur OUXX

#3
Quote from: monkey_05_06 on Wed 13/06/2012 15:09:01
The manual has been open sourced for some time. Did you even bother looking in the SVN? :P

You call me a liar? Your mom! Actually that's exactly where I looked. I checked out the non-native stuff (it was a checkout from several months ago) and performed a search on "*.hhp". I'll look again.
EDIT : found it immediately. I don't know what on earth was in my other checkout, maybe just the Editor source. (I can't check, it's on another computer in another house :-D). Also I'm impressed that the .hhp is generated on the fly.

Quote from: Calin Leafshade on Wed 13/06/2012 18:25:03
The manual needs rewriting. CHM is lol. Off you go frenchy.

The advantage of this format is that it's all-in-one (thesaurus + index + search). But a change is welcome, and it's the right time, because I've read many reports of hhc.exe crashing on Windows 7. Any recommendations for a [compact enough] web-based equivalent?
EDIT: actually I'll create a new thread for that.
 

Monsieur OUXX

#4
To anyone who has commit access to the repository : Here is an enhanced version of trunk/Manual/run.cmd

If does 2 new things :

  • All output is put into a "output" subfolder (otherwise it produces a hundred files in the same folder)
  • At the end it asks you explicitly if you want to run hhc.exe

Code: AGS


rem version 1.4

@echo off
if not exist output mkdir output
if not exist .\output\images mkdir .\output\images

echo _  
echo ===========
echo The output will be placed in folder "output".
echo ===========
echo _
pause
@echo on

copy .\images\*.* .\output\images\.
copy .\*.gif .\output\.

start /WAIT tex2rtf.exe ags.tex .\output\ags.html -html -sync
move *.con .\output\.
 
striphdr htmlfiles\actutor.htm .\output\ags29.htm
striphdr htmlfiles\actutor2.htm .\output\ags30.htm
 
copy procdocs.exe .\output\procdocs.exe
cd output
procdocs.exe
del procdocs.exe
 
cd ..
cd htmlfiles
for %%i in (acintro*.htm) do ..\striphdr %%i ..\output\%%i
 
cd ..\output
for %%i in (acintro*.htm) do echo %%i >>ags.hhp
echo ..\images\*.jpg >>ags.hhp
echo ..\images\*.gif >>ags.hhp
 
@echo off
echo _
echo ===========
echo You must now choose if you want to compile the project into a .CHM file.
echo It will use the old "hhc.exe" utility.
echo (it might not always work if HTML Help workshop 4.74.8702.0
echo is not installed on this machine and/or if you use windows 7).
echo ===========
echo _

:decide
	set /p choice=Do you want to compile? (Y/N)
	 
	if "%choice%"=="Y" goto compile
	if "%choice%"=="y" goto compile
	if "%choice%"=="N" goto nocompile
	if "%choice%"=="n" goto nocompile
goto decide

:nocompile
	@echo off
	echo _
	echo You skipped compiling.
	echo _
goto askclean
 
	 
:compile
	rem current folder = ./output
	@echo on
	copy ..\hhc.exe .
	copy ..\hha.dll .
	hhc ags.hhp
	del hhc.exe
	del hha.dll
goto askclean
   
   
:askclean
	@echo off
	echo _
	echo ===========
	echo Do you want to clean the temporary files?
	echo  - Choose No if you plan on compiling the .hhp file with
	echo    an alternative tool such as Precision Helper.
	echo  - Choosing Yes will leave only the .CHM help file (if it
	echo    has been compiled) in the "output" folder.
	echo ===========
	echo _
	   
	   
:decide2
	set /p choice=Do you want to clean temporary files? (Y/N)
	 
	if "%choice%"=="Y" goto clean
	if "%choice%"=="y" goto clean
	if "%choice%"=="N" goto noclean
	if "%choice%"=="n" goto noclean
goto decide2


:clean
	echo You decided to clean.
	@echo on
	rem current folder = ./output
	del *.htm
	del *.con
	del ags.hh*
	del ags.htx
	del ags.ref
	del *.gif
	rmdir /s /q images
goto end

:noclean
	@echo off
	echo _
	echo You skipped cleaning.
	echo _
goto end
   
:end
	@echo off
	echo _
	echo Finished.
	echo _
	echo ===========
	echo IMPORTANT NOTES:
	echo If you compile the .hhp file with Precision Helper,
	echo    1) Don't forget to sort the Index alphabetically 
	echo       using the GUI.
	echo    2) If you build a HTML help, don't forget to copy
	echo       the "images" folder into the folder where 'index.htm'
	echo       is located.
	echo ===========
	echo _
	pause
 
 



EDIT: The file above has been updated to version 1.1
EDIT: The file above has been updated to version 1.2
EDIT: The file above has been updated to version 1.4
 

Monsieur OUXX

 

monkey0506

What's the point of updating this if the HAT is being replaced anyway?

Spoiler
There, I responded. -_-
[close]

Monsieur OUXX

Quote from: monkey_05_06 on Mon 18/06/2012 20:00:07
What's the point of updating this if the HAT is being replaced anyway?

Is the HAT replaced yet? :-)
At the moment even the new HTML-based help is generated from the .hhp project. It's human-error prone. And as you can see the new .cmd gives useful advice.
 

BigMc

If you want this to be included in the git repository send a pull request or ask JJS to give you commit access.

Crimson Wizard

Quote from: BigMc on Thu 21/06/2012 15:39:42
If you want this to be included in the git repository send a pull request or ask JJS to give you commit access.
I guess this was never submitted to git repository?

Both points Monsieur OUXX mentioned sound right (especially moving all the clutter to other folder).

Crimson Wizard

Does anyone have an idea what program should be normally used to edit the "ags.tex" file?
I tried couple of TeX editing applications (LaTeX and LyX), but either I do something wrong, or these are not what I need; in LaTeX I can only see the text source as I do in any notepad (with various markup tags) and LyX, while allows some kind of "WYSIWYG" preview, fails to parse the format properly, as it seems, or the format is incorrect, because on many occasions there's an inconsistent formatting applied.

BigMc

Yes, tex files are just text files and edited with text editors. They are source code for generating documents in other formats. Personally I use pdflatex (available in any Linux distribution) to generate pdfs from tex files.

This tex file is in another TeX or LaTeX dialect that works only with tex2rtf as far as I know. You can generate the htm files from the ags.tex on Linux with the compile_documentation_unix.sh I created and on Windows it should somehow work with the tex2rtf.exe that is included in the same folder.

EDIT: Ah yes the Windows equivalent to compile_documentation_unix.sh is run.cmd, but I never tested it.

SMF spam blocked by CleanTalk