mirror of
https://github.com/kennethreitz-archive/pyinstaller.git
synced 2026-06-05 23:50:17 +00:00
8a347723a1
git-svn-id: http://svn.pyinstaller.org/trunk@271 8dd32b29-ccff-0310-8a9a-9233e24343b1
49 lines
1.8 KiB
Python
49 lines
1.8 KiB
Python
# Sconscript file to build the bootloader
|
|
# Copyright (C) 2005, Giovanni Bajo
|
|
#
|
|
# 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
|
|
|
|
Import("env")
|
|
|
|
env.Append(CPPPATH = [ "zlib", "common" ])
|
|
|
|
if env["PYINST_FLAVOUR"] == "debug":
|
|
# launch.c prints some debug messages to the console if this macro is defined
|
|
env.Append(CPPDEFINES = ["LAUNCH_DEBUG"])
|
|
|
|
if Platform().name == "win32":
|
|
# We use a prebuilt binary version of zlib [http://www.winimage.com/zLibDll/].
|
|
# It was compiled with the WINAPI convention.
|
|
env.Append(CPPDEFINES = [ "ZLIB_WINAPI" ])
|
|
|
|
if env["PYINST_MODE"] == "cons":
|
|
resfile = env.RES("windows/run.rc")
|
|
else:
|
|
resfile = env.RES("windows/runw.rc")
|
|
|
|
zlib = env.Library("zlib",
|
|
["zlib/inflate.c",
|
|
"zlib/crc32.c",
|
|
"zlib/adler32.c",
|
|
"zlib/zutil.c",
|
|
"zlib/inffast.c",
|
|
"zlib/inftrees.c"])
|
|
run = env.Program("run",
|
|
["common/launch.c", "windows/winmain.c", zlib, resfile])
|
|
dll = env.SharedLibrary("inprocsrvr",
|
|
["common/launch.c", "windows/dllmain.c", zlib])
|
|
|
|
Return("run", "dll")
|