 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
DanRRight

Joined: 10 Mar 2008 Posts: 2124 Location: South Pole, Antarctica
|
Posted: Tue Aug 29, 2017 9:17 am Post subject: Build Version |
|
|
With FTN95 /ver
good also to provide info about DLL/LIB build version and dates. And also if these are original build DLLs or upgraded.
Currently it shows
Silverfrost FTN95/.NET Copyright (C) 1993-2017 Silverfrost Ltd
---------------------------------------------------------------
Version: 8.10.0
Built: Sat Feb 11 12:23:39 2017
Operating System: Microsoft .NET on Windows NT CPU: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz Model 12 Step 3
CPU Features: MMX, SSE, SSE2, x86-64 |
|
Back to top |
|
 |
PaulLaidler Site Admin

Joined: 21 Feb 2005 Posts: 6088 Location: Salford, UK
|
Posted: Tue Aug 29, 2017 5:26 pm Post subject: |
|
|
Thanks Dan. I have made a note of this. |
|
Back to top |
|
 |
PaulLaidler Site Admin

Joined: 21 Feb 2005 Posts: 6088 Location: Salford, UK
|
Posted: Sat Dec 16, 2017 2:24 pm Post subject: |
|
|
This turns out to be a non-trivial task (at least for 64 bits which is where the future interest lies).
The FTN95 compiler is a 32 bit application whilst the easy access to the DLL version is via a function call to the 64 bit DLLs. So this information is not easy to provide via FTN95.
However, you could construct your own simple utility from...
Code: | program main
C_EXTERNAL GetLibraryVersionInfo '_GetLibraryVersionInfo'():INTEGER(7)
C_EXTERNAL GetLibraryDateInfo '_GetLibraryDateInfo'():INTEGER(7)
C_EXTERNAL GetString 'GET_CSTRING@'(REF,VAL,REF)
CHARACTER(80) info
call GetString(info, GetLibraryVersionInfo(), 80)
!Year since 1998, month, day, hour...
print*, info
call GetString(info, GetLibraryDateInfo(), 80)
print*, info
end
|
|
|
Back to top |
|
 |
DanRRight

Joined: 10 Mar 2008 Posts: 2124 Location: South Pole, Antarctica
|
Posted: Sun Dec 17, 2017 7:32 pm Post subject: |
|
|
Thanks, Paul, hope in the future the way to trick the system will be found or this start working when compiler become 100% 64bit. We meantime will include this subroutine into our own codes just not to loose. |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2144 Location: Sydney
|
Posted: Fri Feb 02, 2018 5:29 am Post subject: |
|
|
Paul,
I have the following code which appears to work for /64, but perhaps after reading this thread it should not.
The following bit does not work for a valid date:
dll_version = scc_lib_version@ ()
dll_date = dos_date (ints(dll_version))
Could you suggest any changes, as I would like to get info on salflibc.dll
Code: | subroutine echo_dll_version
!
include <clearwin.ins>
C_EXTERNAL SCC_LIB_VERSION@ '_scc_lib_version' :INTEGER*4
C_EXTERNAL INITLIBRARYFILEINFO@ '_InitLibraryFileInfo'():INTEGER*4
C_EXTERNAL GetLibraryVersionInfo@ '_GetLibraryVersionInfo'():STRING
C_EXTERNAL GetLibraryPath@ '_GetLibraryPath'():STRING
C_EXTERNAL GetLibraryDateInfo@ '_GetLibraryDateInfo'():STRING
!
integer dll_version
character str*256, ftn95_ver*80
character dos_date*9, dll_date*9
external dos_date
!
call get_compiler_version ( ftn95_ver )
!
dll_version = scc_lib_version@ ()
dll_date = dos_date (ints(dll_version))
!
WRITE ( *,1001) trim(ftn95_ver), dll_date, dll_version
WRITE (98,1001) trim(ftn95_ver), dll_date, dll_version
!
WRITE ( *,1000) 'get_library_info.f90 /64'
WRITE (98,1000) 'get_library_info.f90 /64'
str = GetLibraryVersionInfo@ ()
WRITE ( *,1000) ' VERSION: ', trim (str)
WRITE (98,1000) ' VERSION: ', trim (str)
str = GetLibraryPath@ ()
WRITE ( *,1000) ' PATH : ', trim (str)
WRITE (98,1000) ' PATH : ', trim (str)
str = GetLibraryDateInfo@ ()
WRITE ( *,1000) ' DATE : ', trim (str)
WRITE (98,1000) ' DATE : ', trim (str)
write ( *,1000) ' '
write (98,1000) ' '
1000 FORMAT (a,a)
1001 FORMAT (/a/' Salford DLL code : ',a,i11/)
!
RETURN
!
end subroutine echo_dll_version
character*9 function dos_date (yymmdd)
!
integer*2 yymmdd
!
character temp*9, label(0:12)*3
integer*4 yy,mm,dd
intrinsic mod
data label / '___', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', &
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' /
!
! yyyyyyy mmmm ddddd
dd = iand (yymmdd,31) ! 0-31
mm = iand (ishft(yymmdd,-5),15) ! 0-15
yy = ishft (yymmdd,-9) ! 0-127
!
yy = mod (yy+1980,100)
if (mm>12 .OR. mm<0) mm = 0
!
write (temp,1001) dd,label(mm),yy
1001 format (i2.2,'-',a3,'-',i2.2)
dos_date = temp
return
end function dos_date
subroutine get_compiler_version ( version )
character version*(*)
character ftn95_ver*80
!
include <ftn95_ver.ins>
version = ftn95_ver
end subroutine get_compiler_version
|
File ftn95_ver.ins is unique to each FTN95 directory:
ftn95_ver = '[FTN95/Win32 Ver. 8.20.0 Nov 17 Copyright (c) Silverfrost Ltd 1993-2017]' |
|
Back to top |
|
 |
PaulLaidler Site Admin

Joined: 21 Feb 2005 Posts: 6088 Location: Salford, UK
|
Posted: Fri Feb 02, 2018 9:27 am Post subject: |
|
|
John
You can get version information for salflibc64.dll and clearwin64.dll from GetLibraryVersionInfo and GetLibraryDateInfo (as above).
These two DLLs are always built at the same time and released together with the same version information. There is currently no provision for the possibility that users might try to take salflibc64.dll from one release and use it with a clearwin64.dll from a different release. In this sense users should treat them as twinned DLLs. |
|
Back to top |
|
 |
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|