initial commit

Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
This commit is contained in:
2025-10-31 23:37:30 +01:00
commit 7228269764
9653 changed files with 4034514 additions and 0 deletions

View File

@@ -0,0 +1,70 @@
echo.
echo --- Running tests.
echo.
cd c:\projects\wxwidgets\tests
goto %TOOLSET%
:msbuild
PATH=C:\projects\wxwidgets\lib\vc_x64_dll;%PATH%
if "%CONFIGURATION%"=="DLL Release" set suffix=dll
if "%CONFIGURATION%"=="DLL Debug" set suffix=ddll
if "%CONFIGURATION%"=="Debug" set suffix=d
.\vc_x64_mswu%suffix%\test.exe
if %errorlevel% NEQ 0 goto :error
.\vc_x64_mswu%suffix%\test_gui.exe
goto :eof
:nmake
if "%BUILD%"=="debug" set debug_suffix=d
if "%ARCH%"=="amd64" set arch_suffix=_x64
.\vc%arch_suffix%_mswu%debug_suffix%\test.exe
if %errorlevel% NEQ 0 goto :error
.\vc%arch_suffix%_mswu%debug_suffix%\test_gui.exe
goto :eof
:mingw
.\gcc_mswud\test.exe
if %errorlevel% NEQ 0 goto :error
.\gcc_mswud\test_gui.exe
goto :eof
:msys2
PATH=C:\projects\wxwidgets\lib;%PATH%
.\test.exe
if %errorlevel% NEQ 0 goto :error
.\test_gui.exe
goto :eof
:cygwin
PATH=C:\projects\wxwidgets\lib;%PATH%
.\test.exe
.\test_gui.exe
echo.
echo --- Note: ignoring possible test failures under Cygwin
echo.
exit /b 0
:cmake_qt
PATH=%QT5DIR%\bin;%PATH%
set QT_QPA_PLATFORM_PLUGIN_PATH=%QT5DIR%\plugins\platforms
set QT_USE_NATIVE_WINDOWS=1
goto :cmake
:cmake
if "%CONFIGURATION%"=="" set CONFIGURATION=Release
if "%CMAKE_TEST_REGEX%"=="" set CMAKE_TEST_REGEX="test_drawing"
cd ..\build_cmake
ctest -V -C %CONFIGURATION% -E %CMAKE_TEST_REGEX% --output-on-failure --interactive-debug-mode 0 .
if %errorlevel% NEQ 0 goto :error
goto :eof
:error
echo.
echo !!! Non-GUI test failed.
echo.
echo --- httpbin output ---
type c:\projects\wxwidgets\httpbin.log
echo --- httpbin output end ---
exit /b 1

View File

