Skip to content

Commit

Permalink
Add bundle info file creation
Browse files Browse the repository at this point in the history
As discussed in geany/geany#560.
  • Loading branch information
eht16 committed Mar 12, 2016
1 parent f624467 commit 2d01eb9
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions build/gtk-bundle-from-msys2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ gtk3_dependency_pkgs="
webkitgtk3
"

package_urls=""


handle_command_line_options() {
for opt in "$@"; do
Expand Down Expand Up @@ -131,6 +133,15 @@ ${gtk_dependency_pkgs}
"
}

_remember_package_source() {
if [ "$use_cache" = "yes" ]; then
package_url=`pacman -Sp mingw-w64-${ABI}-${2}`
else
package_url="${1}"
fi
package_urls="${package_urls}\n${package_url}"
}

_getpkg() {
if [ "$use_cache" = "yes" ]; then
package_info=`pacman -Qi mingw-w64-$ABI-$1`
Expand All @@ -148,6 +159,7 @@ extract_packages() {
# extract packages
for i in $pkgs; do
pkg=$(_getpkg $i)
_remember_package_source $pkg $i
if [ "$use_cache" = "yes" ]; then
if [ -e "$pkg" ]; then
echo "Extracting $pkg from cache"
Expand Down Expand Up @@ -244,6 +256,19 @@ cleanup_unnecessary_files() {
find . -type d -empty -delete
}

create_bundle_dependency_info_file() {
filename="ReadMe.Dependencies.Geany-Plugins.txt"
cat << EOF > "${filename}"
This installation contains dependencies for Geany-Plugins which are
distributed as binaries (usually .dll files) as well as additional
files necessary for these dependencies.
Following is a list of all included binary packages with their
full download URL as used to create this installation.
EOF
echo -e "${package_urls}" >> "${filename}"
unix2dos "${filename}"
}

create_zip_archive() {
if [ "$make_zip" = "yes" ]; then
echo "Packing the bundle"
Expand All @@ -258,4 +283,5 @@ initialize
extract_packages
move_extracted_files
cleanup_unnecessary_files
create_bundle_dependency_info_file
create_zip_archive

0 comments on commit 2d01eb9

Please sign in to comment.