3 # ***** BEGIN GPL LICENSE BLOCK *****
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software Foundation,
17 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 # The Original Code is Copyright (C) 2006, Blender Foundation
20 # All rights reserved.
22 # The Original Code is: all of this file.
24 # Contributor(s): Nathan Letwory.
26 # ***** END GPL LICENSE BLOCK *****
28 # Main entry-point for the SCons building system
29 # Set up some custom actions and target/argument handling
30 # Then read all SConscripts and build
32 import platform as pltfrm
34 # Need a better way to do this. Automagical maybe is not the best thing, maybe it is.
35 if pltfrm.architecture()[0] == '64bit':
47 from tempfile import mkdtemp
53 EnsureSConsVersion(1,0,0)
55 BlenderEnvironment = tools.Blender.BlenderEnvironment
60 platform = sys.platform
65 ##### BEGIN SETUP #####
67 B.possible_types = ['core', 'player', 'intern', 'extern']
69 B.binarykind = ['blender' , 'blenderplayer']
70 ##################################
71 # target and argument validation #
72 ##################################
73 # XX cheating for BF_FANCY, we check for BF_FANCY before args are validated
74 use_color = ARGUMENTS.get('BF_FANCY', '1')
78 if not use_color=='1':
81 #on defaut white Os X terminal, some colors are totally unlegible
82 if platform=='darwin':
83 B.bc.OKGREEN = '\033[34m'
84 B.bc.WARNING = '\033[36m'
87 print B.bc.HEADER+'Command-line arguments'+B.bc.ENDC
88 B.arguments = btools.validate_arguments(ARGUMENTS, B.bc)
89 btools.print_arguments(B.arguments, B.bc)
92 print B.bc.HEADER+'Command-line targets'+B.bc.ENDC
93 B.targets = btools.validate_targets(COMMAND_LINE_TARGETS, B.bc)
94 btools.print_targets(B.targets, B.bc)
96 ##########################
97 # setting up environment #
98 ##########################
100 # handling cmd line arguments & config file
102 # first check cmdline for toolset and we create env to work on
103 quickie = B.arguments.get('BF_QUICK', None)
104 quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
107 B.quickdebug=string.split(quickdebug, ',')
112 B.quickie=string.split(quickie,',')
116 toolset = B.arguments.get('BF_TOOLSET', None)
118 print "Using " + toolset
119 if toolset=='mstoolkit':
120 env = BlenderEnvironment(ENV = os.environ)
121 env.Tool('mstoolkit', ['tools'])
123 env = BlenderEnvironment(tools=[toolset], ENV = os.environ)
124 # xxx commented out, as was supressing warnings under mingw..
126 # btools.SetupSpawn(env)
128 env = BlenderEnvironment(ENV = os.environ)
131 print "Could not create a build environment"
135 cc = B.arguments.get('CC', None)
136 cxx = B.arguments.get('CXX', None)
142 if env['CC'] in ['cl', 'cl.exe'] and sys.platform=='win32':
144 platform = 'win64-vc'
146 platform = 'win32-vc'
147 elif env['CC'] in ['gcc'] and sys.platform=='win32':
148 platform = 'win32-mingw'
150 env.SConscriptChdir(0)
152 crossbuild = B.arguments.get('BF_CROSS', None)
153 if crossbuild and platform not in ('win32-vc', 'win64-vc'):
154 platform = 'linuxcross'
156 env['OURPLATFORM'] = platform
158 configfile = 'config'+os.sep+platform+'-config.py'
160 if os.path.exists(configfile):
161 print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile
163 print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC
165 if crossbuild and env['PLATFORM'] != 'win32':
166 print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC
167 env.Tool('crossmingw', ['tools'])
168 # todo: determine proper libs/includes etc.
169 # Needed for gui programs, console programs should do without it
170 env.Append(LINKFLAGS=['-mwindows'])
172 userconfig = B.arguments.get('BF_CONFIG', 'user-config.py')
173 # first read platform config. B.arguments will override
174 optfiles = [configfile]
175 if os.path.exists(userconfig):
176 print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig
177 optfiles += [userconfig]
179 print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC
181 opts = btools.read_opts(optfiles, B.arguments)
184 if not env['BF_FANCY']:
187 SetOption('num_jobs', int(env['BF_NUMJOBS']))
188 print "Build with %d parallel jobs" % (GetOption('num_jobs'))
190 # disable elbeem (fluidsim) compilation?
191 if env['BF_NO_ELBEEM'] == 1:
192 env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
193 env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
194 env['CCFLAGS'].append('-DDISABLE_ELBEEM')
196 if env['WITH_BF_OPENMP'] == 1:
197 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
198 env['CCFLAGS'].append('/openmp')
199 env['CPPFLAGS'].append('/openmp')
200 env['CXXFLAGS'].append('/openmp')
202 if env['CC'][-3:] == 'icc': # to be able to handle CC=/opt/bla/icc case
203 env.Append(LINKFLAGS=['-openmp', '-static-intel'])
204 env['CCFLAGS'].append('-openmp')
205 env['CPPFLAGS'].append('-openmp')
206 env['CXXFLAGS'].append('-openmp')
208 env.Append(CCFLAGS=['-fopenmp'])
209 env.Append(CPPFLAGS=['-fopenmp'])
210 env.Append(CXXFLAGS=['-fopenmp'])
211 # env.Append(LINKFLAGS=['-fprofile-generate'])
213 #check for additional debug libnames
215 if env.has_key('BF_DEBUG_LIBS'):
216 B.quickdebug += env['BF_DEBUG_LIBS']
218 printdebug = B.arguments.get('BF_LISTDEBUG', 0)
220 # see if this linux distro has libalut
222 if env['OURPLATFORM'] == 'linux2' :
223 if env['WITH_BF_OPENAL']:
224 mylib_test_source_file = """
226 int main(int argc, char **argv)
228 alutGetMajorVersion();
233 def CheckFreeAlut(context,env):
234 context.Message( B.bc.OKGREEN + "Linux platform detected:\n checking for FreeAlut... " + B.bc.ENDC )
236 result = context.TryLink(mylib_test_source_file, '.c')
237 context.Result(result)
240 env2 = env.Clone( LIBPATH = env['BF_OPENAL'] )
241 sconf_temp = mkdtemp()
242 conf = Configure( env2, {'CheckFreeAlut' : CheckFreeAlut}, sconf_temp, '/dev/null' )
243 if conf.CheckFreeAlut( env2 ):
244 env['BF_OPENAL_LIB'] += ' alut'
247 for root, dirs, files in os.walk(sconf_temp, topdown=False):
249 os.remove(os.path.join(root, name))
251 os.rmdir(os.path.join(root, name))
252 if root: os.rmdir(root)
254 if len(B.quickdebug) > 0 and printdebug != 0:
255 print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC
256 for l in B.quickdebug:
259 # remove stdc++ from LLIBS if we are building a statc linked CXXFLAGS
260 if env['WITH_BF_STATICCXX']:
261 if 'stdc++' in env['LLIBS']:
262 env['LLIBS'].remove('stdc++')
264 print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform'
266 # check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline
267 if 'blenderplayer' in B.targets:
268 env['WITH_BF_PLAYER'] = True
270 if 'blendernogame' in B.targets:
271 env['WITH_BF_GAMEENGINE'] = False
273 if 'blenderlite' in B.targets:
275 target_env_defs['WITH_BF_GAMEENGINE'] = False
276 target_env_defs['WITH_BF_OPENAL'] = False
277 target_env_defs['WITH_BF_OPENEXR'] = False
278 target_env_defs['WITH_BF_ICONV'] = False
279 target_env_defs['WITH_BF_INTERNATIONAL'] = False
280 target_env_defs['WITH_BF_OPENJPEG'] = False
281 target_env_defs['WITH_BF_FFMPEG'] = False
282 target_env_defs['WITH_BF_QUICKTIME'] = False
283 target_env_defs['WITH_BF_REDCODE'] = False
284 target_env_defs['WITH_BF_DDS'] = False
285 target_env_defs['WITH_BF_ZLIB'] = False
286 target_env_defs['WITH_BF_SDL'] = False
287 target_env_defs['WITH_BF_JPEG'] = False
288 target_env_defs['WITH_BF_PNG'] = False
289 target_env_defs['WITH_BF_BULLET'] = False
290 target_env_defs['WITH_BF_BINRELOC'] = False
291 target_env_defs['BF_BUILDINFO'] = False
292 target_env_defs['BF_NO_ELBEEM'] = True
293 target_env_defs['WITH_BF_PYTHON'] = False
295 # Merge blenderlite, let command line to override
296 for k,v in target_env_defs.iteritems():
297 if k not in B.arguments:
300 if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming', 'win64-vc'):
301 env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup')
302 env['PLATFORM_LINKFLAGS'].append('/ENTRY:main')
304 # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
305 #B.root_build_dir = B.arguments.get('BF_BUILDDIR', '..'+os.sep+'build'+os.sep+platform+os.sep)
306 B.root_build_dir = env['BF_BUILDDIR']
307 B.doc_build_dir = env['BF_DOCDIR']
308 if not B.root_build_dir[-1]==os.sep:
309 B.root_build_dir += os.sep
310 if not B.doc_build_dir[-1]==os.sep:
311 B.doc_build_dir += os.sep
313 # We do a shortcut for clean when no quicklist is given: just delete
314 # builddir without reading in SConscripts
316 if 'clean' in B.targets:
319 if not quickie and do_clean:
320 if os.path.exists(B.doc_build_dir):
321 print B.bc.HEADER+'Cleaning doc dir...'+B.bc.ENDC
322 dirs = os.listdir(B.doc_build_dir)
324 if os.path.isdir(B.doc_build_dir + entry) == 1:
325 print "clean dir %s"%(B.doc_build_dir+entry)
326 shutil.rmtree(B.doc_build_dir+entry)
328 print "remove file %s"%(B.doc_build_dir+entry)
329 os.remove(B.root_build_dir+entry)
330 if os.path.exists(B.root_build_dir):
331 print B.bc.HEADER+'Cleaning build dir...'+B.bc.ENDC
332 dirs = os.listdir(B.root_build_dir)
334 if os.path.isdir(B.root_build_dir + entry) == 1:
335 print "clean dir %s"%(B.root_build_dir+entry)
336 shutil.rmtree(B.root_build_dir+entry)
338 print "remove file %s"%(B.root_build_dir+entry)
339 os.remove(B.root_build_dir+entry)
340 for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak',
341 'extern/xvidcore/build/generic/platform.inc', 'extern/ffmpeg/include']:
342 if os.path.exists(confile):
343 print "clean file %s"%confile
344 if os.path.isdir(confile):
345 for root, dirs, files in os.walk(confile):
347 os.remove(os.path.join(root, name))
350 print B.bc.OKGREEN+'...done'+B.bc.ENDC
352 print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
355 if not os.path.isdir ( B.root_build_dir):
356 os.makedirs ( B.root_build_dir )
357 os.makedirs ( B.root_build_dir + 'source' )
358 os.makedirs ( B.root_build_dir + 'intern' )
359 os.makedirs ( B.root_build_dir + 'extern' )
360 os.makedirs ( B.root_build_dir + 'lib' )
361 os.makedirs ( B.root_build_dir + 'bin' )
362 if not os.path.isdir(B.doc_build_dir):
363 os.makedirs ( B.doc_build_dir )
365 Help(opts.GenerateHelpText(env))
367 # default is new quieter output, but if you need to see the
368 # commands, do 'scons BF_QUIET=0'
369 bf_quietoutput = B.arguments.get('BF_QUIET', '1')
371 B.set_quiet_output(env)
376 print B.bc.HEADER+'Building in '+B.bc.ENDC+B.root_build_dir
377 env.SConsignFile(B.root_build_dir+'scons-signatures')
380 ##### END SETUP ##########
384 BuildDir(B.root_build_dir+'/intern', 'intern', duplicate=0)
385 SConscript(B.root_build_dir+'/intern/SConscript')
386 BuildDir(B.root_build_dir+'/extern', 'extern', duplicate=0)
387 SConscript(B.root_build_dir+'/extern/SConscript')
388 BuildDir(B.root_build_dir+'/source', 'source', duplicate=0)
389 SConscript(B.root_build_dir+'/source/SConscript')
391 # now that we have read all SConscripts, we know what
392 # libraries will be built. Create list of
393 # libraries to give as objects to linking phase
395 for tp in B.possible_types:
396 if not tp == 'player' and not tp == 'player2':
397 mainlist += B.create_blender_liblist(env, tp)
399 if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
400 B.propose_priorities()
402 dobj = B.buildinfo(env, "dynamic") + B.resources
403 thestatlibs, thelibincs = B.setup_staticlibs(env)
404 thesyslibs = B.setup_syslibs(env)
406 if env['WITH_BF_PLAYER']:
407 print("Warning: Game player may not build on 2.5")
409 if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
410 #env.BlenderProg(B.root_build_dir, "blender", dobj , [], mainlist + thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
411 env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
412 if env['WITH_BF_PLAYER']:
413 playerlist = B.create_blender_liblist(env, 'player')
414 env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
416 ##### Now define some targets
419 #------------ INSTALL
423 if env['OURPLATFORM']=='darwin':
424 for prg in B.program_list:
425 bundle = '%s.app' % prg[0]
426 bundledir = os.path.dirname(bundle)
427 for dp, dn, df in os.walk(bundle):
432 dir=env['BF_INSTALLDIR']+dp[len(bundledir):]
433 source=[dp+os.sep+f for f in df]
434 blenderinstall.append(env.Install(dir=dir,source=source))
436 blenderinstall = env.Install(dir=env['BF_INSTALLDIR'], source=B.program_list)
439 #- dont do .blender and scripts for darwin, it is already in the bundle
444 if env['OURPLATFORM']!='darwin':
445 for dp, dn, df in os.walk('bin/.blender'):
452 if not env['WITH_BF_INTERNATIONAL']:
455 if f == '.Blanguages':
457 if not env['WITH_BF_FREETYPE']:
458 if f.endswith('.ttf'):
461 dotblendlist.append(os.path.join(dp, f))
462 dottargetlist.append(env['BF_INSTALLDIR']+dp[3:]+os.sep+f)
464 dotblenderinstall = []
465 for targetdir,srcfile in zip(dottargetlist, dotblendlist):
466 td, tf = os.path.split(targetdir)
467 dotblenderinstall.append(env.Install(dir=td, source=srcfile))
469 if env['WITH_BF_PYTHON']:
470 #-- .blender/scripts, .blender/ui, .blender/io
471 scriptpaths=['release/scripts', 'release/ui', 'release/io']
472 for scriptpath in scriptpaths:
473 for dp, dn, df in os.walk(scriptpath):
478 dir=env['BF_INSTALLDIR']+'/.blender/'+os.path.basename(scriptpath)+dp[len(scriptpath):]
479 source=[dp+os.sep+f for f in df]
480 scriptinstall.append(env.Install(dir=dir,source=source))
483 if env['OURPLATFORM']=='linux2':
487 for tp, tn, tf in os.walk('release/freedesktop/icons'):
493 iconlist.append(tp+os.sep+f)
494 icontargetlist.append(env['BF_INSTALLDIR']+tp[19:]+os.sep+f)
497 for targetdir,srcfile in zip(icontargetlist, iconlist):
498 td, tf = os.path.split(targetdir)
499 iconinstall.append(env.Install(dir=td, source=srcfile))
501 # dlls for linuxcross
502 # TODO - add more libs, for now this lets blenderlite run
503 if env['OURPLATFORM']=='linuxcross':
504 dir=env['BF_INSTALLDIR']
505 source = ['../lib/windows/pthreads/lib/pthreadGC2.dll']
506 scriptinstall.append(env.Install(dir=dir, source=source))
511 for tp, tn, tf in os.walk('release/plugins'):
517 pluglist.append(tp+os.sep+f)
518 plugtargetlist.append(env['BF_INSTALLDIR']+tp[7:]+os.sep+f)
520 # header files for plugins
521 pluglist.append('source/blender/blenpluginapi/documentation.h')
522 plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'documentation.h')
523 pluglist.append('source/blender/blenpluginapi/externdef.h')
524 plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'externdef.h')
525 pluglist.append('source/blender/blenpluginapi/floatpatch.h')
526 plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'floatpatch.h')
527 pluglist.append('source/blender/blenpluginapi/iff.h')
528 plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'iff.h')
529 pluglist.append('source/blender/blenpluginapi/plugin.h')
530 plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'plugin.h')
531 pluglist.append('source/blender/blenpluginapi/util.h')
532 plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'util.h')
533 pluglist.append('source/blender/blenpluginapi/plugin.DEF')
534 plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep + 'plugin.def')
537 for targetdir,srcfile in zip(plugtargetlist, pluglist):
538 td, tf = os.path.split(targetdir)
539 plugininstall.append(env.Install(dir=td, source=srcfile))
543 for tp, tn, tf in os.walk('release/text'):
549 textlist.append(tp+os.sep+f)
551 textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist)
553 if env['OURPLATFORM']=='darwin':
554 allinstall = [blenderinstall, plugininstall, textinstall]
555 elif env['OURPLATFORM']=='linux2':
556 allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall, iconinstall]
558 allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
560 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc'):
561 if env['OURPLATFORM'] == 'win64-vc':
564 dllsources = ['${LCGDIR}/gettext/lib/gnu_gettext.dll',
565 '${BF_PNG_LIBPATH}/libpng.dll',
566 '${BF_ZLIB_LIBPATH}/zlib.dll',
567 '${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll']
568 dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll']
569 if env['WITH_BF_SDL']:
570 if env['OURPLATFORM'] == 'win64-vc':
571 pass # we link statically already to SDL on win64
573 dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
574 if env['WITH_BF_PYTHON']:
575 ver = env["BF_PYTHON_VERSION"].replace(".", "")
577 dllsources.append('${LCGDIR}/release/python' + ver + '.zip')
578 dllsources.append('${LCGDIR}/release/zlib.pyd')
580 dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_LIB}_d.dll')
582 dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_LIB}.dll')
583 if env['WITH_BF_ICONV']:
584 if env['OURPLATFORM'] == 'win64-vc':
585 pass # we link statically to iconv on win64
587 dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll']
588 if env['WITH_BF_OPENAL']:
589 dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
590 dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
591 if env['WITH_BF_FFMPEG']:
592 dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-52.dll',
593 '${LCGDIR}/ffmpeg/lib/avformat-52.dll',
594 '${LCGDIR}/ffmpeg/lib/avdevice-52.dll',
595 '${LCGDIR}/ffmpeg/lib/avutil-50.dll',
596 '${LCGDIR}/ffmpeg/lib/libfaad-2.dll',
597 '${LCGDIR}/ffmpeg/lib/libfaac-0.dll',
598 '${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
599 '${LCGDIR}/ffmpeg/lib/libx264-67.dll',
600 '${LCGDIR}/ffmpeg/lib/xvidcore.dll',
601 '${LCGDIR}/ffmpeg/lib/swscale-0.dll']
602 windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
603 allinstall += windlls
605 installtarget = env.Alias('install', allinstall)
606 bininstalltarget = env.Alias('install-bin', blenderinstall)
608 nsisaction = env.Action(btools.NSIS_Installer, btools.NSIS_print)
609 nsiscmd = env.Command('nsisinstaller', None, nsisaction)
610 nsisalias = env.Alias('nsis', nsiscmd)
612 if 'blender' in B.targets:
613 blenderexe= env.Alias('blender', B.program_list)
614 Depends(blenderexe,installtarget)
616 if env['WITH_BF_PLAYER']:
617 blenderplayer = env.Alias('blenderplayer', B.program_list)
618 Depends(blenderplayer,installtarget)
620 if not env['WITH_BF_GAMEENGINE']:
621 blendernogame = env.Alias('blendernogame', B.program_list)
622 Depends(blendernogame,installtarget)
624 if 'blenderlite' in B.targets:
625 blenderlite = env.Alias('blenderlite', B.program_list)
626 Depends(blenderlite,installtarget)
628 Depends(nsiscmd, allinstall)
630 Default(B.program_list)
632 if not env['WITHOUT_BF_INSTALL']:
633 Default(installtarget)
636 if env['WITH_BF_DOCS']:
638 except: epydoc = None
641 SConscript('source/blender/python/api2_2x/doc/SConscript')
642 SConscript('source/gameengine/PyDoc/SConscript')
644 print "No epydoc install detected, Python API and Gameengine API Docs will not be generated "