]>
Dogcows Code - chaz/yoink/blob - options.lua
30d1c756f73ddc67cc4770d548eeac4c4965e9d9
3 -- Yoink Configuration Rules
4 -- Use this file with config.lua to generate config files.
7 local project
= "Yoink"
9 local website
= "http://www.dogcows.com/yoink"
10 local contact
= "chaz@dogcows.com"
13 local check
= require
"check"
14 local util
= require
"utility"
16 return string.format("%s %s", project
, version
),
18 name
= "Yoink Configuration",
19 caption
= "Choose the category of settings to view/change.",
21 name
= "Installation Paths",
22 caption
= "Set the directory paths where program files will be installed.",
28 caption
= "Set the base installation directory.",
29 check
= function(value
)
30 libdir
= value
.. "/lib"
35 symbol
= "exec_prefix",
37 cmdline
= "--exec-prefix",
38 name
= "Executable Prefix",
39 caption
= "Set the base installation directory for executables.",
40 visible
= function() return showAdvanced
end
44 value
= "$(exec_prefix)/bin",
47 caption
= "Set the executable storage directory."
51 value
= "/usr/local/lib"
54 symbol
= "datarootdir",
55 value
= "$(prefix)/share",
56 cmdline
= "--datarootdir",
58 caption
= "Set the base installation directory for resource files.",
59 visible
= function() return showAdvanced
end
63 value
= "$(datarootdir)",
64 cmdline
= "--datadir",
66 caption
= "Set the program resource storage directory."
69 symbol
= "pkgdatadir",
70 value
= "$(datadir)/$(projectName)",
71 config
= "YOINK_DATADIR",
72 export
= "pkgdatadir",
73 name
= "Package Data",
74 caption
= "Set the program resource storage directory.",
75 visible
= function() return showAdvanced
end
79 value
= "$(datarootdir)/man",
82 caption
= "Set the manual page storage directory."
86 name
= "Build Options",
87 caption
= "Set toolset commands and flags.",
90 value
= util
.exec("config.guess"),
92 name
= "Build Triplet",
93 caption
= "Set the build triplet.",
94 check
= function(value
) return value
end
100 name
= "Host Triplet",
101 caption
= "Set the host triplet.",
102 check
= function(value
)
112 CXX
= value
.. "-g++"
114 RANLIB
= value
.. "-ranlib"
115 WINDRES
= value
.. "-windres"
117 if value
:find("mingw32")
127 before
= {"dependencies", "CC", "CXX", "AR", "RANLIB", "WINDRES"}
132 name
= "Executable Suffix",
134 caption
= "Set the extension of binary executables.",
136 Some platforms follow certain conventions with regard
137 to the file extension of executables. By default, the
138 build system will create executables with no suffix,
139 but specifying this option will cause the text to be
140 appended to the names of these files.
142 This option may be changed without your intervention if
143 automatic checks determine there is a common executable
144 suffix for the host platform.
146 visible
= function() return showAdvanced
end
150 value
= {"posix", "win32"},
153 caption
= "Set the architectural platform to target.",
154 visible
= function() return showAdvanced
end,
155 check
= function(value
)
158 PKG_LDLIBS
= PKG_LDLIBS
:setFlag("-lws2_32")
160 PKG_LDLIBS
= PKG_LDLIBS
:unsetFlag("-lws2_32")
167 name
= "Toolset Options",
168 caption
= "Customize the toolset.",
170 You can set which compilers and other tools to use.
171 You may also specify which extra flags should be used
172 during the compile and linking phase.
179 caption
= "Set the C compiler command."
186 caption
= "Set the C++ compiler command."
193 caption
= "Set the archiver for static libraries command."
200 caption
= "Set the archive indexer command."
207 caption
= "Set the Windows resource compiler command.",
208 visible
= function() return platform
== "win32" end
210 "------------INSERT-BLANK-LINE------------",
213 value
= "-Wall -Wno-uninitialized -O2",
216 caption
= "Set the C compiler flags."
221 cmdline
= "CXXFLAGS",
223 caption
= "Set the C++ compiler flags."
228 cmdline
= "CPPFLAGS",
230 caption
= "Set the C preprocessor flags."
237 caption
= "Set the libraries the executable should link with."
244 caption
= "Set the linker flags."
247 symbol
= "dependencies",
248 value
= "sdl gl glu libpng openal vorbisfile lua|lua5.1",
249 check
= function(value
)
250 local value
, err
= util
.pkgfind(value
, libdir
)
253 PKG_CFLAGS
= util
.pkgconfig("CFLAGS", value
, libdir
)
254 PKG_LDLIBS
= util
.pkgconfig("LIBS", value
, libdir
) .. " -lz"
255 PKG_LDFLAGS
= util
.pkgconfig("LDFLAGS", value
, libdir
)
263 symbol
= "PKG_CFLAGS",
265 after
= {"dependencies"}
268 symbol
= "PKG_CXXFLAGS",
269 value
= "$(PKG_CFLAGS)",
270 after
= {"PKG_CFLAGS"}
273 symbol
= "PKG_LDLIBS",
275 after
= {"dependencies"}
278 symbol
= "PKG_LDFLAGS",
280 after
= {"dependencies"}
283 "------------INSERT-BLANK-LINE------------",
287 cmdline
= "--enable-dependency-tracking",
288 name
= "Dependency Tracking",
289 caption
= "Enable tracking of code dependencies.",
291 If you are working on the code, you want this enabled
292 so that the files you edit will automatically be
293 rebuilt when you run make. This may add some overhead
294 to the build process.
296 If in doubt, say Yes.
302 cmdline
= "--enable-profile",
303 config
= "ENABLE_PROFILING",
305 caption
= "Compile in gprof instructions for profiling.",
307 Yoink can be compiled with extra instructions to
308 generate statistical data regarding the performance of
309 the code. This data is saved to a file which can be
310 used by the gprof program to generate a nice report.
314 check
= function(value
)
317 PKG_CFLAGS
= PKG_CFLAGS
:setFlag("-pg")
318 PKG_LDFLAGS
= PKG_LDFLAGS
:setFlag("-pg")
320 PKG_CFLAGS
= PKG_CFLAGS
:unsetFlag("-pg")
321 PKG_LDFLAGS
= PKG_LDFLAGS
:unsetFlag("-pg")
328 name
= "Program Features",
329 caption
= "Choose which features to compile into the program.",
333 cmdline
= "--enable-debug",
334 config
= {"DEBUG", "!NDEBUG"},
336 caption
= "Compile in debug codepaths.",
338 The debug target mode enables runtime assertions and
339 other codepaths appropriate for finding bugs and
340 diagnosing problems. The release target mode will
341 avoid compiling in this extra overhead and also set
342 some compiler flags for optimizing the performance of
345 Note that logging and exception-handling facilities are
346 still available in release mode, and debug symbols are
347 always available provided you do not explicitly strip
348 them out. Therefore, many problems can be diagnosed
349 without these extra codepaths.
353 check
= function(value
)
356 CFLAGS
= CFLAGS
:setFlag("-Wall", "-g")
357 CFLAGS
= CFLAGS
:replaceFlag("%-O%d?", "-O0")
363 symbol
= "clock_gettime",
365 cmdline
= "--enable-clock_gettime",
366 config
= "ENABLE_CLOCK_GETTIME",
367 name
= "clock_gettime",
368 caption
= "Use a high-res clock on platforms that support it.",
370 By default, Yoink will use whatever timing facility is
371 provided by SDL. This only provides a low-resolution
372 guarantee. On some targets, a much higher-resolution
373 timer is available through the use of clock_gettime(2).
374 On such platforms, SDL might have been built to use
375 this time source. This option will cause Yoink to use
376 it directly so that the high resolution is guaranteed.
380 visible
= function() return platform
== "posix" end
383 symbol
= "doublePrecision",
385 cmdline
= "--enable-double-precision",
386 config
= "ENABLE_DOUBLE_PRECISION",
387 name
= "Double Precision",
388 caption
= "Use doubles for floating point numbers.",
390 The most common data type for storing non-integral
391 numbers is called a float. These are quickly processed
392 on modern hardware, but they suffer problems in
393 accuracy. A much more accurate data type is a double,
394 but they may take a bit longer to process.
396 In most cases, floats are adequate. Yet, using doubles
397 will help prevent small inaccuracies from accumulating
398 over time and becoming a bigger deal.
404 symbol
= "hotloading",
406 cmdline
= "--enable-hotloading",
407 config
= "ENABLE_HOTLOADING",
409 caption
= "Allow assets to reload themselves automatically.",
411 Hotloading allows game resources to be reloaded into
412 the game automatically whenever they are changed on
413 disk. For example, if you are running Yoink at the
414 same time as you are editing one of its image files,
415 any changes you save to the file will immediately be
416 seen in the game. Other types of assets are also
417 hotloadable. This is very useful to content creators
418 interested in rapid development.
420 Currently only recent Linux kernels are supported.
421 There is a small amount of overhead associated with
422 hotloading; as such, it is not recommended unless you
423 plan to take advantage of its benefits.
427 visible
= function() return platform
== "posix" end
432 cmdline
= "--enable-threads",
433 config
= "ENABLE_THREADS",
435 caption
= "Use threads for concurrency where appropriate.",
437 If you have multiple processors or cores, enabling
438 threads will allow the workload to be shared. This
439 may have limited usefulness even if you have only a
442 If in doubt, say Yes.
447 value
= {"none", "gtk", "qt4"},
448 cmdline
= "--with-gui",
450 name
= "GUI Toolkit",
451 caption
= "Set which (if any) widget toolkit to use for dialogs.",
453 Sometimes Yoink will show a dialog window for the
454 purpose of providing diagnostics information. If you
455 have KDE, you probably want to choose QT4 for this
456 purpose. If you have Gnome or any other environment,
457 you may prefer GTK2. This option will make certain QT4
458 or GTK2 libraries dependencies. If you choose "none,"
459 no dialog windows will be shown, and any such
460 information can be seen from the terminal output.
462 Under certain targets, the native API will be used and
463 this option will have no effect. For example, a
464 mingw32 target will automatically use native win32
467 If in doubt, say None.
469 visible
= function() return platform
== "posix" end,
470 check
= function(value
)
471 dependencies
= dependencies
:unsetFlag("gtk+-2.0", "QtGui")
472 if value
== "gtk" then dependencies
= dependencies
:setFlag("gtk+-2.0")
473 elseif value
== "qt4" then dependencies
= dependencies
:setFlag("QtGui") end
476 before
= {"dependencies"}
480 name
= "Package Strings",
481 caption
= "Set the package strings.",
482 visible
= function() return showAdvanced
end,
486 config
= {"PACKAGE_NAME", "PACKAGE"},
487 name
= "Package Name",
489 caption
= "Set the name of the program.",
490 check
= function(value
)
491 projectName
= util
.symbolize(value
) return value
495 symbol
= "projectName",
496 value
= util
.symbolize(project
),
497 export
= "projectName",
502 config
= "PACKAGE_VERSION",
505 caption
= "Set the three-part version number of the program.",
506 check
= function(value
)
507 versionMajor
, versionMinor
, versionRevision
= util
.splitVersion(value
)
510 before
= {"versionMajor", "versionMinor", "versionRevision"}
513 symbol
= "packageString",
514 value
= "$(PACKAGE) $(VERSION)",
515 config
= "PACKAGE_STRING",
516 name
= "Full String",
517 caption
= "Set the complete package string."
521 value
= "$(projectName)",
522 config
= "PACKAGE_TARNAME",
523 name
= "Archive Name",
524 caption
= "Set the name used in creating tarballs."
527 symbol
= "archiveFormat",
528 value
= {"bzip2", "gzip", "lzma", "xz", "all"},
529 name
= "Default Archive Format",
530 caption
= "Set the default compression format for tarballs."
535 config
= "PACKAGE_BUGREPORT",
537 name
= "Email Address",
538 caption
= "Set the email address for collecting bug reports."
543 config
= "PACKAGE_URL",
544 name
= "Website URL",
545 caption
= "Set the project website URL."
548 symbol
= "versionMajor",
550 config
= "VERSION_MAJOR"
553 symbol
= "versionMinor",
555 config
= "VERSION_MINOR"
558 symbol
= "versionRevision",
560 config
= "VERSION_REVISION"
565 check
= function(value
)
566 local hash
, code
= util
.exec("git show-ref --head HEAD | sed -n 's/\\(.*\\) HEAD/\\1/p'")
567 if code
== 0 then value
= hash
end
572 symbol
= "manCompression",
573 value
= {"none", "bzip2", "gzip"},
574 cmdline
= "--with-man-compression",
575 name
= "Manual Compression",
576 caption
= "Set which compression to use for installed man pages"
579 symbol
= "includeConfig",
581 config
= "INCLUDE_CONFIG_FILE",
582 name
= "Compile config.mk into executable",
583 caption
= "What the name says."
586 "------------INSERT-BLANK-LINE------------",
588 symbol
= "showAdvanced",
590 name
= "Show Advanced Options",
591 caption
= "Show advanced (and often less useful) options."
This page took 0.054304 seconds and 3 git commands to generate.