@@ -0,0 +1,136 @@
set MSBUILD_LOGGER=/logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
if "%wxUSE_WEBVIEW_EDGE%"=="1" (
curl -L -o 3rdparty/webview2.zip https://www.nuget.org/api/v2/package/Microsoft.Web.WebView2
7z x 3rdparty/webview2.zip -o3rdparty/webview2 -aoa
)
goto %TOOLSET%
:msbuild
cd build\msw
msbuild /m:2 /v:n /p:Platform=%ARCH% /p:Configuration="%CONFIGURATION%" wx_vc%VSVER%.sln %MSBUILD_LOGGER%
cd ..\..\tests
msbuild /m:2 /v:n /p:Platform=%ARCH% /p:Configuration="%CONFIGURATION%" test_vc%VSVER%.sln %MSBUILD_LOGGER%
msbuild /m:2 /v:n /p:Platform=%ARCH% /p:Configuration="%CONFIGURATION%" test_gui_vc%VSVER%.sln %MSBUILD_LOGGER%
cd ..\samples
msbuild /m:2 /v:n /p:Platform=%ARCH% /p:Configuration="%CONFIGURATION%" /t:"1 Fundamental Samples\minimal" samples_vc%VSVER%.sln %MSBUILD_LOGGER%
goto :eof
:nmake
cd build\msw
call "C:\Program Files (x86)\Microsoft Visual Studio %VS%\VC\vcvarsall.bat" %ARCH%
nmake -f makefile.vc BUILD=%BUILD%
cd ..\..\tests
nmake -f makefile.vc BUILD=%BUILD%
cd ..\samples\minimal
nmake -f makefile.vc BUILD=%BUILD%
goto :eof
:mingw
cd build\msw
path C:\MinGW\bin;%path%
echo --- Tools versions:
g++ --version | "C:\Program Files\Git\usr\bin\head" -n 1
mingw32-make --version | "C:\Program Files\Git\usr\bin\head" -n 1
ar --version | "C:\Program Files\Git\usr\bin\head" -n 1
echo.
echo --- Starting the build
echo.
mingw32-make -f makefile.gcc setup_h BUILD=debug SHARED=0
mingw32-make -j3 -f makefile.gcc BUILD=debug SHARED=0
cd ..\..\tests
mingw32-make -j3 -f makefile.gcc BUILD=debug SHARED=0
goto :eof
:msys2
path C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;%path%
set CHERE_INVOKING=yes
:: Workaround for "configure: Bad file descriptor"
perl -i".bak" -pe "s/^test -n \".DJDIR\"/#$&/" configure
bash -lc "g++ --version"
bash -lc "CXXFLAGS=-Wno-deprecated-declarations ./configure --disable-optimise && make -j3 && make -j3 -C tests"
goto :eof
:cygwin
C:\cygwin\setup-x86.exe -qgnNdO -R C:/cygwin -s http://cygwin.mirror.constant.com -l C:/cygwin/var/cache/setup -P libjpeg-devel -P libpng-devel -P libtiff-devel -P libexpat-devel
path c:\cygwin\bin;%path%
set CHERE_INVOKING=yes
:: Workaround for "configure: Bad file descriptor"
perl -i".bak" -pe "s/^test -n \".DJDIR\"/#$&/" configure
bash -lc "g++ --version"
bash -lc "LDFLAGS=-L/usr/lib/w32api ./configure --disable-optimise --disable-shared && make -j3 && make -j3 -C tests"
goto :eof
:cmake_qt
set SKIPINSTALL=1
set QT5DIR=C:\Qt\5.15.2\msvc2019_64
set CMAKE_CONFIGURE_FLAGS=-DCMAKE_PREFIX_PATH="%QT5DIR%" -DwxBUILD_TOOLKIT="qt"
goto cmake
:cmake
echo --- Tools versions:
cmake --version
if "%SHARED%"=="" set SHARED=ON
if "%CONFIGURATION%"=="" set CONFIGURATION=Release
echo.%GENERATOR% | findstr /C:"Visual Studio">nul && (
set CMAKE_LOGGER=%MSBUILD_LOGGER%
)
if "%SKIPTESTS%"=="1" (
set BUILD_TESTS=OFF
) else (
set BUILD_TESTS=ALL
)
echo.
echo --- Generating project files
echo.
set WX_INSTALL_PATH=%HOMEDRIVE%%HOMEPATH%\wx_install_target
mkdir %WX_INSTALL_PATH%
mkdir build_cmake
pushd build_cmake
cmake -G "%GENERATOR%" -DwxBUILD_TESTS=%BUILD_TESTS% -DwxBUILD_SAMPLES=SOME -DCMAKE_INSTALL_PREFIX=%WX_INSTALL_PATH% -DwxBUILD_SHARED=%SHARED% %CMAKE_CONFIGURE_FLAGS% ..
if ERRORLEVEL 1 goto error
echo.
echo --- Starting the build
echo.
cmake --build . --config %CONFIGURATION% -- %CMAKE_NATIVE_FLAGS% %CMAKE_LOGGER%
if ERRORLEVEL 1 goto error
:: Package binaries as artifact
where 7z
if ERRORLEVEL 1 goto cmake_test
7z a -r wxWidgets_Binaries.zip lib/*.*
appveyor PushArtifact wxWidgets_Binaries.zip
:cmake_test
if NOT "%SKIPINSTALL%"=="1" (
echo.
echo --- Installing
echo.
cmake --build . --config %CONFIGURATION% --target install -- %CMAKE_LOGGER%
if ERRORLEVEL 1 goto error
popd
echo.
echo --- Test installed library
echo.
set wxWidgets_DIR=%WX_INSTALL_PATH%
mkdir build_cmake_install_test
pushd build_cmake_install_test
echo --- Configure minimal sample
cmake -G "%GENERATOR%" -DCMAKE_CONFIGURATION_TYPES=%CONFIGURATION% ..\samples\minimal
if ERRORLEVEL 1 goto error
echo --- Building minimal sample with installed library
cmake --build . --config %CONFIGURATION% -- %CMAKE_LOGGER%
if ERRORLEVEL 1 goto error
)
popd
goto :eof
:error
echo.
echo --- Build failed !
echo.

View File

@@ -0,0 +1,10 @@
FROM alpine:3.13
RUN apk add autoconf
# wxWidgets sources must be mounted here.
VOLUME /wx
WORKDIR /wx
CMD ["autoconf"]

View File

@@ -0,0 +1,48 @@
# Docker container for running autoconf
## Rationale
We store generated `configure` in Git to make it simpler for people to build
wxWidgets without having to run autoconf themselves first, but this means that
generating it on another system often results in insignificant changes just due
to a different version of autoconf being used. By using this container, we can
use the same version everywhere.
## Using Pre-Made Image
To use this container, you can pull it from Docker registry and run it
directly by executing the following command from the top-level wx directory:
```shell
$ podman run -v `pwd`:/wx --rm docker.io/vadz/autoconf-for-wx
```
or, if you prefer to use podman:
```shell
$ docker run -v `pwd`:/wx --rm vadz/autoconf-for-wx
```
## Build
You can also build the container yourself easily using the Dockerfile in this
directory, just run
```shell
$ docker build -t autoconf-for-wx build/tools/autoconf
```
This should (quickly) finish with
```
Successfully tagged autoconf-for-wx:latest
```
## Updating autoconf version
When we decide to switch to a newer autoconf version, we should update the
`Dockerfile` here to use a later version of Alpine Linux: the currently used
version is specifically chosen because it has the package with the latest
version of autoconf 2.69.

View File

@@ -0,0 +1,141 @@
#!/bin/sh
#
# This script is used by CI jobs to install the dependencies
# before building wxWidgets but can also be run by hand if necessary (but
# currently it only works for the OS versions used by the CI builds).
#
# WX_EXTRA_PACKAGES environment variable may be predefined to contain extra
# packages to install (in an OS-specific way) in addition to the required ones.
set -e
case $(uname -s) in
Linux)
# Use sudo if it's available or assume root otherwise.
if command -v sudo > /dev/null; then
SUDO=sudo
else
if [ `id -u` -ne 0 ]; then
echo "Please install sudo or run as root (and not user `id -u`)." >& 2
exit 1
fi
fi
# Debian/Ubuntu
if [ -f /etc/apt/sources.list ]; then
# Show information about the repositories and priorities used.
echo 'APT sources used:'
$SUDO grep --no-messages '^[^#]' /etc/apt/sources.list /etc/apt/sources.list.d/* || true
echo '--- End of APT files dump ---'
run_apt() {
echo "-> Running apt-get $@"
# Disable some (but not all) output.
$SUDO apt-get -q -o=Dpkg::Use-Pty=0 "$@"
rc=$?
echo "-> Done with $rc"
return $rc
}
# We could install lsb-release package if the command is missing,
# but we currently only actually use codename on the systems where
# it's guaranteed to be installed, so don't bother doing it for now.
if command -v lsb_release > /dev/null; then
codename=$(lsb_release --codename --short)
fi
if [ "$wxUSE_ASAN" = 1 ]; then
# Enable the `-dbgsym` repositories.
echo "deb http://ddebs.ubuntu.com ${codename} main restricted universe multiverse
deb http://ddebs.ubuntu.com ${codename}-updates main restricted universe multiverse" | \
$SUDO tee --append /etc/apt/sources.list.d/ddebs.list >/dev/null
# Import the debug symbol archive signing key from the Ubuntu server.
# Note that this command works only on Ubuntu 18.04 LTS and newer.
run_apt install -y ubuntu-dbgsym-keyring
# Install the symbols to allow LSAN suppression list to work.
dbgsym_pkgs='libfontconfig1-dbgsym libglib2.0-0-dbgsym libgtk-3-0-dbgsym libatk-bridge2.0-0-dbgsym'
fi
run_apt update || echo 'Failed to update packages, but continuing nevertheless.'
case "$wxCONFIGURE_FLAGS" in
*--with-directfb*) libtoolkit_dev='libdirectfb-dev' ;;
*--with-qt*) libtoolkit_dev='qtdeclarative5-dev libqt5opengl5-dev';;
*--with-x11*) extra_deps='libpango1.0-dev' ;;
*--disable-gui*) ;;
*)
case "$wxGTK_VERSION" in
3) libtoolkit_dev=libgtk-3-dev
extra_deps='libwebkit2gtk-4.0-dev libgspell-1-dev'
;;
2) libtoolkit_dev=libgtk2.0-dev
extra_deps='libwebkitgtk-dev libxkbcommon-dev'
;;
*) echo 'Please specify wxGTK_VERSION explicitly.' >&2
exit 1
;;
esac
case "$codename" in
jammy)
# Under Ubuntu 22.04 installing libgstreamer1.0-dev
# fails because it depends on libunwind-dev which
# is not going to be installed because it conflicts
# with the pre-installed (in GitHub Actions
# environment) libc++-dev, so we need to install it
# directly to avoid errors later.
extra_deps="$extra_deps libunwind-dev"
;;
esac
extra_deps="$extra_deps \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
"
esac
# Install locales used by our tests to run all the tests instead of
# skipping them.
pkg_install="$pkg_install $libtoolkit_dev gawk gdb locales-all ${WX_EXTRA_PACKAGES}"
extra_deps="$extra_deps libcurl4-openssl-dev libsecret-1-dev libnotify-dev"
for pkg in $extra_deps; do
if $(apt-cache pkgnames | grep -q $pkg) ; then
pkg_install="$pkg_install $pkg"
else
echo "Not installing non-existent package $pkg"
fi
done
if ! run_apt install -y $pkg_install $dbgsym_pkgs; then
if [ -z "$dbgsym_pkgs" ]; then
exit 1
fi
# Retry without dbgsym packages that currently fail to install
# under Ubuntu Focal (20.04).
echo 'Installing with dbgsym packages failed, retrying without...'
if ! run_apt install -y $pkg_install; then
exit 1
fi
else
touch wx_dbgsym_available
fi
fi
if [ -f /etc/redhat-release ]; then
dnf install -y ${WX_EXTRA_PACKAGES} gawk expat-devel findutils g++ git-core gspell-devel gstreamer1-plugins-base-devel gtk3-devel make libcurl-devel libjpeg-devel libnotify-devel libpng-devel libSM-devel libsecret-devel libtiff-devel SDL-devel webkit2gtk4.1-devel zlib-devel
fi
;;
FreeBSD)
pkg install -q -y ${WX_EXTRA_PACKAGES} gawk gspell gstreamer1 gtk3 jpeg-turbo libnotify libsecret mesa-libs pkgconf png tiff webkit2-gtk_40
;;
Darwin)
;;
esac

View File

@@ -0,0 +1,640 @@
#!/usr/bin/env python
###################################
# Author: Kevin Ollivier
# Licence: wxWindows licence
###################################
import os
import re
import sys
import builder
import glob
import optparse
import platform
import shutil
import types
import subprocess
# builder object
wxBuilder = None
# other globals
scriptDir = None
wxRootDir = None
contribDir = None
options = None
configure_opts = None
exitWithException = True
nmakeCommand = 'nmake.exe'
verbose = False
def numCPUs():
"""
Detects the number of CPUs on a system.
This approach is from detectCPUs here: http://www.artima.com/weblogs/viewpost.jsp?thread=230001
"""
# Linux, Unix and MacOS:
if hasattr(os, "sysconf"):
if "SC_NPROCESSORS_ONLN" in os.sysconf_names:
# Linux & Unix:
ncpus = os.sysconf("SC_NPROCESSORS_ONLN")
if isinstance(ncpus, int) and ncpus > 0:
return ncpus
else: # OSX:
p = subprocess.Popen("sysctl -n hw.ncpu", shell=True, stdout=subprocess.PIPE)
return p.stdout.read()
# Windows:
if "NUMBER_OF_PROCESSORS" in os.environ:
ncpus = int(os.environ["NUMBER_OF_PROCESSORS"]);
if ncpus > 0:
return ncpus
return 1 # Default
def getXcodePaths():
base = getoutput("xcode-select -print-path")
return [base, base+"/Platforms/MacOSX.platform/Developer"]
def getVisCVersion():
text = getoutput("cl.exe")
if 'Version 13' in text:
return '71'
if 'Version 15' in text:
return '90'
if 'Version 16' in text:
return '100'
# TODO: Add more tests to get the other versions...
else:
return 'FIXME'
def exitIfError(code, msg):
if code != 0:
print(msg)
if exitWithException:
raise builder.BuildError(msg)
else:
sys.exit(1)
def getWxRelease(wxRoot=None):
if not wxRoot:
global wxRootDir
wxRoot = wxRootDir
configureText = open(os.path.join(wxRoot, "configure.ac"), "r").read()
majorVersion = re.search("wx_major_version_number=(\d+)", configureText).group(1)
minorVersion = re.search("wx_minor_version_number=(\d+)", configureText).group(1)
versionText = "%s.%s" % (majorVersion, minorVersion)
if int(minorVersion) % 2:
releaseVersion = re.search("wx_release_number=(\d+)", configureText).group(1)
versionText += ".%s" % (releaseVersion)
return versionText
def getFrameworkName(options):
# the name of the framework is based on the wx port being built
name = "wxOSX"
if options.osx_cocoa:
name += "Cocoa"
else:
name += "Carbon"
return name
def getPrefixInFramework(options, wxRoot=None):
# the path inside the framework that is the wx --prefix
fwPrefix = os.path.join(
os.path.abspath(options.mac_framework_prefix),
"%s.framework/Versions/%s" % (getFrameworkName(options), getWxRelease(wxRoot)))
return fwPrefix
def macFixupInstallNames(destdir, prefix, buildDir=None):
# When an installdir is used then the install_names embedded in
# the dylibs are not correct. Reset the IDs and the dependencies
# to use just the prefix.
print("**** macFixupInstallNames(%s, %s, %s)" % (destdir, prefix, buildDir))
pwd = os.getcwd()
os.chdir(destdir+prefix+'/lib')
dylibs = glob.glob('*.dylib') # ('*[0-9].[0-9].[0-9].[0-9]*.dylib')
for lib in dylibs:
cmd = 'install_name_tool -id %s/lib/%s %s/lib/%s' % \
(prefix,lib, destdir+prefix,lib)
print(cmd)
run(cmd)
for dep in dylibs:
if buildDir is not None:
cmd = 'install_name_tool -change %s/lib/%s %s/lib/%s %s/lib/%s' % \
(buildDir,dep, prefix,dep, destdir+prefix,lib)
else:
cmd = 'install_name_tool -change %s/lib/%s %s/lib/%s %s/lib/%s' % \
(destdir+prefix,dep, prefix,dep, destdir+prefix,lib)
print(cmd)
run(cmd)
os.chdir(pwd)
def run(cmd):
global verbose
if verbose:
print("Running %s" % cmd)
return exitIfError(os.system(cmd), "Error running %s" % cmd)
def getoutput(cmd):
sp = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
output = None
output = sp.stdout.read()
if sys.version_info > (3,):
output = output.decode('utf-8') # TODO: is utf-8 okay here?
output = output.rstrip()
rval = sp.wait()
if rval:
# Failed!
print("Command '%s' failed with exit code %d." % (cmd, rval))
sys.exit(rval)
return output
def main(scriptName, args):
global scriptDir
global wxRootDir
global contribDir
global options
global configure_opts
global wxBuilder
global nmakeCommand
scriptDir = os.path.dirname(os.path.abspath(scriptName))
wxRootDir = os.path.abspath(os.path.join(scriptDir, "..", ".."))
contribDir = os.path.join("contrib", "src")
installDir = None
VERSION = tuple([int(i) for i in getWxRelease().split('.')[:2]])
if sys.platform.startswith("win"):
contribDir = os.path.join(wxRootDir, "contrib", "build")
if sys.platform.startswith("win"):
toolkit = "msvc"
else:
toolkit = "autoconf"
defJobs = str(numCPUs())
defFwPrefix = '/Library/Frameworks'
option_dict = {
"clean" : (False, "Clean all files from the build directory"),
"debug" : (False, "Build the library in debug symbols"),
"builddir" : ("", "Directory where the build will be performed for autoconf builds."),
"prefix" : ("", "Configured prefix to use for autoconf builds. Defaults to installdir if set. Ignored for framework builds."),
"jobs" : (defJobs, "Number of jobs to run at one time in make. Default: %s" % defJobs),
"install" : (False, "Install the toolkit to the installdir directory, or the default dir."),
"installdir" : ("", "Directory where built wxWidgets will be installed"),
"mac_distdir" : (None, "If set on Mac, will create an installer package in the specified dir."),
"mac_universal_binary"
: ("", "Comma separated list of architectures to include in the Mac universal binary"),
"mac_framework" : (False, "Install the Mac build as a framework"),
"mac_framework_prefix"
: (defFwPrefix, "Prefix where the framework should be installed. Default: %s" % defFwPrefix),
"cairo" : (False, "Enable dynamically loading the Cairo lib for wxGraphicsContext on MSW"),
"no_config" : (False, "Turn off configure step on autoconf builds"),
"config_only" : (False, "Only run the configure step and then exit"),
"rebake" : (False, "Regenerate Bakefile and autoconf files"),
"unicode" : (False, "Build the library with unicode support"),
"wxpython" : (False, "Build the wxWidgets library with all options needed by wxPython"),
"cocoa" : (False, "Build the old Mac Cocoa port."),
"osx_cocoa" : (False, "Build the new Cocoa port"),
"shared" : (False, "Build wx as a dynamic library"),
"extra_make" : ("", "Extra args to pass on [n]make's command line."),
"features" : ("", "A comma-separated list of wxUSE_XYZ defines on Win, or a list of configure flags on unix."),
"verbose" : (False, "Print commands as they are run, (to aid with debugging this script)"),
"jom" : (False, "Use jom.exe instead of nmake for MSW builds."),
}
parser = optparse.OptionParser(usage="usage: %prog [options]", version="%prog 1.0")
keys = option_dict.keys()
for opt in sorted(keys):
default = option_dict[opt][0]
action = "store"
if type(default) == bool:
action = "store_true"
parser.add_option("--" + opt, default=default, action=action, dest=opt,
help=option_dict[opt][1])
options, arguments = parser.parse_args(args=args)
global verbose
if options.verbose:
verbose = True
# compiler / build system specific args
buildDir = options.builddir
args = []
installDir = options.installdir
prefixDir = options.prefix
if toolkit == "autoconf":
if not buildDir:
buildDir = os.getcwd()
configure_opts = []
if options.features != "":
configure_opts.extend(options.features.split(" "))
if options.unicode:
configure_opts.append("--enable-unicode")
if options.debug:
configure_opts.append("--enable-debug")
if options.cocoa:
configure_opts.append("--with-old_cocoa")
if options.osx_cocoa:
configure_opts.append("--with-osx_cocoa")
wxpy_configure_opts = [
"--with-opengl",
"--enable-sound",
"--enable-graphics_ctx",
"--enable-mediactrl",
"--enable-display",
"--enable-geometry",
"--enable-debug_flag",
"--enable-optimise",
"--disable-debugreport",
"--enable-uiactionsim",
]
if sys.platform.startswith("darwin"):
wxpy_configure_opts.append("--enable-monolithic")
else:
wxpy_configure_opts.append("--with-sdl")
# Try to use use lowest available SDK back to 10.5. Both Carbon and
# Cocoa builds require at least the 10.5 SDK now. We only add it to
# the wxpy options because this is a hard-requirement for wxPython,
# but other cases it is optional and is left up to the developer.
# TODO: there should be a command line option to set the SDK...
if sys.platform.startswith("darwin"):
for xcodePath in getXcodePaths():
sdks = [
xcodePath+"/SDKs/MacOSX10.5.sdk",
xcodePath+"/SDKs/MacOSX10.6.sdk",
xcodePath+"/SDKs/MacOSX10.7.sdk",
xcodePath+"/SDKs/MacOSX10.8.sdk",
]
# use the lowest available sdk
for sdk in sdks:
if os.path.exists(sdk):
wxpy_configure_opts.append(
"--with-macosx-sdk=%s" % sdk)
break
if not options.mac_framework:
if installDir and not prefixDir:
prefixDir = installDir
if prefixDir:
prefixDir = os.path.abspath(prefixDir)
configure_opts.append("--prefix=" + prefixDir)
if options.wxpython:
configure_opts.extend(wxpy_configure_opts)
if options.debug:
# wxPython likes adding these debug options too
configure_opts.append("--enable-debug_gdb")
configure_opts.append("--disable-optimise")
configure_opts.remove("--enable-optimise")
if options.rebake:
retval = run("make -f autogen.mk")
exitIfError(retval, "Error running autogen.mk")
if options.mac_framework:
# TODO: Should options.install be automatically turned on if the
# mac_framework flag is given?
# framework builds always need to be monolithic
if not "--enable-monolithic" in configure_opts:
configure_opts.append("--enable-monolithic")
# The --prefix given to configure will be the framework prefix
# plus the framework specific dir structure.
prefixDir = getPrefixInFramework(options)
configure_opts.append("--prefix=" + prefixDir)
# the framework build adds symlinks above the installDir + prefixDir folder
# so we need to wipe from the framework root instead of inside the prefixDir.
frameworkRootDir = os.path.abspath(os.path.join(installDir + prefixDir, "..", ".."))
if os.path.exists(frameworkRootDir):
if os.path.exists(frameworkRootDir):
shutil.rmtree(frameworkRootDir)
if options.mac_universal_binary:
if options.mac_universal_binary == 'default':
if options.osx_cocoa:
configure_opts.append("--enable-universal_binary=i386,x86_64")
else:
configure_opts.append("--enable-universal_binary")
else:
configure_opts.append("--enable-universal_binary=%s" % options.mac_universal_binary)
print("Configure options: " + repr(configure_opts))
wxBuilder = builder.AutoconfBuilder()
if not options.no_config and not options.clean:
olddir = os.getcwd()
if buildDir:
os.chdir(buildDir)
exitIfError(wxBuilder.configure(dir=wxRootDir, options=configure_opts),
"Error running configure")
os.chdir(olddir)
if options.config_only:
print("Exiting after configure")
return
elif toolkit in ["msvc", "msvcProject"]:
flags = {}
buildDir = os.path.abspath(os.path.join(scriptDir, "..", "msw"))
print("creating wx/msw/setup.h")
if options.cairo:
if not os.environ.get("CAIRO_ROOT"):
print("WARNING: Expected CAIRO_ROOT set in the environment!")
flags["wxUSE_CAIRO"] = "1"
if options.wxpython:
flags["wxDIALOG_UNIT_COMPATIBILITY "] = "0"
flags["wxUSE_DEBUGREPORT"] = "0"
flags["wxUSE_DIALUP_MANAGER"] = "0"
flags["wxUSE_GRAPHICS_CONTEXT"] = "1"
flags["wxUSE_DISPLAY"] = "1"
flags["wxUSE_GLCANVAS"] = "1"
flags["wxUSE_POSTSCRIPT"] = "1"
flags["wxUSE_AFM_FOR_POSTSCRIPT"] = "0"
flags["wxUSE_DATEPICKCTRL_GENERIC"] = "1"
if VERSION < (2,9):
flags["wxUSE_DIB_FOR_BITMAP"] = "1"
if VERSION >= (2,9):
flags["wxUSE_UIACTIONSIMULATOR"] = "1"
mswIncludeDir = os.path.join(wxRootDir, "include", "wx", "msw")
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 setup.h!" % flag)
sys.exit(1)
setupFile = open(os.path.join(mswIncludeDir, "setup.h"), "wb")
setupFile.write(setupText)
setupFile.close()
args = []
if toolkit == "msvc":
print("setting build options...")
args.append("-f makefile.vc")
if options.wxpython:
args.append("OFFICIAL_BUILD=1")
args.append("COMPILER_VERSION=%s" % getVisCVersion())
args.append("SHARED=1")
args.append("MONOLITHIC=0")
args.append("USE_OPENGL=1")
args.append("USE_GDIPLUS=1")
if not options.debug:
args.append("BUILD=release")
else:
args.append("BUILD=debug")
if options.shared:
args.append("SHARED=1")
if options.cairo:
args.append(
"CPPFLAGS=/I%s" %
os.path.join(os.environ.get("CAIRO_ROOT", ""), 'include\\cairo'))
if options.jom:
nmakeCommand = 'jom.exe'
wxBuilder = builder.MSVCBuilder(commandName=nmakeCommand)
if toolkit == "msvcProject":
args = []
if options.shared or options.wxpython:
args.append("wx_dll.dsw")
else:
args.append("wx.dsw")
# TODO:
wxBuilder = builder.MSVCProjectBuilder()
if not wxBuilder:
print("Builder not available for your specified platform/compiler.")
sys.exit(1)
if options.clean:
print("Performing cleanup.")
wxBuilder.clean(dir=buildDir, options=args)
sys.exit(0)
if options.extra_make:
args.append(options.extra_make)
if not sys.platform.startswith("win"):
args.append("--jobs=" + options.jobs)
exitIfError(wxBuilder.build(dir=buildDir, options=args), "Error building")
if options.install:
extra=None
if installDir:
extra = ['DESTDIR='+installDir]
wxBuilder.install(dir=buildDir, options=extra)
if options.install and options.mac_framework:
def renameLibrary(libname, frameworkname):
reallib = libname
links = []
while os.path.islink(reallib):
links.append(reallib)
reallib = "lib/" + os.readlink(reallib)
#print("reallib is %s" % reallib)
run("mv -f %s lib/%s.dylib" % (reallib, frameworkname))
for link in links:
run("ln -s -f %s.dylib %s" % (frameworkname, link))
frameworkRootDir = prefixDir
if installDir:
print("installDir = %s" % installDir)
frameworkRootDir = installDir + prefixDir
os.chdir(frameworkRootDir)
build_string = ""
if options.debug:
build_string = "d"
fwname = getFrameworkName(options)
version = getoutput("bin/wx-config --release")
version_full = getoutput("bin/wx-config --version")
basename = getoutput("bin/wx-config --basename")
configname = getoutput("bin/wx-config --selected-config")
os.makedirs("Resources")
wxplist = dict(
CFBundleDevelopmentRegion="English",
CFBundleIdentifier='org.wxwidgets.wxosxcocoa',
CFBundleName=fwname,
CFBundleVersion=version_full,
CFBundleExecutable=fwname,
CFBundleGetInfoString="%s %s" % (fwname, version_full),
CFBundlePackageType="FMWK",
CFBundleSignature="WXCO",
CFBundleShortVersionString=version_full,
CFBundleInfoDictionaryVersion="6.0",
)
import plistlib
plistlib.writePlist(wxplist, os.path.join(frameworkRootDir, "Resources", "Info.plist"))
# we make wx the "actual" library file and link to it from libwhatever.dylib
# so that things can link to wx and survive minor version changes
renameLibrary("lib/lib%s-%s.dylib" % (basename, version), fwname)
run("ln -s -f lib/%s.dylib %s" % (fwname, fwname))
run("ln -s -f include Headers")
for lib in ["GL", "STC", "Gizmos", "Gizmos_xrc"]:
libfile = "lib/lib%s_%s-%s.dylib" % (basename, lib.lower(), version)
if os.path.exists(libfile):
frameworkDir = "framework/wx%s/%s" % (lib, version)
if not os.path.exists(frameworkDir):
os.makedirs(frameworkDir)
renameLibrary(libfile, "wx" + lib)
run("ln -s -f ../../../%s %s/wx%s" % (libfile, frameworkDir, lib))
for lib in glob.glob("lib/*.dylib"):
if not os.path.islink(lib):
corelibname = "lib/lib%s-%s.0.dylib" % (basename, version)
run("install_name_tool -id %s %s" % (os.path.join(prefixDir, lib), lib))
run("install_name_tool -change %s %s %s" % (os.path.join(frameworkRootDir, corelibname), os.path.join(prefixDir, corelibname), lib))
os.chdir("include")
header_template = """
#ifndef __WX_FRAMEWORK_HEADER__
#define __WX_FRAMEWORK_HEADER__
%s
#endif // __WX_FRAMEWORK_HEADER__
"""
headers = ""
header_dir = "wx-%s/wx" % version
for include in glob.glob(header_dir + "/*.h"):
headers += "#include <wx/" + os.path.basename(include) + ">\n"
framework_header = open("%s.h" % fwname, "w")
framework_header.write(header_template % headers)
framework_header.close()
run("ln -s -f %s wx" % header_dir)
os.chdir("wx-%s/wx" % version)
run("ln -s -f ../../../lib/wx/include/%s/wx/setup.h setup.h" % configname)
os.chdir(os.path.join(frameworkRootDir, ".."))
run("ln -s -f %s Current" % getWxRelease())
os.chdir("..")
run("ln -s -f Versions/Current/Headers Headers")
run("ln -s -f Versions/Current/Resources Resources")
run("ln -s -f Versions/Current/%s %s" % (fwname, fwname))
# sanity check to ensure the symlink works
os.chdir("Versions/Current")
# put info about the framework into wx-config
os.chdir(frameworkRootDir)
text = file('lib/wx/config/%s' % configname).read()
text = text.replace("MAC_FRAMEWORK=", "MAC_FRAMEWORK=%s" % getFrameworkName(options))
if options.mac_framework_prefix not in ['/Library/Frameworks',
'/System/Library/Frameworks']:
text = text.replace("MAC_FRAMEWORK_PREFIX=",
"MAC_FRAMEWORK_PREFIX=%s" % options.mac_framework_prefix)
file('lib/wx/config/%s' % configname, 'w').write(text)
# The framework is finished!
print("wxWidgets framework created at: " +
os.path.join( installDir,
options.mac_framework_prefix,
'%s.framework' % fwname))
# adjust the install_name if needed
if sys.platform.startswith("darwin") and \
options.install and \
options.installdir and \
not options.mac_framework and \
not options.wxpython: # wxPython's build will do this later if needed
if not prefixDir:
prefixDir = '/usr/local'
macFixupInstallNames(options.installdir, prefixDir)#, buildDir)
# make a package if a destdir was set.
if options.mac_framework and \
options.install and \
options.installdir and \
options.mac_distdir:
if os.path.exists(options.mac_distdir):
shutil.rmtree(options.mac_distdir)
packagedir = os.path.join(options.mac_distdir, "packages")
os.makedirs(packagedir)
basename = os.path.basename(prefixDir.split(".")[0])
packageName = basename + "-" + getWxRelease()
packageMakerPath = getXcodePaths()[0]+"/usr/bin/packagemaker "
args = []
args.append("--root %s" % options.installdir)
args.append("--id org.wxwidgets.%s" % basename.lower())
args.append("--title %s" % packageName)
args.append("--version %s" % getWxRelease())
args.append("--out %s" % os.path.join(packagedir, packageName + ".pkg"))
cmd = packageMakerPath + ' '.join(args)
print("cmd = %s" % cmd)
run(cmd)
os.chdir(options.mac_distdir)
run('hdiutil create -srcfolder %s -volname "%s" -imagekey zlib-level=9 %s.dmg' % (packagedir, packageName, packageName))
shutil.rmtree(packagedir)
if __name__ == '__main__':
exitWithException = False # use sys.exit instead
main(sys.argv[0], sys.argv[1:])

View File

@@ -0,0 +1,255 @@
import os
import subprocess
import sys
import time
class BuildError(Exception):
def __init__(self, value):
self.value = value
def __repr__(self):
return repr(self.value)
def runInDir(command, dir=None, verbose=True):
if dir:
olddir = os.getcwd()
os.chdir(dir)
commandStr = " ".join(command)
if verbose:
print(commandStr)
result = os.system(commandStr)
if dir:
os.chdir(olddir)
return result
class Builder:
"""
Base class exposing the Builder interface.
"""
def __init__(self, formatName="", commandName="", programDir=None):
"""
formatName = human readable name for project format (should correspond with Bakefile names)
commandName = name of command line program used to invoke builder
programDir = directory program is located in, if not on the path
"""
self.dir = dir
self.name = commandName
self.formatName = formatName
self.programDir = programDir
self.doSetup()
def doSetup(self):
"""
Do anything special needed to configure the environment to build with this builder.
"""
pass
def isAvailable(self):
"""
Run sanity checks before attempting to build with this format
"""
# Make sure the builder program exists
programPath = self.getProgramPath()
if os.path.exists(programPath):
return True
else:
# check the PATH for the program
# TODO: How do we check if we're in Cygwin?
if sys.platform.startswith("win"):
result = os.system(self.name)
if result == 0:
return True
dirs = os.environ["PATH"].split(":")
for dir in dirs:
if os.path.isfile(os.path.join(dir, self.name)):
return True
else:
result = os.system("which %s" % self.name)
if result == 0:
return True
return False
def getProgramPath(self):
if self.programDir:
path = os.path.join(self.programDir, self.name)
if sys.platform.startswith("win"):
path = '"%s"' % path
return path
return self.name
def getProjectFileArg(self, projectFile = None):
result = []
if projectFile:
result.append(projectFile)
return result
def clean(self, dir=None, projectFile=None, options=[]):
"""
dir = the directory containing the project file
projectFile = Some formats need to explicitly specify the project file's name
"""
if self.isAvailable():
args = [self.getProgramPath()]
pfArg = self.getProjectFileArg(projectFile)
if pfArg:
args.extend(pfArg)
args.append("clean")
if options:
args.extend(options)
result = runInDir(args, dir)
return result
return False
def configure(self, dir=None, options=[]):
# if we don't have configure, just report success
return 0
def build(self, dir=None, projectFile=None, targets=None, options=[]):
if self.isAvailable():
args = [self.getProgramPath()]
pfArg = self.getProjectFileArg(projectFile)
if pfArg:
args.extend(pfArg)
# Important Note: if extending args, check it first!
# NoneTypes are not iterable and will crash the clean, build, or install!
# Very very irritating when this happens right at the end.
if options:
args.extend(options)
result = runInDir(args, dir)
return result
return 1
def install(self, dir=None, projectFile=None, options=[]):
if self.isAvailable():
args = [self.getProgramPath()]
pfArg = self.getProjectFileArg(projectFile)
if pfArg:
args.extend(pfArg)
args.append("install")
if options:
args.extend(options)
result = runInDir(args, dir)
return result
return 1
# Concrete subclasses of abstract Builder interface
class GNUMakeBuilder(Builder):
def __init__(self, commandName="make", formatName="GNUMake"):
Builder.__init__(self, commandName=commandName, formatName=formatName)
class XcodeBuilder(Builder):
def __init__(self, commandName="xcodebuild", formatName="Xcode"):
Builder.__init__(self, commandName=commandName, formatName=formatName)
class AutoconfBuilder(GNUMakeBuilder):
def __init__(self, formatName="autoconf"):
GNUMakeBuilder.__init__(self, formatName=formatName)
def configure(self, dir=None, options=None):
#olddir = os.getcwd()
#os.chdir(dir)
configdir = dir
if not dir:
configdir = os.getcwd()
configure_cmd = ""
while os.path.exists(configdir):
config_cmd = os.path.join(configdir, "configure")
if not os.path.exists(config_cmd):
parentdir = os.path.abspath(os.path.join(configdir, ".."))
if configdir == parentdir:
break
configdir = parentdir
else:
configure_cmd = config_cmd
break
if not configure_cmd:
sys.stderr.write("Could not find configure script at %r. Have you run autoconf?\n" % dir)
return 1
optionsStr = " ".join(options) if options else ""
command = "%s %s" % (configure_cmd, optionsStr)
print(command)
result = os.system(command)
#os.chdir(olddir)
return result
class MSVCBuilder(Builder):
def __init__(self, commandName="nmake.exe"):
Builder.__init__(self, commandName=commandName, formatName="msvc")
def isAvailable(self):
PATH = os.environ['PATH'].split(os.path.pathsep)
for p in PATH:
if os.path.exists(os.path.join(p, self.name)):
return True
return False
def getProjectFileArg(self, projectFile = None):
result = []
if projectFile:
result.extend(['-f', projectFile])
return result
class MSVCProjectBuilder(Builder):
def __init__(self):
Builder.__init__(self, commandName="VCExpress.exe", formatName="msvcProject")
for key in ["VS90COMNTOOLS", "VC80COMNTOOLS", "VC71COMNTOOLS"]:
if os.environ.has_key(key):
self.programDir = os.path.join(os.environ[key], "..", "IDE")
if self.programDir == None:
for version in ["9.0", "8", ".NET 2003"]:
msvcDir = "C:\\Program Files\\Microsoft Visual Studio %s\\Common7\\IDE" % version
if os.path.exists(msvcDir):
self.programDir = msvcDir
def isAvailable(self):
if self.programDir:
path = os.path.join(self.programDir, self.name)
if os.path.exists(path):
return True
else:
# I don't have commercial versions of MSVC so I can't test this
name = "devenv.com"
path = os.path.join(self.programDir, name)
if os.path.exists(path):
self.name = "devenv.com"
return True
return False
builders = [GNUMakeBuilder, XcodeBuilder, AutoconfBuilder, MSVCBuilder, MSVCProjectBuilder]
def getAvailableBuilders():
availableBuilders = {}
for symbol in builders:
thisBuilder = symbol()
if thisBuilder.isAvailable():
availableBuilders[thisBuilder.formatName] = symbol
return availableBuilders

View File

@@ -0,0 +1,27 @@
# This script is sourced by CI scripts to launch httpbin.
#
# Do not run it directly.
httpbin_launch() {
# If the tests are already disabled, don't do anything.
if [ "$WX_TEST_WEBREQUEST_URL" != "0" ]; then
WX_TEST_WEBREQUEST_URL=0
export WX_TEST_WEBREQUEST_URL
go version
go install github.com/mccutchen/go-httpbin/v2/cmd/go-httpbin@v2
echo 'Launching httpbin...'
go-httpbin -host 127.0.0.1 -port 8081 2>&1 >httpbin.log &
WX_TEST_WEBREQUEST_URL="http://127.0.0.1:8081"
fi
}
httpbin_show_log() {
if [ "$WX_TEST_WEBREQUEST_URL" != "0" ]; then
echo '*** Tests failed, contents of httpbin.log follows: ***'
echo '-----------------------------------------------------------'
cat httpbin.log
echo '-----------------------------------------------------------'
fi
}

View File

@@ -0,0 +1,29 @@
MinGW build tools
-----------------
This folder contains batch files used to create zip packages for official
builds with different versions of the MinGW compiler.
Building a new release
----------------------
1. If needed, update the versions list in the 'buildall.bat' script (the first 'for' loop of this file)
2. Update the 'parameters.bat" file to reflect your system and your installations of the different MinGW versions. This script is first called without any parameter, to initialize generals values. It will then be called with the compiler version, and the number of bits of the architecture (32 or 64). Here are the lines that will probably need to be changed:
* `set /A JOBS=%NUMBER_OF_PROCESSORS%-1` : the value of this variable contains the number of processes that will be launched simultaneously. It is automatically calculated as "number of cores of your processor - 1" which is the recommended value. It can be overridden by writing something like `set JOBS=3` to directly assign a numerical value to this variable.
* `set CLEANBUILD=1` : setting this value to 0 will not remove old builds previously done. It is not recommended to modify it, unless you know what you're doing.
* `set COMPBINDIR=G:\msys64\mingw%2\bin` and/or `set COMPBINDIR=G:\MinGW%1-%2\bin` : these lines will surely need to be updated. The `COMPBINDIR` value must point to the binary folder of the corresponding MinGW installation. The `%1` parameter will contain the version of the current compiler (such as 730, 810, 1020, 920, ...) and the `%2` one will contain the number of bits of the architecture (32 or 64).
* The 7Zip executable path can also be changed (see at the end of the 'parameters.bat' file).
3) Launch the builds by running the 'buildall.bat' script.
4) Check if nothing went wrong: Have a look at the main log file (a file named `_wxWidgets-x.x.x.log` in the `logs` sub directory). It will contain the result of each executed command line. If a value is different than zero, there was a problem.
Current compilers versions
--------------------------
The following versions of MinGW are actually used to create binaries (they all use Win32 threads):
* MinGW-W64 GCC-7.3.0 using SJLJ exceptions for 32 bits architecture downloadable from [here](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/7.3.0/threads-win32/sjlj/i686-7.3.0-release-win32-sjlj-rt_v5-rev0.7z "MinGW-W64 GCC-7.3.0 i686 Win32 SJLJ") and SEH exceptions for 64 bits architecture downloadable from [here](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/7.3.0/threads-win32/seh/x86_64-7.3.0-release-win32-seh-rt_v5-rev0.7z "MinGW-W64 GCC-7.3.0 x86_64 Win32 SEH")
* MinGW-W64 GCC-8.1.0 using SJLJ exceptions for 32 bits architecture downloadable from [here](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-win32/sjlj/i686-8.1.0-release-win32-sjlj-rt_v6-rev0.7z "MinGW-W64 GCC-8.1.0 i686 Win32 SJLJ") and SEH exceptions for 64 bits architecture downloadable from [here](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-win32/seh/x86_64-8.1.0-release-win32-seh-rt_v6-rev0.7z "MinGW-W64 GCC-8.1.0 x86_64 Win32 SEH")
* MinGW-TDM GCC-10.3.0 downloadable from [here](https://jmeubank.github.io/tdm-gcc/articles/2021-05/10.3.0-release"TDM GCC-10.3.0")
* MSYS2 MinGW GCC-12.1.0 which is the last version installable using [MSYS2](https://www.msys2.org "www.msys2.org") package manager

View File

@@ -0,0 +1,21 @@
@echo off
rem Initialize general parameters
call parameters.bat
rem Create output and logs directories if needed
if not exist %OUTPUTDIR% mkdir %OUTPUTDIR%
if not exist %LOGDIR% mkdir %LOGDIR%
rem Initialize the main log file with the current date and time
echo %date% %time% : wxWidgets-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER% build started > %MAINLOGFILE%
rem Loop through all versions of the compiler
for %%c in ( 730 810 1030 1210 ) do (
rem For each version, create a 32 and a 64 bits build
for %%a in ( 32 64 ) do (
call officialbuild.bat %%c %%a
)
)
echo %date% %time% : wxWidgets-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER% build ended >> %MAINLOGFILE%

View File

@@ -0,0 +1,95 @@
@echo off
rem Check if compiler version is present
if "%1" == "" goto :ERR_NOPARM
rem Check if architecture is present
if "%2" == "" goto :ERR_NOPARM
rem Initialize specifics parameters related to the current build
call parameters.bat %1 %2
echo Starting official build for %COMPNAME% ( %COMPBINDIR% )
if %CLEANBUILD%==1 (
echo - Cleanup
for %%d in ( lib\%COMPNAME%_dll build\msw\%COMPNAME%_mswuddll build\msw\%COMPNAME%_mswudll utils\wxrc\%COMPNAME%_mswudll ) do (
if exist %WXDIR%\%%d (
echo * removing %%d
rmdir /s /q %WXDIR%\%%d
)
)
)
rem Common part of the build command line
set MAINCMDLINE=SHARED=1 CXXFLAGS="-fno-keep-inline-dllexport" OFFICIAL_BUILD=1 COMPILER_VERSION=%COMPVERS%
if "%2" == "64" (
set MAINCMDLINE=%MAINCMDLINE% CPP="gcc -E -D_M_AMD64"
)
pushd %WXDIR%\build\msw
rem ============================================ Build debug version
title Debug for %COMPNAME%
echo - Debug
set BUILDLOGFILE=%LOGDIR%\wxWidgets-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%-%COMPNAME%-Debug
set CMDLINE=BUILD=debug %MAINCMDLINE%
echo mingw32-make -f makefile.gcc setup_h %CMDLINE% >%BUILDLOGFILE%-build.log
echo mingw32-make -f makefile.gcc setup_h %CMDLINE% >%BUILDLOGFILE%-errors.log
mingw32-make -f makefile.gcc setup_h %CMDLINE% 1>>%BUILDLOGFILE%-build.log 2>>%BUILDLOGFILE%-errors.log
set ERRLVL=%ERRORLEVEL%
echo %date% %time% : %COMPNAME%%XTRASPCS% Dbg setup : ERRORLEVEL=%ERRLVL% >> %MAINLOGFILE%
if not %ERRLVL%==0 goto :ENDBUILD
echo mingw32-make -j%JOBS% -f makefile.gcc %CMDLINE% >>%BUILDLOGFILE%-build.log
echo mingw32-make -j%JOBS% -f makefile.gcc %CMDLINE% >>%BUILDLOGFILE%-errors.log
mingw32-make -j%JOBS% -f makefile.gcc %CMDLINE% 1>>%BUILDLOGFILE%-build.log 2>>%BUILDLOGFILE%-errors.log
set ERRLVL=%ERRORLEVEL%
echo %date% %time% : %COMPNAME%%XTRASPCS% Dbg build : ERRORLEVEL=%ERRLVL% >> %MAINLOGFILE%
if not %ERRLVL%==0 goto :ENDBUILD
rem ============================================ Build release version
title Release for %COMPNAME%
echo - Release
set BUILDLOGFILE=%LOGDIR%\wxWidgets-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%-%COMPNAME%-Release
set CMDLINE=BUILD=release %MAINCMDLINE%
echo mingw32-make -f makefile.gcc setup_h %CMDLINE% >%BUILDLOGFILE%-build.log
echo mingw32-make -f makefile.gcc setup_h %CMDLINE% >%BUILDLOGFILE%-errors.log
mingw32-make -f makefile.gcc setup_h %CMDLINE% 1>>%BUILDLOGFILE%-build.log 2>>%BUILDLOGFILE%-errors.log
set ERRLVL=%ERRORLEVEL%
echo %date% %time% : %COMPNAME%%XTRASPCS% Rel setup : ERRORLEVEL=%ERRLVL% >> %MAINLOGFILE%
if not %ERRLVL%==0 goto :ENDBUILD
echo mingw32-make -j%JOBS% -f makefile.gcc %CMDLINE% >>%BUILDLOGFILE%-build.log
echo mingw32-make -j%JOBS% -f makefile.gcc %CMDLINE% >>%BUILDLOGFILE%-errors.log
mingw32-make -j%JOBS% -f makefile.gcc %CMDLINE% 1>>%BUILDLOGFILE%-build.log 2>>%BUILDLOGFILE%-errors.log
set ERRLVL=%ERRORLEVEL%
echo %date% %time% : %COMPNAME%%XTRASPCS% Rel build : ERRORLEVEL=%ERRLVL% >> %MAINLOGFILE%
if not %ERRLVL%==0 goto :ENDBUILD
rem ============================================ Build wxrc executable
title wxrc for %COMPNAME%
echo - wxrc.exe
set BUILDLOGFILE=%LOGDIR%\wxWidgets-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%-%COMPNAME%-wxrc
cd %WXDIR%\utils\wxrc
echo mingw32-make -j%JOBS% -f makefile.gcc %CMDLINE% >%BUILDLOGFILE%-build.log
echo mingw32-make -j%JOBS% -f makefile.gcc %CMDLINE% >%BUILDLOGFILE%-errors.log
mingw32-make -j%JOBS% -f makefile.gcc %CMDLINE% 1>>%BUILDLOGFILE%-build.log 2>>%BUILDLOGFILE%-errors.log
set ERRLVL=%ERRORLEVEL%
echo %date% %time% : %COMPNAME%%XTRASPCS% wxrc.exe : ERRORLEVEL=%ERRLVL% >> %MAINLOGFILE%
if not %ERRLVL%==0 goto :ENDBUILD
copy %WXDIR%\utils\wxrc\%COMPNAME%_mswudll\wxrc.exe %WXDIR%\lib\%COMPNAME%_dll\
rem ============================================ Create archives
title Archives for %COMPNAME%
cd %WXDIR%\
if exist %OUTPUTDIR%\%ARCHNAME%%COMPNAME%_Dev.7z del %OUTPUTDIR%\%ARCHNAME%%COMPNAME%_Dev.7z
%ZIP% a -t7z -mx4 -bb %OUTPUTDIR%\%ARCHNAME%%COMPNAME%_Dev.7z -r %COMPNAME%_dll
set ERRLVL=%ERRORLEVEL%
if exist %OUTPUTDIR%\%ARCHNAME%%COMPNAME%_ReleaseDLL.7z del %OUTPUTDIR%\%ARCHNAME%%COMPNAME%_ReleaseDLL.7z
%ZIP% a -t7z -mx4 -bb %OUTPUTDIR%\%ARCHNAME%%COMPNAME%_ReleaseDLL.7z -r -ir!lib\%COMPNAME%_dll\*.dll -xr!*ud_*.dll
set ERRLVL=%ERRLVL% / %ERRORLEVEL%
echo %date% %time% : %COMPNAME%%XTRASPCS% archives : ERRORLEVEL=%ERRLVL% >> %MAINLOGFILE%
:ENDBUILD
popd
goto :EOF
:ERR_NOPARM
echo.
echo ERROR: NO PARAMETER SUPPLIED:
echo officialbuildgcc.bat cmpVers arch
echo cmpVers = Compiler version (730, 810, 920, ...)
echo arch = architecture (32 or 64)

View File

@@ -0,0 +1,56 @@
@echo off
rem Number of jobs for parallels builds
if "%NUMBER_OF_PROCESSORS%" == "" set NUMBER_OF_PROCESSORS=2
set /A JOBS=%NUMBER_OF_PROCESSORS%-1
rem Removing (if = 1) or not (otherwise) actuals build and lib dirs
set CLEANBUILD=1
rem Check if compiler version is present
if "%1" == "" goto :NOPARAMS
rem Check if architecture is present
if "%2" == "" goto :NOPARAMS
rem Define compiler's bin directory
if "%1" == "1210" (
set COMPBINDIR=G:\msys64\mingw%2\bin
) else (
set COMPBINDIR=G:\MinGW%1-%2\bin
)
rem Define compiler's version string such as 810, 730_x64, 920TDM
rem Also define extra spaces for "aligned" logs lines
set COMPVERS=%1
set XTRASPCS= :
if "%1" == "1030" (
set COMPVERS=%COMPVERS%TDM
) else (
set XTRASPCS= %XTRASPCS%
)
if "%2" == "64" (
set COMPVERS=%COMPVERS%_x64
) else (
set XTRASPCS= %XTRASPCS%
)
rem Define compiler's name, such as gcc810, gcc730_x64, gcc1030TDM, ...
set COMPNAME=gcc%COMPVERS%
rem Simplified (but sufficient) PATH variable
set PATH=C:\Windows;C:\Windows\system32\;%COMPBINDIR%
goto :EOF
rem Generals parameters
:NOPARAMS
rem Normalized wxWidgets base dir
set WXDIR=%CD%\..\..\..
for %%i in ("%WXDIR%") do SET "WXDIR=%%~fi"
rem wxWidgets version
call ..\msvs\getversion.bat
rem Logs and output
set LOGDIR=%CD%\logs
set OUTPUTDIR=%CD%\output
SET MAINLOGFILE=%LOGDIR%\_wxWidgets-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%.log
rem Base of each created zip archive
set ARCHNAME=wxMSW-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%_
rem 7Zip executable
set ZIP="C:\Program Files\7-Zip\7z.exe"

View File

@@ -0,0 +1 @@
start cmd /k Call officialbuild.bat vc14x

View File

@@ -0,0 +1,3 @@
set wxMAJOR_VERSION=3
set wxMINOR_VERSION=3
set wxRELEASE_NUMBER=1

View File

@@ -0,0 +1,112 @@
@echo off
rem SetLocal EnableDelayedExpansion
if "%1" == "" goto ERR_NOPARM
set curr_dir=%cd%
cd ..\..\msw
rem VS2017 changes the build directory when environment batch files
rem are called, so remember where we are building from.
set "VSCMD_START_DIR=%CD%"
rem ================ wxWidgets Official Build ===============
rem
rem Open a command prompt and run this from the build\tools\msvs folder.
rem Specify the compiler version to use.
rem
rem ========================================================
set compvers="Unknown"
if "%1" == "vc14x" (
@echo Building for vc14x with vs2015
set comp=14x
set compvers=vc14x
call "%VS140COMNTOOLS%VsDevCmd.bat"
)
if %compvers% == "Unknown" goto ERR_UNKNOWNCOMP
rem Return to the build directory in case we have been moved elsewhere.
cd %VSCMD_START_DIR%
@echo Removing the existing destination so that a complete rebuild occurs.
rmdir %compvers%_mswuddll_x64 /s /q
rmdir %compvers%_mswudll_x64 /s /q
rmdir ..\..\lib\%compvers%_x64_dll /s /q
@echo Delete the build output files from the last run.
del %compvers%x64_Debug.txt
del %compvers%x64_Release.txt
if "%compvers%" == "vc14x" call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x64 10.0.17763.0
@echo 64 bit release build
nmake -f makefile.vc BUILD=release SHARED=1 COMPILER_VERSION=%comp% OFFICIAL_BUILD=1 TARGET_CPU=AMD64 >> %compvers%x64_Release.txt
if ERRORLEVEL 1 goto ERR_BUILD
set build_dir=%cd%
cd ..\..\utils\wxrc
rmdir %compvers%_mswudll_x64 /s /q
del %compvers%x64_Release.txt
nmake -f makefile.vc BUILD=release SHARED=1 COMPILER_VERSION=%comp% OFFICIAL_BUILD=1 TARGET_CPU=AMD64 >> %compvers%x64_Release.txt
if ERRORLEVEL 1 goto ERR_BUILD
cd %build_dir%
@echo 64 bit debug build
nmake -f makefile.vc BUILD=debug SHARED=1 COMPILER_VERSION=%comp% OFFICIAL_BUILD=1 TARGET_CPU=AMD64 >> %compvers%x64_Debug.txt
if ERRORLEVEL 1 goto ERR_BUILD
@echo Building Packages
cd %curr_dir%
call package %compvers%
goto End
:ERR_BUILD
goto End
@echo.
@echo BUILD ERROR
:ERR_UNKNOWNCOMP
@echo.
@echo UNKNOWN COMPILER VERSION
goto VERSIONS
goto End
:ERR_NOPARM
@echo.
@echo ERROR: NO PARAMETER SUPPLIED
goto VERSIONS
:VERSIONS
@echo.
@echo Compiler Version:
@echo vc14x (Requires VS2015)
@echo.
:End
@echo Finished.
cd %curr_dir%

View File

@@ -0,0 +1,102 @@
rem ================ VS Official Build Package Tool ===============
rem
rem This is used to assemble the official build binaries into
rem three 7zip files for one compiler version. It is normally
rem run by the makepackages.bat tool but can be run from the command line.
rem
rem Do not run this until after the official packages have
rem been built.
rem
rem Open a command prompt. Switch to the build\tools\msvs
rem directory.
rem
rem package major minor revision compilerversion
rem for example: package 3 1 0 vc140
rem
rem ========================================================
call getversion.bat
if "%1" == "" goto ERR_NOPARM
path=%path%;"C:\Program Files\7-Zip"
rem Add path to fciv (the sha tool) if it is not already
rem in the path.
set VCver=%1
rem packages will be located in wx install folder\packages
set packagePath=build\msw\packages
rem Change to wx root folder
set curr_dir1=%cd%
cd ..\..\..
set base_dir=%cd%
mkdir %packagePath%
mkdir %packagePath%\%VCver%
set wxLibVers=%wxMAJOR_VERSION%%wxMINOR_VERSION%
set wxDLLVers=%wxMAJOR_VERSION%%wxMINOR_VERSION%
if "%wxMINOR_VERSION%" == "1" set wxDLLVers=%wxMAJOR_VERSION%%wxMINOR_VERSION%%wxRELEASE_NUMBER%
if "%wxMINOR_VERSION%" == "3" set wxDLLVers=%wxMAJOR_VERSION%%wxMINOR_VERSION%%wxRELEASE_NUMBER%
if "%wxMINOR_VERSION%" == "5" set wxDLLVers=%wxMAJOR_VERSION%%wxMINOR_VERSION%%wxRELEASE_NUMBER%
if "%wxMINOR_VERSION%" == "7" set wxDLLVers=%wxMAJOR_VERSION%%wxMINOR_VERSION%%wxRELEASE_NUMBER%
if "%wxMINOR_VERSION%" == "9" set wxDLLVers=%wxMAJOR_VERSION%%wxMINOR_VERSION%%wxRELEASE_NUMBER%
rem Get rid of any files from the last run.
del %packagePath%\%VCver%\wxMSW-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%_%VCver%_x64_Dev.7z
del %packagePath%\%VCver%\wxMSW-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%_%VCver%_x64_ReleaseDLL.7z
del %packagePath%\%VCver%\wxMSW-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%_%VCver%_x64_ReleasePDB.7z
rem Package the 64 bit files
REM Copy wxrc.exe to the dll folder.
copy utils\wxrc\%VCver%_x64_mswudll\wxrc.exe lib\%VCver%_x64_dll
7z a -t7z %packagePath%\%VCver%\wxMSW-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%_%VCver%_x64_Dev.7z lib\%VCver%_x64_dll\mswud lib\%VCver%_x64_dll\mswu lib\%VCver%_x64_dll\wxMSW%wxDllVers%ud_*.pdb lib\%VCver%_x64_dll\wxbase%wxDllVers%ud_*.pdb lib\%VCver%_x64_dll\wxMSW%wxDllVers%ud_*.dll lib\%VCver%_x64_dll\wxbase%wxDllVers%u*.dll lib\%VCver%_x64_dll\*.lib lib\%VCver%_x64_dll\wxrc.exe
7z a -t7z %packagePath%\%VCver%\wxMSW-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%_%VCver%_x64_ReleaseDLL.7z lib\%VCver%_x64_dll\wxMSW%wxDllVers%u_*.dll lib\%VCver%_x64_dll\wxbase%wxDllVers%u_*.dll
7z a -t7z %packagePath%\%VCver%\wxMSW-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%_%VCver%_x64_ReleasePDB.7z lib\%VCver%_x64_dll\wxMSW%wxDllVers%u_*.pdb lib\%VCver%_x64_dll\wxbase%wxDllVers%u_*.pdb
rem Include the props files: we need wxwidgets.props itself and wx_setup.props
rem included from it.
7z a -t7z %packagePath%\%VCver%\wxMSW-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%_%VCver%_x64_Dev.7z build\msw\wx_setup.props
copy wxwidgets.props %packagePath%\%VCver%\wxwidgets.props
rem Change to the directory containing wxwidgets.props in order to include it
rem into the archive without any path.
cd %packagePath%\%VCver%
7z a -t7z wxMSW-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%_%VCver%_x64_Dev.7z wxwidgets.props
del wxwidgets.props
rem Change to the directory containing licence file in order to include it
rem into the archives without any path.
cd %base_dir%\docs
7z a -t7z ..\%packagePath%\%VCver%\wxMSW-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%_%VCver%_x64_Dev.7z licence.txt
7z a -t7z ..\%packagePath%\%VCver%\wxMSW-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%_%VCver%_x64_ReleaseDLL.7z licence.txt
cd ..\%packagePath%\%VCver%
del sha1.txt
rem fciv requires a complete path to files
fciv %cd%\. -type *.7z -sha1 -wp >> sha1.txt
goto End
:ERR_NOPARM
@echo.
@echo ERROR: NO PARAMETER SUPPLIED
@echo MajorVers MinorVers BuildVers
:End
cd %curr_dir1%

View File

@@ -0,0 +1,32 @@
#!/bin/bash
# Exit immediately if a command exits with a non-zero status.
set -e
topdir=`dirname $0`/../..
# Build the file list for sha1sums, from `docs/release.md`
declare -a files=(`sed -n '/^To verify your download/,/^## Binaries/p' $topdir/docs/release.md | sed -n -E 's/^\s*0{40}\s{2}(wx.*)/\1/p'`)
if [ -z "$files" ]; then
echo "No lines with SHA-1 sums, has release.md format changed?" >&2
exit 1
fi
# Get the release version unless it's given explicitly on the command line.
if [ -z $1 ]; then
ver_string=`grep '#define wxVERSION_STRING ' $topdir/include/wx/version.h | sed 's/^.*"wxWidgets \(.*\)")/\1/'`
else
ver_string=$1
fi
for i in "${files[@]}"
do
# compute sha1sum
sha1sum=`sha1sum $topdir/distrib/release/$ver_string/$i | cut -d' ' -f1`
# save the sha1sum for this file
sed -i -E "/^\s*[0]{40}\s{2}wx/ s/(^\s*)[0]{40}(\s{2}$i)/\1$sha1sum\2/" $topdir/docs/release.md
done
echo "File $topdir/docs/release.md updated after $ver_string release, don't forget to commit it."

View File

@@ -0,0 +1,68 @@
#!/bin/bash
# build a list of English locales
declare -a locale_list=("en_GB" "en_US")
# get available en locales (including .utf8 and .UTF-8 ones)
declare -a en_locales=(`locale -a | grep '^C\|^POSIX\|^en_'`)
locale_list+=("${en_locales[@]}")
found=0
# set an English locale to get the month name
for i in "${locale_list[@]}"
do
LC_ALL="$i"
# check that setting the locale succeeded
# if it failed then LC_TIME would be empty
my_locale=`locale | grep LC_TIME | sed 's/.*"\(.*\)".*/\1/'`
if [ "$my_locale" = "$i" ]
then
echo Locale set to $i
found=1
break
fi
done
if [ $found = 0 ]
then
echo Could not set an appropriate locale
exit 1
fi
# Optional release-date argument can be specified if the release is not being
# done today.
if [[ -n $1 ]]
then
echo Using release date of $1
rel_date=--date=$1
fi
# Exit immediately if a command exits with a non-zero status.
set -e
topdir=`dirname $0`/../..
# get the month name and the year, see $(date +'%B %Y')
# then use it in the relevant line (one before last)
sed -i "/^The wxWidgets Team, / s/.*/The wxWidgets Team, $(date ${rel_date} +'%B %Y')/" $topdir/docs/readme.txt
echo Updated date in docs/readme.txt
# reset checksums to a string of 40 0-s, see $(printf '%.40d' 0)
sed -i -E "/^\s*[0-9a-f]{40}\s{1,2}wx/ s/(\s*)[0-9a-f]{40}(\s{1,2}wx)/\1$(printf '%.40d' 0)\2/" $topdir/docs/release.md
echo Reset checksums in docs/release.md
# get current date, see $(date +'%Y-%m-%d')
# then use it in the line containing "X.X.X: (not released yet)"
sed -i "/^[3-9]\.[0-9]\.[0-9]: (not released yet)$/ s/not released yet/released $(date ${rel_date} +'%Y-%m-%d')/" $topdir/docs/changes.txt
echo Updated release date in docs/changes.txt
# get current date, see $(date +'%B %d, %Y')
# then use it in the line starting with @date
sed -i "/^@date / s/.*/@date $(date ${rel_date} +'%B %d, %Y')/" $topdir/docs/doxygen/mainpages/manual.h
echo Updated date in docs/doxygen/mainpages/manual.h
# get current date, see $(date +'%B %d, %Y')
# then use it in the first line
sed -i "1s/^.* -- /$(date ${rel_date} +'%B %d, %Y') -- /" $topdir/docs/publicity/announce.txt
echo Updated date in docs/publicity/announce.txt

