Only print the PE flags string for actual PE executable files. Now also zeros the checksum just in case.
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6943 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
590bb32e43
commit
bde2173193
3 changed files with 85 additions and 35 deletions
19
SConstruct
19
SConstruct
|
@ -420,14 +420,17 @@ def Sign(targets):
|
|||
a = defenv.Action('$CODESIGNER "%s"' % t.path)
|
||||
defenv.AddPostAction(t, a)
|
||||
|
||||
Import('EnablePESecurityFlagsHelper')
|
||||
def EnablePESecurityFlagsAction(target, source, env):
|
||||
Import('IsPEExecutable SetPESecurityFlagsWorker')
|
||||
def SetPESecurityFlagsAction(target, source, env):
|
||||
for t in target:
|
||||
EnablePESecurityFlagsHelper(t.path)
|
||||
|
||||
def EnablePESecurityFlags(targets):
|
||||
SetPESecurityFlagsWorker(t.path)
|
||||
def SetPESecurityFlagsActionEcho(target, source, env):
|
||||
for t in target:
|
||||
if IsPEExecutable(t.path):
|
||||
print('Setting PE flags on %s' % t.name)
|
||||
def SetPESecurityFlags(targets):
|
||||
for t in targets:
|
||||
a = defenv.Action(EnablePESecurityFlagsAction, cmdstr=('Setting PE flags on %s' % (t)))
|
||||
a = defenv.Action(SetPESecurityFlagsAction, strfunction=SetPESecurityFlagsActionEcho)
|
||||
defenv.AddPostAction(t, a)
|
||||
|
||||
def TestScript(scripts):
|
||||
|
@ -446,7 +449,7 @@ defenv.DistributeDoc = DistributeDoc
|
|||
defenv.DistributeDocs = DistributeDocs
|
||||
defenv.DistributeExamples = DistributeExamples
|
||||
defenv.Sign = Sign
|
||||
defenv.EnablePESecurityFlags = EnablePESecurityFlags
|
||||
defenv.SetPESecurityFlags = SetPESecurityFlags
|
||||
defenv.TestScript = TestScript
|
||||
|
||||
def DistributeExtras(env, target, examples, docs):
|
||||
|
@ -686,7 +689,7 @@ def BuildPluginWorker(target, source, libs, examples = None, docs = None,
|
|||
defenv.Alias(target, plugin)
|
||||
defenv.Alias('plugins', plugin)
|
||||
|
||||
defenv.EnablePESecurityFlags(plugin)
|
||||
defenv.SetPESecurityFlags(plugin)
|
||||
defenv.Sign(plugin)
|
||||
|
||||
CleanMap(env, plugin, target)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue