From 4973638f8dc3d1ea2c92f9e321e3b12b7d572640 Mon Sep 17 00:00:00 2001 From: IgorA Date: Thu, 18 Feb 2016 13:08:33 +0000 Subject: [PATCH] 'info3ds' load library in sub folder '../../lib/' git-svn-id: svn://kolibrios.org@6245 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/info3ds/info3ds.asm | 12 ++++--- programs/develop/info3ds/info3ds_u.asm | 12 ++++--- .../develop/libraries/box_lib/load_lib.mac | 36 ++++++++++++++----- 3 files changed, 41 insertions(+), 19 deletions(-) diff --git a/programs/develop/info3ds/info3ds.asm b/programs/develop/info3ds/info3ds.asm index c7bffe6113..29c008200f 100644 --- a/programs/develop/info3ds/info3ds.asm +++ b/programs/develop/info3ds/info3ds.asm @@ -1073,9 +1073,9 @@ end if align 4 l_libs_start: lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\ - err_msg_found_lib_0, head_f_l, proclib_import,err_msg_import_0, head_f_i + err_msg_found_lib_0, head_f_l, proclib_import,err_msg_import_0,head_f_i lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\ - err_msg_found_lib_1, head_f_l, import_libimg, err_msg_import_1, head_f_i + err_msg_found_lib_1, head_f_l, import_libimg, err_msg_import_1,head_f_i lib_2 l_libs lib_name_2, sys_path, file_name, system_dir_2,\ err_msg_found_lib_2, head_f_l, import_box_lib,err_msg_import_2,head_f_i lib_3 l_libs lib_name_3, sys_path, file_name, system_dir_3,\ @@ -1083,7 +1083,7 @@ l_libs_start: lib_4 l_libs lib_name_4, sys_path, file_name, system_dir_4,\ err_msg_found_lib_4, head_f_l, import_libkmenu,err_msg_import_4,head_f_i lib_5 l_libs lib_name_5, sys_path, file_name, system_dir_5,\ - err_msg_found_lib_5, head_f_l, import_lib_tinygl,err_msg_import_5,head_f_i + err_msg_found_lib_5, head_f_l, import_lib_tinygl,err_msg_import_5,head_f_i,lib_sub_folder lib_6 l_libs lib_name_6, sys_path, file_name, system_dir_6,\ err_msg_found_lib_6, head_f_l, import_libini, err_msg_import_6,head_f_i l_libs_end: @@ -1362,11 +1362,13 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ; lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; Параметры фонового освещения if lang eq ru -capt db 'info 3ds версия 16.02.16',0 ;подпись окна +capt db 'info 3ds версия 18.02.16',0 ;подпись окна else -capt db 'info 3ds version 16.02.16',0 ;window caption +capt db 'info 3ds version 18.02.16',0 ;window caption end if +lib_sub_folder db '../../lib/',0 + align 16 i_end: procinfo process_information diff --git a/programs/develop/info3ds/info3ds_u.asm b/programs/develop/info3ds/info3ds_u.asm index 97c2822f54..846a91c59e 100644 --- a/programs/develop/info3ds/info3ds_u.asm +++ b/programs/develop/info3ds/info3ds_u.asm @@ -1113,9 +1113,9 @@ end if align 4 l_libs_start: lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\ - err_msg_found_lib_0, head_f_l, proclib_import,err_msg_import_0, head_f_i + err_msg_found_lib_0, head_f_l, proclib_import,err_msg_import_0,head_f_i lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\ - err_msg_found_lib_1, head_f_l, import_libimg, err_msg_import_1, head_f_i + err_msg_found_lib_1, head_f_l, import_libimg, err_msg_import_1,head_f_i lib_2 l_libs lib_name_2, sys_path, file_name, system_dir_2,\ err_msg_found_lib_2, head_f_l, import_box_lib,err_msg_import_2,head_f_i lib_3 l_libs lib_name_3, sys_path, file_name, system_dir_3,\ @@ -1123,7 +1123,7 @@ l_libs_start: lib_4 l_libs lib_name_4, sys_path, file_name, system_dir_4,\ err_msg_found_lib_4, head_f_l, import_libkmenu,err_msg_import_4,head_f_i lib_5 l_libs lib_name_5, sys_path, file_name, system_dir_5,\ - err_msg_found_lib_5, head_f_l, import_lib_tinygl,err_msg_import_5,head_f_i + err_msg_found_lib_5, head_f_l, import_lib_tinygl,err_msg_import_5,head_f_i,lib_sub_folder lib_6 l_libs lib_name_6, sys_path, file_name, system_dir_6,\ err_msg_found_lib_6, head_f_l, import_libini, err_msg_import_6,head_f_i l_libs_end: @@ -1397,11 +1397,13 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ; lmodel_ambient dd 0.3, 0.3, 0.3, 1.0 ; Параметры фонового освещения if lang eq ru -capt db 'info 3ds [user] версия 13.02.16',0 ;подпись окна +capt db 'info 3ds [user] версия 18.02.16',0 ;подпись окна else -capt db 'info 3ds [user] version 13.02.16',0 ;window caption +capt db 'info 3ds [user] version 18.02.16',0 ;window caption end if +lib_sub_folder db '../../lib/',0 + align 16 i_end: procinfo process_information diff --git a/programs/develop/libraries/box_lib/load_lib.mac b/programs/develop/libraries/box_lib/load_lib.mac index 573f04b209..249dd534e3 100644 --- a/programs/develop/libraries/box_lib/load_lib.mac +++ b/programs/develop/libraries/box_lib/load_lib.mac @@ -117,6 +117,8 @@ local lp1 local lp2 local lp3 local lp4 +local lp5 +local lp6 local file_name library_fun_memory_alloc equ 0 ;не использовать в макросах проверку на функции 'lib_init' @@ -168,6 +170,21 @@ align 4 test esi,esi jz .str_lp4 + ;проверка относительных путей c двумя точками '../' + cmp word[esi],'..' + jne .lp3 + dec edi ;для перехода на '/' +.lp6: + add esi,3 ;пропускаем одно поднятие '../' +.lp5: + dec edi ;идем по папкам + cmp byte[edi],'/' + jnz .lp5 + cmp word[esi],'..' + je .lp6 + inc edi ;для перехода на '/' + + ;копирование относительного пути align 4 .lp3: lodsb @@ -183,7 +200,7 @@ align 4 stosb test eax,eax jnz .lp4 -;--------------------------------------------------------------------- +;--------------------------------------------------------------------- ret } @@ -439,15 +456,16 @@ exit_lp2: macro copy_path lib_name,dir_path,lib_path,point_dir_name { - pushad ;save all registers - push dword lib_name - push dword dir_path - push dword lib_path - push dword point_dir_name - call @copy_path +pushad ;save all registers + push dword lib_name + push dword dir_path + push dword lib_path + push dword point_dir_name + call @copy_path - add esp,16 - popad ;restore all registers + add esp,16 + ;notify_window_run lib_path ;unblok for test load path +popad ;restore all registers } ; готовим текст для показа через @notify: