Commit graph

17 commits

Author SHA1 Message Date
Robert Knight
3cce9d3058 Portability fix for calculating package SHA sums
Use Digest::SHA1 from the standard library instead of shelling
out to the 'sha1sum' utility which is named shasum under OS X
2014-05-19 17:32:25 +01:00
Robert Knight
373caf74a7 Fix permissions of Updater binary under Ruby 1.9.x
When create-packages.rb was run under ruby 1.9.x the Updater
binary in the output dir lost its executable permissions.

This is the same issue and fix as previously applied in
0472a4e991
2013-09-20 14:57:30 +01:00
Carles Pina
7864ad1829 In Ruby 1.9.2p0 'value' is a frozen string and fails to be assigned. 2012-12-12 12:10:07 +00:00
Robert Knight
df89da7ebd Fix create-packages.rb script under Ruby 1.9.2
The 'dependency' variable is now just a string instead of array,
avoid trying to iterate over it with .each
2011-11-02 16:20:35 +00:00
Robert Knight
c9c19fad3b If no custom updater binary is specified in the arguments to create-packages.rb, use the copy from the install directory. 2011-09-13 11:21:59 +01:00
Robert Knight
38bb0e8787 Add --bzip2 option to create-packages.rb to use bzip2 compression instead of deflate when creating the .zip packages
This results in smaller packages but the package creation will be slower
and the system 'zip' tool must support bzip2 compression.
2011-09-05 16:33:28 +01:00
Robert Knight
09b3b2f43a Switch to using Unix chmod values for file permissions instead of values from Qt's QFile::Permission enum
The use of QFile::Permission flag values is a legacy from the old Qt-based updater.
Unix chmod values are used by the native system calls so it makes more sense
to use them instead.

 * Update the test examples and the test update script.
 * Update the package building tool to populate the permissions field with octal chmod values.
2011-09-04 14:53:51 +01:00
Robert Knight
95b39d66c7 Update the argument list in the --help banner for the create-packages.rb tool. 2011-09-04 12:27:47 +01:00
Robert Knight
e835036e41 Fix the package name of the original updater not being used when inserting a subtitute updater via the -u command line flag 2011-09-01 17:56:36 +01:00
Robert Knight
6c9c8696fb Fix symlinks to directories in the input directory not being included in the <install> section of the generated file_list.xml
Only exclude plain directories from update packages, not symlinks to directories.
2011-09-01 17:42:46 +01:00
Robert Knight
48084cfdb2 Special handling for the updater binary in the package creation script.
The updater binary is listed as a package on its own but is not
compressed.  The program downloading the update can then download
all packages for the new version including the updater executable
'package' (in reality, just the plain file) and then invoke that updater.

This also allows for substitution of the updater binary with a different
version via the -u parameter.
2011-09-01 17:37:50 +01:00
Robert Knight
9d088dff86 Robustness improvements to the package generator
* Abort if running the zip tool fails
 * Abort if multiple file path rules match a given file
 * Remove part of the special updater binary handling - this needs to be reworked
 * Sort the file paths before feeding them to the zip tool, so that multiple runs with
   with the same set of files will generate the same packages
2011-09-01 15:56:26 +01:00
Robert Knight
b39c71638a Add required --platform and --version arguments to the package creation script and allow the updater binary to be specified with a -u option
These specify the target version for the update and the platform and are embedded
in the <targetVersion> and <platform> elements of the generated file_list.xml file

Ordinarily the script will use the updater binary from the input files directory which
matches the path of the updater binary specified in the package config file.

However it may sometimes be necessary to use a different binary, which can be done
via a -u option.
2011-09-01 12:47:10 +01:00
Robert Knight
ddb52aa244 Change the package-map JSON file into a general config file which also specifies the name of the updater and path to the main binary.
The generated file_list.xml needs to specify the path
 of the main binary and the name of the updater binary
 to download.  Change the format of the JSON config file to
 allow these paths to be specified there.

 * Update create-packages.rb to add the <is-main-binary> attribute
   to the appropriate entry in file_list.xml

 * Modify the sample config file

 * Improve documentation in create-packages.rb
2011-08-27 16:09:11 +01:00
Robert Knight
d414423c35 Create the output directory if it does not already exist. 2011-08-26 19:02:01 +01:00
Robert Knight
0a684be50f Enable code to create zip packages that was unintentionally commented out 2011-08-26 18:55:06 +01:00
Robert Knight
1189720a58 Add a script which creates the file_list.xml file and compressed packages for autoupdates from an installation directory and a package -> file map.
* create-packages.rb takes an input directory containing all files as they are laid out in
    the installation directory of an application, a JSON file mapping files to packages and
    generates the file_list.xml file listing all files in the release along with the
    .zip packages containing those files.

  * Add single-package-map.json which is the simplest possible package map - putting
    all files in a single package.

    Per-project/build package maps can be written that separate files into different packages
	based on the component they belong to.

This script replaces the autoupdate-setup tool written in C++ in the utilities/autoupdate-setup
directory in the desktop source tree.
2011-08-25 18:55:23 +01:00