diff --git a/view/load_vtm.anubis b/view/load_vtm.anubis index c422c59..7f1262f 100644 --- a/view/load_vtm.anubis +++ b/view/load_vtm.anubis @@ -9,7 +9,7 @@ transmit view_table_manager_types.anubis -define String modules_directory = find_and_replace(my_anubis_directory, "\\", "/") + "/modules/". +//define String modules_directory = find_and_replace(my_anubis_directory, "\\", "/") + "/modules/". public define Maybe(VTM) load_plugin @@ -34,6 +34,7 @@ public define Maybe(VTM) define Maybe(VTM) load_vtm ( + String app_vtm_path, List(String) left, DB_Version vtm_version )= @@ -41,13 +42,13 @@ define Maybe(VTM) { [] then failure, [file_name . t] then - if load_plugin(modules_directory+file_name) is + if load_plugin(app_vtm_path+file_name) is { - failure then load_vtm(t, vtm_version), + failure then load_vtm(app_vtm_path, t, vtm_version), success(_vtm) then if compare_db_version(_vtm.db_version, vtm_version) is { - less then load_vtm(t, vtm_version), + less then load_vtm(app_vtm_path, t, vtm_version), more then failure, equal then success(_vtm), equal_but_sign then success(_vtm) @@ -59,6 +60,7 @@ define Maybe(VTM) define Maybe(VTM) load_latest_vtm ( + String app_vtm_path, List(String) left, VTM _current_vtm )= @@ -71,16 +73,16 @@ define Maybe(VTM) else success(_current_vtm), [file_name . t] then - if load_plugin(modules_directory+file_name) is + if load_plugin(app_vtm_path+file_name) is { - failure then load_latest_vtm(t, _current_vtm), + failure then load_latest_vtm(app_vtm_path, t, _current_vtm), success(_vtm) then if compare_db_version( _vtm.db_version, _current_vtm.db_version) is { - less then load_latest_vtm(t, _current_vtm), - more then load_latest_vtm(t, _vtm), - equal then load_latest_vtm(t, _current_vtm), - equal_but_sign then load_latest_vtm(t, _current_vtm) + less then load_latest_vtm(app_vtm_path, t, _current_vtm), + more then load_latest_vtm(app_vtm_path, t, _vtm), + equal then load_latest_vtm(app_vtm_path, t, _current_vtm), + equal_but_sign then load_latest_vtm(app_vtm_path, t, _current_vtm) } } } @@ -89,16 +91,22 @@ define Maybe(VTM) public define Maybe(VTM) load_vtm ( + String app_vtm_path, + String app_name, DB_Version vtm_version ) = - with files = directory_list(modules_directory, "vtm_v*.adm"), - load_vtm(files, vtm_version) + with files = directory_list(app_vtm_path, app_name+"_v*.vtm"), + load_vtm(app_vtm_path, files, vtm_version) . public define Maybe(VTM) load_latest_vtm + ( + String app_vtm_path, + String app_name + ) = - with files = directory_list(modules_directory, "vtm_v*.adm"), - load_latest_vtm(files, blank_vtm) + with files = directory_list(app_vtm_path, app_name+"_vtm_v*.adm"), + load_latest_vtm(app_vtm_path, files, blank_vtm) . -- libgit2 0.21.4