Skip to content

Commit

Permalink
creatensis.pl: don't require admin rights to create the uninstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Aug 22, 2017
1 parent f38c032 commit ef89a62
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
22 changes: 16 additions & 6 deletions ms-windows/osgeo4w/creatensis.pl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
# Download OSGeo4W packages
#

BEGIN {
# ignore requireAdministrator execution level while producing the
# uninstaller
$ENV{"__COMPAT_LAYER"} = 'RUNASINVOKER';
}

use strict;
use warnings;
use Getopt::Long;
Expand Down Expand Up @@ -448,16 +454,18 @@ sub getDeps {

my $run;
my $instdest;
unless($^O =~ /win/i) {

if($^O eq "cygwin") {
$run = "cygstart ";
$instdest = `cygpath -w \$PWD`;
} else {
$run = "wine ";
$instdest = `winepath -w \$PWD`;
$instdest =~ s/\s+$//;
$instdest =~ s/\\/\\\\/g;
} else {
$run = "";
$instdest = ".";
}

$instdest =~ s/\s+$//;
$instdest =~ s/\\/\\\\/g;


my $args = "";
$args .= " -V$verbose";
Expand Down Expand Up @@ -498,7 +506,9 @@ sub sign {
die "makeuinst.exe not created" unless -f "makeuinst.exe";

unlink "uninstall.exe";
chmod 0755, "makeuinst.exe";
system "${run}makeuinst.exe";
sleep 5;
die "uninstall.exe not created" unless -f "uninstall.exe";
unlink "makeuinst.exe";

Expand Down
1 change: 1 addition & 0 deletions scripts/spell_check/spelling.dat
Original file line number Diff line number Diff line change
Expand Up @@ -7101,6 +7101,7 @@ tyrranies:tyrannies
tyrrany:tyranny
ubiquitious:ubiquitous
ublisher:publisher
updat:update
udpate:update
udpated:updated
udpates:updates
Expand Down

0 comments on commit ef89a62

Please sign in to comment.