Development Builds

User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: Development Builds

Post by Josef Templ »

Robert wrote:I have written a BlackBox module that takes the "Dates.txt" file (see my previous post), and corrects all the file date stamps in a given version of BlackBox (eg build #741) to reflect when that file was last modified. See below:

There is probably a 1 line Unix command that does this!

The Docu file (in the pac coding below) gives detailed instructions to do all this.

I would like this "FileDates.txt" file to be routinely produced by the build engine (if this is possible), and made available, maybe in the same place as the "buildlog.html" file.
What is this information used for?

- Josef
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: Development Builds

Post by Robert »

Josef Templ wrote:What is this information used for?
I have given this some thought - for four months!
When I switch to a new version, which I did today, I want to update (hack!) a few Menu, Strings (& a very few Mod) files. This involves copying across my changes, but also checking if there have been any official changes since the last time I changed them. This is easier if the file dates are informative (correct).

It is unnecessary to have correct dates, and it is only a small convenience.
But, logic aside, I definately much prefer to have the file dates correct.

I am up against a hard deadline at work. I wanted to progress forward from 1.7 stable, but can't wait for a new stable, so build 845 is going to be my reference build for the next period of time. If we could move to a stable build compatible with 845 I will be in a position to republish on CPC most of the material I needed to withdraw a year ago.
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: Development Builds

Post by Zinn »

Robert wrote:
Josef Templ wrote:What is this information used for?
I have given this some thought - for four months!
When I switch to a new version, which I did today, I want to update (hack!) a few Menu, Strings (& a very few Mod) files. This involves copying across my changes, but also checking if there have been any official changes since the last time I changed them. This is easier if the file dates are informative (correct).

It is unnecessary to have correct dates, and it is only a small convenience.
But, logic aside, I definately much prefer to have the file dates correct.
Sorry Robert, to have a correct file date is a Microsoft Windows problem. Today when you expand a zip file the file get the expanded date. In older Windows version you get the original file date. When you copy files from NTFS to FAT the date may change depending if you have summertime or wintertime (daylight time or not). Every new Windows is getting more worse and old rules are no longer valid.

I use my own BlackBox program to find differences between two BlackBox version.
- Helmut
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: Development Builds

Post by Robert »

Zinn wrote:Sorry Robert, to have a correct file date is a Microsoft Windows problem. Today when you expand a zip file the file get the expanded date. In older Windows version you get the original file date. When you copy files from NTFS to FAT the date may change depending if you have summertime or wintertime (daylight time or not). Every new Windows is getting more worse and old rules are no longer valid.
You make two interesting points I was unaware of:

1 - I have recently had some unexplained problems with file times moving by 1 hour (in one case this changed the date). This is the first spring time-change since I moved from XP. I often copy files between computer systems on a FAT USB stick. Maybe there is a pattern here?

2 - Regarding Center BlackBox builds. Are you suggesting the files go into the Zip with the correct time-stamp, but come out with the incorrect one (ie the un-zip date)? Is there a sinple solution, such as using a different zip program (I think I used to use "Zip-7" or some similar name). If I used the "setup.exe" rather than the ".zip" would I get the correct file dates? If zip and modern Windows are incompatible maybe we should stop using zip, and use pac instead!

3 - Nothing to do with BlackBox. Where I find date stamp corruption a real nuisance is my collection of 100 000+ map "tile" files which I want to keep aligned with my PC program (BlackBox) and my portable Android program. Windows might change every few years, but Android and the Apps required to go with it seem to change (for the worse) every 5 minutes. This is this week's preoccupation as I am planning next week's motorcycle tour to Southern Spain.
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: Development Builds

Post by DGDanforth »

Robert wrote: I am planning next week's motorcycle tour to Southern Spain.
Please be very careful! Motorcyles can be dangerous.
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: Development Builds

Post by Josef Templ »

Robert wrote:
Zinn wrote:Sorry Robert, to have a correct file date is a Microsoft Windows problem. Today when you expand a zip file the file get the expanded date. In older Windows version you get the original file date. When you copy files from NTFS to FAT the date may change depending if you have summertime or wintertime (daylight time or not). Every new Windows is getting more worse and old rules are no longer valid.
You make two interesting points I was unaware of:

1 - I have recently had some unexplained problems with file times moving by 1 hour (in one case this changed the date). This is the first spring time-change since I moved from XP. I often copy files between computer systems on a FAT USB stick. Maybe there is a pattern here?

2 - Regarding Center BlackBox builds. Are you suggesting the files go into the Zip with the correct time-stamp, but come out with the incorrect one (ie the un-zip date)? Is there a sinple solution, such as using a different zip program (I think I used to use "Zip-7" or some similar name). If I used the "setup.exe" rather than the ".zip" would I get the correct file dates? If zip and modern Windows are incompatible maybe we should stop using zip, and use pac instead!

3 - Nothing to do with BlackBox. Where I find date stamp corruption a real nuisance is my collection of 100 000+ map "tile" files which I want to keep aligned with my PC program (BlackBox) and my portable Android program. Windows might change every few years, but Android and the Apps required to go with it seem to change (for the worse) every 5 minutes. This is this week's preoccupation as I am planning next week's motorcycle tour to Southern Spain.
Interesting, in my zip/unzip experiments under both Vista and Win10 I get the original file dates, as expected.
May be there is an option in the zip file format/tool that affects the behavior.
If there is a way to reconstruct the file dates reliably from the commit info in git, it could be included in the build engine.
Just let me know the command or tool required. Look for the timezone. Is it UTC or local time that is required?

- Josef
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: Development Builds

Post by Robert »

Josef Templ wrote:If there is a way to reconstruct the file dates reliably from the commit info in git, it could be included in the build engine.
Yes, I believe there is a way. It returns local time & UTC offset. Note that we are a widely spread community, so the UTC offsets vary considerably on a file-by-file basis.
While I think this process is reliable, I would not describe it as convenient, so having it automated would be good.
An example GIT output is:

Code: Select all

		2014-09-09 00:01:33 +0800 .gitignore
		2014-09-09 00:01:33 +0800 BlackBox.exe.manifest
	…
		2016-11-27 23:32:02 +0700 Dev/Mod/Browser.odc
	…
		2016-10-06 15:07:07 +0700 appbuild/AppVersion.txt
		2014-09-09 14:34:01 +0200 appbuild/appendProps.txt
		2016-09-13 11:50:27 +0200 appbuild/build.py
		2016-11-25 00:32:31 +0700 appbuild/newbbscript.txt
I have carefully documented the method for getting this output (based on Ivan's suggestions) in the Docu for my tool that uses it to update the files.

Code: Select all

PacCoder.Decode /./rLtBB8Y.1GlhwNK8PXcskx..bXUw1S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HIyz/5NZmJR82ookuZlXhrU1:xdtpWYO3woeKv/zsNPzhRewhMacXqjiNruzKuqVlkRJ
j:7IxedQdxH7VrY/qvg5T6NvRCpHWn.qYCxBVbuFvNqeePv7KdNSb1ZfeMrhRrrjrkuyxQz3tcxo
S0LZ:/XZK/htf9LTk2xn1:gzi4fVUsNdieUy4VeHMwNc25VMat/ie:JO59zUfEHiSzM1DXPpsoUc
a8nnq/sr:dna9SJ7r:B02xYmTlkDZRd/YFugeR0FleNIwJVDsrdc2q/hwNVDPDTeUG5Nw7tJ0rlc
ivhIsZPa8qiVHxPWCb55sBIEG3e0HD4IubXB0HtDjSMRLk2RkbdKrCm1xwJoFy9j..t6s5qfzzy.
AtEndOfEncoding
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: Development Builds

Post by Robert »

Josef Templ wrote:Is it UTC or local time that is required?
Good question.
I use the file described above to create BlackBox UTC Date & Time records, then update the files using

Code: Select all

PROCEDURE  FileSetDateTime (IN fullName : ARRAY OF CHAR;
                            IN date : Dates.Date; IN time : Dates.Time) : BOOLEAN;
  VAR
    fi       :  Api.HANDLE;
    sysTime  :  Api.SYSTEMTIME;
    fiTime   :  Api.FILETIME;
  BEGIN
    sysTime.wYear    :=  SHORT (date.year);
    sysTime.wMonth   :=  SHORT (date.month);
    sysTime.wDay     :=  SHORT (date.day);    sysTime.wDayOfWeek     :=  0;
    sysTime.wHour    :=  SHORT (time.hour);
    sysTime.wMinute  :=  SHORT (time.minute);
    sysTime.wSecond  :=  SHORT (time.second); sysTime.wMilliseconds  :=  0;
    ASSERT (Api.SystemTimeToFileTime (sysTime, fiTime) # Api.FALSE, 20);
    fi  :=  Api.CreateFileW (fullName, Api.FILE_WRITE_ATTRIBUTES,
                             Api.FILE_SHARE_WRITE, NIL, Api.OPEN_EXISTING, {}, 0);
    RETURN  (Api.SetFileTime (fi, NIL, NIL, fiTime) # Api.FALSE)
         &  (Api.CloseHandle (fi) # Api.FALSE)
  END  FileSetDateTime;
I think this worked correctly when I wrote it a few months ago, but then my local time (GMT) was the same as UTC; maybe this code is not correct, for me, today?
The Microsoft page for the FILETIME structure says
Therefore, the GetFileTime function may not return the same file time information set using the SetFileTime function. Furthermore, FAT records times on disk in local time. However, NTFS records times on disk in UTC.
so the process of going from the Git output to actually correcting the files is not something I find simple.
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: Development Builds

Post by Robert »

If you look at http://blackboxframework.org/unstable/ there are four sub-directories related to issues; two of these issues are open and two are closed.

What is the process for deleting these sub-directories for closed issues?
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: Development Builds

Post by Josef Templ »

Robert wrote:If you look at http://blackboxframework.org/unstable/ there are four sub-directories related to issues; two of these issues are open and two are closed.

What is the process for deleting these sub-directories for closed issues?
Currently, there is no process about deleting closed issues from the unstable dir.
I delete them manually from time to time.

It may be possible to delete them automatically but I don't know how to detect this event.

- Josef
Post Reply