You can't do -syssave- on an informal basis, you must -plan- for it, which
means writing your application carefully. Principally, structure your code
so that NO X-objects are created until all the code is loaded (or at least
as much as is stable). Then have one function or file which creates all the
X-objects. Typically this is best done by writing X-object creating
procedures in the various modules which make up your application, but only
calling these at the last moment. This saved-image can of course be
modified incrementally after restoration.
Typically I build the image in a separate process.
*/
Build_AutoWeb.p
uses acis_obj; ;;; Load the application
uses AcisObjects; ;;;
uses Generate_C; ;;;
uses Generate_rw; ;;;
/*
Build_AutoWeb() will auto-load this file, and make the saved image.
*/
define Build_AutoWeb();
unless pop_runtime then
lvars is_restored = syssave('AutoWeb.psv');
if is_restored then ;;; We have just done sysrestore
sysxsetup(); ;;; set up POPLOG X-based stuff
popval([uses ImageInterface]); ;;; make the actual windows.
endif;
endunless;
show_libraries(true); ;;; A call to my own proc. which lists
;;; library files used, and where they came
;;; from.
enddefine;
(The use of "popval" is not elegant, but it is how I did it).
Robin
|