All predicatesShow -- Save current program as a state or executable

This library provides qsave_program/1 and qsave_program/2, which are also used by the commandline sequence below.

swipl -o exe -c ...
Source qsave_program(+File) is det
Source qsave_program(+File, :Options) is det
Make a saved state in file `File'.
Source save_options(+ArchiveHandle, +SaveClass, +Options)[private]
Save the options in the '$options' resource. The home directory is saved for development states to make it keep refering to the development home.

The script files (-s script) are not saved at all. I think this is fine to avoid a save-script loading itself.

Source save_option_value(+SaveClass, +OptionName, +OptionValue, -FinalValue)[private]
Source save_init_goals(+Stream, +Options)[private]
Save initialization goals. If there is a goal(Goal) option, use that, else save the goals from '$cmd_option_val'/2.
Source save_module(+Module, +SaveClass)[private]
Saves a module
Source save_imports[private]
Save import relations. An import relation is saved if a predicate is imported from a module that is not a default module for the destination module. If the predicate is dynamic, we always define the explicit import relation to make clear that an assert must assert on the imported predicate.
Source restore_import(+TargetModule, +SourceModule, +PI) is det[private]
Restore import relation. This notably deals with imports from the module user, avoiding a message that the predicate is not exported.
Source restore_prolog_flag(+Name, +Value, +Type)[private]
Deal with possibly protected flags (debug_on_error and report_error are protected flags for the runtime kernel).
Source save_operators(+Options) is det[private]
Save operators for all modules. Operators for system are not saved because these are read-only anyway.
Source save_foreign_libraries(+Archive, +Options) is det[private]
Save current foreign libraries into the archive.
Source find_foreign_library(+FileSpec, -File) is det[private]
Find the shared object specified by FileSpec. If posible, the shared object is stripped to reduce its size. This is achieved by calling strip -o <tmp> <shared-object>. Note that the file is a Prolog tmp file and will be deleted on halt.
- Should perform OS search on failure
Source qsave_program(+File) is det
Source qsave_program(+File, :Options) is det
Make a saved state in file `File'.