How do I access the Project Properties from my code?
In VB6 it was app.versionmajor or app.productname
Is this information easily available?
Hello Peter,
If you search for the word 'app' in the FF helpfile you will find:
Quote
APP Variable
In addition to the above special functions, FireFly allows you access to a special global TYPE variable that contains useful application specific information.
The TYPE is defined as follows:
' Common info that the programmer can access via the global APP variable.
Type APP_TYPE
Comments As Asciiz * %MAX_PATH ' Comments
CompanyName As Asciiz * %MAX_PATH ' Company Name
EXEName As Asciiz * %MAX_PATH ' EXE name of program
FileDescription As Asciiz * %MAX_PATH ' File Description
hInstance As Long ' Instance handle of the program
Path As Asciiz * %MAX_PATH ' Current Path to the EXE
ProductName As Asciiz * %MAX_PATH ' Product Name
LegalCopyright As Asciiz * %MAX_PATH ' Legal Copyright
LegalTrademarks As Asciiz * %MAX_PATH ' Legal Trademarks
ProductMajor As Long ' Product Major number
ProductMinor As Long ' Product Minor number
ProductRevision As Long ' Product Revision number
ProductBuild As Long ' Product Build number
FileMajor As Long ' File Major number
FileMinor As Long ' File Minor number
FileRevision As Long ' File Revision number
FileBuild As Long ' File Build number
ReturnValue As Long ' User value returned from FF_FormClose
End Type
Global App As APP_TYPE
Hope this helps.
Marc
In other words you can use it much like in VB6.
aVerInfo= "v. " & Format$(app.ProductMajor) & "." & Format$(app.ProductMinor) & _
"." & Format$(app.ProductRevision) & " Rev. " & Format$(app.FileBuild)
Thanks Guys.
I searched the forum for everything but APP, I also searched the help file but apparently did not search for APP there either!
Is there any way to auto increment the Product Build?
Thanks again . . . :)
Yes - check in project properties.
Rolf,
The checkbox in Project Properties is for the Files Build and not the Product Build.
It would be really nice to have the Product Build auto increment also.
Peter
Back in the FireFly 2 days we had a huge discussion about "Product Version" versus "File Version" and the need for an autoincrement for the file version. I can't remember the details of that debate (3 or 4 years ago) but what ended up in FF2 is what was settled on. I used the same when building FF3. Personally, I only really "Product Version".....never really understood the need for the differentiation between the two. :)
I am not sure why the need for two. Currently, I am using the Files version as the Product Version due to the availability of the auto increment feature.
I thought about saying - "Surely there is no need for both" to spark some debate and decided no to :) .
I found that setting the Files Build to -1 will produce a build number of 0 on the next build. If you set the Product Build to -1 the program you compile will not load from within Firefly 3 and Windows reports the file as corrupted and unable to load even thought the compile seems to complete normally.