Skip to content
Permalink
Browse files

creatensis.pl: retrieve version earlier from CMakeLists.txt for

preremove
  • Loading branch information
jef-n committed May 17, 2016
1 parent 56d5046 commit a3a64a1fd0a065f49fd74c95763c006eb8b0c3f9
Showing with 18 additions and 18 deletions.
  1. +18 −18 ms-windows/osgeo4w/creatensis.pl
@@ -265,6 +265,24 @@ sub getDeps {
chdir "..";
}

my($major, $minor, $patch);

open F, "../../CMakeLists.txt";
while(<F>) {
if(/SET\(CPACK_PACKAGE_VERSION_MAJOR "(\d+)"\)/) {
$major = $1;
} elsif(/SET\(CPACK_PACKAGE_VERSION_MINOR "(\d+)"\)/) {
$minor = $1;
} elsif(/SET\(CPACK_PACKAGE_VERSION_PATCH "(\d+)"\)/) {
$patch = $1;
} elsif(/SET\(RELEASE_NAME "(.+)"\)/) {
$releasename = $1 unless defined $releasename;
}
}
close F;

$version = "$major.$minor.$patch" unless defined $version;

#
# Create postinstall.bat
#
@@ -337,24 +355,6 @@ sub getDeps {

close F;

my($major, $minor, $patch);

open F, "../../CMakeLists.txt";
while(<F>) {
if(/SET\(CPACK_PACKAGE_VERSION_MAJOR "(\d+)"\)/) {
$major = $1;
} elsif(/SET\(CPACK_PACKAGE_VERSION_MINOR "(\d+)"\)/) {
$minor = $1;
} elsif(/SET\(CPACK_PACKAGE_VERSION_PATCH "(\d+)"\)/) {
$patch = $1;
} elsif(/SET\(RELEASE_NAME "(.+)"\)/) {
$releasename = $1 unless defined $releasename;
}
}
close F;

$version = "$major.$minor.$patch" unless defined $version;

unless( defined $binary ) {
if( -f "binary$archpostfix-$version" ) {
open P, "binary$archpostfix-$version";

0 comments on commit a3a64a1

Please sign in to comment.
You can’t perform that action at this time.