;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Create dave project sav file with an embedded license
; Richard Tumanjong Azuah
;;;;;;;;;;;;;;;;;;;;;;;;;
;

; Locate directory where dave.pro is located 
; - assummes project has been build and hence 'dave' symbol is defined
davepro_path =  routine_filepath('dave')
if (strlen(davepro_path) gt 0) then cd, file_dirname(davepro_path)
cd, cur=current_path
print, 'Changing directory to: ',current_path

print,'############################################'
print,'Execute @getpaths...'
@getpaths

print,'############################################'
print,'Resolving symbols...'
print,''
class_list = ['idlgrarc','idlgrcolorbar','idlgrlegend','orb','idlexinscribingview','idlexmodelmanip']
class_list = [class_list,'idlexobjview','idlexobjviewwid','idlexviewgroup','idlexviewmanip','idlexvolview']
class_list = [class_list,'idlexvolviewwid','idlexwidget','spurion2_2dlattice_data','spurion2_alspheres_data']
class_list = [class_list,'trackball']

routine_list = ['get_screen_size']
resolve_all, /continue_on_error,unresolved=unresolved $
            ,class=class_list $
            ,resolve_either=routine_list
print,'___________________________________________'
print,''
print,'Creating binary...'
print,''

outf = 'dave.sav'
save,file=outf,/routines,/embedded,/compress
cd,cur=outd
print,'Sav file stored in:',outd+path_sep()+outf
print,''
print,'############################################'
$ls -l dave.sav

;;;; Windows
; make_rt, 'dave','C:\home\daveexport',savefile='C:\home\dave_installers\dave_devel_1.5beta\dave.sav',/embedded,/idl_assistant
;;;; Linux
; make_rt, 'dave','/tmp/tmpapps/daveexport',savefile='/tmp/tmpapps/daveexport/dave.sav',/embedded,/idl_assistant
;;;;;;;;;Mac OS X
;make_rt, 'dave', '/tmp/tmpapps/daveexport', savefile='/tmp/tmpapps/daveexport/dave.sav',/embedded,/idl_assistant

