Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / Is there a documentation.chm?
- - By Gamer [de] Date 2013-02-20 14:21
I'm aware of that the current C4Script Documentation is located at http://docs.openclonk.org/en/sdk/ , but I want to download this as a .chm, like the one Redwolf Design distributes (http://www.clonkx.de/rage/cr_developer_de.zip).
If not, is there an easy way to copy the contents of the online documentation into a .chm file? I would really need this to finnish my selfwritten c# editor for openclonk (current state: http://s14.directupload.net/images/130220/r6eagd3f.png , as soon as I finish the main features I will release it).
Parent - By Zapper [de] Date 2013-02-20 14:26
It should be possible to build one yourself.

If you know how to build stuff in general, check out the Makefile in our repository in /docs/.

# Enwickler.chm: the German offline doc
#                use with make Entwickler.chm HHC = /path/to/hhc


I am not sure whether this still works, though. Did anyone try that already?
Parent - By ker [de] Date 2013-02-20 14:27
the git repository contains the docs in some xml format that you could use.
if you want a chm file, there is a chm make target in the Makefile of the docs folder in the repository. I'm not sure how to build that though, it requires a "hhc.exe".
Parent - - By Gamer [de] Date 2013-02-20 15:56 Edited 2013-02-20 16:06
Okay, so after Installing cygwin and installing all the dependecies I've got stuck.
after cd'ing to the /doc/ directory on my Windows drive through cygwin and just typing "make", I could compile the "online" folder correctly.
But if I type
$ make Entwickler.chm HHC="/cygdrive/c/Program Files (x86)/HTML Help Workshop/hhc.exe"
It turns out that way:
make: *** Keine Regel, um »Entwickler.chm« zu erstellen.  Schluss. ("No Rules to compile "Entwickler.chm". Ending")
It also doesn't work when I write Entwickler.chm in any other way ("entwickler.chm", or as written in the Makefile "Enwickler.chm"

Suprisingly, that note still exists.
# Notable targets:
# all (default): German and English onlinedocs
# online-en: only English onlinedocs, which can be partially updated
# Enwickler.chm: the German offline doc
#                use with make Entwickler.chm HHC = /path/to/hhc