View File

@@ -0,0 +1,17 @@
# This script outputs the number of available processors/cores plus one.
case `uname` in
Linux|MSYS*|MINGW*)
wxPROC_COUNT=`nproc`
;;
Darwin|FreeBSD)
wxPROC_COUNT=`sysctl -n hw.ncpu`
;;
*)
wxPROC_COUNT=0
;;
esac
echo $((wxPROC_COUNT+1))

View File

@@ -0,0 +1,71 @@
@echo off
setlocal enabledelayedexpansion
rem This script builds the CHM manual and the Windows installer for release.
if "%1" == "" (
echo You must specify a release version.
exit /b 1
)
pushd "%~dp0..\.."
set root=%cd%
set version=%1
set prefix=wxWidgets-%1
set release_path=%root%\distrib\release\%version%
where /q 7z
if %ERRORLEVEL% neq 0 (
echo Error: 7-Zip was not found in your PATH.
exit /b 1
)
where /q dot
if %ERRORLEVEL% neq 0 (
echo Error: GraphViz was not found in your PATH.
exit /b 1
)
where /q doxygen
if %ERRORLEVEL% neq 0 (
echo Error: Doxygen was not found in your PATH.
exit /b 1
)
where /q hhc
if %ERRORLEVEL% neq 0 (
echo Error: HTML Help Workshop was not found in your PATH.
exit /b 1
)
where /q iscc
if %ERRORLEVEL% neq 0 (
echo Error: Inno Setup was not found in your PATH.
exit /b 1
)
if not exist "%release_path%\%prefix%.zip" (
echo Error: Release ZIP package not found: %release_path%\%prefix%.zip
exit /b 1
)
pushd "%root%\docs\doxygen"
echo Building the CHM manual...
call regen.bat chm
if %errorlevel% neq 0 exit /b %errorlevel%
copy out\wx.chm "%release_path%\%prefix%.chm"
popd
if exist "%release_path%\%prefix%" rd /s /q "%release_path%\%prefix%"
md "%release_path%\%prefix%"
pushd "%release_path%\%prefix%"
echo Extracting release ZIP for installer...
7z x "..\%prefix%.zip"
if %errorlevel% neq 0 exit /b %errorlevel%
md docs\htmlhelp
copy "..\%prefix%.chm" docs\htmlhelp\wx.chm
set WXW_VER=%1
echo Building the installer...
iscc /Qp build\tools\wxwidgets.iss
if %errorlevel% neq 0 exit /b %errorlevel%
popd
echo Cleaning up installer files...
rd /s /q "%release_path%\%prefix%"

