Packaging Diana
This assumes you've completed the previous steps exactly as described.
TODO: update for dynamic libpq / libavformat
The stupid way
Create the installation tree
Create a scratch directory (e.g. C:\dianainst
). In the Diana source directory, run the following command to install Diana into that directory:
$ make install prefix=c:/dianainst/met.no
Remember to strip the diana and bdiana binaries:
$ strip c:/dianainst/met.no/bin/diana.bin.exe $ strip c:/dianainst/met.no/bin/bdiana.exe
Qt
Copy the following Qt libraries into c:/dianainst/met.no/bin
:
QtCore4.dll
QtGui4.dll
QtNetwork4.dll
QtOpenGL4.dll
QtXml4.dll
NOTE: I'm unsure about QtXml4.dll
- it looks like something in metlibs may need it, but I haven't tried to run without it.
Other third-party stuff
Copy the following files from c:/met.no
(assuming that's where you installed metlibs) into the corresponding directory under c:/dianainst/met.no
:
copyright/*
etc/udunits.dat
share/grib_api/definitions/*
share/proj/*
Zip it
$ cd c:/dianainst $ zip -9 -r ~/diana-X.Y.Z-win32.zip met.no
The smart way (slightly more complicated)
Install everything into c:/met.no
as per instructions. Remember to strip the binaries. Copy the Qt libraries as described above. Then, assuming you have InfoZip's zip
in your path:
C:\> zip -9rv met.no/diana-X.Y.Z-win32.zip met.no/bin/bdiana.exe C:\> zip -9rv met.no/diana-X.Y.Z-win32.zip met.no/bin/diana.bin.exe C:\> zip -9rv met.no/diana-X.Y.Z-win32.zip met.no/bin/diana.bat C:\> zip -9rv met.no/diana-X.Y.Z-win32.zip met.no/etc C:\> zip -9rv met.no/diana-X.Y.Z-win32.zip met.no/share/applications C:\> zip -9rv met.no/diana-X.Y.Z-win32.zip met.no/share/diana C:\> zip -9rv met.no/diana-X.Y.Z-win32.zip met.no/share/doc/diana C:\> zip -9rv met.no/diana-X.Y.Z-win32.zip met.no/share/pixmaps C:\> zip -9rv met.no/diana-X.Y.Z-win32.zip met.no/share/grib_api/definitions C:\> zip -9rv met.no/diana-X.Y.Z-win32.zip met.no/share/proj C:\> zip -9rv met.no/diana-X.Y.Z-win32.zip met.no/copyright
The quick way
There should be a batch file called diana-zip.bat in c:/met.no/bin
which automates the release process. It is somewhat experimental.
It expects exactly one command-line argument, which should be the version number or identificator (X.Y.Z
in the examples above).
It will create a zip file in c:/met.no
(or whatever prefix you gave to configure
). Just run
C:\> \met.no\bin\diana-zip TEST
and answer y
at the prompt to create c:/met.no/diana-TEST-win32.zip
.
License compliance
If you are going to distribute the ZIP file outside your organization, you have to include copyright and license information about all third-party components included in it taken care of by c:/met.no/copyright/*
.
To comply with the GPL, you also need to make sure that the source code for the exact versions you used and any patches you have applied and complete instructions for building metlibs and diana are available to all recipients of the compiled binaries.ls