diff --git a/Plugins/Wox.Plugin.Everything/Main.cs b/Plugins/Wox.Plugin.Everything/Main.cs index ae3d3baea8..0bccf89cf4 100644 --- a/Plugins/Wox.Plugin.Everything/Main.cs +++ b/Plugins/Wox.Plugin.Everything/Main.cs @@ -13,10 +13,13 @@ namespace Wox.Plugin.Everything { public class Main : IPlugin, IPluginI18n, IContextMenu { - private PluginInitContext _context; private readonly EverythingAPI _api = new EverythingAPI(); private static readonly List ImageExts = new List { ".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".ico" }; private static readonly List ExecutableExts = new List { ".exe" }; + private const string PortableEverything = "PortableEverything"; + private const string EverythingProcessName = "Everything"; + + private PluginInitContext _context; private ContextMenuStorage _settings = ContextMenuStorage.Instance; public List Query(Query query) @@ -157,14 +160,17 @@ namespace Wox.Plugin.Everything _context = context; _settings.API = context.API; - LoadLibrary(Path.Combine( - Path.Combine(context.CurrentPluginMetadata.PluginDirectory, (IntPtr.Size == 4) ? "x86" : "x64"), - "Everything.dll" - )); + LoadLibrary(Path.Combine(context.CurrentPluginMetadata.PluginDirectory, + PortableEverything, GetCpuType(), "Everything.dll")); StartEverything(); } + private string GetCpuType() + { + return (IntPtr.Size == 4) ? "x86" : "x64"; + } + private void StartEverything() { if (!CheckEverythingServiceRunning()) @@ -211,7 +217,7 @@ namespace Wox.Plugin.Everything p.StartInfo.Arguments = "-uninstall-service"; p.Start(); - Process[] proc = Process.GetProcessesByName("Everything"); + Process[] proc = Process.GetProcessesByName(EverythingProcessName); foreach (Process process in proc) { process.Kill(); @@ -245,7 +251,7 @@ namespace Wox.Plugin.Everything { try { - ServiceController sc = new ServiceController("Everything"); + ServiceController sc = new ServiceController(EverythingProcessName); return sc.Status == ServiceControllerStatus.Running; } catch @@ -257,13 +263,13 @@ namespace Wox.Plugin.Everything private bool CheckEverythingIsRunning() { - return Process.GetProcessesByName("Everything").Length > 0; + return Process.GetProcessesByName(EverythingProcessName).Length > 0; } private string GetEverythingPath() { string directory = Path.Combine(_context.CurrentPluginMetadata.PluginDirectory, - "PortableEverything", + PortableEverything, GetCpuType(), "Everything.exe"); return directory; } diff --git a/Plugins/Wox.Plugin.Everything/PortableEverything/Everything.ini b/Plugins/Wox.Plugin.Everything/PortableEverything/Everything.ini deleted file mode 100644 index c3769fe5c9..0000000000 --- a/Plugins/Wox.Plugin.Everything/PortableEverything/Everything.ini +++ /dev/null @@ -1,485 +0,0 @@ -[Everything] -app_data=0 -run_as_admin=0 -window_x=75 -window_y=37 -window_wide=1097 -window_high=664 -maximized=0 -minimized=0 -fullscreen=0 -ontop=0 -match_whole_word=0 -match_path=0 -match_case=0 -match_diacritics=0 -match_regex=0 -selection_mask_right_bottom_inclusive=1 -allow_multiple_windows=0 -allow_multiple_instances=0 -run_in_background=1 -show_tray_icon=0 -alternate_row_color=0 -show_mouseover=0 -check_for_updates_on_startup=0 -beta_updates=0 -show_highlighted_search_terms=1 -text_size=0 -hide_empty_search_results=0 -clear_selection_on_search=1 -new_window_key=0 -show_window_key=0 -toggle_window_key=0 -language=0 -show_selected_item_in_statusbar=0 -open_folder_command2= -open_file_command2= -open_path_command2= -explore_command2= -explore_path_command2= -window_title_format= -taskbar_notification_title_format= -instance_name= -translucent_selection_rectangle_alpha=70 -min_zoom=-6 -max_zoom=27 -context_menu_type=0 -auto_include_fixed_volumes=1 -auto_include_removable_volumes=0 -last_export_type=0 -max_threads=0 -reuse_threads=1 -single_parent_context_menu=0 -auto_size_1=512 -auto_size_2=640 -auto_size_3=768 -auto_size_aspect_ratio_x=9 -auto_size_aspect_ratio_y=7 -auto_size_path_x=1 -auto_size_path_y=2 -sticky_vscroll_bottom=1 -last_options_page=0 -draw_focus_rect=1 -date_format= -time_format= -invert_layout=0 -listview_item_high=0 -debug=0 -home_match_case=0 -home_match_whole_word=0 -home_match_path=0 -home_match_diacritics=0 -home_regex=0 -home_search=1 -home_filter=0 -home_sort=0 -home_index=1 -allow_multiple_windows_from_tray=0 -single_click_tray=0 -close_on_execute=0 -double_click_path=0 -update_display_after_scroll=0 -update_display_after_mask=1 -auto_scroll_view=0 -double_quote_copy_as_path=0 -snap=0 -snaplen=10 -rename_select_filepart_only=0 -rename_move_caret_to_selection_end=0 -search_edit_move_caret_to_selection_end=0 -select_search_on_mouse_click=1 -focus_search_on_activate=0 -reset_vscroll_on_search=1 -wrap_focus=0 -load_icon_priority=0 -load_fileinfo_priority=0 -header_high=0 -hide_on_close=0 -winmm=0 -menu_escape_amp=1 -fast_ascii_search=1 -match_path_when_search_contains_path_separator=1 -allow_literal_operators=0 -allow_round_bracket_parenthesis=0 -expand_environment_variables=0 -search_as_you_type=1 -convert_forward_slash_to_backslash=0 -match_whole_filename_when_using_wildcards=1 -double_buffer=1 -search= -show_number_of_results_with_selection=0 -date_descending_first=0 -size_descending_first=1 -size_format=2 -alpha_select=0 -tooltips=1 -rtl_listview_edit=0 -bookmark_remember_case=1 -bookmark_remember_wholeword=1 -bookmark_remember_path=1 -bookmark_remember_diacritic=1 -bookmark_remember_regex=1 -bookmark_remember_sort=1 -bookmark_remember_filter=1 -bookmark_remember_index=1 -exclude_list_enabled=1 -exclude_hidden_files_and_folders=0 -exclude_system_files_and_folders=0 -include_only_files= -exclude_files= -db_location= -db_multi_user_filename=0 -db_compress=0 -extended_information_cache_monitor=1 -keep_missing_indexes=0 -editor_x=0 -editor_y=0 -editor_wide=0 -editor_high=0 -editor_maximized=0 -file_list_relative_paths=1 -max_recv_size=8388608 -display_full_path_name=0 -size_tiny=10240 -size_small=102400 -size_medium=1048576 -size_large=16777216 -size_huge=134217728 -themed_toolbar=1 -show_copy_path=2 -show_copy_full_name=2 -show_open_path=2 -show_explore=2 -show_explore_path=2 -copy_path_folder_append_backslash=0 -custom_verb01= -custom_verb02= -custom_verb03= -custom_verb04= -custom_verb05= -custom_verb06= -custom_verb07= -custom_verb08= -custom_verb09= -custom_verb10= -custom_verb11= -custom_verb12= -filters_visible=0 -filters_wide=128 -filters_right_align=1 -filters_tab_stop=0 -filter= -filter_everything_name= -sort=Name -sort_ascending=1 -always_keep_sort=0 -index=0 -index_file_list= -index_etp_server= -index_link_type=1 -status_bar_visible=1 -select_search_on_focus_mode=1 -select_search_on_set_mode=2 -search_history_enabled=0 -run_history_enabled=0 -search_history_days_to_keep=90 -run_history_days_to_keep=90 -search_history_always_suggest=0 -search_history_max_results=24 -search_history_show_above=0 -service_port=15485 -etp_server_enabled=0 -etp_server_bindings= -etp_server_port=21 -etp_server_username= -etp_server_password= -etp_server_welcome_message= -etp_server_log_file_name= -etp_server_logging_enabled=1 -etp_server_log_max_size=4194304 -etp_server_log_delta_size=524288 -etp_server_allow_file_download=1 -http_server_enabled=0 -http_server_bindings= -http_title_format= -http_server_port=80 -http_server_username= -http_server_password= -http_server_home= -http_server_default_page= -http_server_log_file_name= -http_server_logging_enabled=1 -http_server_log_max_size=4194304 -http_server_log_delta_size=524288 -http_server_allow_file_download=1 -name_column_pos=0 -name_column_width=256 -path_column_visible=1 -path_column_pos=1 -path_column_width=559 -size_column_visible=1 -size_column_pos=2 -size_column_width=96 -extension_column_visible=0 -extension_column_pos=3 -extension_column_width=96 -type_column_visible=0 -type_column_pos=4 -type_column_width=96 -last_write_time_column_visible=1 -last_write_time_column_pos=3 -last_write_time_column_width=153 -creation_time_column_visible=0 -creation_time_column_pos=6 -creation_time_column_width=140 -date_accessed_column_visible=0 -date_accessed_column_pos=7 -date_accessed_column_width=140 -attribute_column_visible=0 -attribute_column_pos=8 -attribute_column_width=70 -date_recently_changed_column_visible=0 -date_recently_changed_column_pos=9 -date_recently_changed_column_width=96 -run_count_column_visible=0 -run_count_column_pos=10 -run_count_column_width=96 -date_run_column_visible=0 -date_run_column_pos=11 -date_run_column_width=140 -file_list_filename_column_visible=0 -file_list_filename_column_pos=12 -file_list_filename_column_width=96 -translucent_selection_rectangle_background_color= -translucent_selection_rectangle_border_color= -ntfs_volume_paths="C:" -ntfs_volume_includes=1 -ntfs_volume_load_recent_changes=0 -ntfs_volume_include_onlys="" -ntfs_volume_monitors=1 -filelists= -folders= -folder_monitor_changes= -folder_update_types= -folder_update_days= -folder_update_ats= -folder_update_intervals= -folder_update_interval_types= -exclude_folders= -connect_history_hosts= -connect_history_ports= -connect_history_usernames= -connect_history_link_types= -file_new_search_window_keys=334 -file_open_file_list_keys=335 -file_close_file_list_keys= -file_close_keys=343,27 -file_export_keys=339 -file_copy_full_name_to_clipboard_keys=9539 -file_copy_path_to_clipboard_keys= -file_set_run_count_keys= -file_create_shortcut_keys= -file_delete_keys=8238 -file_delete_permanently_keys=9262 -file_edit_keys= -file_open_keys=8205 -file_open_selection_and_close_everything_keys= -file_explore_path_keys= -file_open_new_keys= -file_open_path_keys=8461 -file_open_with_keys= -file_open_with_default_verb_keys= -file_play_keys= -file_preview_keys= -file_print_keys= -file_print_to_keys= -file_properties_keys=8717 -file_read_extended_information_keys=8517 -file_rename_keys=8305 -file_run_as_keys= -file_exit_keys=337 -file_custom_verb_1_keys= -file_custom_verb_2_keys= -file_custom_verb_3_keys= -file_custom_verb_4_keys= -file_custom_verb_5_keys= -file_custom_verb_6_keys= -file_custom_verb_7_keys= -file_custom_verb_8_keys= -file_custom_verb_9_keys= -file_custom_verb_10_keys= -file_custom_verb_11_keys= -file_custom_verb_12_keys= -edit_cut_keys=8536 -edit_copy_keys=8515,8493 -edit_paste_keys=8534,9261 -edit_select_all_keys=8513 -edit_invert_selection_keys= -view_filters_keys= -view_status_bar_keys= -view_window_size_small_keys=561 -view_window_size_medium_keys=562 -view_window_size_large_keys=563 -view_window_size_auto_fit_keys=564 -view_zoom_zoom_in_keys=443,363 -view_zoom_zoom_out_keys=445,365 -view_zoom_reset_keys=304,352 -view_go_to_back_keys=549,166 -view_go_to_forward_keys=551,167 -view_go_to_home_keys=548 -view_sort_by_name_keys=305 -view_sort_by_path_keys=306 -view_sort_by_size_keys=307 -view_sort_by_extension_keys=308 -view_sort_by_type_keys=309 -view_sort_by_date_modified_keys=310 -view_sort_by_date_created_keys=311 -view_sort_by_attributes_keys=312 -view_sort_by_file_list_filename_keys= -view_sort_by_run_count_keys= -view_sort_by_date_run_keys= -view_sort_by_date_recently_changed_keys=313 -view_sort_by_date_accessed_keys= -view_sort_by_ascending_keys= -view_sort_by_descending_keys= -view_refresh_keys=116 -view_fullscreen_keys=122 -view_toggle_ltrrtl_keys= -view_on_top_never_keys= -view_on_top_always_keys=340 -view_on_top_while_searching_keys= -search_match_case_keys=329 -search_match_whole_word_keys=322 -search_match_path_keys=341 -search_match_diacritics_keys=333 -search_enable_regex_keys=338 -search_add_to_filters_keys= -search_organize_filters_keys=1350 -bookmarks_add_to_bookmarks_keys=324 -bookmarks_organize_bookmarks_keys=1346 -tools_options_keys=336 -tools_console_keys=448 -tools_file_list_editor_keys= -tools_connect_to_etp_server_keys= -tools_disconnect_from_etp_server_keys= -help_everything_help_keys=112 -help_search_syntax_keys= -help_regex_syntax_keys= -help_command_line_options_keys= -help_everything_website_keys= -help_check_for_updates_keys= -help_about_everything_keys=368 -search_edit_focus_search_edit_keys=326,114 -search_edit_delete_previous_word_keys=4360 -search_edit_auto_complete_search_keys=4384 -search_edit_show_search_history_keys= -search_edit_show_all_search_history_keys=4646,4648 -result_list_item_up_keys=8230,4134 -result_list_item_down_keys=8232,4136 -result_list_page_up_keys=8225,4129 -result_list_page_down_keys=8226,4130 -result_list_start_of_list_keys=8228 -result_list_end_of_list_keys=8227 -result_list_item_up_extend_keys=9254,5158 -result_list_item_down_extend_keys=9256,5160 -result_list_page_up_extend_keys=9249,5153 -result_list_page_down_extend_keys=9250,5154 -result_list_start_of_list_extend_keys=9252 -result_list_end_of_list_extend_keys=9251 -result_list_focus_up_keys=8486,4390 -result_list_focus_down_keys=8488,4392 -result_list_focus_page_up_keys=8481,4385 -result_list_focus_page_down_keys=8482,4386 -result_list_focus_start_of_list_keys=8484 -result_list_focus_end_of_list_keys=8483 -result_list_focus_up_extend_keys=9510,5414 -result_list_focus_down_extend_keys=9512,5416 -result_list_focus_page_up_extend_keys=9505,5409 -result_list_focus_page_down_extend_keys=9506,5410 -result_list_focus_start_of_list_extend_keys=9508 -result_list_focus_end_of_list_extend_keys=9507 -result_list_focus_result_list_keys= -result_list_toggle_path_column_keys=1330 -result_list_toggle_size_column_keys=1331 -result_list_toggle_extension_column_keys=1332 -result_list_toggle_type_column_keys=1333 -result_list_toggle_date_modified_column_keys=1334 -result_list_toggle_date_created_column_keys=1335 -result_list_toggle_attributes_column_keys=1336 -result_list_toggle_file_list_filename_column_keys= -result_list_toggle_run_count_column_keys= -result_list_toggle_date_recently_changed_column_keys=1337 -result_list_toggle_date_accessed_column_keys= -result_list_toggle_date_run_column_keys= -result_list_size_all_columns_to_fit_keys=8555 -result_list_size_result_list_to_fit_keys= -result_list_context_menu_keys=9337 -result_list_scroll_left_keys=8229 -result_list_scroll_right_keys=8231 -result_list_scroll_page_left_keys=8485 -result_list_scroll_page_right_keys=8487 -result_list_select_focus_keys=8224 -result_list_toggle_focus_selection_keys=8480 -result_list_copy_selection_to_clipboard_as_csv_keys= -result_list_font= -result_list_font_size= -search_edit_font= -search_edit_font_size= -status_bar_font= -status_bar_font_size= -header_font= -header_font_size= -normal_background_color= -normal_foreground_color= -normal_bold= -highlighted_background_color= -highlighted_foreground_color= -highlighted_bold= -selected_background_color= -selected_foreground_color= -selected_bold= -highlighted_selected_background_color= -highlighted_selected_foreground_color= -highlighted_selected_bold= -selected_inactive_background_color= -selected_inactive_foreground_color= -selected_inactive_bold= -highlighted_selected_inactive_background_color= -highlighted_selected_inactive_foreground_color= -highlighted_selected_inactive_bold= -drop_target_background_color= -drop_target_foreground_color= -drop_target_bold= -highlighted_drop_target_background_color= -highlighted_drop_target_foreground_color= -highlighted_drop_target_bold= -current_sort_background_color= -current_sort_foreground_color= -current_sort_bold= -highlighted_current_sort_background_color= -highlighted_current_sort_foreground_color= -highlighted_current_sort_bold= -mouseover_background_color= -mouseover_foreground_color= -mouseover_bold= -mouseover_highlighted_background_color= -mouseover_highlighted_foreground_color= -mouseover_highlighted_bold= -current_sort_mouseover_background_color= -current_sort_mouseover_foreground_color= -current_sort_mouseover_bold= -mouseover_current_sort_highlighted_background_color= -mouseover_current_sort_highlighted_foreground_color= -mouseover_current_sort_highlighted_bold= -alternate_row_background_color= -alternate_row_foreground_color= -alternate_row_bold= -alternate_row_highlighted_background_color= -alternate_row_highlighted_foreground_color= -alternate_row_highlighted_bold= -current_sort_alternate_row_background_color= -current_sort_alternate_row_foreground_color= -current_sort_alternate_row_bold= -current_sort_alternate_row_highlighted_background_color= -current_sort_alternate_row_highlighted_foreground_color= -current_sort_alternate_row_highlighted_bold= diff --git a/Plugins/Wox.Plugin.Everything/PortableEverything/x64/Everything.dll b/Plugins/Wox.Plugin.Everything/PortableEverything/x64/Everything.dll new file mode 100644 index 0000000000..20c2ed86ca Binary files /dev/null and b/Plugins/Wox.Plugin.Everything/PortableEverything/x64/Everything.dll differ diff --git a/Plugins/Wox.Plugin.Everything/PortableEverything/x64/Everything.exe b/Plugins/Wox.Plugin.Everything/PortableEverything/x64/Everything.exe new file mode 100644 index 0000000000..d02f5a37fe Binary files /dev/null and b/Plugins/Wox.Plugin.Everything/PortableEverything/x64/Everything.exe differ diff --git a/Plugins/Wox.Plugin.Everything/PortableEverything/x86/Everything.dll b/Plugins/Wox.Plugin.Everything/PortableEverything/x86/Everything.dll new file mode 100644 index 0000000000..19761064e1 Binary files /dev/null and b/Plugins/Wox.Plugin.Everything/PortableEverything/x86/Everything.dll differ diff --git a/Plugins/Wox.Plugin.Everything/PortableEverything/Everything.exe b/Plugins/Wox.Plugin.Everything/PortableEverything/x86/Everything.exe similarity index 100% rename from Plugins/Wox.Plugin.Everything/PortableEverything/Everything.exe rename to Plugins/Wox.Plugin.Everything/PortableEverything/x86/Everything.exe diff --git a/Plugins/Wox.Plugin.Everything/Wox.Plugin.Everything.csproj b/Plugins/Wox.Plugin.Everything/Wox.Plugin.Everything.csproj index 5347f70421..4314340236 100644 --- a/Plugins/Wox.Plugin.Everything/Wox.Plugin.Everything.csproj +++ b/Plugins/Wox.Plugin.Everything/Wox.Plugin.Everything.csproj @@ -85,16 +85,19 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - diff --git a/Plugins/Wox.Plugin.Everything/x64/Everything.dll b/Plugins/Wox.Plugin.Everything/x64/Everything.dll deleted file mode 100644 index 2b7abd03cb..0000000000 Binary files a/Plugins/Wox.Plugin.Everything/x64/Everything.dll and /dev/null differ diff --git a/Plugins/Wox.Plugin.Everything/x86/Everything.dll b/Plugins/Wox.Plugin.Everything/x86/Everything.dll deleted file mode 100644 index c0c1fe792b..0000000000 Binary files a/Plugins/Wox.Plugin.Everything/x86/Everything.dll and /dev/null differ