I did exactly as I was told, but all I get is that Entwickler.chm is no target. :(

/*Edit*/
Even making the online folder wasn't quite sucessfull. It ends like this:
..
generate online/en/sdk/script/fn/while.html
generate online/en/sdk/script/for.html
generate online/en/sdk/script/index.html
generate online/en/sdk/script/operatoren.html
generate sdk/content.xml
Makefile:66: recipe for target `sdk/content.xml' failed
make: *** [sdk/content.xml] Aborted

But I did Install ALL the dependecies mentioned in README.cygwin.txt -.-
Parent - - By ker [de] Date 2013-02-20 16:25
it is "make chm"
Parent - - By Gamer [de] Date 2013-02-20 16:41
Thanks. Still, I can't compile them.

generate sdk-de/script/index.xml
generate chm/de/sdk/script/index.html
generate sdk-de/script/operatoren.xml
generate chm/de/sdk/script/operatoren.html
cp bitmasks.js chm/de/bitmasks.js
cp doku.css chm/de/doku.css
cp images/AnimationStack.png chm/de/images/AnimationStack.png
cp images/AnimationStack.svg chm/de/images/AnimationStack.svg
..
"/cygdrive/c/Program Files (x86)/HTML Help Workshop/hhc.exe" chm/de/Output.hhp
Microsoft HTML Help Compiler 4.74.8702

Compiling c:\Users\Maxi\Desktop\openclonk-release-5.3.2-src\docs\chm\de\Entwickler.chm

HHC5003: Error: Compilation failed while compiling sdk\.
HHC5003: Error: Compilation failed while compiling sdk\script.

The following files were not compiled:
sdk\(shitload of files)

So, the Entwickler.chm GETS CREATED, but it's not complete. The "functions by category" page is there in the index but not openable, and "functions by version" is completly missing. I think that's because some other files before couldn't compile correctly (see after "Edit" in Post above) in the docs\chm\de folder, there are the folders "images" (filled correctly), "sdk" (which also includes all the Functions in .html format which aren't included in the Entwickler.chm), and the files bitmasks.js, doku.cs, Entwickler.chm, Output.hhc, Output.hhk and Output.hhp.

Repeating the command results in
generate sdk/content.xml
Makefile:66: recipe for target `sdk/content.xml' failed
make: *** [sdk/content.xml] Aborted
make: *** Datei »sdk/content.xml« wird gelöscht

I can't seem to compile this fucking .chm correctly myself.  I can only beg for someone with better Cygwin shell skills. HHC can be obtained by installing http://go.microsoft.com/fwlink/?LinkId=14188 , by the way.
Parent - - By Caesar [de] Date 2013-02-20 20:21
Mh. If you only want a local copy, you already have one.
Parent - - By Gamer [de] Date 2013-02-20 21:00
Right now I'm compiling inside a BackTrack 5 R3 (Ubunti 10.04) virtual machine via VirtualBox.
And it seems to Fucking Work.

YAY!
Atleast I could just compile the Developer.chm by making the Output.hhp with my VirtualMachine and then copying all the files back and Executing hhc.exe on that File!
Cygwin is still failing hard, claiming that compression failed and doesn't even want to get started on the german .chm.
But yeah, I got the English .chm now.
To everybody who wants one: http://www.mediafire.com/download.php?2jgcbvgebyajrf6

Log from failing Cygwin:
$ make chm HHC=/cygdrive/c/Users/Maxi/Desktop/docs/docs/chm/en/hhc.exe
generate chm/en/Output.hhp
"/cygdrive/c/Users/Maxi/Desktop/docs/docs/chm/en/hhc.exe" chm/en/Output.hhp
Microsoft HTML Help Compiler 4.74.8702

Compiling c:\Users\Maxi\Desktop\docs\docs\chm\en\Developer.chm

Compile time: 0 minutes, 4 seconds
1,314   Topics
4,441   Local links
3       Internet links
3       Graphics

Created c:\Users\Maxi\Desktop\docs\docs\chm\en\Developer.chm, 520,764 bytes
Compression decreased file by 951,857 bytes.
Makefile:125: recipe for target `chm/en/Developer.chm' failed
make: *** [chm/en/Developer.chm] Error 1
(File was rendered perfeclty)
Parent - By Günther [de] Date 2013-02-21 22:45

> Makefile:125: recipe for target `chm/en/Developer.chm' failed
> make: *** [chm/en/Developer.chm] Error 1
> (File was rendered perfeclty)


Yeah, hhc.exe likes to claim that it failed despite not failing. Apparently nobody expected people to use it in Makefiles. Perhaps we should just always ignore its return value.
Reply
Parent - - By Günther [de] Date 2013-02-21 22:33 Edited 2013-02-21 22:42
Could you attach the erroneous Output.hh* files? Maybe I can fix the problem - it has been a while since anybody tested this, and the changes to generate the content.html file for the online help could certainly have broken some things. In the meantime, I've updated the build docs, thanks for reporting their problems.
Reply
Parent - - By Gamer [de] Date 2013-02-22 14:50
Of course I can do that, Günther.
Please find the attached docs.zip in this post.
To clearify it again: These files were produced by obtaining the LATEST SOURCE with mercuarial (or something like that), Installing ALL THE DEPENDECIES mentioned in Cygwin.Readme.txt with the BackTrack 5 R3 system (That's bascly Ubuntu 10.04). Of course, my Linux system can't execute the .exe file (I tried). So that's why I copied the "make"d Files from Backtrack back to my Windows System. I then started the Cygwin shell (I also installed all mentioned dependcies there) and provided the link to the hhc.exe. It compiled the Developer.chm which is located in chm/en/ . It then aborted because of the "Error" above.

I hereby license the file docs.zip under the CC-BY license
Attachment: docs.zip (4158k)
Parent - - By Günther [de] Date 2013-02-22 23:35
No, I meant the Output.hh* files produced by the cygwin tools. They presumably cause this error:

> HHC5003: Error: Compilation failed while compiling sdk\.
> HHC5003: Error: Compilation failed while compiling sdk\script.


The later problem that the Makefile stops after hhc returned a spurious error is known, and can be worked around by using make -k, or making the Makefile ignore hhc errors.
Reply
Parent - - By Gamer [de] Date 2013-02-23 11:50
Oh, sorry for that.
So I just made a "make clean" and then started compiling again.

Maxi@Maxi-PC /cygdrive/c/Users/Maxi/Desktop/docs/docs
$ make chm HHC="/cygdrive/c/Program Files (x86)/HTML Help Workshop/hhc.exe"
mkdir -p sdk-de
mkdir -p sdk-de/definition
mkdir -p sdk-de/folder
mkdir -p sdk-de/material
mkdir -p sdk-de/particle
mkdir -p sdk-de/scenario
mkdir -p sdk-de/script
mkdir -p sdk-de/script/fn
mkdir -p chm/en/.
mkdir -p chm/en/sdk
mkdir -p chm/en/sdk/definition
mkdir -p chm/en/sdk/folder
mkdir -p chm/en/sdk/material
mkdir -p chm/en/sdk/particle
mkdir -p chm/en/sdk/scenario
mkdir -p chm/en/sdk/script
mkdir -p chm/en/sdk/script/fn
mkdir -p chm/en/images
mkdir -p chm/de/.
mkdir -p chm/de/sdk
mkdir -p chm/de/sdk/definition
mkdir -p chm/de/sdk/folder
mkdir -p chm/de/sdk/material
mkdir -p chm/de/sdk/particle
mkdir -p chm/de/sdk/scenario
mkdir -p chm/de/sdk/script
mkdir -p chm/de/sdk/script/fn
mkdir -p chm/de/images
generate chm/en/Output.hhp
generate sdk/content.xml
Makefile:66: recipe for target `sdk/content.xml' failed
make: *** [sdk/content.xml] Aborted
make: *** Datei »sdk/content.xml« wird gelöscht

It just created a 17 kB Output.hhp with links to HTML files in it.  Zipped File is attached to this post.

I hereby license the file docs_cygwin.zip under the CC-BY license
Attachment: docs_cygwin.zip - Docs Cygwin (823k)
Parent - - By Günther [de] Date 2013-02-23 18:55
Huh, a Python problem. That's odd. Do you use a cygwin python, a windows python, something else? There's an (empty) "python2.7.exe.stackdump" file in the archive, but I don't know what it signifies. In any case, the Output.hhp files are identical (except for some extra lines) to the one my setup produces, and identical to the one from your other zip, so the problem presumably isn't there. Though it might be worth to look out for the mixed line-endings in the file.
Reply
Parent - - By Gamer [de] Date 2013-02-23 20:41
In order to use Blender 2.49 with the ogre mesh exporter I installed Python 2.6.2 on my windows pc.
In cygwin:
$ python -V
Python 2.7.3
Parent - - By Caesar [de] Date 2013-02-23 22:28
I hope that cygwin installed its own python, anyway, could you do whereis python
Parent - - By Gamer [de] Date 2013-02-23 22:31
$ whereis python
-bash: whereis: Kommando nicht gefunden. (Command not found)

I think you meant
$ which python
/usr/bin/python
Parent - By Caesar [de] Date 2013-02-23 22:34
Again what learned, cygwin does not have whereis. :/
Parent - - By Günther [de] Date 2013-02-23 23:22
So presumably you've installed a cygwin python. There may be conflicts between them, but I don't think that's likely. In any case, the problem could be sporadic - you've reported two different errors - so does calling make multiple times help?

I've also experimented with hhc under wine, and the exit code seems to be simply inverted instead of "always error", so changing
  "$(HHC)" $<
to
  ! "$(HHC)" $<
at the bottom of the Makefile will correct the other problem. (I'll push that soonish.) And after some prodding, wine is able to execute hhc.exe properly and create the .chms.
Reply
Parent - - By Gamer [de] Date 2013-02-24 11:25 Edited 2013-02-24 11:27
Another interresting thing:
If I change the last 2 lines to directly execute wine hhc.exe it still doesn't create the .chm but it moves on to create all the Output.hh* files for the german docs.
I changed
"$(HHC)" $<
to
wine "/root/Downloads/hhc.exe" $<

Moving the files back to windows and callling hhc.exe upon them creates the files. Wine doesn't seem to be working with hhc.exe very well, although I copied the demanded "HHA.dll". It just says

root@bt:~/Desktop/openclonk/docs# make chm HHC="/root/Downloads/hhc.exe"
wine "/root/Downloads/hhc.exe" chm/en/Output.hhp
fixme:itss:ITStorageImpl_SetControlData 0x130ef0
HHC5010: Error: Cannot open "z:\root\Desktop\openclonk\docs\chm\en\Developer.chm". Compilation stopped.
Unable to open chm/en/Output.hhp.generate chm/de/Output.hhp
wine "/root/Downloads/hhc.exe" chm/de/Output.hhp
fixme:itss:ITStorageImpl_SetControlData 0x130ef0
HHC5010: Error: Cannot open "z:\root\Desktop\openclonk\docs\chm\de\Entwickler.chm". Compilation stopped.

Calling hhc.exe with wine seems to have worked.
$wine /root/Downloads/hhc.exe
Usage:   hhc <filename>
    where <filename> = an HTML Help project file
Example: hhc myfile.hhp
On this BackTrack system I'm running Python 2.6.5 btw.
But yeah, although it was complicated: I now have BOTH Developer.chm and Entwickler.chm :)
To everyone who wants a Entwickler.chm: http://www.mediafire.com/?ad5wsh1493k7d46
Parent - By Günther [de] Date 2013-02-24 14:52
Oh, you're also using wine? I should've linked the webpage describing how to get hhc.exe working. (I replaced step 4 with "winetricks mfc40".) The wine implementation of itss.dll is deficient, presumably enough to display chms and fool hhc.exe, but not enough to produce chms.

But what I'd really be interested in is somebody testing the current state of the repository on cygwin, calling make multiple times if python inexplicably fails.
Reply
Up Topic Development / Developer's Corner / Is there a documentation.chm?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill