200 likes | 399 Views
OpenG Package Files (*.ogp). “What’s in a package and how are they built?”. As Presented by Jim Kring April 1, 2003. OpenG Package Files. Contain everything needed for the OpenG Package Installer (OGPI) to install a LabVIEW reuse library, development environment app, and more….
E N D
OpenG Package Files (*.ogp) “What’s in a package and how are they built?” As Presented by Jim Kring April 1, 2003
OpenG Package Files Contain everything needed for the OpenG Package Installer (OGPI) to install a LabVIEW reuse library, development environment app, and more… OpenG User Group Meeting
Presentation Outline • Cross Platform (Zip File with ogp ext’n) • LabVIEW Zip tools (OpenG Toolkit pkg) for read/write • Supported on Win32, Linux, and Mac Classic and OS X (Other Unix builds are possible) • Icon’s for Win32 • Windows File Handler • Double-click to Open • Right-click Options • File Contents (Format) Standardized • Building OpenG Package Files OpenG User Group Meeting
Zip Compatible Files • May be extracted (but not installed) using WinZip, Stuffit, gunzip, etc. OpenG User Group Meeting
Icons and Shell Ext’ns for Windows • Pkg .spec files and .ogp files have icons and Windows Shell extensions that allow double-click and right-click options OpenG User Group Meeting
Building a Pkg – The .spec file • Packages are built from a .spec file which is an INI file containing all of the information about the package and its contents • The spec file tells the Package Builder which files to put in the package and it tells the Package Installer Where to Put the Pacakges • The .spec file format documentation is included in the OGPI user manual OpenG User Group Meeting
Spec File Sections • [Package Name] • [Description] • [Dependencies] • [Platform] • [Build-Time Script VIs] • [Install and Erase-Time Script VIs] • [Verification-Time Script VIs] • [Files] • [File Group N] OpenG User Group Meeting
[Package Name] • Pkg Name, Version, and Release For example: string-1.2-1 OpenG User Group Meeting
[Description] • Descriptive Info OpenG User Group Meeting
[Dependencies] • What pkg dependencies does the pkg require in order to run? Which pkg’s conflict with the pkg? [Dependencies] Requires="bar >= 2.7-4, baz = 2.1-1" Conflicts="foo <= 2.7“ OpenG User Group Meeting
[Platform] • In which OS’es and LabVIEW versions does the pkg run (or not run)? [Platform] Exclusive_LabVIEW_Version=“” Exclusive _LabVIEW_System=“” Exclusive _OS=“” Exclude_LabVIEW_Version=“” Exclude_LabVIEW_System=“” Exclude_OS=“” OpenG User Group Meeting
Script VIs - Build, (Un)Install, Verify Script VIs allow a package to execute LabVIEW code before and after (1) Build, (2) Install, and (3) Uninstall and during pkg (4) Verification. Right now these script VIs cannot have subVIs that are not resolved by the LabVIEW search path, but eventually these script VIs will be built (and name-mangled) at packaging-time using the DEAB and included in the .ogp as LLBs. OpenG User Group Meeting
[Build-Time Script VIs] • Source Dir=<rel path to source dir> • PreBuild=<rel path to prebuild script> • PostBuild=<rel path to postbuild script> OpenG User Group Meeting
[Install and Erase-Time Script VIs] • Source Dir=<rel/abs path to source dir> • PreInstall=<rel/abs path to VI> • PostInstall=<rel/abs path to VI> • PreUninstall=<rel/abs path to VI> • PostUninstall =<rel/abs path to VI> OpenG User Group Meeting
[Verification-Time Script VIs] • Source Dir=<rel/abs path to source dir> • Verify=<rel/abs path to VI> OpenG User Group Meeting
[Files] • DocGroups=N,M,etc. • File groups containing documentation files. If the user selects a documentation link, these groups are copied to the temp directory and launched from there • Target Dir=<rel/abs path to VI> • Num File Groups=N OpenG User Group Meeting
[File Group N] • File groups can override OS, LabVIEW Version/Platform req’s and Target Dir specified in “global” sections Source Dir=<location of files> Target Dir=<target install location for files> Replace Mode=If Newer (Never, Always, If Newer) Num Files=3 (Number of files following) File 0=<filename> File 1=<filename> File 2=<filename> OpenG User Group Meeting
Building an .ogp from a .spec file • Double-click creates an .ogp in the same location • Package Builder UI Tools OpenG Tools Packaging Tools Package Builder (shown on the right) • Programmatically (below) OpenG User Group Meeting
.ogp File Contents • spec file – INI file that contains the pkg “metadata” • File Groups – files are handled in groups • Pkg Icon – optional image file • Script VIs – optional VIs that are executed at Install/Uninstall/Verify .ogp file extracted with WinZip OpenG User Group Meeting
Recap • .ogp and spec files are cross/multi-platform Zip archives. • Individual File Groups can target specific OS and/or LabVIEW platform/version. • Visit http://OpenG.org or http://ogpm.sf.net for more info. OpenG User Group Meeting