Merge lp:~brian.curtin/ubuntuone-windows-installer/909389-firewall-exception into lp:ubuntuone-windows-installer

Proposed by Brian Curtin
Status: Merged
Approved by: dobey
Approved revision: 111
Merged at revision: 111
Proposed branch: lp:~brian.curtin/ubuntuone-windows-installer/909389-firewall-exception
Merge into: lp:ubuntuone-windows-installer
Diff against target: 48 lines (+38/-0)
1 file modified
scripts/ubuntuone.xml (+38/-0)
To merge this branch: bzr merge lp:~brian.curtin/ubuntuone-windows-installer/909389-firewall-exception
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve
dobey (community) Approve
Review via email: mp+101137@code.launchpad.net

Commit message

 - Add Windows firewall exceptions to the installer (LP: #909389)

Description of the change

Add the relevant netsh commands to the Windows installer. Note that the Vista/7 version has to use different commands to get the same functionality on XP.

To post a comment you must log in.
Revision history for this message
dobey (dobey) wrote :

Looks ok to me.

review: Approve
Revision history for this message
Roberto Alsina (ralsina) wrote :

Looks good to me! Can't do IRL testing though

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/ubuntuone.xml'
2--- scripts/ubuntuone.xml 2012-03-23 21:02:45 +0000
3+++ scripts/ubuntuone.xml 2012-04-06 18:17:28 +0000
4@@ -226,6 +226,44 @@
5 <type>REG_SZ</type>
6 <value>${installdir}\dist\ubuntu-sso-login.exe</value>
7 </registrySet>
8+ <setInstallerVariableFromRegEx>
9+ <!-- Help get the paths correct on Windows 7
10+ netsh complains about path separators from installdir -->
11+ <name>forwardslash_installdir</name>
12+ <pattern>/</pattern>
13+ <substitution>\</substitution>
14+ <text>${installdir}</text>
15+ </setInstallerVariableFromRegEx>
16+ <runProgram>
17+ <!-- Inbound Firewall allowance -->
18+ <program>netsh.exe</program>
19+ <programArguments>advfirewall firewall add rule name="Ubuntu One" dir=in action=allow program="${forwardslash_installdir}\dist\ubuntuone-syncdaemon.exe" enable=yes</programArguments>
20+ <ruleEvaluationLogic>or</ruleEvaluationLogic>
21+ <ruleList>
22+ <!-- This usage of netsh is for Vista and 7. -->
23+ <platformTest type="windows-vista" />
24+ <platformTest type="windows-7" />
25+ </ruleList>
26+ </runProgram>
27+ <runProgram>
28+ <!-- Outbound Firewall allowance -->
29+ <program>netsh.exe</program>
30+ <programArguments>advfirewall firewall add rule name="Ubuntu One" dir=out action=allow program="${forwardslash_installdir}\dist\ubuntuone-syncdaemon.exe" enable=yes</programArguments>
31+ <ruleEvaluationLogic>or</ruleEvaluationLogic>
32+ <ruleList>
33+ <!-- This usage of netsh is for Vista and 7. -->
34+ <platformTest type="windows-vista" />
35+ <platformTest type="windows-7" />
36+ </ruleList>
37+ </runProgram>
38+ <runProgram>
39+ <program>netsh.exe</program>
40+ <programArguments>firewall add allowedprogram "${installdir}\dist\ubuntuone-syncdaemon.exe" "Ubuntu One" ENABLE</programArguments>
41+ <ruleList>
42+ <!-- This usage of netsh is for XP. -->
43+ <platformTest type="windows-xp" />
44+ </ruleList>
45+ </runProgram>
46 <runProgram>
47 <program>${windows_folder_system}\RunDll32.exe</program>
48 <programArguments>"${installdir}\dist\VistaLib32.dll" RunNonElevated "${installdir}\dist\ubuntuone-control-panel-qt.exe" --installer --with-icon &amp;</programArguments>

Subscribers

People subscribed via source and target branches