It is currently Mon Mar 08, 2021 1:18 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Fri Oct 21, 2005 5:07 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Apr 21, 2004 7:12 pm
Posts: 731
Thanks for creating the Compile/Run option!

_________________
~I see one problem with your reasoning: the fact is thats not a chicken~


Top
 Profile  
Reply with quote  
 Post subject: Purebuild causes a 16 line offset on every compile error
PostPosted: Thu Dec 08, 2005 11:03 am 
Offline
User
User
User avatar

Joined: Fri Nov 11, 2005 5:42 pm
Posts: 15
Location: Netherlands
I use purebasic 3.94 and SmartUpdate weekly thus Purebasic is up to date.

When I use Purebuild I get a 16 line offset on every error reported by the Compiler. The error is in line 13 but the compiler reports line 29.

Doesn't matter if I register Purebuild automatically or manually.

Unregistering Purebuild solves the problem but .... no build information.


Top
 Profile  
Reply with quote  
 Post subject: Re: Purebuild causes a 16 line offset on every compile error
PostPosted: Thu Dec 08, 2005 12:40 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
zekitez@lycos.com wrote:
I use purebasic 3.94 and SmartUpdate weekly thus Purebasic is up to date.

When I use Purebuild I get a 16 line offset on every error reported by the Compiler. The error is in line 13 but the compiler reports line 29.

Doesn't matter if I register Purebuild automatically or manually.

Unregistering Purebuild solves the problem but .... no build information.

It's probably because PureBuild adds 16 lines to the source before compilation :
Code:
          WriteStringN(";")
          WriteStringN("; -=========== Build Plugin ===[Begin]==-")
          WriteStringN(";")
          WriteStringN("; - Build number")
          WriteStringN("#jaPBe_ExecuteBuild = " + Str(Build))
          WriteStringN("#PureBuild_Number = " + Str(Build))
          WriteStringN("; - Build date")
          WriteStringN("#PureBuild_Date = " + Str(Date()))
          WriteStringN("; - Build source file")
          WriteStringN("#PureBuild_Source = " + Chr(34) + File + Chr(34))
          WriteStringN("; - IsExecute")
          WriteStringN("#jaPBe_IsExecute = " + Str(IsExecute))
          WriteStringN("#PureBuild_IsExecute = " + Str(IsExecute))
          WriteStringN(";")
          WriteStringN("; -=========== Build Plugin ====[End]===-")
          WriteStringN(";")

And apparently the purebasic editor uses the source file to report errors and not the file actually compiled (is it logical ?).

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Last edited by gnozal on Fri Dec 09, 2005 9:12 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Purebuild adds 16 extra lines
PostPosted: Thu Dec 08, 2005 2:27 pm 
Offline
User
User
User avatar

Joined: Fri Nov 11, 2005 5:42 pm
Posts: 15
Location: Netherlands
Ehh.. since I only want a buildnumber per project (exe) and not per file I just made my own version to add a buildnumber. I make dayly backups of the project. At least errors have now no offset.

Code:

; This works fine if you devellop each program (exe) in a seperate directory
;
; Put in the main file code file of the project you want to Compile/Run:
; IncludeFile "build_info.pbi"
;
; This program generates/updates the pbi file
; Add buildnumber.exe via menu Tools : Config tools
;
; Commandline: browse to the directory where you stored the executable
;              example: C:\Program Files\PureBasic\AddOn\buildnumber.exe
; Arguments  : "%PATH"
; Name       : BuildNumber
; Event to trigger the tool: Before Compile/Run
; Options: Wait until tool quits
; Options: Hide Tool from the Main menu

IncludeFile "build_info.pbi"

#STR_BUILD_NUMBER  = "#BUILD_NUMBER = "
#STR_BUILD_DATE    = "#BUILD_DATE   = "
#BUILD_NUMBER_FILE = "build_info.pbi"

#DATE_MASK = " %dd-%mm-%yyyy %hh:%ii "

Global path$
Global bnbr.l

bnbr = 0
path$=Trim(ProgramParameter())

; MessageRequester("Debug information " + Str(#BUILD_NUMBER), path$, 0)
If path$="" Or Len(path$)<3
   MessageRequester("Build information "+Str(#BUILD_NUMBER), "Save the file just once to get Build information.", 0)
Else
   If ReadFile(1,path$+#BUILD_NUMBER_FILE) <> 0
      in$=ReadString()
      If Left(in$,Len(#STR_BUILD_NUMBER)) = #STR_BUILD_NUMBER
          bnbr = Val(Trim(Right(in$,Len(in$)-Len(#STR_BUILD_NUMBER) + 1))) + 1
      Else
          bnbr = 1;
      EndIf
      CloseFile(1)
      DeleteFile(path$+#BUILD_NUMBER_FILE)
   EndIf
   CreateFile(0,path$+#BUILD_NUMBER_FILE)   
   WriteStringN(#STR_BUILD_NUMBER+Str(bnbr))
   WriteStringN(#STR_BUILD_DATE+Chr(34)+FormatDate(#DATE_MASK,Date())+Chr(34))
   CloseFile(0)
EndIf

End


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 08, 2005 8:32 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat May 17, 2003 11:31 am
Posts: 6074
codecaddy changes the first line, ie.

; test

to

#constant1 = asdasdf : #constant2 = asdasdf : ; test

problem solved :-)

_________________
( PB5.xx Win10 x64 Asrock AB350 Pro4 Ryzen 1600X 32GB RAM Evo 840 GTX1060 )
( The path to enlightenment and the PureBasic Survival Guide right here... )


Top
 Profile  
Reply with quote  
 Post subject: Re: Purebuild causes a 16 line offset on every compile error
PostPosted: Fri Dec 09, 2005 9:14 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
zekitez@lycos.com wrote:
When I use Purebuild I get a 16 line offset on every error reported by the Compiler. The error is in line 13 but the compiler reports line 29.

Fixed (like blueznl suggested).

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Sep 27, 2008 11:30 pm 
Offline
Addict
Addict

Joined: Thu Jun 19, 2003 7:55 pm
Posts: 1286
I just tried to download PureBUILD and got an alert from Avast.

It says the PureBUILD.exe is infected with Win32-Trojan-gen [Other]

VPS (Virus database) version is: 080926-0, 09/26/2008

I believe this is a false positive but thought you should know anyway so you can tell them about it.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Sep 30, 2008 2:03 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
Tipperton wrote:
I just tried to download PureBUILD and got an alert from Avast.

It says the PureBUILD.exe is infected with Win32-Trojan-gen [Other]

VPS (Virus database) version is: 080926-0, 09/26/2008

I believe this is a false positive but thought you should know anyway so you can tell them about it.
Thanks.
Once in a while, some antivirus [usually Norton :wink: ] gives a false alert for one of my tools, probably because I usually use an EXE packer, UPX or PECompact.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 14 guests


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

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye