issue-#14: Blackbox building pipeline

User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: blackbox-1.6-setup

Post by DGDanforth »

Ivan Denisov wrote:I have tested the command line compiler at the server side and it works well.

http://redmine.blackboxframework.org/issues/2
What are you talking about?
Why a command line compiler?
What issue are you attempting to solve?
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: blackbox-1.6-setup

Post by Ivan Denisov »

DGDanforth wrote:
Ivan Denisov wrote:I have tested the command line compiler at the server side and it works well.

http://redmine.blackboxframework.org/issues/2
What are you talking about?
Why a command line compiler?
What issue are you attempting to solve?
In the repository the sources of BlackBox are stored. We need some tool for compile the BlackBox from sources on the developer PC and at the server side for preparing Setup binary.

This solution works for windows and comping the Windows version of BlackBox.
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: blackbox-1.6-setup

Post by DGDanforth »

This should all be done within the BlackBox framework not with some add-on tool.
The BB linker creates an executable from the list of files stated by Omic. It is a trivial matter to take that list
and put it into a document and specify DevCompiler.CompileThis ....

So again I ask, what are you talking about?

-Doug
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: blackbox-1.6-setup

Post by Ivan Denisov »

DGDanforth wrote:This should all be done within the BlackBox framework not with some add-on tool.
The BB linker creates an executable from the list of files stated by Omic. It is a trivial matter to take that list
and put it into a document and specify DevCompiler.CompileThis ....

So again I ask, what are you talking about?
This can not be done from BB GUI in the server, because server has no GUI. However we need to do this compilation for automated creation of Setup Binary.

Also, when you get sources from the repository, you have no BlackBox. There are to ways for doing this:
1. To start BB as second directory and start Dev/Docu/Build-Tool.odc, however in this case the BlackBox will not create Sym files if interfaces was not changed, and all the interfaces files will need to be copied manually...
2. Add sources over installed BB and start Dev/Docu/Build-Tool.odc, in that case you need to copy the git folder to do not lost connection with repository.
3. Make some BlackBox compiler tool (written in BlackBox) and distribute it with sources. In this case you do not need extra copy of BlackBox for the deploying development. My opinion that this is preferred variant, because this tool already done for server compilation and the developer will be sure that will be the result after the server will build Setup Binary.
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: blackbox-1.6-setup

Post by DGDanforth »

Ivan Denisov wrote: This can not be done from BB GUI in the server, because server has no GUI. However we need to do this compilation for automated creation of Setup Binary.
Why does the 'server' need to compile anything? Should not the server simply be a file handler?

What is a 'Setup Binary'? Are you referring to the process of downloading the BlackBox files from the server?
Isn't that process done (created) only once and then whenever files are changed the 'Setup' program simply downloads the new files?
Also, when you get sources from the repository, you have no BlackBox.
That's rediculous! No one would get BB sources from the repository without having BlackBox to test them on.
There are to (sic several) ways for doing this:
1. To start BB as second directory and start Dev/Docu/Build-Tool.odc, however in this case the BlackBox will not create Sym files if interfaces was (sic were) not changed, and all the interfaces files will need to be copied manually...
Why? If you already have the interface files then you have the files. If you don't have the files then the compiler creates the sym files.
2. Add sources over installed BB and start Dev/Docu/Build-Tool.odc, in that case you need to copy the git folder to do not lost (sic so one does not loose the) connection with repository.
Ivan, In general the process of creating files is a separate action from that of storing and retrieving files from a repository. If one (of us) builds a new version of BlackBox then it is up to that person to add those new files to their repository and then push their changes to the central repository.
3. Make some BlackBox compiler tool (written in BlackBox) and distribute it with sources.
Isn't that exactly what Dev/Docu/Build-Tool.odc is?
In this case you do not need extra copy of BlackBox for the deploying development. My opinion that this is preferred variant, because this tool already done for server compilation and the developer will be sure that will be the result after the server will build Setup Binary.
What do you mean by 'extra copy of BlackBox'? All of us already have a copy of BlackBox.
The server should NOT be doing any compilations.
Please explain again what is 'Setup Binary'
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: blackbox-1.6-setup

Post by Josef Templ »

