falpack(1)
π falpack(1) β the falcon application packaging tool π
okay bestie, welcome to falpack(1), aka the Falcon User Manuals entry for the falcon application packaging tool. this is the page where you learn how to shove your whole falcon app into a folder and have it, like, actually run somewhere else. no cap. β¨
πΈ SYNOPSIS πΈ
falpak [options] main_script
(yes, it says falpak up there β that's the page's own spelling, we're keeping it exactly as-is, iykyk π«Ά)
π¦ DESCRIPTION π¦
so the tea is: falpack is a command line tool that copies all the modules and other dependencies your standalone falcon application needs into a target directory. that's the whole vibe check. π
it can also copy the system files you need to run the app β which makes the final application totally stand-alone β or it can just stash the needed modules so that a local falcon installation can be used to run the application. your choice, main character energy either way β¨
falpack searches for special attributes in the parsed modules so it can store resource data files that an application may require. it copies needed internationalization translation tables too, and eventually compiles sources into binary .fam modules. it can also remove sources from the final installation, so that pre-compiled applications only can be shipped. and finally, it creates a script that can be used to run the application with a "single click" operation on the host platform. obsessed. π₯
system relevant modules (as i.e. feathers or system-wide installed modules) are also stored together with the application. π
anyhow, installation of falcon system files (which include feather modules) is optional. not mandatory, just a slay little extra.
system files get copied into a fake root subdirectory (normally called _system). all the modules that aren't lying under the same directory of the application "main script" or in deeper trees are considered "system-wide" installed, and it is supposed that the script accesses them via the -L option or via the FALCON_LOAD_PATH environment variable. so those ones get stored in the system directory and a directory tree is re-created, meaning that the simple addition of the fake root to the load path (i.e. falcon -L _system) is enough to access all of them. literally so clean. π§
this method allows the application to access modules by logical name and by filename, because the filename is made relative to the load path. BUT π β modules loaded with absolute filenames must be separately installed on the target system so that their position matches the required absolute path. no shortcuts there, sorry bestie.
π OPTIONS π
-b<module>` β blacklists this module (by module name). using this option, it's possible to prevent default action on the given module (copy into the application tree or the fake root tree). and you can specify more blacklisted modules by repeating this option as many times as your heart desires π--bin<dir>** β specify the directory where the falcon binary resides. useful iffalpackis required to read an interpreter from a non-default installation, or if it can't find it. **NOTE:**falpack` uses falcon build environment settings. if used under the build environment, it will copy files from the active build tree, **ignoring system wide installations. π- *
-e*<enc>** β source files encoding. in case the source file text encoding is different from the system default encoding, the module loader may detect syntax errors or fail to load the sources; also, if.fam` generation is required, the strings in the pre-compiled modules. (that's the sentence as the page gives it, fr fr β we're not editing it π) -hβ usage help. a short in-line summary of options. the "help me help you" button π«Ά--lib<dir>** β specify the directory where the falcon engine dynamic link library resides. useful iffalpackis required to read an interpreter from a non-default installation, or if it can't find it. **NOTE:**falpack` uses falcon build environment settings. if used under the build environment, it will copy files from the active build tree, **ignoring system wide installations. β-L<dir>** β redefineFALCON_LOAD_PATH. use this in case the main module needs a special load path that isn't the system default or the one stored in theFALCON_LOAD_PATH` environment variable. *notice that this setting overwrites system and environment variable settings. also notice that this load path is intended for *local loading and compiling of the modules in the application β the modules are then arranged so that this setting is not needed in the final application. so it's like, a temporary vibe β¨-Mβ pack also pre-compiled modules. if given, this option will cause.fammodules to be stored beside their source files (.falor.ftd). it is incompatible with the-soption. pick a lane bestie π-P<dir>` β save the package in this directory. by default, the package is stored in a directory with the same name as the main module (its extension stripped), under the current work directory. this option overrides the default and allows you to store the package at an arbitrary location. π- *
-r*<name>** β install *<name>* instead of"falcon"as interpreter. useful in case only pre-compiled modules are packaged, wherefalrunmay be employed, or in case of a special system-specific interpreter build, as withsdl_falcon` MacOSX framework compatible interpreter. π« - *
-R*<dir>** β change the fake root for system data into *<dir>*. if the default name for storage of system specific apparels (as binary modules, falcon engine library etc.), which is"_system"`, is not satisfactory, it can be overridden through this option. π -sβ strip sources. using this option, source falcon files are not copied in the package; only the pre-compiled bytecode.fammodules are stored. shipping-only-bytes energy π₯-Sβ do not store system files. prevents copying of the falcon interpreter, falcon engine dynamic library and feather modules. keep it light π-vβ prints version and exit.-Vβ verbose mode. prints verbose messages of whatfalpackis doing. the "tell me everything" option, we love a narrator π£οΈ
π SPECIAL ATTRIBUTES π
falpack automatically packages needed ancillary files required by modules, like the translation table files (.ftr). but hold on β the modules may specify other files to be included through a set of special attributes, which are interpreted by falpack as it loads and analyzes them. π
π resources
this attribute can indicate a list of resources that should be copied together with the module. the attribute needs to be a string, and different resources can be separated through a semi comma (;). it's possible also to specify file masks using the "*.ext" pattern; whole subdirectories can be stored using the "dir/*" pattern. please notice that this attribute doesn't work recursively β to include sub-directories in resource directories, specify all of them. for example:
resources: "images/*; images/icons/*"
π plugins
similar to the resources attribute, the plugins attribute indicates a single module or a directory containing more modules that may be used by the applications as dynamic plugins. differently from the data considered in the resources attribute, the files indicated in the plugins attribute are loaded by the loader, and their dependencies, if any, are further resolved and become part of the installed application. also, they are treated as any other module in any respect β for example, associated translation files are copied, and in case falpack is required to strip sources, only the pre-compiled .fam modules will be saved. π¦
it is possible to store all the modules found in a certain directory using the "*" wildcard.
similarly to the resources attribute, the plugins attribute doesn't descend recursively in sub-directories; to include other modules laying below the required directory, that subdirectory must be explicitly specified, as in this example:
plugins: "output/*; output/helpers/*"
π dynlib
this attribute stores one or more system dynamic library needed for the falcon module to run. depending on the host system, the target location may be in the fake root directory or besides the module (depending on how the system module loader tries to find the modules). more dependencies may be separated with a semi comma (;). π§
π BUGS π
relative paths are not jailed. if theresourcesattribute or the relative path of a loaded module indicates a position above the main script directory or above any position in theFALCON_LOAD_PATHspecification, the files may be copied outside the target package location. be careful when writing the application you want to package, so that all the needed files can be reached at the same level as or below the main script, or at the same level as or below directories in the load path. this is the realest warning on the page, please read it twice π
at the moment, it's quite complex to create cross platform packages (except for script-only applications which use a local falcon installation to run). it is planned to provide this support in future via the ability to download pre-compiled modules from a central repository. future update pending, we'll wait π
in this version, the dynlib attribute is not working for MacOSX style framework libraries. however, it will work for MacOSX dylib that can be found via the ldd command. π
π AUTHOR π
Giancarlo Niccolai <gc@falconpl.org>
πΈ SEE ALSO πΈ
π LICENSE π
this document is released under the "GNU Free Documentation License, version 1.2". on Debian systems, the complete text of the Free Documentation License, version 1.2, can be found in /usr/share/common-licenses/. π
and that's the whole page, bestie β brought to you by the Falcon toolset, dated January 2010, filed under falpack(1). go forth and package something iconic π
β¨π«Ά
π¦ where this page comes from
- nixos 26.05: falcon 0-unstable-2023-11-19
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms