Skip to content

Commit

Permalink
Merge v0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaoses-Ib authored Oct 5, 2021
2 parents 013ee88 + 55e3f87 commit 56fef3b
Show file tree
Hide file tree
Showing 27 changed files with 1,459 additions and 615 deletions.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ["https://chaoses-ib.github.io/funding/微信赞赏码.png", "https://chaoses-ib.github.io/funding/支付宝收款码.png", "感谢捐赠,捐赠时请备注仓库名,便于记录。"]
8 changes: 4 additions & 4 deletions Hijacker/Hijacker.rc
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,3,0,1
PRODUCTVERSION 0,3,0,1
FILEVERSION 0,4,0,1
PRODUCTVERSION 0,4,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -69,12 +69,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "https://github.com/Chaoses-Ib/IbEverythingExt"
VALUE "FileDescription", "Everything ƴ��������չ"
VALUE "FileVersion", "0.3.0.1"
VALUE "FileVersion", "0.4.0.1"
VALUE "InternalName", "Hijacker.dll"
VALUE "LegalCopyright", "Copyright (C) 2021 ����Ib"
VALUE "OriginalFilename", "WindowsCodecs.dll"
VALUE "ProductName", "IbEverythingExt"
VALUE "ProductVersion", "0.3.0.1"
VALUE "ProductVersion", "0.4.0.1"
END
END
BLOCK "VarFileInfo"
Expand Down
6 changes: 6 additions & 0 deletions Hijacker/Hijacker.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,20 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="config.hpp" />
<ClInclude Include="framework.h" />
<ClInclude Include="helper.hpp" />
<ClInclude Include="ipc.hpp" />
<ClInclude Include="pch.h" />
<ClInclude Include="pinyin.hpp" />
<ClInclude Include="quick_select.hpp" />
<ClInclude Include="resource.h" />
<ClInclude Include="search_history.hpp" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="config.cpp" />
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="ipc.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
Expand All @@ -188,6 +193,7 @@
</ClCompile>
<ClCompile Include="pinyin.cpp" />
<ClCompile Include="pinyin_data.cpp" />
<ClCompile Include="quick_select.cpp" />
<ClCompile Include="search_history.cpp" />
</ItemGroup>
<ItemGroup>
Expand Down
18 changes: 18 additions & 0 deletions Hijacker/Hijacker.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@
<ClInclude Include="search_history.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ipc.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="quick_select.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="config.hpp">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp">
Expand All @@ -50,6 +59,15 @@
<ClCompile Include="search_history.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ipc.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="quick_select.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="config.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Hijacker.rc">
Expand Down
25 changes: 25 additions & 0 deletions Hijacker/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include "pch.h"
#include "config.hpp"
#include <fstream>
#include <Shlwapi.h>
#include <yaml-cpp/yaml.h>

#pragma comment(lib, "Shlwapi.lib")

Config config{};

void config_init() {
wchar_t path[MAX_PATH];
GetModuleFileNameW(nullptr, path, std::size(path));
PathRemoveFileSpecW(path);
PathAppendW(path, L"IbEverythingExt.yaml");

std::ifstream in(path);
if (in) {
YAML::Node root = YAML::Load(in);
config.pinyin_search = root["pinyin_search"].as<bool>();
config.quick_select = root["quick_select"].as<bool>();
}
}

void config_destroy() {}
10 changes: 10 additions & 0 deletions Hijacker/config.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once

struct Config {
bool pinyin_search = true;
bool quick_select = true;
};
extern Config config;

void config_init();
void config_destroy();
Loading

0 comments on commit 56fef3b

Please sign in to comment.