sconscript-dll

来自「一个曾经热门的网络游戏RO查看GRF工具的源码」· 代码 · 共 35 行

TXT
35
字号
Import('*')lib = env.Copy()lib['CPPPATH'] += ['zlib']lib['CPPDEFINES'] = ['GRF_BUILDING', 'SPR_BUILDING', 'WIN32']if DEBUG:	lib['CPPDEFINES'] += ['DEBUG']if platform == "cygwin":	# Compile the DLL on Cygwin.	lib.StaticLibrary(		'static-grf-dll',		['grf.c', 'sprite.c']		)	dllbld = Builder(action = [		'dllwrap --driver=gcc --target=i386-mingw32 -mno-cygwin --def lib/dll/grf.gccdef $SOURCE -o $TARGET lib/zlib/libgrfzlib-static.a',		'strip --strip-all $TARGET'		])	defbld = Builder(action = [		'dlltool --dllname grf.dll --output-def $TARGET --no-export-all-symbols --add-stdcall-alias $SOURCE'		])	dll = lib.Copy(BUILDERS = { 'Dll' : dllbld, 'Def' : defbld })	dll.Depends('grf.dll', ['grf.gccdef'])	dll.Def('grf.gccdef', 'libstatic-grf-dll.a');	Default(dll.Dll('grf.dll', 'libstatic-grf-dll.a'))else:	# Compile the DLL with MS Visual C++ and mingw. Not sure whether this works	lib.SharedLibrary(		'static-grf-dll',		['grf.c', 'sprite.c']		)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?