Use build date as version number?

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Use build date as version number?

Post by emendelson »

Another thread points out that the builds here are all numbered 2.4, and the way to distinguish them is by the build date. Is there any reason not to use the build date as the version number, so that a build made today would be version 2022.07.29 ?? That would save some trouble and confusion in the future.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Use build date as version number?

Post by Ronald P. Regensburg »

The SheepShaver and BasiliskII version numbers are determined in the source. There are multiple forks. We use the fork by kanjitalk755. The version numbers are rarely changed. BasiliskII has been for decades, and still is, version 1.0, though the kanjitalk755 fork is now labelled "SDL2 port". The change in SheepShaver from SDL1 to SDL2 was marked by the change from version 2.4 to 2.5). Kanjitalk755 does not publish ready to use binaries. Anyone can choose to create his/her own builds. The builds that are posted here are created by me (for macOS) and by Cat_7 (for Windows). The build date is an indication for the state of source on that date.

Years ago I used to add the date to the version number. A SheepShaver build could than be version 2.5.20220629
Edit: I do not remember why I stopped doing that.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Use build date as version number?

Post by emendelson »

Ronald P. Regensburg wrote: Wed Jun 29, 2022 1:02 pm Years ago I used to add the date to the version number. A SheepShaver build could than be version 2.5.20220629
That seems like a very good idea, worth reviving.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Use build date as version number?

Post by adespoton »

emendelson wrote: Wed Jun 29, 2022 2:43 pm
Ronald P. Regensburg wrote: Wed Jun 29, 2022 1:02 pm Years ago I used to add the date to the version number. A SheepShaver build could than be version 2.5.20220629
That seems like a very good idea, worth reviving.
I second that :)
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Use build date as version number?

Post by Cat_7 »

Unfortunately the standalone GUIs for Windows will only recognise executables called SheepShaver.exe or BasiliskII.exe, so those builds will not take part ;-)

Best,
Cat_7
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Use build date as version number?

Post by Ronald P. Regensburg »

I was referring to the version numbers, not to the application file names. The version number will be shown in Finder Info for the app. A BasiliskII for macOS with version number 1.0.20220629 will still be named just BasiliskII.app. Otherwise Basilisk II GUI.app would not be able to start BasiliskII. It needs editing of the version number in the source code. Isn't a similar approach possible for Windows builds?
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Use build date as version number?

Post by adespoton »

Ronald P. Regensburg wrote: Wed Jun 29, 2022 5:43 pm I was referring to the version numbers, not to the application file names. The version number will be shown in Finder Info for the app. A BasiliskII for macOS with version number 1.0.20220629 will still be named just BasiliskII.app. Otherwise Basilisk II GUI.app would not be able to start BasiliskII. It needs editing of the version number in the source code. Isn't a similar approach possible for Windows builds?
It is; all that needs to change is the Version Info strings in the Resource section: specifically the File Version and Product Version strings. They can be modified after the fact with various tools if needed.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Use build date as version number?

Post by emendelson »

adespoton wrote: Wed Jun 29, 2022 6:44 pm It is; all that needs to change is the Version Info strings in the Resource section: specifically the File Version and Product Version strings. They can be modified after the fact with various tools if needed.
Open the exe in Visual Studio, use Edit, Add Resource, New, Version. You're limited to four sets of numbers, but there's clearly a limit of some sort, so 2.5.20220629 won't work (it gets changed to another number), but you can use 2.5.2022.629. Possibly another tool would allow different numbers.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Use build date as version number?

Post by Ronald P. Regensburg »

For my next macOS builds I will leave in Info.plist "Bundle version" and "Bundle version string (short)" alone but I will add "Get Info string" with the extended version number. That string will then be displayed as version in the Finder Info panel for the app. I will do the editing in the Xcode project before building. If edited afterwards, the notarized builds would become useless.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Use build date as version number?

Post by emendelson »

Ronald P. Regensburg wrote: Thu Jun 30, 2022 9:56 am For my next macOS builds I will leave in Info.plist "Bundle version" and "Bundle version string (short)" alone but I will add "Get Info string" with the extended version number. That string will then be displayed as version in the Finder Info panel for the app. I will do the editing in the Xcode project before building. If edited afterwards, the notarized builds would become useless.
Ronald, you can use SD Notary to notarize a build again after modifying it. I do that all the time with my Xcode builds.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Use build date as version number?

Post by Ronald P. Regensburg »

Yes. I know. But I am used to make modifications in Xcode before building. I open the project, make some modifications (Deployment Target to 10.9., Minimum System version to 10.9.0, Bundle Identifier to com.emaculation.sheepshaver in two places) and then I run the commands as indicated by kanjitalk755. One cannot make edits after notarizing.
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: Use build date as version number?

Post by kanjitalk755 »

In the latest source, the build date is appended at the end of the help.

Code: Select all

./BasiliskII --help
./SheepShaver --help
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Use build date as version number?

Post by Ronald P. Regensburg »

Where does this show? Where is that help?
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: Use build date as version number?

Post by kanjitalk755 »

A command line.

For macOS:

Code: Select all

BasiliskII.app/Contents/MacOS/BasiliskII --help
SheepShaver.app/Contents/MacOS/SheepShaver --help
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Use build date as version number?

Post by Ronald P. Regensburg »

OK, found it.

Will be an additional way to find the exact build date, which can in most cases also be found by looking for the creation date.

But it is not suitable for solving the frequent misunderstandings in the forum when users report the version as 2.4 or 2.5 or (BasiliskII) as 1.0, even when explicitly asked for the build/creation date.

I think I will append the date in "Bundle version string (short)" like this: 2.5.20220701. That way the extended (with date) version number will be shown both in Finder Info and in "About SheepShaver" (or in "About BasiliskII").
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Use build date as version number?

Post by emendelson »

Ronald P. Regensburg wrote: Thu Jun 30, 2022 11:55 am Yes. I know. But I am used to make modifications in Xcode before building. I open the project, make some modifications (Deployment Target to 10.9., Minimum System version to 10.9.0, Bundle Identifier to com.emaculation.sheepshaver in two places) and then I run the commands as indicated by kanjitalk755. One cannot make edits after notarizing.
Yes, but it's easy to notarize again by dropping the modified executable on to the SD Notary. I always forget to make all the changes needed in info.plist before building, so I modify the file in a text editor and then use SD Notary to notarize.

I think we both know this, and I'm posting only for visitors who may want to build for themselves
Post Reply