Skip to content
Permalink
Browse files

creatensis.pl: don't require admin rights to create the uninstaller

  • Loading branch information
jef-n committed Aug 20, 2017
1 parent f38c032 commit ef89a624a1308daec5ebf1b8a8f13fde822e17d1
Showing with 17 additions and 6 deletions.
  1. +16 −6 ms-windows/osgeo4w/creatensis.pl
  2. +1 −0 scripts/spell_check/spelling.dat
@@ -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;
@@ -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";
@@ -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";

@@ -7101,6 +7101,7 @@ tyrranies:tyrannies
tyrrany:tyranny
ubiquitious:ubiquitous
ublisher:publisher
updat:update
udpate:update
udpated:updated
udpates:updates

0 comments on commit ef89a62

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