mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge fx-team to m-c a=merge
This commit is contained in:
commit
7e015865b6
@ -7,7 +7,7 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
const BASE_URL = "http://mochi.test:8888/browser/browser/components/loop/test/mochitest/loop_fxa.sjs?";
|
||||
const BASE_URL = Services.prefs.getCharPref("loop.server");
|
||||
|
||||
function* checkFxA401() {
|
||||
let err = MozLoopService.errors.get("login");
|
||||
@ -23,7 +23,7 @@ function* checkFxA401() {
|
||||
"state of loop button should be error after a 401 with login");
|
||||
|
||||
let loopPanel = document.getElementById("loop-notification-panel");
|
||||
yield loadLoopPanel({loopURL: BASE_URL });
|
||||
yield loadLoopPanel();
|
||||
let loopDoc = document.getElementById("loop").contentDocument;
|
||||
is(loopDoc.querySelector(".alert-error .message").textContent,
|
||||
getLoopString("could_not_authenticate"),
|
||||
@ -132,17 +132,22 @@ add_task(function* params_no_hawk_session() {
|
||||
add_task(function* params_nonJSON() {
|
||||
let loopServerUrl = Services.prefs.getCharPref("loop.server");
|
||||
Services.prefs.setCharPref("loop.server", "https://localhost:3000/invalid");
|
||||
// Reset after changing the server so a new HawkClient is created
|
||||
yield resetFxA();
|
||||
try {
|
||||
// Reset after changing the server so a new HawkClient is created
|
||||
yield resetFxA();
|
||||
|
||||
let loginPromise = MozLoopService.logInToFxA();
|
||||
let caught = false;
|
||||
yield loginPromise.catch(() => {
|
||||
ok(true, "The login promise should be rejected due to non-JSON params");
|
||||
caught = true;
|
||||
});
|
||||
ok(caught, "Should have caught the rejection");
|
||||
Services.prefs.setCharPref("loop.server", loopServerUrl);
|
||||
let loginPromise = MozLoopService.logInToFxA();
|
||||
let caught = false;
|
||||
yield loginPromise.catch(() => {
|
||||
ok(true, "The login promise should be rejected due to non-JSON params");
|
||||
caught = true;
|
||||
});
|
||||
ok(caught, "Should have caught the rejection");
|
||||
} catch (err) {
|
||||
throw err;
|
||||
} finally {
|
||||
Services.prefs.setCharPref("loop.server", loopServerUrl);
|
||||
}
|
||||
});
|
||||
|
||||
add_task(function* invalidState() {
|
||||
@ -286,7 +291,7 @@ add_task(function* basicAuthorizationAndRegistration() {
|
||||
yield MozLoopService.promiseRegisteredWithServers();
|
||||
|
||||
let statusChangedPromise = promiseObserverNotified("loop-status-changed");
|
||||
yield loadLoopPanel({loopURL: BASE_URL, stayOnline: true});
|
||||
yield loadLoopPanel({stayOnline: true});
|
||||
yield statusChangedPromise;
|
||||
let loopDoc = document.getElementById("loop").contentDocument;
|
||||
let visibleEmail = loopDoc.getElementsByClassName("user-identity")[0];
|
||||
@ -316,7 +321,7 @@ add_task(function* basicAuthorizationAndRegistration() {
|
||||
let loopPanel = document.getElementById("loop-notification-panel");
|
||||
loopPanel.hidePopup();
|
||||
statusChangedPromise = promiseObserverNotified("loop-status-changed");
|
||||
yield loadLoopPanel({loopURL: BASE_URL, stayOnline: true});
|
||||
yield loadLoopPanel({stayOnline: true});
|
||||
yield statusChangedPromise;
|
||||
is(loopButton.getAttribute("state"), "", "state of loop button should return to empty after panel is opened");
|
||||
loopPanel.hidePopup();
|
||||
|
@ -589,6 +589,9 @@ Section "-Application" APP_IDX
|
||||
${EndUnless}
|
||||
${EndIf}
|
||||
|
||||
; Add the Firewall entries during install
|
||||
Call AddFirewallEntries
|
||||
|
||||
!ifdef MOZ_MAINTENANCE_SERVICE
|
||||
${If} $TmpVal == "HKLM"
|
||||
; Add the registry keys for allowed certificates.
|
||||
|
@ -115,6 +115,9 @@ FunctionEnd
|
||||
; Win7 taskbar and start menu link maintenance
|
||||
Call FixShortcutAppModelIDs
|
||||
|
||||
; Add the Firewall entries after an update
|
||||
Call AddFirewallEntries
|
||||
|
||||
; Only update the Clients\StartMenuInternet registry key values in HKLM if
|
||||
; they don't exist or this installation is the same as the one set in those
|
||||
; keys.
|
||||
@ -1616,6 +1619,10 @@ Function FixShortcutAppModelIDs
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Function AddFirewallEntries
|
||||
liteFirewallW::AddRule "$INSTDIR\${FileMainEXE}" "${BrandShortName} ($INSTDIR)"
|
||||
FunctionEnd
|
||||
|
||||
; The !ifdef NO_LOG prevents warnings when compiling the installer.nsi due to
|
||||
; this function only being used by the uninstaller.nsi.
|
||||
!ifdef NO_LOG
|
||||
|
@ -464,6 +464,8 @@ Section "Uninstall"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
liteFirewallW::RemoveRule "$INSTDIR\${FileMainEXE}" "${BrandShortName} ($INSTDIR)"
|
||||
|
||||
; Refresh desktop icons otherwise the start menu internet item won't be
|
||||
; removed and other ugly things will happen like recreation of the app's
|
||||
; clients registry key by the OS under some conditions.
|
||||
|
17
other-licenses/nsis/Contrib/liteFirewall/License.txt
Normal file
17
other-licenses/nsis/Contrib/liteFirewall/License.txt
Normal file
@ -0,0 +1,17 @@
|
||||
liteFirewall is based on nsisFirewall.
|
||||
|
||||
nsisFirewall -- Small NSIS plugin for simple tasks with Windows Firewall
|
||||
Web site: http://wiz0u.free.fr/prog/nsisFirewall
|
||||
|
||||
Copyright (c) 2007-2009 Olivier Marcoux
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
39
other-licenses/nsis/Contrib/liteFirewall/ReadMe.txt
Normal file
39
other-licenses/nsis/Contrib/liteFirewall/ReadMe.txt
Normal file
@ -0,0 +1,39 @@
|
||||
liteFirewall 1.0 -- based on nsisFirewall 1.2
|
||||
|
||||
http://liangsun.info/portfolio/nsis-plugin-litefirewall/
|
||||
http://nsis.sourceforge.net/LiteFirewall_Plugin
|
||||
|
||||
---------------------------------------------------------
|
||||
liteFirewall resolved the issue nsisFirewall exists on Vista/Windows 7 platforms.
|
||||
It support the profiles (private, domain, public) of firewall rules.
|
||||
It support Unicode NSIS, while another firewall plugin SimpleFC not.
|
||||
------------------------------------------------------------
|
||||
|
||||
Usage
|
||||
----------------------------------------------------------
|
||||
liteFirewall::AddRule "<application path>" "<rule name>"
|
||||
liteFirewall::RemoveRule "<application path>" "<rule name>"
|
||||
|
||||
<application path> is the full path to the application you want to be authorized to
|
||||
access the network (or accept incoming connections)
|
||||
|
||||
<rule name> is the title that will be given to this exception entry in the firewall
|
||||
control panel list
|
||||
|
||||
|
||||
Notes
|
||||
-----
|
||||
1) Your installer must be run with administrator rights for liteFirewall to work
|
||||
2) When compiling with more recent compiler than VC60, you need to choose the compilation
|
||||
option to use static MFC library.
|
||||
|
||||
Sample scripts
|
||||
--------------
|
||||
|
||||
; Add NOTEPAD to the authorized list
|
||||
liteFirewall::AddRule "$WINDIR\Notepad.exe" "liteFirewall Test"
|
||||
Pop $0
|
||||
|
||||
; Remove NOTEPAD from the authorized list
|
||||
liteFirewall::RemoveRule "$WINDIR\Notepad.exe" "liteFirewall Test"
|
||||
Pop $0
|
25
other-licenses/nsis/Contrib/liteFirewall/Sample.nsi
Normal file
25
other-licenses/nsis/Contrib/liteFirewall/Sample.nsi
Normal file
@ -0,0 +1,25 @@
|
||||
; liteFirewall - Sample script
|
||||
|
||||
!ifdef TARGETDIR
|
||||
!addplugindir "${TARGETDIR}"
|
||||
!else
|
||||
!addplugindir "..\bin"
|
||||
!endif
|
||||
|
||||
Name "Sample liteFirewall"
|
||||
OutFile "Sample.exe"
|
||||
ShowInstDetails show
|
||||
|
||||
Section "Main program"
|
||||
; Add NOTEPAD to the authorized list
|
||||
liteFirewallW::AddRule "$WINDIR\Notepad.exe" "liteFirewall Test"
|
||||
Pop $0
|
||||
Exec "rundll32.exe shell32.dll,Control_RunDLL firewall.cpl"
|
||||
MessageBox MB_OK "Program added to Firewall exception list.$\r$\n(close the control panel before clicking OK)"
|
||||
|
||||
; Remove NOTEPAD from the authorized list
|
||||
liteFirewallW::RemoveRule "$WINDIR\Notepad.exe" "liteFirewall Test"
|
||||
Pop $0
|
||||
Exec "rundll32.exe shell32.dll,Control_RunDLL firewall.cpl"
|
||||
MessageBox MB_OK "Program removed to Firewall exception list"
|
||||
SectionEnd
|
97
other-licenses/nsis/Contrib/liteFirewall/exdll.h
Normal file
97
other-licenses/nsis/Contrib/liteFirewall/exdll.h
Normal file
@ -0,0 +1,97 @@
|
||||
#ifndef _EXDLL_H_
|
||||
#define _EXDLL_H_
|
||||
|
||||
// only include this file from one place in your DLL.
|
||||
// (it is all static, if you use it in two places it will fail)
|
||||
|
||||
#define EXDLL_INIT() { \
|
||||
g_stringsize=string_size; \
|
||||
g_stacktop=stacktop; \
|
||||
g_variables=variables; }
|
||||
|
||||
// For page showing plug-ins
|
||||
#define WM_NOTIFY_OUTER_NEXT (WM_USER+0x8)
|
||||
#define WM_NOTIFY_CUSTOM_READY (WM_USER+0xd)
|
||||
#define NOTIFY_BYE_BYE 'x'
|
||||
|
||||
typedef struct _stack_t {
|
||||
struct _stack_t *next;
|
||||
TCHAR text[1]; // this should be the length of string_size
|
||||
} stack_t;
|
||||
|
||||
|
||||
static unsigned int g_stringsize;
|
||||
static stack_t **g_stacktop;
|
||||
static TCHAR *g_variables;
|
||||
|
||||
static int __stdcall popstring(TCHAR *str); // 0 on success, 1 on empty stack
|
||||
static void __stdcall pushstring(const TCHAR *str);
|
||||
|
||||
enum
|
||||
{
|
||||
INST_0, // $0
|
||||
INST_1, // $1
|
||||
INST_2, // $2
|
||||
INST_3, // $3
|
||||
INST_4, // $4
|
||||
INST_5, // $5
|
||||
INST_6, // $6
|
||||
INST_7, // $7
|
||||
INST_8, // $8
|
||||
INST_9, // $9
|
||||
INST_R0, // $R0
|
||||
INST_R1, // $R1
|
||||
INST_R2, // $R2
|
||||
INST_R3, // $R3
|
||||
INST_R4, // $R4
|
||||
INST_R5, // $R5
|
||||
INST_R6, // $R6
|
||||
INST_R7, // $R7
|
||||
INST_R8, // $R8
|
||||
INST_R9, // $R9
|
||||
INST_CMDLINE, // $CMDLINE
|
||||
INST_INSTDIR, // $INSTDIR
|
||||
INST_OUTDIR, // $OUTDIR
|
||||
INST_EXEDIR, // $EXEDIR
|
||||
INST_LANG, // $LANGUAGE
|
||||
__INST_LAST
|
||||
};
|
||||
|
||||
|
||||
// utility functions (not required but often useful)
|
||||
static int __stdcall popstring(TCHAR *str)
|
||||
{
|
||||
stack_t *th;
|
||||
if (!g_stacktop || !*g_stacktop) return 1;
|
||||
th=(*g_stacktop);
|
||||
lstrcpy(str,th->text);
|
||||
*g_stacktop = th->next;
|
||||
GlobalFree((HGLOBAL)th);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __stdcall pushstring(const TCHAR *str)
|
||||
{
|
||||
stack_t *th;
|
||||
if (!g_stacktop) return;
|
||||
th=(stack_t*)GlobalAlloc(GPTR,sizeof(stack_t)+g_stringsize*sizeof(TCHAR));
|
||||
lstrcpyn(th->text,str,g_stringsize);
|
||||
th->next=*g_stacktop;
|
||||
*g_stacktop=th;
|
||||
}
|
||||
|
||||
static TCHAR * __stdcall getuservariable(int varnum)
|
||||
{
|
||||
if (varnum < 0 || varnum >= __INST_LAST) return NULL;
|
||||
return g_variables+varnum*g_stringsize;
|
||||
}
|
||||
|
||||
static void __stdcall setuservariable(int varnum, const TCHAR *var)
|
||||
{
|
||||
if (var != NULL && varnum >= 0 && varnum < __INST_LAST)
|
||||
lstrcpy(g_variables + varnum*g_stringsize, var);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif//_EXDLL_H_
|
408
other-licenses/nsis/Contrib/liteFirewall/liteFirewall.cpp
Normal file
408
other-licenses/nsis/Contrib/liteFirewall/liteFirewall.cpp
Normal file
@ -0,0 +1,408 @@
|
||||
/*
|
||||
liteFirewall is based on nsisFirewall.
|
||||
Modified by Liang Sun on 19, July, 2011
|
||||
http://liangsun.info/portfolio/nsis-plugin-litefirewall/
|
||||
http://nsis.sourceforge.net/LiteFirewall_Plugin
|
||||
http://www.msnlite.org
|
||||
*/
|
||||
|
||||
/*
|
||||
nsisFirewall -- Small NSIS plugin for simple tasks with Windows Firewall
|
||||
Web site: http://wiz0u.free.fr/prog/nsisFirewall
|
||||
|
||||
Copyright (c) 2007-2009 Olivier Marcoux
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
#include <shlwapi.h>
|
||||
//#include <stdio.h>
|
||||
|
||||
#ifdef NSIS
|
||||
#include "exdll.h"
|
||||
#endif
|
||||
|
||||
//#import "libid:58FBCF7C-E7A9-467C-80B3-FC65E8FCCA08"
|
||||
#import "netfw.tlb"
|
||||
#include <netfw.h>
|
||||
using namespace NetFwTypeLib;
|
||||
|
||||
|
||||
#pragma comment( lib, "ole32.lib" )
|
||||
#pragma comment( lib, "oleaut32.lib" )
|
||||
// Forward declarations
|
||||
|
||||
#ifdef NSIS
|
||||
HINSTANCE g_hInstance;
|
||||
#endif
|
||||
|
||||
HRESULT WFCOMInitialize(INetFwPolicy2** ppNetFwPolicy2);
|
||||
|
||||
HRESULT AddRule(LPCTSTR ExceptionName, LPCTSTR ProcessPath)
|
||||
{
|
||||
HRESULT result = CoInitialize(NULL);
|
||||
if (FAILED(result))
|
||||
return result;
|
||||
result = REGDB_E_CLASSNOTREG;
|
||||
|
||||
HRESULT hrComInit = S_OK;
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
INetFwPolicy2 *pNetFwPolicy2 = NULL;
|
||||
INetFwRules *pFwRules = NULL;
|
||||
INetFwRule *pFwRule = NULL;
|
||||
/* Start Mozilla modification */
|
||||
INetFwRule *pFwRuleExisting = NULL;
|
||||
|
||||
// long CurrentProfilesBitMask = 0;
|
||||
/* End Mozilla modification */
|
||||
|
||||
BSTR bstrRuleName = SysAllocString(ExceptionName);
|
||||
BSTR bstrApplicationName = SysAllocString(ProcessPath);
|
||||
BSTR bstrRuleInterfaceType = SysAllocString(L"All");
|
||||
|
||||
// Initialize COM.
|
||||
hrComInit = CoInitializeEx(
|
||||
0,
|
||||
COINIT_APARTMENTTHREADED
|
||||
);
|
||||
|
||||
// Ignore RPC_E_CHANGED_MODE; this just means that COM has already been
|
||||
// initialized with a different mode. Since we don't care what the mode is,
|
||||
// we'll just use the existing mode.
|
||||
if (hrComInit != RPC_E_CHANGED_MODE)
|
||||
{
|
||||
if (FAILED(hrComInit))
|
||||
{
|
||||
printf("CoInitializeEx failed: 0x%08lx\n", hrComInit);
|
||||
goto Cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
// Retrieve INetFwPolicy2
|
||||
hr = WFCOMInitialize(&pNetFwPolicy2);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
try
|
||||
{
|
||||
INetFwMgrPtr fwMgr(L"HNetCfg.FwMgr");
|
||||
if (fwMgr)
|
||||
{
|
||||
INetFwAuthorizedApplicationPtr app(L"HNetCfg.FwAuthorizedApplication");
|
||||
if (app)
|
||||
{
|
||||
app->ProcessImageFileName = ProcessPath;
|
||||
app->Name = ExceptionName;
|
||||
app->Scope = NetFwTypeLib::NET_FW_SCOPE_ALL;
|
||||
app->IpVersion = NetFwTypeLib::NET_FW_IP_VERSION_ANY;
|
||||
app->Enabled = VARIANT_TRUE;
|
||||
fwMgr->LocalPolicy->CurrentProfile->AuthorizedApplications->Add(app);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (_com_error& e)
|
||||
{
|
||||
printf("%s", e.Error());
|
||||
}
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
// Retrieve INetFwRules
|
||||
hr = pNetFwPolicy2->get_Rules(&pFwRules);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
printf("get_Rules failed: 0x%08lx\n", hr);
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
/* Start Mozilla modification */
|
||||
// Don't add a new rule if there is an existing rule with the same name.
|
||||
hr = pFwRules->Item(bstrRuleName, &pFwRuleExisting);
|
||||
// Release the INetFwRule object
|
||||
if (pFwRuleExisting != NULL)
|
||||
{
|
||||
pFwRuleExisting->Release();
|
||||
}
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
printf("Firewall profile already exists\n");
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
// Retrieve Current Profiles bitmask
|
||||
// hr = pNetFwPolicy2->get_CurrentProfileTypes(&CurrentProfilesBitMask);
|
||||
// if (FAILED(hr))
|
||||
// {
|
||||
// printf("get_CurrentProfileTypes failed: 0x%08lx\n", hr);
|
||||
// goto Cleanup;
|
||||
// }
|
||||
|
||||
// When possible we avoid adding firewall rules to the \ profile.
|
||||
// If Public is currently active and it is not the only active profile, we remove it from the bitmask
|
||||
// if ((CurrentProfilesBitMask & NET_FW_PROFILE2_PUBLIC) &&
|
||||
// (CurrentProfilesBitMask != NET_FW_PROFILE2_PUBLIC))
|
||||
// {
|
||||
// CurrentProfilesBitMask ^= NET_FW_PROFILE2_PUBLIC;
|
||||
// }
|
||||
|
||||
// Create a new Firewall Rule object.
|
||||
hr = CoCreateInstance(
|
||||
__uuidof(NetFwRule),
|
||||
NULL,
|
||||
CLSCTX_INPROC_SERVER,
|
||||
__uuidof(INetFwRule),
|
||||
(void**)&pFwRule);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
printf("CoCreateInstance for Firewall Rule failed: 0x%08lx\n", hr);
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
// Populate the Firewall Rule object
|
||||
pFwRule->put_Name(bstrRuleName);
|
||||
pFwRule->put_Protocol(NetFwTypeLib::NET_FW_IP_PROTOCOL_TCP);
|
||||
pFwRule->put_InterfaceTypes(bstrRuleInterfaceType);
|
||||
pFwRule->put_Profiles(NET_FW_PROFILE2_PRIVATE);
|
||||
pFwRule->put_Action(NET_FW_ACTION_ALLOW);
|
||||
pFwRule->put_Enabled(VARIANT_TRUE);
|
||||
|
||||
pFwRule->put_ApplicationName(bstrApplicationName);
|
||||
// Add the Firewall Rule
|
||||
hr = pFwRules->Add(pFwRule);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
printf("Firewall Rule Add failed: 0x%08lx\n", hr);
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
pFwRule->Release();
|
||||
/* End Mozilla modification */
|
||||
|
||||
// Create a new Firewall Rule object.
|
||||
hr = CoCreateInstance(
|
||||
__uuidof(NetFwRule),
|
||||
NULL,
|
||||
CLSCTX_INPROC_SERVER,
|
||||
__uuidof(INetFwRule),
|
||||
(void**)&pFwRule);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
printf("CoCreateInstance for Firewall Rule failed: 0x%08lx\n", hr);
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
// Populate the Firewall Rule object
|
||||
pFwRule->put_Name(bstrRuleName);
|
||||
/* Start Mozilla modification */
|
||||
// pFwRule->put_Protocol(NET_FW_IP_PROTOCOL_ANY);
|
||||
pFwRule->put_Protocol(NetFwTypeLib::NET_FW_IP_PROTOCOL_UDP);
|
||||
/* End Mozilla modification */
|
||||
pFwRule->put_InterfaceTypes(bstrRuleInterfaceType);
|
||||
/* Start Mozilla modification */
|
||||
// pFwRule->put_Profiles(CurrentProfilesBitMask);
|
||||
pFwRule->put_Profiles(NET_FW_PROFILE2_PRIVATE);
|
||||
/* End Mozilla modification */
|
||||
pFwRule->put_Action(NET_FW_ACTION_ALLOW);
|
||||
pFwRule->put_Enabled(VARIANT_TRUE);
|
||||
|
||||
pFwRule->put_ApplicationName(bstrApplicationName);
|
||||
// Add the Firewall Rule
|
||||
hr = pFwRules->Add(pFwRule);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
printf("Firewall Rule Add failed: 0x%08lx\n", hr);
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
Cleanup:
|
||||
|
||||
// Free BSTR's
|
||||
SysFreeString(bstrRuleName);
|
||||
SysFreeString(bstrApplicationName);
|
||||
SysFreeString(bstrRuleInterfaceType);
|
||||
|
||||
// Release the INetFwRule object
|
||||
if (pFwRule != NULL)
|
||||
{
|
||||
pFwRule->Release();
|
||||
}
|
||||
|
||||
// Release the INetFwRules object
|
||||
if (pFwRules != NULL)
|
||||
{
|
||||
pFwRules->Release();
|
||||
}
|
||||
|
||||
// Release the INetFwPolicy2 object
|
||||
if (pNetFwPolicy2 != NULL)
|
||||
{
|
||||
pNetFwPolicy2->Release();
|
||||
}
|
||||
|
||||
CoUninitialize();
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT RemoveRule(LPCTSTR ExceptionName, LPCTSTR ProcessPath)
|
||||
{
|
||||
HRESULT result = CoInitialize(NULL);
|
||||
if (FAILED(result))
|
||||
return result;
|
||||
try
|
||||
{
|
||||
INetFwMgrPtr fwMgr(L"HNetCfg.FwMgr");
|
||||
if (fwMgr)
|
||||
{
|
||||
fwMgr->LocalPolicy->CurrentProfile->AuthorizedApplications->Remove(ProcessPath);
|
||||
result = S_OK;
|
||||
}
|
||||
}
|
||||
catch (_com_error& e)
|
||||
{
|
||||
e;
|
||||
}
|
||||
HRESULT hrComInit = S_OK;
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
INetFwPolicy2 *pNetFwPolicy2 = NULL;
|
||||
INetFwRules *pFwRules = NULL;
|
||||
|
||||
/* Start Mozilla modification */
|
||||
// long CurrentProfilesBitMask = 0;
|
||||
/* End Mozilla modification */
|
||||
|
||||
BSTR bstrRuleName = SysAllocString(ExceptionName);
|
||||
|
||||
// Retrieve INetFwPolicy2
|
||||
hr = WFCOMInitialize(&pNetFwPolicy2);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
// Retrieve INetFwRules
|
||||
hr = pNetFwPolicy2->get_Rules(&pFwRules);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
printf("get_Rules failed: 0x%08lx\n", hr);
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
/* Start Mozilla modification */
|
||||
// Retrieve Current Profiles bitmask
|
||||
// hr = pNetFwPolicy2->get_CurrentProfileTypes(&CurrentProfilesBitMask);
|
||||
// if (FAILED(hr))
|
||||
// {
|
||||
// printf("get_CurrentProfileTypes failed: 0x%08lx\n", hr);
|
||||
// goto Cleanup;
|
||||
// }
|
||||
|
||||
// When possible we avoid adding firewall rules to the Public profile.
|
||||
// If Public is currently active and it is not the only active profile, we remove it from the bitmask
|
||||
// if ((CurrentProfilesBitMask & NET_FW_PROFILE2_PUBLIC) &&
|
||||
// (CurrentProfilesBitMask != NET_FW_PROFILE2_PUBLIC))
|
||||
// {
|
||||
// CurrentProfilesBitMask ^= NET_FW_PROFILE2_PUBLIC;
|
||||
// }
|
||||
/* End Mozilla modification */
|
||||
|
||||
// Remove the Firewall Rule
|
||||
hr = pFwRules->Remove(bstrRuleName);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
printf("Firewall Rule Remove failed: 0x%08lx\n", hr);
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
Cleanup:
|
||||
|
||||
// Free BSTR's
|
||||
SysFreeString(bstrRuleName);
|
||||
|
||||
// Release the INetFwRules object
|
||||
if (pFwRules != NULL)
|
||||
{
|
||||
pFwRules->Release();
|
||||
}
|
||||
|
||||
// Release the INetFwPolicy2 object
|
||||
if (pNetFwPolicy2 != NULL)
|
||||
{
|
||||
pNetFwPolicy2->Release();
|
||||
}
|
||||
|
||||
CoUninitialize();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef NSIS
|
||||
extern "C" void __declspec(dllexport) AddRule(HWND hwndParent, int string_size,
|
||||
TCHAR *variables, stack_t **stacktop)
|
||||
{
|
||||
EXDLL_INIT();
|
||||
|
||||
TCHAR ExceptionName[256], ProcessPath[MAX_PATH];
|
||||
popstring(ProcessPath);
|
||||
popstring(ExceptionName);
|
||||
HRESULT result = AddRule(ExceptionName, ProcessPath);
|
||||
// push the result back to NSIS
|
||||
TCHAR intBuffer[16];
|
||||
wsprintf(intBuffer, _T("%d"), result);
|
||||
pushstring(intBuffer);
|
||||
}
|
||||
|
||||
extern "C" void __declspec(dllexport) RemoveRule(HWND hwndParent, int string_size,
|
||||
TCHAR *variables, stack_t **stacktop)
|
||||
{
|
||||
EXDLL_INIT();
|
||||
|
||||
TCHAR ExceptionName[256], ProcessPath[MAX_PATH];
|
||||
popstring(ProcessPath);
|
||||
popstring(ExceptionName);
|
||||
HRESULT result = RemoveRule(ExceptionName, ProcessPath);
|
||||
// push the result back to NSIS
|
||||
TCHAR intBuffer[16];
|
||||
wsprintf(intBuffer, _T("%d"), result);
|
||||
pushstring(intBuffer);
|
||||
}
|
||||
|
||||
extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD, LPVOID)
|
||||
{
|
||||
g_hInstance = hInstance;
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// Instantiate INetFwPolicy2
|
||||
|
||||
HRESULT WFCOMInitialize(INetFwPolicy2** ppNetFwPolicy2)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
hr = CoCreateInstance(
|
||||
__uuidof(NetFwPolicy2),
|
||||
NULL,
|
||||
CLSCTX_INPROC_SERVER,
|
||||
__uuidof(INetFwPolicy2),
|
||||
(void**)ppNetFwPolicy2);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
printf("CoCreateInstance for INetFwPolicy2 failed: 0x%08lx\n", hr);
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
Cleanup:
|
||||
return hr;
|
||||
}
|
204
other-licenses/nsis/Contrib/liteFirewall/liteFirewall.dsp
Normal file
204
other-licenses/nsis/Contrib/liteFirewall/liteFirewall.dsp
Normal file
@ -0,0 +1,204 @@
|
||||
# Microsoft Developer Studio Project File - Name="liteFirewall" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=liteFirewall - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "liteFirewall.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "liteFirewall.mak" CFG="liteFirewall - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "liteFirewall - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "liteFirewall - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "liteFirewall - Win32 Release UNICODE" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "liteFirewall - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /Zi /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /Zi /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NSIS" /FR /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib shlwapi.lib /nologo /dll /machine:I386 /out:"../bin/liteFirewall.dll" /OPT:REF /OPT:NOWIN98
|
||||
# SUBTRACT LINK32 /pdb:none /debug /nodefaultlib
|
||||
# Begin Special Build Tool
|
||||
IntDir=.\Release
|
||||
ProjDir=.
|
||||
TargetDir=\Prog\shared\bin
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Desc=Building Sample Installer...
|
||||
PostBuild_Cmds="%ProgramFiles%\NSIS\makensis" /V2 "/DTARGETDIR=$(TargetDir)" "/DINTDIR=$(IntDir)" "$(ProjDir)\Sample.nsi"
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "liteFirewall - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /D "NSIS" /FR /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib shlwapi.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
# Begin Special Build Tool
|
||||
IntDir=.\Debug
|
||||
ProjDir=.
|
||||
TargetDir=.\Debug
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Desc=Building Sample Installer...
|
||||
PostBuild_Cmds="%ProgramFiles%\NSIS\makensis" /V4 /DTARGETDIR=$(TargetDir) /DINTDIR=$(IntDir) $(ProjDir)\Sample.nsi
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "liteFirewall - Win32 Release UNICODE"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release_UNICODE"
|
||||
# PROP BASE Intermediate_Dir "Release_UNICODE"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_UNICODE"
|
||||
# PROP Intermediate_Dir "Release_UNICODE"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /Zi /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NSIS" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /Zi /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /D "NSIS" /FR /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib shlwapi.lib /nologo /dll /machine:I386 /out:"../bin/liteFirewall.dll" /OPT:REF /OPT:NOWIN98
|
||||
# SUBTRACT BASE LINK32 /pdb:none /debug /nodefaultlib
|
||||
# ADD LINK32 kernel32.lib user32.lib shlwapi.lib /nologo /dll /machine:I386 /out:"../bin/liteFirewallW.dll" /OPT:REF /OPT:NOWIN98
|
||||
# SUBTRACT LINK32 /pdb:none /debug /nodefaultlib
|
||||
# Begin Special Build Tool
|
||||
IntDir=.\Release_UNICODE
|
||||
ProjDir=.
|
||||
TargetDir=\Prog\shared\bin
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Desc=Building Sample Installer...
|
||||
PostBuild_Cmds="%ProgramFiles%\NSIS\makensis" /V2 "/DTARGETDIR=$(TargetDir)" "/DINTDIR=$(IntDir)" "$(ProjDir)\Sample.nsi"
|
||||
# End Special Build Tool
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "liteFirewall - Win32 Release"
|
||||
# Name "liteFirewall - Win32 Debug"
|
||||
# Name "liteFirewall - Win32 Release UNICODE"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\exdll.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\License.txt
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\liteFirewall.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ReadMe.txt
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Sample.nsi
|
||||
|
||||
!IF "$(CFG)" == "liteFirewall - Win32 Release"
|
||||
|
||||
# Begin Custom Build
|
||||
ProjDir=.
|
||||
InputPath=.\Sample.nsi
|
||||
|
||||
"$(ProjDir)\Sample.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
rem Force Post-Build Step
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "liteFirewall - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
ProjDir=.
|
||||
InputPath=.\Sample.nsi
|
||||
|
||||
"$(ProjDir)\Sample.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
rem Force Post-Build Step
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "liteFirewall - Win32 Release UNICODE"
|
||||
|
||||
# Begin Custom Build
|
||||
ProjDir=.
|
||||
InputPath=.\Sample.nsi
|
||||
|
||||
"$(ProjDir)\Sample.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
rem Force Post-Build Step
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
29
other-licenses/nsis/Contrib/liteFirewall/liteFirewall.dsw
Normal file
29
other-licenses/nsis/Contrib/liteFirewall/liteFirewall.dsw
Normal file
@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "liteFirewall"=.\liteFirewall.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
23
other-licenses/nsis/Contrib/liteFirewall/liteFirewall.sln
Normal file
23
other-licenses/nsis/Contrib/liteFirewall/liteFirewall.sln
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liteFirewall", "liteFirewall.vcproj", "{F7462DF9-A430-4185-9AFC-8FAEA0FB98EA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release UNICODE|Win32 = Release UNICODE|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F7462DF9-A430-4185-9AFC-8FAEA0FB98EA}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F7462DF9-A430-4185-9AFC-8FAEA0FB98EA}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F7462DF9-A430-4185-9AFC-8FAEA0FB98EA}.Release UNICODE|Win32.ActiveCfg = Release UNICODE|Win32
|
||||
{F7462DF9-A430-4185-9AFC-8FAEA0FB98EA}.Release UNICODE|Win32.Build.0 = Release UNICODE|Win32
|
||||
{F7462DF9-A430-4185-9AFC-8FAEA0FB98EA}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F7462DF9-A430-4185-9AFC-8FAEA0FB98EA}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
390
other-licenses/nsis/Contrib/liteFirewall/liteFirewall.vcproj
Normal file
390
other-licenses/nsis/Contrib/liteFirewall/liteFirewall.vcproj
Normal file
@ -0,0 +1,390 @@
|
||||
<?xml version="1.0" encoding="gb2312"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="liteFirewall"
|
||||
ProjectGUID="{F7462DF9-A430-4185-9AFC-8FAEA0FB98EA}"
|
||||
TargetFrameworkVersion="0"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/liteFirewall.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;UNICODE;NSIS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
PrecompiledHeaderFile=".\Debug/liteFirewall.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="shlwapi.lib"
|
||||
OutputFile=".\Debug/liteFirewall.dll"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\Debug/liteFirewall.pdb"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
ImportLibrary=".\Debug/liteFirewall.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
OutputFile=".\Debug/liteFirewall.bsc"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
Description="Building Sample Installer..."
|
||||
CommandLine=""E:\Program Files (x86)\NSIS\Unicode\makensis" /V4 /DTARGETDIR=$(TargetDir) /DINTDIR=$(IntDir) $(ProjectDir)Sample.nsi"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release UNICODE|Win32"
|
||||
OutputDirectory=".\Release_UNICODE"
|
||||
IntermediateDirectory=".\Release_UNICODE"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release_UNICODE/liteFirewall.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;UNICODE;NSIS"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderFile=".\Release_UNICODE/liteFirewall.pch"
|
||||
AssemblerListingLocation=".\Release_UNICODE/"
|
||||
ObjectFile=".\Release_UNICODE/"
|
||||
ProgramDataBaseFileName=".\Release_UNICODE/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="shlwapi.lib"
|
||||
OutputFile="../bin/liteFirewallW.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
ProgramDatabaseFile=".\Release_UNICODE/liteFirewallW.pdb"
|
||||
OptimizeReferences="2"
|
||||
OptimizeForWindows98="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
ImportLibrary=".\Release_UNICODE/liteFirewallW.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
OutputFile=".\Release_UNICODE/liteFirewall.bsc"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
Description="Building Sample Installer..."
|
||||
CommandLine=""E:\Program Files (x86)\NSIS\Unicode\makensis" /V2 /DTARGETDIR=$(TargetDir) /DINTDIR=$(IntDir) $(ProjectDir)Sample.nsi"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/liteFirewall.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;NSIS"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderFile=".\Release/liteFirewall.pch"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="shlwapi.lib"
|
||||
OutputFile="../bin/liteFirewall.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
ProgramDatabaseFile=".\Release/liteFirewall.pdb"
|
||||
OptimizeReferences="2"
|
||||
OptimizeForWindows98="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
ImportLibrary=".\Release/liteFirewall.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
OutputFile=".\Release/liteFirewall.bsc"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
Description="Building Sample Installer..."
|
||||
CommandLine=""E:\Program Files (x86)\NSIS\Unicode\makensis" /V2 /DTARGETDIR=$(TargetDir) /DINTDIR=$(IntDir) $(ProjectDir)Sample.nsi"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath="exdll.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="License.txt"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="liteFirewall.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release UNICODE|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ReadMe.txt"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Sample.nsi"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="rem Force Post-Build Step
"
|
||||
Outputs="$(ProjectDir)Sample.exe"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release UNICODE|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="rem Force Post-Build Step
"
|
||||
Outputs="$(ProjectDir)Sample.exe"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="rem Force Post-Build Step
"
|
||||
Outputs="$(ProjectDir)Sample.exe"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
BIN
other-licenses/nsis/Contrib/liteFirewall/netfw.tlb
Normal file
BIN
other-licenses/nsis/Contrib/liteFirewall/netfw.tlb
Normal file
Binary file not shown.
BIN
other-licenses/nsis/Plugins/liteFirewallW.dll
Normal file
BIN
other-licenses/nsis/Plugins/liteFirewallW.dll
Normal file
Binary file not shown.
@ -30,6 +30,7 @@ CUSTOM_NSIS_PLUGINS = \
|
||||
CityHash.dll \
|
||||
InetBgDL.dll \
|
||||
InvokeShellVerb.dll \
|
||||
liteFirewallW.dll \
|
||||
ServicesHelper.dll \
|
||||
ShellLink.dll \
|
||||
UAC.dll \
|
||||
|
Loading…
Reference in New Issue
Block a user