View File

@@ -0,0 +1,85 @@
#!/bin/sh
#
# This is the official script used to make wxWidgets releases.
#
# We use the git export features to track which files should be included in the
# distribution and we don't need to maintain the list of them ourselves but we
# also don't run the risk of including anything unwanted.
#
# See docs/contributing/how-to-release.md for usage instructions.
version=$1
if [ -z "$version" ]; then
echo "Must specify the distribution version." >&2
exit 1
fi
root="$(readlink -f $(dirname $(readlink -f $0))/../..)"
cd "$root"
if ! git diff --quiet; then
echo "Working copy has modifications, commit or stash them." >&2
exit 2
fi
set -e
set -x
prefix=wxWidgets-$version
destdir="$root/distrib/release/$version"
cleanup() {
rm -rf $destdir/$prefix
}
trap cleanup INT TERM EXIT
cleanup
mkdir -p $destdir
# We use GNU tar -i option to allow successfully extracting files from several
# tar archives concatenated together, without it we'd have to pipe output of
# each git-archive separately.
(git archive --prefix=$prefix/ HEAD;
git submodule foreach --quiet "cd $root/\$path && git archive --prefix=$prefix/\$path/ HEAD") |
tar x -C $destdir -i
cd $destdir
# Check that there are no symlinks because we don't handle them correctly
# under MSW systems currently.
if ! find . -type l -exec false {} + -quit; then
set +x
echo 'There are unexpected symlinks in the source tree:' >&2
echo '' >& 2
find . -type l -fprint /dev/stderr
echo '' >& 2
echo 'Please remove them or fix #22271.' >&2
exit 2
fi
# Compile gettext catalogs.
make -C $prefix/locale -s MSGFMT=msgfmt allmo
tar cjf $prefix.tar.bz2 $prefix
cd $prefix
zip -q -r ../$prefix.zip .
7z a ../$prefix.7z . >/dev/null
7z a ../${prefix}-headers.7z include >/dev/null
# Build HTML documentation packages.
prefix_docs=$prefix-docs-html
cd "$root/docs/doxygen"
rm -rf out
./regen.sh html
cd out
mv html "$prefix_docs"
tar cjf "$destdir/$prefix_docs.tar.bz2" "$prefix_docs"
cd "$prefix_docs"
zip -q -r "$destdir/$prefix_docs.zip" .
cd "$root"
rm -rf "$root/docs/doxygen/out"