The idea is to get rid of the manual build process.
You simply commit changes to the master bbcb repository (on GitHub)
and get a new downloadable package automatically.
The commit includes the sources, resources and docu only.
The build machine (our Edis host) detects a change in the repository and
starts the build process without any manual intervention.
As an optimization it could selectively compile the changed files only,
but this option is not available currently, as far as I know.
In any case, after compilation it packs the involved files
into a downloadable package, either as a plain .zip or as an
installer .exe or both and makes it available for download on
our download server (our Edis host).
Manual intervention is thereby reduced as much as possible.

This is not a new approach, but widely used in todays open source projects.
It is sometimes called a 'continuous build process'.
The advantage is obvious. You trade repeated manual intervention for
an initial more complicated setup step for getting the automation right.
After that initial step you get the updates more or less for free.
There is of course one situation which still needs manual intervention: changing
the compiler itself, for example including a bug fix that leads to new
fingerprints as it occurs in the CPC 1.7 changes. But such changes are very rare
compared to the regular changes.

- Josef
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: blackbox-1.6-setup

Post by DGDanforth »

Thank you Josef. That makes it very clear.
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: blackbox-1.6-setup

Post by Ivan Denisov »

cfbsoftware wrote:While on the topic of version numbering both the setup.exe and / or the BlackBox.exe file should have their file properties maintained as part of the build process to identify their version number etc. You should not have to install or run an application to be able to determine what version it is. The properties of the BlackBox setup file are mostly OK except for the missing copyright notice and file version.
I have added this two lines to BlackBox.iss for solving this problem:

Code: Select all

VersionInfoVersion=1.7.0.1
AppCopyright=Copyright (c) 1994 - 2013 Oberon microsystems, Inc., Switzerland. All rights reserved.
1.7.0.1 means 1.7-alpha1
version.png
version.png (34.87 KiB) Viewed 13006 times
Do I understand right, that the Copyright will be always owned by Oberon microsystems, Inc., while they will not present it to somebody?

Can we change "1994 - 2013" to "1994 - 2014"?

cfbsoftware wrote: However, the BlackBox exe has no proper identification at all
I do not know, how to solve this problem now. There are some advices, maybe somebody has such experience?
http://stackoverflow.com/questions/2842 ... ng-exe-dll

BlackBox Linker does not adding this information? Can we tune a bit the DevLinker?
cfbsoftware
Posts: 204
Joined: Wed Sep 18, 2013 10:06 pm
Contact:

Re: blackbox-1.6-setup

Post by cfbsoftware »

Ivan Denisov wrote:Do I understand right, that the Copyright will be always owned by Oberon microsystems, Inc., while they will not present it to somebody??
That is my understanding also but only an IP lawyer would be able to give you a definitive answer.
Ivan Denisov wrote:
cfbsoftware wrote: However, the BlackBox exe has no proper identification at all
I do not know, how to solve this problem now. There are some advices, maybe somebody has such experience?
As far as I know version information is associated with a Win32 application using a Win32 resource file. Usually development systems (e.g. Visual Studio, Delphi etc.) do this as part of the build process. The BlackBox DevLinker documentation states
... windows resource files (.res), and type libraries (.tlb) are supported. The resource files are loaded from the Rsrc or Win/Rsrc directory.
so I believe the process for BlackBox would be:

1. Enter the version information into a text .rc file (e.g. BlackBox.rc) in the BlackBox Rsrc folder.
2. Use a resource compiler to compile the .rc file into a .res file (e.g. BlackBox.res).
3. Include BlackBox.res in the list of items on the normal BlackBox DevLinker.Link command line

An example of a version resource text file (Lookup.rc) is incuded in the BlackBox Component Builder 1.6\Com\Interfaces\Lookup folder. The only missing bit is the resource compiler which I believe is supplied with the Win32 SDK. For more information see:

http://msdn.microsoft.com/en-us/library ... s.85).aspx
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: blackbox-1.7-a1-setup

Post by Ivan Denisov »

Thank you, Chris, that helps. I used MinGW32 compiler. And the "rc" code which I posted in issues tracker.
bbversion.png
bbversion.png (34.02 KiB) Viewed 12993 times
The resources file should be included next way:
res.png
res.png (5.16 KiB) Viewed 12993 times
Post Reply