Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
1c173782
Commit
1c173782
authored
Nov 07, 2011
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
peflags: rewrite needed features in python
remove conditional from configure.ac
parent
0fc21feb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
17 deletions
+58
-17
Makefile.am
Makefile.am
+1
-3
configure.ac
configure.ac
+0
-10
contrib/TODO
contrib/TODO
+0
-4
extras/package/win32/peflags.py
extras/package/win32/peflags.py
+57
-0
No files found.
Makefile.am
View file @
1c173782
...
...
@@ -773,9 +773,7 @@ endif
find
$(win32_destdir)
-type
f
\(
-name
"*xml"
-or
-name
"*html"
-or
-name
'*js'
-or
-name
'*css'
-or
-name
'*hosts'
-or
-iname
'*txt'
-or
-name
'*.cfg'
-or
-name
'*.lua'
\)
-exec
$(U2D)
{}
\;
#Enable DEP and ASLR for all the binaries
if
USE_PEFLAGS
find
$(win32_destdir)
-type
f
\(
-name
'*$(LIBEXT)'
-print
-o
-name
'*$(EXEEXT)'
-print
\)
-exec
$(PEFLAGS)
--dynamicbase
=
true
--nxcompat
=
true
{}
\;
endif
find
$(win32_destdir)
-type
f
\(
-name
'*$(LIBEXT)'
-print
-o
-name
'*$(EXEEXT)'
-print
\)
-exec
$(top_srcdir)/extras/package/win32/peflags.py
{}
\;
find
$(win32_destdir)/plugins/
-type
f
\(
-name
'*.a'
-or
-name
'*.la'
\)
-exec
rm
-rvf
{}
\;
package-win-base
:
package-win-common
...
...
configure.ac
View file @
1c173782
...
...
@@ -343,15 +343,6 @@ case "${host_os}" in
VLC_ADD_LDFLAGS([vlc],[-mwindows])
VLC_ADD_LIBS([win32text],[-lgdi32])
VLC_ADD_LIBS([cdda vcdx sdl_image vout_sdl],[-lwinmm])
dnl
dnl DEP and ASLR options
dnl
AC_ARG_WITH(peflags,
[AS_HELP_STRING([--with-peflags],
[use peflags (default enabled on Windows)])])
if test "${with_peflags}" != "no" ; then
AC_PATH_TOOL(PEFLAGS, peflags, :)
fi
AC_CHECK_PROGS(U2D, [unix2dos todos], unix2dos)
ac_default_prefix="`pwd`/_win32"
DESTDIR="`pwd`/_win32/"
...
...
@@ -405,7 +396,6 @@ AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32")
AM_CONDITIONAL(HAVE_WIN64, test "${HAVE_WIN64}" = "1")
AM_CONDITIONAL(HAVE_WINCE, test "${SYS}" = "mingwce")
AM_CONDITIONAL(HAVE_SYMBIAN, test "${SYS}" = "symbian")
AM_CONDITIONAL(USE_PEFLAGS, test "${with_peflags}" = "yes")
dnl
dnl Sadly autoconf doesn't think about testing foo.exe when ask to test
...
...
contrib/TODO
View file @
1c173782
...
...
@@ -12,7 +12,3 @@ Sparkle
vcdimager, cdio -- why are they used only in osx binaries, do we really need them?
build tools -- (autotools, libtool, yasm...) see extras/tools
# Windows
peflags -- a build tool, only a single .c file; we should rather put it in git
extras/package/win32/peflags.py
0 → 100755
View file @
1c173782
#!/usr/bin/env python
# -*- coding: utf8 -*-
#
# Copyright © 2011 Rafaël Carré <funman at videolanorg>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
#
from
os
import
SEEK_CUR
from
sys
import
argv
def
get_le
(
f
,
n
):
array
=
bytearray
(
f
.
read
(
n
))
if
len
(
array
)
!=
n
:
raise
Exception
(
'Reading failed!'
)
shift
=
0
ret
=
0
for
c
in
array
:
ret
=
ret
+
(
c
<<
shift
)
shift
=
shift
+
8
return
ret
###
if
len
(
argv
)
!=
2
:
exit
(
1
)
f
=
open
(
argv
[
1
],
'r+b'
)
f
.
seek
(
0x3c
)
f
.
seek
(
get_le
(
f
,
4
))
if
get_le
(
f
,
4
)
!=
0x00004550
:
# IMAGE_NT_SIGNATURE
raise
Exception
(
'Not a NT executable'
)
f
.
seek
(
20
+
70
,
SEEK_CUR
)
flags
=
get_le
(
f
,
2
)
f
.
seek
(
-
2
,
SEEK_CUR
)
flags
|=
0x100
# NX Compat
flags
|=
0x40
# Dynamic Base
f
.
write
(
bytearray
([
flags
&
0xff
,
(
flags
>>
8
)
&
0xff
]))
f
.
close
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment