#PB_Compiler_File
#PB_Compiler_File
I do not know if there is a problem with jaPBe (build 3.7.9.666), PB4.00, a combination or them; or its my stupidity...
<#PB_Compiler_File> now appears to return the following for several different projects:
c:\programfiles\purebasicrev4\compilers\pb_editoroutput2.pb
instead of:
n:\projects\networkstuff\simulator2\my_projectRevx.pb
Can anyone point me to a solution?
Thanks
NOTE: I use #PB_Compiler_File to put the source file into Help\About on all my projects so each one carries the source file identity, I have found this very useful in major jobs.
<#PB_Compiler_File> now appears to return the following for several different projects:
c:\programfiles\purebasicrev4\compilers\pb_editoroutput2.pb
instead of:
n:\projects\networkstuff\simulator2\my_projectRevx.pb
Can anyone point me to a solution?
Thanks
NOTE: I use #PB_Compiler_File to put the source file into Help\About on all my projects so each one carries the source file identity, I have found this very useful in major jobs.
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
#PB_Compiler_File returns the compiled file, and "pb_editoroutput2.pb" is the file compiled by jaPBe.
I don't know if I can change this, since #PB_Compiler_File is defined by the compiler.
I don't know if I can change this, since #PB_Compiler_File is defined by the compiler.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
The bugs forum is not for jaPBe bugs. Only for the PB Package.
Using the PB IDE, it will display the real filename since one of the 4.10 betas.
In 4.0x it was the same as you describe.
@gnozal:
Look at the 'SOURCEALIAS' command in the Library SDK\CompilerInterface.txt
There you can modify the value of #PB_Compiler_File for the main file.
I think i wrote that in a jaPBe related discussion when i made this change.
Using the PB IDE, it will display the real filename since one of the 4.10 betas.
In 4.0x it was the same as you describe.
@gnozal:
Look at the 'SOURCEALIAS' command in the Library SDK\CompilerInterface.txt
There you can modify the value of #PB_Compiler_File for the main file.
I think i wrote that in a jaPBe related discussion when i made this change.
quidquid Latine dictum sit altum videtur
@ freak:
Is it possible, to implement a #PB_Compiler_FilePath constant parallel to #PB_Compiler_File?
I'm using the onError-Lib, that should generate error messages like "error in 'main module.pb' line 20".
Of course, I use GetFilePart(#PB_Compiler_File), but I don't want to have the path to the file in the final exe. Nobody should see my pathes.
(Before prosting this, I verified my request by opening my EXE with notepad)
Edit: Woooow! have a look at this: Everybody executing my EXEs can see my temporary path!
Is it possible, to implement a #PB_Compiler_FilePath constant parallel to #PB_Compiler_File?
I'm using the onError-Lib, that should generate error messages like "error in 'main module.pb' line 20".
Of course, I use GetFilePart(#PB_Compiler_File), but I don't want to have the path to the file in the final exe. Nobody should see my pathes.
(Before prosting this, I verified my request by opening my EXE with notepad)
Edit: Woooow! have a look at this: Everybody executing my EXEs can see my temporary path!
My EXE wrote:Division by zero forbidden. Modulo zero is forbidden (result in a zero divide). Pointer is null. Array index out of bounds. The linked list doesn't have a current element. Structure array index out of bounds. Array size can't be negative. Only the last dimension of an array can be changed with ReDim. Read data error: no more data. C:\Dokumente und Einstellungen\Andre\Lokale Einstellungen\Temp\PB_EditorOutput.pb D:\PureBasic\Projekte\TO-Multi Tool\ D:\Programme\PureBasic\ RG QRG €RG ´RG èRG SG JSG D:\PureBasic\Projekte\TO-Multi Tool\Enumerations.pbi
PB 4.30
Code: Select all
onErrorGoto(?Fred)
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Yes, you are right ...freak wrote:@gnozal:
Look at the 'SOURCEALIAS' command in the Library SDK\CompilerInterface.txt
There you can modify the value of #PB_Compiler_File for the main file.
I think i wrote that in a jaPBe related discussion when i made this change.

I forgot this new command !
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
I tried to use the SOURCEALIAS command, but it doesn't seem to work ?
jaPBe debug output
test code
test code debug output
jaPBe debug output
Code: Select all
PBPath : C:\PureBasic410\
STARTING 4.10 PureBasic 4.10 Beta 4 (Windows - x86)
READY
REQUEST : FUNCTIONLIST
COMPLETE
BUFFERLEN = 108203
REQUEST : STRUCTURELIST
COMPLETE
BUFFERLEN = 9457
REQUEST : INTERFACELIST
COMPLETE
BUFFERLEN = 38524
COMMAND : SOURCE C:\TEMP\PB_EditorOutput.pb
COMMAND : Ok
COMMAND : TARGET C:\TEMP\Purebasic0.exe
COMMAND : Ok
COMMAND : SOURCEALIAS C:\PureBasic410\Program\debug_test.pb
COMMAND : Ok
COMMAND : RESOURCE C:\TEMP\_jaPBe_.rc
COMMAND : Ok
COMMAND : INCLUDEPATH C:\PureBasic410\Program\
COMMAND : Ok
Code: Select all
Debug #PB_Compiler_File
Code: Select all
C:\TEMP\PB_EditorOutput2.pb
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Works fine here in the IDE, and also in a quick test in the console:
Correctly reports the alias path in the executable.
I noticed in your debug output that the reported filename is neither your
SOURCE nor your SOURCEALIAS filename (PB_EditorOutput2.pb).
Is the file containing the Debug statement maybe not really the main file, but included into another one ?
AND51:
I do not see a problem really. Just cut the path before displaying. And if somebody
looks at your exe and sees this path, whats the big deal ? It reveals no useful information.
On the other hand, if the path information is missing, larger projects could have
a problem when they have files with equal names in different directories.
Code: Select all
SOURCE C:\x.pb
TARGET C:\x.exe
SOURCEALIAS Y:\whatever.pb
COMPILE
I noticed in your debug output that the reported filename is neither your
SOURCE nor your SOURCEALIAS filename (PB_EditorOutput2.pb).
Is the file containing the Debug statement maybe not really the main file, but included into another one ?
AND51:
I do not see a problem really. Just cut the path before displaying. And if somebody
looks at your exe and sees this path, whats the big deal ? It reveals no useful information.
On the other hand, if the path information is missing, larger projects could have
a problem when they have files with equal names in different directories.
quidquid Latine dictum sit altum videtur
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Yesfreak wrote:I noticed in your debug output that the reported filename is neither your SOURCE nor your SOURCEALIAS filename (PB_EditorOutput2.pb).
Is the file containing the Debug statement maybe not really the main file, but included into another one ?
Compiled file = PB_EditorOutput.pb
Source copy = PB_EditorOutput2.pb
Like this :
Code: Select all
; File PB_EditorOutput.pb
...
IncludeFile PB_EditorOutput2.pb
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: #PB_Compiler_File
I almost forgot ...RichardL wrote:Can anyone point me to a solution?
NOTE: I use #PB_Compiler_File to put the source file into Help\About on all my projects so each one carries the source file identity, I have found this very useful in major jobs.
In jaPBe, you can use #jaPBe_SourcePath and #jaPBe_SourceFile.
Code (Test2.pb)
Code: Select all
Debug #PB_Compiler_File
Debug #jaPBe_SourcePath
Debug #jaPBe_SourceFile
Code: Select all
C:\TEMP\PB_EditorOutput2.pb
C:\PureBasic410\Program\
TEST2.pb
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Well, the SOURCEALIAS is only for the main file.
Why not include the files the other way around (ie include the PB_EditorOutput.pb into the PB_EditorOutput2.pb, then you do not have the problem.)
If you put the IncludeFile on the beginning of the first line with a ":", you will not mess up any linenumbers.
Why not include the files the other way around (ie include the PB_EditorOutput.pb into the PB_EditorOutput2.pb, then you do not have the problem.)
If you put the IncludeFile on the beginning of the first line with a ":", you will not mess up any linenumbers.
quidquid Latine dictum sit altum videtur
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
I don't understand why ?freak wrote:Well, the SOURCEALIAS is only for the main file.
I thought the SOURCEALIAS command just sets a value for #PB_Compiler_File (so why not accept any value passed to the compiler ?). Or is it used for something else ?
Yes, that an idea. Thanks.freak wrote:Why not include the files the other way around (ie include the PB_EditorOutput.pb into the PB_EditorOutput2.pb, then you do not have the problem.)
If you put the IncludeFile on the beginning of the first line with a ":", you will not mess up any linenumbers.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
#PB_Compiler_File always retuns the filename where the constant was used.
So if you use it in an includefile, it returns the includefile name. Thats the purpose of it.
It is different from the #jaPBE_SourceFile, which always returns the mainfile name i think.
The SOURCEALIAS only modifies the mainfile name (to allow a temporary file there).
If it would modify all filenames, the #PB_Compiler_File could no longer fullfill the above mentioned purpose.
So if you use it in an includefile, it returns the includefile name. Thats the purpose of it.
It is different from the #jaPBE_SourceFile, which always returns the mainfile name i think.
The SOURCEALIAS only modifies the mainfile name (to allow a temporary file there).
If it would modify all filenames, the #PB_Compiler_File could no longer fullfill the above mentioned purpose.
quidquid Latine dictum sit altum videtur
@freak
@gnozal
First, I apologise if this is out of topic, as I said in the initial post I could not be sure where the source of the problem was... but as it works out I now have a solution, using #jaPBe_SourcePath and jaPBe_SourceFile. Thank you gentlemen.
Now I will be really cheeky and ask a really out-of-topic question, because one of you probably knows the answer... and if the moderator boots me out well that fair enough. Question:
How can I make the debug window use a fixed pitch font... looking at debug data in tabular format using a proportional font drives me up the wall!
Richard
@gnozal
First, I apologise if this is out of topic, as I said in the initial post I could not be sure where the source of the problem was... but as it works out I now have a solution, using #jaPBe_SourcePath and jaPBe_SourceFile. Thank you gentlemen.
Now I will be really cheeky and ask a really out-of-topic question, because one of you probably knows the answer... and if the moderator boots me out well that fair enough. Question:
How can I make the debug window use a fixed pitch font... looking at debug data in tabular format using a proportional font drives me up the wall!
Richard
no problem.
Open the PureBasic IDE, go to Preferences->Debugger->Individual Settings
and there you can change the font used in the Debug output window.
Since the standalone debugger also uses this setting, this change should affect jaPBe as well.
If jaPBe has a setting in its prefs to affect this value for the debugger, i don't know. It is a quite new option.
Open the PureBasic IDE, go to Preferences->Debugger->Individual Settings
and there you can change the font used in the Debug output window.
Since the standalone debugger also uses this setting, this change should affect jaPBe as well.
If jaPBe has a setting in its prefs to affect this value for the debugger, i don't know. It is a quite new option.
quidquid Latine dictum sit altum videtur
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Thank you very much for the explanation.freak wrote:#PB_Compiler_File always retuns the filename where the constant was used.
So if you use it in an includefile, it returns the includefile name. Thats the purpose of it.
It is different from the #jaPBE_SourceFile, which always returns the mainfile name i think.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).