Remove setup0.h files

Simplify things by putting setup.h files themselves under version
control and getting rid of setup0.h ones.

The initial motivation for using separate setup0.h files was to allow
having local changes to setup.h, but with Git there is a simple way to
do it by using "git update-index --skip-worktree include/wx/msw/setup.h"
for example, so we don't really need setup0.h any more and dropping them
makes things simpler.
This commit is contained in:
Vadim Zeitlin
2021-01-31 18:57:24 +01:00
parent fd653c7ca8
commit d1810b0dce
24 changed files with 35 additions and 126 deletions

View File

@@ -372,7 +372,7 @@ def main(scriptName, args):
flags = {}
buildDir = os.path.abspath(os.path.join(scriptDir, "..", "msw"))
print("creating wx/msw/setup.h from setup0.h")
print("creating wx/msw/setup.h")
if options.unicode:
flags["wxUSE_UNICODE"] = "1"
@@ -404,13 +404,13 @@ def main(scriptName, args):
mswIncludeDir = os.path.join(wxRootDir, "include", "wx", "msw")
setup0File = os.path.join(mswIncludeDir, "setup0.h")
setupText = open(setup0File, "rb").read()
setupFile = os.path.join(mswIncludeDir, "setup.h")
setupText = open(setupFile, "rb").read()
for flag in flags:
setupText, subsMade = re.subn(flag + "\s+?\d", "%s %s" % (flag, flags[flag]), setupText)
if subsMade == 0:
print("Flag %s wasn't found in setup0.h!" % flag)
print("Flag %s wasn't found in setup.h!" % flag)
sys.exit(1)
setupFile = open(os.path.join(mswIncludeDir, "setup.h"), "wb")