View File

@@ -0,0 +1,61 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#if GetEnv("INNO") != ""
#define WXW_DIR GetEnv("INNO")
#else
#define WXW_DIR "..\.."
#endif
#if GetEnv("WXW_VER") == "Snapshot"
#define WX_VERSION "Snapshot"
#elif GetEnv("WXW_VER") != ""
#define WX_VERSION GetEnv("WXW_VER")
#else
#error "WXW_VER environment variable must be defined."
#endif
#define SETUPFILENAME "wxMSW-" + GetEnv("WXW_VER") + "-Setup"
[Setup]
AppName=wxWidgets
AppVerName=wxWidgets {#WX_VERSION}
AppPublisher=wxWidgets
AppPublisherURL=https://www.wxwidgets.org
AppSupportURL=https://www.wxwidgets.org
AppUpdatesURL=https://www.wxwidgets.org
DefaultDirName={sd}\wxWidgets-{#WX_VERSION}
DefaultGroupName=wxWidgets {#WX_VERSION}
UsePreviousAppDir=no
DisableProgramGroupPage=yes
LicenseFile={#WXW_DIR}\docs\licence.txt
InfoBeforeFile={#WXW_DIR}\docs\readme.txt
InfoAfterFile={#WXW_DIR}\docs\msw\setup_after.txt
OutputDir={#WXW_DIR}\..
OutputBaseFilename={#SETUPFILENAME}
PrivilegesRequired=none
SetupIconFile={#WXW_DIR}\art\wxwin.ico
UninstallDisplayIcon={#WXW_DIR}\art\wxwin.ico
Compression=lzma
SolidCompression=yes
[Files]
; source files
Source: "{#WXW_DIR}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
[INI]
Filename: "{app}\wx.url"; Section: "InternetShortcut"; Key: "URL"; String: "https://www.wxwidgets.org"
[Icons]
Name: "{group}\{cm:ProgramOnTheWeb,wxWidgets}"; Filename: "{app}\wx.url"
Name: {group}\wxWidgets Manual; Filename: {app}\docs\htmlhelp\wx.chm; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
Name: {group}\Changes; Filename: {app}\docs\changes.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
Name: {group}\Readme; Filename: {app}\docs\readme.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
Name: {group}\Setting up wxWidgets; Filename: {app}\docs\msw\install.md; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
Name: "{group}\Uninstall wxWidgets {#WX_VERSION}"; Filename: "{uninstallexe}"
[UninstallDelete]
Type: files; Name: "{app}\wx.url"