PDF Viewer DLL?
Moderator: Rathinagiri
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Re: PDF Viewer DLL?
Very good to make mention in the posted message.
Nice !SumatraPDF as library 32-bit:
SumatraPDF_lib_32bit.zip
Excellent work, Krzysztof !
I liked that you left in "Settings" the option "Open PDF at once" (GRID event ON CHANGE) and other options as well. Availability in a correct and objective manner in my POV.
I would like to add how directives could be done for those who use the IDE and/or want to still use the batch file for compilation and still maintain the settings that you include in the HBP (project file).
I have noted that you use directives in the hbp file very often. But this when is being used the IDE for compiling, is completely lost. You can check the Build.log file and see in it (not recognize these directives.
I clarify this because there are some colleagues who use the compilation (as well as me) and could find some difficulty.
Harbour and more precisely the IDE allows you to do the compiler directives through the HBC file.
I read about each one of them and I even tested and removed each one of them but I think maybe they are not necessary because (I believe) Harbour defaults these directives:
Code: Select all
#harbour options:
-a
-m
-n
-v
-w3
#hbmk2 options:
#-compr
All this is still new to me (hbc use), if you believe so needed, could you please explain why these "harbour options" are used for in your project ?
I have done (please revise it if it's correct) the following changes:
- I have created a sub-folder named lib at current project's folder and placed your libSumatraPDF.a file lib.
- For PdfView.hbc:
Please note this is the right way to be used when wish to compress it or using max flag option.
Code: Select all
libpaths=lib libs=SumatraPDF prgflags=-w3 #compr=min
prgflags can be added (with space character between each "harbour options").
- For PdfView.hbp:
Code: Select all
pdfview.prg
- For PdfViewBuild.cmd:
Please note that PdfView.hbc was added. So it's going to work by IDE and by batch file in building process.
Code: Select all
call C:\hmg.3.4.4\build.bat PdfView.hbp PdfView.hbc
- And renamed a typo in name of SumatraPDFLibBuild32.cmd.
It also good to say that HMGPATH is needing for change folder name according with our HMG installation.
I am in doubt if these directives are so necessary but be that any case, these changes that I indicate may be useful for the future.
However I want to clarify that your batch files files work very well.
Given the other way of compilation in Harbour and consequently in HMG.
Thank you very much Krzysztof for this brillant work.
Dzięki!
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- serge_girard
- Posts: 3166
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: PDF Viewer DLL?
Hi Pablo
I do not use HMG IDE.
For compiling I use .cmd (.bat) and .hbp files.
In .hbp you can place all options for compiler and linker, so .hbc file is unnecessary.
And you can place libSumatraPDF.a library in HMGdirectory\lib.
I do not use HMG IDE.
For compiling I use .cmd (.bat) and .hbp files.
In .hbp you can place all options for compiler and linker, so .hbc file is unnecessary.
And you can place libSumatraPDF.a library in HMGdirectory\lib.
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Re: PDF Viewer DLL?
Hi Krzysztof,
Otherwise all directives that you put in hbp file will be lost and in hbc file is not the say way as you do in hbp.
What I tried to say is this project have been done ready to be compiled by batch file and not for IDE. But even losing those directives in IDE, will compile anyway because those directives are not so necessary be setted (I guess).
You do not use IDE to compile, but there are many who use it a lot. And to meet those users I've clarified how to make it workable without losing the settings options for IDE building. So I asked to you for an explanation of these directives.
Yes but to work properly with the IDE must be present hbc. It's what I already said.
Otherwise all directives that you put in hbp file will be lost and in hbc file is not the say way as you do in hbp.
What I tried to say is this project have been done ready to be compiled by batch file and not for IDE. But even losing those directives in IDE, will compile anyway because those directives are not so necessary be setted (I guess).
You do not use IDE to compile, but there are many who use it a lot. And to meet those users I've clarified how to make it workable without losing the settings options for IDE building. So I asked to you for an explanation of these directives.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Re: PDF Viewer DLL?
If you make a test opening this project at IDE and after you builded, will run ok but check again the hbp file you will see all those setting will be lost.
This is the main reason of .hbc files. At least important for whom use IDE on compiling process.
This is the main reason of .hbc files. At least important for whom use IDE on compiling process.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Re: PDF Viewer DLL?
OK, Pablo. Check whether this will be good:
However I do not understand why IDE changes .hbp file content.
It also changes .rc content.
And how to create library (eg. libSumatraPDF.a) via IDE?
However I do not understand why IDE changes .hbp file content.
It also changes .rc content.
And how to create library (eg. libSumatraPDF.a) via IDE?
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Re: PDF Viewer DLL?
I think it's great !
I think the IDE should only write when they are changed through the IDE.
But what I think is still very bad is when the DBF files are not lberados even leaving the table manager, HMG Report Builder and also occurs with the project folder, which even closing the project does not release. This was pointed out in: viewtopic.php?p=47543#p47543
I have no difficulty in compiling other projects unless at least some of the files are missing.
Sorry to bother you, I just wanted you to know why I've noticed that in your previous projects you used to do that (not that this could be wrong in Harbour) but and some colleagues could find the same problem at missing directives.
Thank Krzysztof.
Unfortunately, IDE always changes these files.However I do not understand why IDE changes .hbp file content.
It also changes .rc content.
I think the IDE should only write when they are changed through the IDE.
But what I think is still very bad is when the DBF files are not lberados even leaving the table manager, HMG Report Builder and also occurs with the project folder, which even closing the project does not release. This was pointed out in: viewtopic.php?p=47543#p47543
In POV I do not think so necessary. Because it's make it at once.And how to create library (eg. libSumatraPDF.a) via IDE?
I have no difficulty in compiling other projects unless at least some of the files are missing.
Sorry to bother you, I just wanted you to know why I've noticed that in your previous projects you used to do that (not that this could be wrong in Harbour) but and some colleagues could find the same problem at missing directives.
Thank Krzysztof.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein