flat assembler
Message board for the users of flat assembler.

Index > IDE Development > Fresh Programmer's Guide issues

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
I've implemented support for CHM help, but it still requires some modifications. I've done quite a lot of changes, I'm writing what exactly I have done to make implanting it easy:

1. I moved OnHelp event from actions.asm file to new help.asm.
2. I set Fresh stack to 0x10020 (with just 64K it didnt want to work - argghhh, Micro$uck... Mad)
3. Added code (in fresh.asm) that creates variable containing Fresh directory - it should be useful in future - but temporary it uses GetCurrentDirectory, so it may cause problems. What would be the best way to obtain Fresh dir? Parsing command line?
4. Converted htmlhelp.h to fasm format - it must be placed in include/win32/equates directory.
5. Added MAX_PATH definition to kernel32.inc file from above dir.
6.In Fresh directory folder named 'doc' must be created and freshguide.chm file must lie there.
All modified files files are included in attachement.

If everything will be set properly, pressing F1 will search freshguide.chm for given keyword, and if this lookup fails, it will search file chosen in 'appearance options'.

uffff Wink

oh, and I made updates to the Guide itself Smile

regards,
decard

outdated attachement removed.


Last edited by decard on 03 Feb 2004, 17:39; edited 1 time in total
Post 27 Jan 2004, 20:20
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Hi Decard.
Really impressive work. Smile
I implemented it and it works good at least in Win98.
I only don't like this variable hFreshDirectory and the way you set it's via "GetCurrendDir".

There are better variants. I suggest you two:
1. Use another line in [Environment] section of Fresh.ini (for example: "FreshDoc") and to use "%FreshDoc%/freshguide.chm" as file name.
Then you have to pass this name to ConvertPath function (it is in Fasm.asm file) - it will return handle to string with full path name to the file. (Don't forget to delete it.)

2. Leave this variant, but move everything related in help.asm and create the full path/file name of the freshguide.chm in InitHelp procedure, using not GetCurrentDir, but GetModuleFileName the same way as hApplication window ( include/libs/application.asm - WM_CREATE handler) when it gets the name of Fresh INI file.

Also, I think that in the future, we have to add Privalovs documentation about FASM syntax to your chm file to allow help on the FASM keywords too.

Regards.
Post 27 Jan 2004, 22:00
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
OK, I'll follow variant #2.
But why don't you want to have a global variable containing Fresh directory? It would be useful in future - for example to access directory with templates...

regards
Post 27 Jan 2004, 22:11
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
decard wrote:
But why don't you want to have a global variable containing Fresh directory?


Well, IMHO it is not flexible enough. It ties the help file to the executable location and it is not very good. For example, when I work on Fresh, I compile it in the directory "source" and first I run it from this directory. But in "source" your help don't work. I have to make second copy of freshguide.chm in "source/doc/" to make it work.
BTW: I think that seting environment variables have another problems, but it will be fixed later.

Regards.
Post 27 Jan 2004, 22:20
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
JohnFound wrote:
Also, I think that in the future, we have to add Privalovs documentation about FASM syntax to your chm file to allow help on the FASM keywords too.


BTW: I just remember, there is a port of FASM docs to CHM, made by IceStudent, maybe you have to contact him, and simply add his file to yours.

Regards.
Post 27 Jan 2004, 22:29
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
JohnFound wrote:
It ties the help file to the executable location and it is not very good.

Both solutions have their advantages and disadvantages. I don't like to make user set one more variable in fresh.inc. And proably "ordinary" Fresh users will almost always run our IDE from its main directory. So I will make it this way: I will check fresh.ini for %freshdoc% variable, and if it won't exist, I will look for it in main Fresh directory.

JohnFound wrote:
Also, I think that in the future, we have to add Privalovs documentation about FASM syntax to your chm file to allow help on the FASM keywords too.

Yeah, but first I must think about the way how to do it. Now I would like to make some better (commented!!!) examples, and make some corrections in existing Guide.
Also, I want the help system to display help even when user selects some assembler instruction, but I would have to add each instruction to keyword file manually Sad.
Post 27 Jan 2004, 23:04
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
decard wrote:
I will check fresh.ini for %freshdoc% variable, and if it won't exist, I will look for it in main Fresh directory.


That is exactly what we need. Smile Good approach. BTW: You still can try "ConvertPath" for this. It checks Fresh.ini AND also environment, the same way as FASM compiler.

Regards
Post 27 Jan 2004, 23:16
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
I made the changes that we were talking about. Also, this required some changes in StrLib - I'm attaching new version here.

regards

outdated attachement removed.


Last edited by decard on 03 Feb 2004, 17:38; edited 1 time in total
Post 28 Jan 2004, 20:49
View user's profile Send private message Visit poster's website Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
New version of the Fresh Guide here. I included FASM manual, but I still have a lot of work on keyword list. However, some of FASM directives are already added, so you can have a contex help when you point for example "virtual" directive Wink

regards

[edit]outdated attachment removed[/edit]


Last edited by decard on 18 May 2004, 20:07; edited 1 time in total
Post 03 Feb 2004, 17:37
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Great!
Post 03 Feb 2004, 17:49
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.