31 Commits

Author SHA1 Message Date
Bruce
9edccede4e Update ContentDialog Styles. 2026-04-06 18:52:40 +08:00
Bruce
1d7359ebdd Merge branch 'master' of https://github.com/modernw/App-Installer-For-Windows-8.x-Reset.git 2026-04-06 18:46:56 +08:00
Bruce
fafff1bc5c Update locale strings.
Add a new project.
Remove the datas for test.
2026-04-06 18:46:51 +08:00
modernw
be599991b8 Update README to clarify AI assistance and GitHub usage 2026-04-06 18:43:19 +08:00
Bruce
48954e5206 Update item. 2026-04-06 15:18:27 +08:00
Bruce
a7c22adc05 Update libs used. 2026-04-06 13:29:14 +08:00
Bruce
be643a9935 Not use WinJS 3.0. 2026-04-06 13:13:54 +08:00
Bruce
64f3958d7f Update reader. 2026-04-06 13:09:20 +08:00
Bruce
b562d5b5ba fix bugs. 2026-04-04 19:49:45 +08:00
Bruce
bf54d5a531 Update reader. 2026-04-04 19:27:45 +08:00
Bruce
f9f4db3f6c Update Reader. 2026-04-02 11:33:57 +08:00
Bruce
880a834296 Change build configure. 2026-03-28 22:41:43 +08:00
Bruce
e47813765a Fix bugs. 2026-03-28 19:13:15 +08:00
Bruce
2f0d1dc27f Update build for ARM. 2026-03-28 19:11:29 +08:00
modernw
3c35a8acaa Merge pull request #1 from bingtangxh/master
Add ARM support and remove symbol links
2026-03-28 12:20:47 +08:00
冰糖XH
27e604892d Remove hardcoded pugixml include path
Clear absolute AdditionalIncludeDirectories entries referencing D:\GitHub\App-Installer-For-Windows-8.x-Reset\packages\pugixml.1.15.0\build\native\include\ in pkgread/pkgread.vcxproj across multiple build configurations. This removes a machine-specific include path to improve portability and avoid build failures on other systems; include dirs should be provided via package restore or configured with relative paths or project properties.
2026-03-28 11:31:43 +08:00
冰糖XH
1c05d8a379 Remove unused mmsyscom include from appxinfo.h
Drop the #include <mmsyscom.h> line from appinstaller/appxinfo.h to eliminate an unnecessary dependency and reduce potential compilation issues. No functional changes to code behavior.
2026-03-28 11:22:43 +08:00
Bruce
43983a2c87 Update builder for ARM. 2026-03-28 10:55:13 +08:00
冰糖XH
df0d14e282 Merge branch 'modernw:master' into master 2026-03-28 10:44:10 +08:00
Bruce
419498bef8 Update readme for ARM. 2026-03-28 10:39:28 +08:00
Bruce
4118efa4b6 Remove build files. 2026-03-28 10:38:20 +08:00
冰糖XH
ecde1c8d80 Remove minwindef include; docs and whitespace cleanup
Remove an unnecessary #include <minwindef.h> from pkgread/typestrans.h and perform minor whitespace cleanups in desktopini/main.cpp and pkgread/dllmain.cpp. Update notes/symlinks.md to explain that appxinfo.h and main.cpp now use #include "../<ProjectName>/<ProjectName>.h", so the previous symbolic links are no longer required. These are non-functional cleanup and documentation updates.
2026-03-26 22:13:08 +08:00
冰糖XH
79674b639b Use external headers; remove local header links
Replace local header placeholders in appinstaller with direct references to upstream headers. Deleted the gitlink/header stubs (certmgr.h, notice.h, pkgmgr.h, pkgread.h, priformatcli.h) from appinstaller, updated main.cpp and appxinfo.h to include the ../path to those headers, and adjusted appinstaller.vcxproj.filters to point to the new locations. Cleans up redundant local links and ensures the project references the original header files.
2026-03-26 22:01:12 +08:00
冰糖XH
0073da9c8e Add ARM Desktop SDK props; remove x64 configs
Add ArmDesktopSdk.props and a Directory.Build.props to force-import ARM desktop SDK settings (WindowsSDKDesktopARMSupport and centralized handling of the ARM desktop preprocessor define). Remove x64-specific configurations, property sheets and duplicated ARM preprocessor definitions from multiple .vcxproj files to simplify supported platforms. Update pkgread to use package-based pugixml library paths and set TreatWChar_tAsBuiltInType, and tweak solution configuration entries in AppInstallerReset.sln.
2026-03-26 21:54:42 +08:00
冰糖XH
a472ddba73 Set PlatformTarget to AnyCPU and add publish
Change PlatformTarget from x86 to AnyCPU across solution and projects (Launch, Manager, ModernNotice, Reader) so builds target AnyCPU. Add ClickOnce/publishing properties to Manager.csproj (PublishUrl, Install, Update settings, ApplicationVersion/Revision, BootstrapperEnabled, etc.) and include a BootstrapperPackage entry for .NET Framework 3.5 SP1. These changes prepare the projects for AnyCPU builds and configure Manager for deployment/publishing.
2026-03-26 20:11:24 +08:00
冰糖XH
b2633b37e5 Add pugixml project and reference
Add a new pugixml static library project and include it in the solution to support ARM builds. pkgread now references the new pugixml project (removed direct pugixml file/includes) and its Release|ARM PrecompiledHeader is set to NotUsing. Update solution configurations to include pugixml and add appropriate build platform mappings. Update notes/symlinks.md with instructions for the new project and manual copying of generated pugixml.lib; also clear an AdditionalLibraryDirectories entry in priformatcli.
2026-03-26 15:46:37 +08:00
冰糖XH
fe6a9a186b Enable ARM desktop SDK macro in projects
Add _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1 to PreprocessorDefinitions in multiple .vcxproj files so ARM desktop SDK partition is available at project level. Remove per-file #ifdef _M_ARM defines from several headers and source files (Stdafx.h, targetver.h, main.cpp across various modules) to avoid duplication. Also add ShowIncludes=false in pkgread.vcxproj. This centralizes the ARM macro for consistent ARM builds across modules.
2026-03-26 14:46:26 +08:00
冰糖XH
2e45bb1cd9 Add symlink notes and fix pugixml path
Add notes/symlinks.md documenting required symbolic links for the appinstaller and shared directories, plus guidance for creating symlinks in Debug/Release and including shared subdirs in releases. Update pkgread project and its filters to use a relative path for pugixml.cpp (..\packages\pugixml.1.15.0\...) instead of an absolute user-specific NuGet path so the project is portable and includes pugixml.cpp needed to resolve linker errors for non-x86 builds (e.g. ARM).
2026-03-26 14:27:03 +08:00
冰糖XH
ccf6cfd66c Remove useless pugixml_arm 2026-03-26 13:58:29 +08:00
冰糖XH
34895b9edd Merge branch 'master' of https://github.com/bingtangxh/App-Installer-For-Windows-8.x-Reset 2026-03-26 13:54:51 +08:00
冰糖XH
745a89fa9c Add ARM platform & pugixml_arm, update VS solution
Upgrade solution to Visual Studio 17 and add ARM build configurations across projects. Several .vcxproj files were updated to include Debug/Release|ARM property groups, property sheet imports and LinkIncremental settings; platform toolset set for ARM configs where appropriate. A new pugixml_arm project and its sources/filters were added. Also added ExtensibilityGlobals (SolutionGuid) to the .sln.
2026-03-26 13:54:29 +08:00
170 changed files with 23489 additions and 182390 deletions

3
.gitignore vendored
View File

@@ -248,6 +248,5 @@ ModelManifest.xml
[Oo]thers/ [Oo]thers/
# Arm Build Files # Arm Build Files
arm_build.bat
ArmBuild.ps1
package.zip package.zip
ArmPackage.zip

View File

@@ -15,10 +15,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "certmgr", "certmgr\certmgr.
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "appinstaller", "appinstaller\appinstaller.vcxproj", "{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "appinstaller", "appinstaller\appinstaller.vcxproj", "{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{8EAC0230-4990-4E41-8E0F-D641D1561396} = {8EAC0230-4990-4E41-8E0F-D641D1561396}
{33D91B58-1981-4A3C-B4D1-86EE406CDE12} = {33D91B58-1981-4A3C-B4D1-86EE406CDE12} {33D91B58-1981-4A3C-B4D1-86EE406CDE12} = {33D91B58-1981-4A3C-B4D1-86EE406CDE12}
{A7753282-AA16-43D9-8ACA-7065239DD702} = {A7753282-AA16-43D9-8ACA-7065239DD702}
{798ED492-EECE-457D-8FD8-129DA93CE126} = {798ED492-EECE-457D-8FD8-129DA93CE126} {798ED492-EECE-457D-8FD8-129DA93CE126} = {798ED492-EECE-457D-8FD8-129DA93CE126}
{8EAC0230-4990-4E41-8E0F-D641D1561396} = {8EAC0230-4990-4E41-8E0F-D641D1561396}
{A7753282-AA16-43D9-8ACA-7065239DD702} = {A7753282-AA16-43D9-8ACA-7065239DD702}
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C} = {B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}
{E04CCAB9-35DB-495C-A279-5B483C707CD0} = {E04CCAB9-35DB-495C-A279-5B483C707CD0} {E04CCAB9-35DB-495C-A279-5B483C707CD0} = {E04CCAB9-35DB-495C-A279-5B483C707CD0}
{EF4012D4-EF08-499C-B803-177739350B2D} = {EF4012D4-EF08-499C-B803-177739350B2D} {EF4012D4-EF08-499C-B803-177739350B2D} = {EF4012D4-EF08-499C-B803-177739350B2D}
EndProjectSection EndProjectSection
@@ -26,6 +27,7 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settings", "settings\settings.vcxproj", "{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settings", "settings\settings.vcxproj", "{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{3AE2A022-ED83-41F1-948A-12A7593CBD00} = {3AE2A022-ED83-41F1-948A-12A7593CBD00} {3AE2A022-ED83-41F1-948A-12A7593CBD00} = {3AE2A022-ED83-41F1-948A-12A7593CBD00}
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C} = {B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reslib", "reslib\reslib.vcxproj", "{3AE2A022-ED83-41F1-948A-12A7593CBD00}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reslib", "reslib\reslib.vcxproj", "{3AE2A022-ED83-41F1-948A-12A7593CBD00}"
@@ -48,8 +50,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PrivateInit", "PrivateInit\
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppxPackage", "AppxPackage\AppxPackage.csproj", "{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppxPackage", "AppxPackage\AppxPackage.csproj", "{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{8EAC0230-4990-4E41-8E0F-D641D1561396} = {8EAC0230-4990-4E41-8E0F-D641D1561396}
{33D91B58-1981-4A3C-B4D1-86EE406CDE12} = {33D91B58-1981-4A3C-B4D1-86EE406CDE12} {33D91B58-1981-4A3C-B4D1-86EE406CDE12} = {33D91B58-1981-4A3C-B4D1-86EE406CDE12}
{8EAC0230-4990-4E41-8E0F-D641D1561396} = {8EAC0230-4990-4E41-8E0F-D641D1561396}
{A7753282-AA16-43D9-8ACA-7065239DD702} = {A7753282-AA16-43D9-8ACA-7065239DD702} {A7753282-AA16-43D9-8ACA-7065239DD702} = {A7753282-AA16-43D9-8ACA-7065239DD702}
{EF4012D4-EF08-499C-B803-177739350B2D} = {EF4012D4-EF08-499C-B803-177739350B2D} {EF4012D4-EF08-499C-B803-177739350B2D} = {EF4012D4-EF08-499C-B803-177739350B2D}
EndProjectSection EndProjectSection
@@ -73,256 +75,288 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Launch", "Launch\Launch.csp
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reader", "Reader\Reader.csproj", "{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reader", "Reader\Reader.csproj", "{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pugixml", "pugixml\pugixml.vcxproj", "{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PkgCLI", "PkgCLI\PkgCLI.csproj", "{8D333AF6-E901-4301-B3EE-923088E81062}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64 Debug|ARM = Debug|ARM
Debug|x86 = Debug|x86 Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64 Release|ARM = Release|ARM
Release|x86 = Release|x86 Release|x86 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A7753282-AA16-43D9-8ACA-7065239DD702}.Debug|Any CPU.ActiveCfg = Debug|Win32 {A7753282-AA16-43D9-8ACA-7065239DD702}.Debug|Any CPU.ActiveCfg = Debug|Win32
{A7753282-AA16-43D9-8ACA-7065239DD702}.Debug|x64.ActiveCfg = Debug|x64 {A7753282-AA16-43D9-8ACA-7065239DD702}.Debug|ARM.ActiveCfg = Debug|ARM
{A7753282-AA16-43D9-8ACA-7065239DD702}.Debug|x64.Build.0 = Debug|x64 {A7753282-AA16-43D9-8ACA-7065239DD702}.Debug|ARM.Build.0 = Debug|ARM
{A7753282-AA16-43D9-8ACA-7065239DD702}.Debug|x86.ActiveCfg = Debug|Win32 {A7753282-AA16-43D9-8ACA-7065239DD702}.Debug|x86.ActiveCfg = Debug|Win32
{A7753282-AA16-43D9-8ACA-7065239DD702}.Debug|x86.Build.0 = Debug|Win32 {A7753282-AA16-43D9-8ACA-7065239DD702}.Debug|x86.Build.0 = Debug|Win32
{A7753282-AA16-43D9-8ACA-7065239DD702}.Release|Any CPU.ActiveCfg = Release|Win32 {A7753282-AA16-43D9-8ACA-7065239DD702}.Release|Any CPU.ActiveCfg = Release|Win32
{A7753282-AA16-43D9-8ACA-7065239DD702}.Release|x64.ActiveCfg = Release|x64 {A7753282-AA16-43D9-8ACA-7065239DD702}.Release|ARM.ActiveCfg = Release|ARM
{A7753282-AA16-43D9-8ACA-7065239DD702}.Release|x64.Build.0 = Release|x64 {A7753282-AA16-43D9-8ACA-7065239DD702}.Release|ARM.Build.0 = Release|ARM
{A7753282-AA16-43D9-8ACA-7065239DD702}.Release|x86.ActiveCfg = Release|Win32 {A7753282-AA16-43D9-8ACA-7065239DD702}.Release|x86.ActiveCfg = Release|Win32
{A7753282-AA16-43D9-8ACA-7065239DD702}.Release|x86.Build.0 = Release|Win32 {A7753282-AA16-43D9-8ACA-7065239DD702}.Release|x86.Build.0 = Release|Win32
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Debug|Any CPU.ActiveCfg = Debug|Win32 {8EAC0230-4990-4E41-8E0F-D641D1561396}.Debug|Any CPU.ActiveCfg = Debug|Win32
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Debug|x64.ActiveCfg = Debug|Win32 {8EAC0230-4990-4E41-8E0F-D641D1561396}.Debug|ARM.ActiveCfg = Debug|ARM
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Debug|ARM.Build.0 = Debug|ARM
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Debug|x86.ActiveCfg = Debug|Win32 {8EAC0230-4990-4E41-8E0F-D641D1561396}.Debug|x86.ActiveCfg = Debug|Win32
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Debug|x86.Build.0 = Debug|Win32 {8EAC0230-4990-4E41-8E0F-D641D1561396}.Debug|x86.Build.0 = Debug|Win32
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Release|Any CPU.ActiveCfg = Release|Win32 {8EAC0230-4990-4E41-8E0F-D641D1561396}.Release|Any CPU.ActiveCfg = Release|Win32
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Release|x64.ActiveCfg = Release|Win32 {8EAC0230-4990-4E41-8E0F-D641D1561396}.Release|ARM.ActiveCfg = Release|ARM
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Release|ARM.Build.0 = Release|ARM
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Release|x86.ActiveCfg = Release|Win32 {8EAC0230-4990-4E41-8E0F-D641D1561396}.Release|x86.ActiveCfg = Release|Win32
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Release|x86.Build.0 = Release|Win32 {8EAC0230-4990-4E41-8E0F-D641D1561396}.Release|x86.Build.0 = Release|Win32
{798ED492-EECE-457D-8FD8-129DA93CE126}.Debug|Any CPU.ActiveCfg = Debug|Win32 {798ED492-EECE-457D-8FD8-129DA93CE126}.Debug|Any CPU.ActiveCfg = Debug|Win32
{798ED492-EECE-457D-8FD8-129DA93CE126}.Debug|x64.ActiveCfg = Debug|Win32 {798ED492-EECE-457D-8FD8-129DA93CE126}.Debug|ARM.ActiveCfg = Debug|ARM
{798ED492-EECE-457D-8FD8-129DA93CE126}.Debug|ARM.Build.0 = Debug|ARM
{798ED492-EECE-457D-8FD8-129DA93CE126}.Debug|x86.ActiveCfg = Debug|Win32 {798ED492-EECE-457D-8FD8-129DA93CE126}.Debug|x86.ActiveCfg = Debug|Win32
{798ED492-EECE-457D-8FD8-129DA93CE126}.Debug|x86.Build.0 = Debug|Win32 {798ED492-EECE-457D-8FD8-129DA93CE126}.Debug|x86.Build.0 = Debug|Win32
{798ED492-EECE-457D-8FD8-129DA93CE126}.Release|Any CPU.ActiveCfg = Release|Win32 {798ED492-EECE-457D-8FD8-129DA93CE126}.Release|Any CPU.ActiveCfg = Release|Win32
{798ED492-EECE-457D-8FD8-129DA93CE126}.Release|x64.ActiveCfg = Release|Win32 {798ED492-EECE-457D-8FD8-129DA93CE126}.Release|ARM.ActiveCfg = Release|ARM
{798ED492-EECE-457D-8FD8-129DA93CE126}.Release|ARM.Build.0 = Release|ARM
{798ED492-EECE-457D-8FD8-129DA93CE126}.Release|x86.ActiveCfg = Release|Win32 {798ED492-EECE-457D-8FD8-129DA93CE126}.Release|x86.ActiveCfg = Release|Win32
{798ED492-EECE-457D-8FD8-129DA93CE126}.Release|x86.Build.0 = Release|Win32 {798ED492-EECE-457D-8FD8-129DA93CE126}.Release|x86.Build.0 = Release|Win32
{EF4012D4-EF08-499C-B803-177739350B2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EF4012D4-EF08-499C-B803-177739350B2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF4012D4-EF08-499C-B803-177739350B2D}.Debug|Any CPU.Build.0 = Debug|Any CPU {EF4012D4-EF08-499C-B803-177739350B2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF4012D4-EF08-499C-B803-177739350B2D}.Debug|x64.ActiveCfg = Debug|Any CPU {EF4012D4-EF08-499C-B803-177739350B2D}.Debug|ARM.ActiveCfg = Debug|Any CPU
{EF4012D4-EF08-499C-B803-177739350B2D}.Debug|x64.Build.0 = Debug|Any CPU {EF4012D4-EF08-499C-B803-177739350B2D}.Debug|ARM.Build.0 = Debug|Any CPU
{EF4012D4-EF08-499C-B803-177739350B2D}.Debug|x86.ActiveCfg = Debug|Any CPU {EF4012D4-EF08-499C-B803-177739350B2D}.Debug|x86.ActiveCfg = Debug|Any CPU
{EF4012D4-EF08-499C-B803-177739350B2D}.Debug|x86.Build.0 = Debug|Any CPU {EF4012D4-EF08-499C-B803-177739350B2D}.Debug|x86.Build.0 = Debug|Any CPU
{EF4012D4-EF08-499C-B803-177739350B2D}.Release|Any CPU.ActiveCfg = Release|Any CPU {EF4012D4-EF08-499C-B803-177739350B2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF4012D4-EF08-499C-B803-177739350B2D}.Release|Any CPU.Build.0 = Release|Any CPU {EF4012D4-EF08-499C-B803-177739350B2D}.Release|Any CPU.Build.0 = Release|Any CPU
{EF4012D4-EF08-499C-B803-177739350B2D}.Release|x64.ActiveCfg = Release|Any CPU {EF4012D4-EF08-499C-B803-177739350B2D}.Release|ARM.ActiveCfg = Release|Any CPU
{EF4012D4-EF08-499C-B803-177739350B2D}.Release|x64.Build.0 = Release|Any CPU {EF4012D4-EF08-499C-B803-177739350B2D}.Release|ARM.Build.0 = Release|Any CPU
{EF4012D4-EF08-499C-B803-177739350B2D}.Release|x86.ActiveCfg = Release|Any CPU {EF4012D4-EF08-499C-B803-177739350B2D}.Release|x86.ActiveCfg = Release|Any CPU
{EF4012D4-EF08-499C-B803-177739350B2D}.Release|x86.Build.0 = Release|Any CPU {EF4012D4-EF08-499C-B803-177739350B2D}.Release|x86.Build.0 = Release|Any CPU
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Debug|Any CPU.ActiveCfg = Debug|Win32 {E04CCAB9-35DB-495C-A279-5B483C707CD0}.Debug|Any CPU.ActiveCfg = Debug|Win32
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Debug|x64.ActiveCfg = Debug|x64 {E04CCAB9-35DB-495C-A279-5B483C707CD0}.Debug|ARM.ActiveCfg = Debug|ARM
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Debug|x64.Build.0 = Debug|x64 {E04CCAB9-35DB-495C-A279-5B483C707CD0}.Debug|ARM.Build.0 = Debug|ARM
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Debug|x86.ActiveCfg = Debug|Win32 {E04CCAB9-35DB-495C-A279-5B483C707CD0}.Debug|x86.ActiveCfg = Debug|Win32
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Debug|x86.Build.0 = Debug|Win32 {E04CCAB9-35DB-495C-A279-5B483C707CD0}.Debug|x86.Build.0 = Debug|Win32
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Release|Any CPU.ActiveCfg = Release|Win32 {E04CCAB9-35DB-495C-A279-5B483C707CD0}.Release|Any CPU.ActiveCfg = Release|Win32
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Release|x64.ActiveCfg = Release|x64 {E04CCAB9-35DB-495C-A279-5B483C707CD0}.Release|ARM.ActiveCfg = Release|ARM
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Release|x64.Build.0 = Release|x64 {E04CCAB9-35DB-495C-A279-5B483C707CD0}.Release|ARM.Build.0 = Release|ARM
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Release|x86.ActiveCfg = Release|Win32 {E04CCAB9-35DB-495C-A279-5B483C707CD0}.Release|x86.ActiveCfg = Release|Win32
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Release|x86.Build.0 = Release|Win32 {E04CCAB9-35DB-495C-A279-5B483C707CD0}.Release|x86.Build.0 = Release|Win32
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Debug|Any CPU.ActiveCfg = Debug|Win32 {F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Debug|Any CPU.ActiveCfg = Debug|Win32
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Debug|x64.ActiveCfg = Debug|x64 {F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Debug|ARM.ActiveCfg = Debug|ARM
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Debug|x64.Build.0 = Debug|x64 {F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Debug|ARM.Build.0 = Debug|ARM
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Debug|x86.ActiveCfg = Debug|Win32 {F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Debug|x86.ActiveCfg = Debug|Win32
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Debug|x86.Build.0 = Debug|Win32 {F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Debug|x86.Build.0 = Debug|Win32
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Release|Any CPU.ActiveCfg = Release|Win32 {F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Release|Any CPU.ActiveCfg = Release|Win32
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Release|x64.ActiveCfg = Release|x64 {F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Release|ARM.ActiveCfg = Release|ARM
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Release|x64.Build.0 = Release|x64 {F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Release|ARM.Build.0 = Release|ARM
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Release|x86.ActiveCfg = Release|Win32 {F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Release|x86.ActiveCfg = Release|Win32
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Release|x86.Build.0 = Release|Win32 {F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Release|x86.Build.0 = Release|Win32
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Debug|Any CPU.ActiveCfg = Debug|Win32 {AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Debug|Any CPU.ActiveCfg = Debug|Win32
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Debug|x64.ActiveCfg = Debug|x64 {AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Debug|ARM.ActiveCfg = Debug|ARM
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Debug|x64.Build.0 = Debug|x64 {AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Debug|ARM.Build.0 = Debug|ARM
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Debug|x86.ActiveCfg = Debug|Win32 {AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Debug|x86.ActiveCfg = Debug|Win32
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Debug|x86.Build.0 = Debug|Win32 {AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Debug|x86.Build.0 = Debug|Win32
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Release|Any CPU.ActiveCfg = Release|Win32 {AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Release|Any CPU.ActiveCfg = Release|Win32
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Release|x64.ActiveCfg = Release|x64 {AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Release|ARM.ActiveCfg = Release|ARM
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Release|x64.Build.0 = Release|x64 {AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Release|ARM.Build.0 = Release|ARM
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Release|x86.ActiveCfg = Release|Win32 {AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Release|x86.ActiveCfg = Release|Win32
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Release|x86.Build.0 = Release|Win32 {AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Release|x86.Build.0 = Release|Win32
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Debug|Any CPU.ActiveCfg = Debug|Win32 {3AE2A022-ED83-41F1-948A-12A7593CBD00}.Debug|Any CPU.ActiveCfg = Debug|Win32
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Debug|x64.ActiveCfg = Debug|x64 {3AE2A022-ED83-41F1-948A-12A7593CBD00}.Debug|ARM.ActiveCfg = Debug|ARM
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Debug|x64.Build.0 = Debug|x64 {3AE2A022-ED83-41F1-948A-12A7593CBD00}.Debug|ARM.Build.0 = Debug|ARM
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Debug|x86.ActiveCfg = Debug|Win32 {3AE2A022-ED83-41F1-948A-12A7593CBD00}.Debug|x86.ActiveCfg = Debug|Win32
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Debug|x86.Build.0 = Debug|Win32 {3AE2A022-ED83-41F1-948A-12A7593CBD00}.Debug|x86.Build.0 = Debug|Win32
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Release|Any CPU.ActiveCfg = Release|Win32 {3AE2A022-ED83-41F1-948A-12A7593CBD00}.Release|Any CPU.ActiveCfg = Release|Win32
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Release|x64.ActiveCfg = Release|x64 {3AE2A022-ED83-41F1-948A-12A7593CBD00}.Release|ARM.ActiveCfg = Release|ARM
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Release|x64.Build.0 = Release|x64 {3AE2A022-ED83-41F1-948A-12A7593CBD00}.Release|ARM.Build.0 = Release|ARM
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Release|x86.ActiveCfg = Release|Win32 {3AE2A022-ED83-41F1-948A-12A7593CBD00}.Release|x86.ActiveCfg = Release|Win32
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Release|x86.Build.0 = Release|Win32 {3AE2A022-ED83-41F1-948A-12A7593CBD00}.Release|x86.Build.0 = Release|Win32
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Debug|Any CPU.ActiveCfg = Debug|Win32 {18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Debug|Any CPU.ActiveCfg = Debug|Win32
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Debug|x64.ActiveCfg = Debug|x64 {18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Debug|ARM.ActiveCfg = Debug|ARM
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Debug|x64.Build.0 = Debug|x64 {18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Debug|ARM.Build.0 = Debug|ARM
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Debug|x86.ActiveCfg = Debug|Win32 {18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Debug|x86.ActiveCfg = Debug|Win32
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Debug|x86.Build.0 = Debug|Win32 {18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Debug|x86.Build.0 = Debug|Win32
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Release|Any CPU.ActiveCfg = Release|Win32 {18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Release|Any CPU.ActiveCfg = Release|Win32
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Release|x64.ActiveCfg = Release|x64 {18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Release|ARM.ActiveCfg = Release|ARM
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Release|x64.Build.0 = Release|x64 {18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Release|ARM.Build.0 = Release|ARM
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Release|x86.ActiveCfg = Release|Win32 {18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Release|x86.ActiveCfg = Release|Win32
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Release|x86.Build.0 = Release|Win32 {18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Release|x86.Build.0 = Release|Win32
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Debug|Any CPU.ActiveCfg = Debug|Win32 {7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Debug|Any CPU.ActiveCfg = Debug|Win32
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Debug|x64.ActiveCfg = Debug|x64 {7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Debug|ARM.ActiveCfg = Debug|ARM
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Debug|x64.Build.0 = Debug|x64 {7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Debug|ARM.Build.0 = Debug|ARM
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Debug|x86.ActiveCfg = Debug|Win32 {7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Debug|x86.ActiveCfg = Debug|Win32
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Debug|x86.Build.0 = Debug|Win32 {7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Debug|x86.Build.0 = Debug|Win32
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Release|Any CPU.ActiveCfg = Release|Win32 {7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Release|Any CPU.ActiveCfg = Release|Win32
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Release|x64.ActiveCfg = Release|x64 {7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Release|ARM.ActiveCfg = Release|ARM
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Release|x64.Build.0 = Release|x64 {7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Release|ARM.Build.0 = Release|ARM
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Release|x86.ActiveCfg = Release|Win32 {7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Release|x86.ActiveCfg = Release|Win32
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Release|x86.Build.0 = Release|Win32 {7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Release|x86.Build.0 = Release|Win32
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|Any CPU.ActiveCfg = Debug|Win32 {33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|Any CPU.ActiveCfg = Debug|Win32
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|x64.ActiveCfg = Debug|x64 {33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|ARM.ActiveCfg = Debug|ARM
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|x64.Build.0 = Debug|x64 {33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|ARM.Build.0 = Debug|ARM
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|x86.ActiveCfg = Debug|Win32 {33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|x86.ActiveCfg = Debug|Win32
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|x86.Build.0 = Debug|Win32 {33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|x86.Build.0 = Debug|Win32
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|Any CPU.ActiveCfg = Release|Win32 {33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|Any CPU.ActiveCfg = Release|Win32
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|x64.ActiveCfg = Release|x64 {33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|ARM.ActiveCfg = Release|ARM
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|x64.Build.0 = Release|x64 {33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|ARM.Build.0 = Release|ARM
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|x86.ActiveCfg = Release|Win32 {33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|x86.ActiveCfg = Release|Win32
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|x86.Build.0 = Release|Win32 {33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|x86.Build.0 = Release|Win32
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|Any CPU.Build.0 = Debug|Any CPU {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|x64.ActiveCfg = Debug|Any CPU {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|ARM.ActiveCfg = Debug|Any CPU
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|x64.Build.0 = Debug|Any CPU {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|ARM.Build.0 = Debug|Any CPU
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|x86.ActiveCfg = Debug|Any CPU {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|x86.ActiveCfg = Debug|Any CPU
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|x86.Build.0 = Debug|Any CPU {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|x86.Build.0 = Debug|Any CPU
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|Any CPU.ActiveCfg = Release|Any CPU {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|Any CPU.Build.0 = Release|Any CPU {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|Any CPU.Build.0 = Release|Any CPU
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|x64.ActiveCfg = Release|Any CPU {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|ARM.ActiveCfg = Release|Any CPU
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|x64.Build.0 = Release|Any CPU {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|ARM.Build.0 = Release|Any CPU
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|x86.ActiveCfg = Release|Any CPU {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|x86.ActiveCfg = Release|Any CPU
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|x86.Build.0 = Release|Any CPU {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|x86.Build.0 = Release|Any CPU
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|Any CPU.Build.0 = Debug|Any CPU {8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|x64.ActiveCfg = Debug|Any CPU {8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|ARM.ActiveCfg = Debug|Any CPU
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|x64.Build.0 = Debug|Any CPU {8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|ARM.Build.0 = Debug|Any CPU
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|x86.ActiveCfg = Debug|Any CPU {8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|x86.ActiveCfg = Debug|Any CPU
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|x86.Build.0 = Debug|Any CPU {8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|x86.Build.0 = Debug|Any CPU
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|Any CPU.ActiveCfg = Release|Any CPU {8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|Any CPU.Build.0 = Release|Any CPU {8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|Any CPU.Build.0 = Release|Any CPU
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|x64.ActiveCfg = Release|Any CPU {8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|ARM.ActiveCfg = Release|Any CPU
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|x64.Build.0 = Release|Any CPU {8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|ARM.Build.0 = Release|Any CPU
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|x86.ActiveCfg = Release|Any CPU {8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|x86.ActiveCfg = Release|Any CPU
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|x86.Build.0 = Release|Any CPU {8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|x86.Build.0 = Release|Any CPU
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|Any CPU.Build.0 = Debug|Any CPU {BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|x64.ActiveCfg = Debug|Any CPU {BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|ARM.ActiveCfg = Debug|Any CPU
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|x64.Build.0 = Debug|Any CPU {BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|ARM.Build.0 = Debug|Any CPU
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|x86.ActiveCfg = Debug|x86 {BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|x86.ActiveCfg = Debug|Any CPU
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|x86.Build.0 = Debug|x86 {BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|x86.Build.0 = Debug|Any CPU
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|Any CPU.ActiveCfg = Release|Any CPU {BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|Any CPU.Build.0 = Release|Any CPU {BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|Any CPU.Build.0 = Release|Any CPU
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|x64.ActiveCfg = Release|Any CPU {BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|ARM.ActiveCfg = Release|Any CPU
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|x64.Build.0 = Release|Any CPU {BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|ARM.Build.0 = Release|Any CPU
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|x86.ActiveCfg = Release|x86 {BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|x86.ActiveCfg = Release|Any CPU
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|x86.Build.0 = Release|x86 {BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|x86.Build.0 = Release|Any CPU
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|Any CPU.Build.0 = Debug|Any CPU {FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|x64.ActiveCfg = Debug|Any CPU {FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|ARM.ActiveCfg = Debug|Any CPU
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|x64.Build.0 = Debug|Any CPU {FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|ARM.Build.0 = Debug|Any CPU
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|x86.ActiveCfg = Debug|Any CPU {FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|x86.ActiveCfg = Debug|Any CPU
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|x86.Build.0 = Debug|Any CPU {FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|x86.Build.0 = Debug|Any CPU
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|Any CPU.ActiveCfg = Release|Any CPU {FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|Any CPU.Build.0 = Release|Any CPU {FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|Any CPU.Build.0 = Release|Any CPU
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|x64.ActiveCfg = Release|Any CPU {FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|ARM.ActiveCfg = Release|Any CPU
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|x64.Build.0 = Release|Any CPU {FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|ARM.Build.0 = Release|Any CPU
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|x86.ActiveCfg = Release|Any CPU {FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|x86.ActiveCfg = Release|Any CPU
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|x86.Build.0 = Release|Any CPU {FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|x86.Build.0 = Release|Any CPU
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|Any CPU.Build.0 = Debug|Any CPU {3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|x64.ActiveCfg = Debug|Any CPU {3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|ARM.ActiveCfg = Debug|Any CPU
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|x64.Build.0 = Debug|Any CPU {3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|ARM.Build.0 = Debug|Any CPU
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|x86.ActiveCfg = Debug|Any CPU {3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|x86.ActiveCfg = Debug|Any CPU
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|x86.Build.0 = Debug|Any CPU {3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|x86.Build.0 = Debug|Any CPU
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|Any CPU.ActiveCfg = Release|Any CPU {3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|Any CPU.Build.0 = Release|Any CPU {3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|Any CPU.Build.0 = Release|Any CPU
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|x64.ActiveCfg = Release|Any CPU {3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|ARM.ActiveCfg = Release|Any CPU
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|x64.Build.0 = Release|Any CPU {3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|ARM.Build.0 = Release|Any CPU
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|x86.ActiveCfg = Release|Any CPU {3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|x86.ActiveCfg = Release|Any CPU
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|x86.Build.0 = Release|Any CPU
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|Any CPU.Build.0 = Debug|Any CPU {4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|x64.ActiveCfg = Debug|Any CPU {4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|ARM.ActiveCfg = Debug|Any CPU
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|x64.Build.0 = Debug|Any CPU {4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|ARM.Build.0 = Debug|Any CPU
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|x86.ActiveCfg = Debug|Any CPU {4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|x86.ActiveCfg = Debug|Any CPU
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|x86.Build.0 = Debug|Any CPU {4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|x86.Build.0 = Debug|Any CPU
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|Any CPU.ActiveCfg = Release|Any CPU {4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|Any CPU.Build.0 = Release|Any CPU {4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|Any CPU.Build.0 = Release|Any CPU
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|x64.ActiveCfg = Release|Any CPU {4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|ARM.ActiveCfg = Release|Any CPU
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|x64.Build.0 = Release|Any CPU {4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|ARM.Build.0 = Release|Any CPU
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|x86.ActiveCfg = Release|Any CPU {4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|x86.ActiveCfg = Release|Any CPU
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|x86.Build.0 = Release|Any CPU {4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|x86.Build.0 = Release|Any CPU
{DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|x64.ActiveCfg = Debug|Any CPU {DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|ARM.ActiveCfg = Debug|Any CPU
{DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|x64.Build.0 = Debug|Any CPU {DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|ARM.Build.0 = Debug|Any CPU
{DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|x86.ActiveCfg = Debug|Any CPU {DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|x86.ActiveCfg = Debug|x86
{DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|x86.Build.0 = Debug|Any CPU {DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|x86.Build.0 = Debug|x86
{DC074727-72E4-43C5-BAAF-E0D548104797}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC074727-72E4-43C5-BAAF-E0D548104797}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DC074727-72E4-43C5-BAAF-E0D548104797}.Release|Any CPU.Build.0 = Release|Any CPU {DC074727-72E4-43C5-BAAF-E0D548104797}.Release|Any CPU.Build.0 = Release|Any CPU
{DC074727-72E4-43C5-BAAF-E0D548104797}.Release|x64.ActiveCfg = Release|Any CPU {DC074727-72E4-43C5-BAAF-E0D548104797}.Release|ARM.ActiveCfg = Release|Any CPU
{DC074727-72E4-43C5-BAAF-E0D548104797}.Release|x64.Build.0 = Release|Any CPU {DC074727-72E4-43C5-BAAF-E0D548104797}.Release|ARM.Build.0 = Release|Any CPU
{DC074727-72E4-43C5-BAAF-E0D548104797}.Release|x86.ActiveCfg = Release|Any CPU {DC074727-72E4-43C5-BAAF-E0D548104797}.Release|x86.ActiveCfg = Release|x86
{DC074727-72E4-43C5-BAAF-E0D548104797}.Release|x86.Build.0 = Release|Any CPU {DC074727-72E4-43C5-BAAF-E0D548104797}.Release|x86.Build.0 = Release|x86
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Debug|Any CPU.ActiveCfg = Debug|Win32 {E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Debug|Any CPU.ActiveCfg = Debug|Win32
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Debug|x64.ActiveCfg = Debug|x64 {E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Debug|ARM.ActiveCfg = Debug|ARM
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Debug|x64.Build.0 = Debug|x64 {E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Debug|ARM.Build.0 = Debug|ARM
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Debug|x86.ActiveCfg = Debug|Win32 {E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Debug|x86.ActiveCfg = Debug|Win32
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Debug|x86.Build.0 = Debug|Win32 {E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Debug|x86.Build.0 = Debug|Win32
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Release|Any CPU.ActiveCfg = Release|Win32 {E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Release|Any CPU.ActiveCfg = Release|Win32
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Release|x64.ActiveCfg = Release|x64 {E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Release|ARM.ActiveCfg = Release|ARM
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Release|x64.Build.0 = Release|x64 {E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Release|ARM.Build.0 = Release|ARM
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Release|x86.ActiveCfg = Release|Win32 {E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Release|x86.ActiveCfg = Release|Win32
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Release|x86.Build.0 = Release|Win32 {E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Release|x86.Build.0 = Release|Win32
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|Any CPU.Build.0 = Debug|Any CPU {C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|x64.ActiveCfg = Debug|Any CPU {C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|ARM.ActiveCfg = Debug|Any CPU
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|x64.Build.0 = Debug|Any CPU {C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|ARM.Build.0 = Debug|Any CPU
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|x86.ActiveCfg = Debug|Any CPU {C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|x86.ActiveCfg = Debug|Any CPU
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|x86.Build.0 = Debug|Any CPU {C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|x86.Build.0 = Debug|Any CPU
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|Any CPU.ActiveCfg = Release|Any CPU {C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|Any CPU.Build.0 = Release|Any CPU {C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|Any CPU.Build.0 = Release|Any CPU
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|x64.ActiveCfg = Release|Any CPU {C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|ARM.ActiveCfg = Release|Any CPU
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|x64.Build.0 = Release|Any CPU {C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|ARM.Build.0 = Release|Any CPU
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|x86.ActiveCfg = Release|Any CPU {C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|x86.ActiveCfg = Release|Any CPU
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|x86.Build.0 = Release|Any CPU {C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|x86.Build.0 = Release|Any CPU
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|Any CPU.Build.0 = Debug|Any CPU {F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|x64.ActiveCfg = Debug|Any CPU {F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|ARM.ActiveCfg = Debug|Any CPU
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|x64.Build.0 = Debug|Any CPU {F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|ARM.Build.0 = Debug|Any CPU
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|x86.ActiveCfg = Debug|Any CPU {F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|x86.ActiveCfg = Debug|Any CPU
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|x86.Build.0 = Debug|Any CPU {F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|x86.Build.0 = Debug|Any CPU
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|Any CPU.ActiveCfg = Release|Any CPU {F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|Any CPU.Build.0 = Release|Any CPU {F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|Any CPU.Build.0 = Release|Any CPU
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|x64.ActiveCfg = Release|Any CPU {F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|ARM.ActiveCfg = Release|Any CPU
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|x64.Build.0 = Release|Any CPU {F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|ARM.Build.0 = Release|Any CPU
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|x86.ActiveCfg = Release|Any CPU {F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|x86.ActiveCfg = Release|Any CPU
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|x86.Build.0 = Release|Any CPU {F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|x86.Build.0 = Release|Any CPU
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|x64.ActiveCfg = Debug|Any CPU {26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|ARM.ActiveCfg = Debug|Any CPU
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|x64.Build.0 = Debug|Any CPU {26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|ARM.Build.0 = Debug|Any CPU
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|x86.ActiveCfg = Debug|Any CPU {26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|x86.ActiveCfg = Debug|x86
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|x86.Build.0 = Debug|Any CPU {26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|x86.Build.0 = Debug|x86
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Release|Any CPU.Build.0 = Release|Any CPU {26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Release|Any CPU.Build.0 = Release|Any CPU
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Release|x64.ActiveCfg = Release|Any CPU {26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Release|ARM.ActiveCfg = Release|Any CPU
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Release|x64.Build.0 = Release|Any CPU {26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Release|ARM.Build.0 = Release|Any CPU
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Release|x86.ActiveCfg = Release|Any CPU {26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Release|x86.ActiveCfg = Release|x86
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Release|x86.Build.0 = Release|Any CPU {26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Release|x86.Build.0 = Release|x86
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Debug|Any CPU.ActiveCfg = Debug|Win32
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Debug|ARM.ActiveCfg = Debug|ARM
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Debug|ARM.Build.0 = Debug|ARM
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Debug|x86.ActiveCfg = Debug|Win32
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Debug|x86.Build.0 = Debug|Win32
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Release|Any CPU.ActiveCfg = Release|Win32
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Release|ARM.ActiveCfg = Release|ARM
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Release|ARM.Build.0 = Release|ARM
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Release|x86.ActiveCfg = Release|Win32
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Release|x86.Build.0 = Release|Win32
{8D333AF6-E901-4301-B3EE-923088E81062}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D333AF6-E901-4301-B3EE-923088E81062}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D333AF6-E901-4301-B3EE-923088E81062}.Debug|ARM.ActiveCfg = Debug|Any CPU
{8D333AF6-E901-4301-B3EE-923088E81062}.Debug|ARM.Build.0 = Debug|Any CPU
{8D333AF6-E901-4301-B3EE-923088E81062}.Debug|x86.ActiveCfg = Debug|x86
{8D333AF6-E901-4301-B3EE-923088E81062}.Debug|x86.Build.0 = Debug|x86
{8D333AF6-E901-4301-B3EE-923088E81062}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8D333AF6-E901-4301-B3EE-923088E81062}.Release|Any CPU.Build.0 = Release|Any CPU
{8D333AF6-E901-4301-B3EE-923088E81062}.Release|ARM.ActiveCfg = Release|Any CPU
{8D333AF6-E901-4301-B3EE-923088E81062}.Release|ARM.Build.0 = Release|Any CPU
{8D333AF6-E901-4301-B3EE-923088E81062}.Release|x86.ActiveCfg = Release|x86
{8D333AF6-E901-4301-B3EE-923088E81062}.Release|x86.Build.0 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5FAD9D1A-D291-492A-956A-94422761AA8E}
EndGlobalSection
EndGlobal EndGlobal

View File

@@ -48,6 +48,10 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.4\lib\net40\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.13.0.4\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private> <Private>True</Private>
@@ -70,6 +74,7 @@
<Compile Include="PriFileNative.cs" /> <Compile Include="PriFileNative.cs" />
<Compile Include="PriReader.cs" /> <Compile Include="PriReader.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Utils.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\DataUtils\DataUtils.csproj"> <ProjectReference Include="..\DataUtils\DataUtils.csproj">

File diff suppressed because it is too large Load Diff

View File

@@ -20,6 +20,8 @@ namespace NativeWrappers
using UINT64 = System.UInt64; using UINT64 = System.UInt64;
using HRESULT = System.Int32; using HRESULT = System.Int32;
using ULONG = System.UInt32; using ULONG = System.UInt32;
using System.Collections.Generic;
using System.Linq;
public static class PackageReadHelper public static class PackageReadHelper
{ {
@@ -304,6 +306,7 @@ namespace NativeWrappers
{ {
} }
} }
// ================= Manifest Reader ================= // ================= Manifest Reader =================
[DllImport (DllName, CallingConvention = CallConv, CharSet = CharSet.Unicode)] [DllImport (DllName, CallingConvention = CallConv, CharSet = CharSet.Unicode)]
@@ -404,5 +407,160 @@ namespace NativeWrappers
[DllImport (DllName, CallingConvention = CallConv, CharSet = CharSet.Unicode)] [DllImport (DllName, CallingConvention = CallConv, CharSet = CharSet.Unicode)]
public static extern IntPtr GetManifestPrerequistieSystemVersionName (IntPtr hReader, string lpName); public static extern IntPtr GetManifestPrerequistieSystemVersionName (IntPtr hReader, string lpName);
// ========== Appx Bundle Resource Packages ==========
[DllImport (DllName, CallingConvention = CallConv)]
private static extern IntPtr GetAppxBundleAllResourcePackageFileNames (IntPtr hReader);
[DllImport (DllName, CallingConvention = CallConv)]
private static extern void FreeAppxBundlePayloadsFileNameList (IntPtr hStringList);
/// <summary>
/// 获取 Bundle 包中所有资源包的文件名列表。
/// </summary>
/// <param name="hReader">由 CreatePackageReader 创建的读取器句柄</param>
/// <returns>资源包文件名数组,若无资源包或非 bundle 类型则返回空数组</returns>
public static string [] GetAppxBundleAllResourcePackageFileNameList (IntPtr hReader)
{
IntPtr hList = GetAppxBundleAllResourcePackageFileNames (hReader);
if (hList == IntPtr.Zero)
return new string [0];
try
{
return ReadWStringList (hList);
}
finally
{
FreeAppxBundlePayloadsFileNameList (hList);
}
}
[DllImport (DllName, CallingConvention = CallConv)]
private static extern IntPtr GetAppxBundleAllLocaleResourcePackageFileNames (IntPtr hReader);
/// <summary>
/// 获取 Bundle 包中所有区域设置资源包的文件名列表。
/// </summary>
/// <param name="hReader">由 CreatePackageReader 创建的读取器句柄</param>
/// <returns>区域设置资源包文件名数组,若无则返回空数组</returns>
public static string [] GetAppxBundleAllLocaleResourcePackageFileNameList (IntPtr hReader)
{
IntPtr hList = GetAppxBundleAllLocaleResourcePackageFileNames (hReader);
if (hList == IntPtr.Zero)
return new string [0];
try
{
return ReadWStringList (hList);
}
finally
{
FreeAppxBundlePayloadsFileNameList (hList);
}
}
[DllImport (DllName, CallingConvention = CallConv)]
private static extern IntPtr GetAppxBundleAllFileResourcePackageFileNames (IntPtr hReader);
/// <summary>
/// 获取 Bundle 包中所有文件资源包的文件名列表。
/// </summary>
/// <param name="hReader">由 CreatePackageReader 创建的读取器句柄</param>
/// <returns>文件资源包文件名数组,若无则返回空数组</returns>
public static string [] GetAppxBundleAllFileResourcePackageFileNameList (IntPtr hReader)
{
IntPtr hList = GetAppxBundleAllFileResourcePackageFileNames (hReader);
if (hList == IntPtr.Zero)
return new string [0];
try
{
return ReadWStringList (hList);
}
finally
{
FreeAppxBundlePayloadsFileNameList (hList);
}
}
// 用于更新应用项名称列表(设置要查询的项)
[DllImport (DllName, CallingConvention = CallConv, CharSet = CharSet.Unicode)]
public static extern void UpdatePackageApplicationItemGetName (
[In] IntPtr [] lpNames, // 传入一个 IntPtr 数组,每个元素指向一个 Unicode 字符串
uint dwArrLen
);
// 回调委托声明
[UnmanagedFunctionPointer (CallConv)]
public delegate void IterWStringCallback ([MarshalAs (UnmanagedType.LPWStr)] string lpString);
// 枚举当前列表中的项(通过回调逐个返回)
[DllImport (DllName, CallingConvention = CallConv, CharSet = CharSet.Unicode)]
public static extern void GetPackageApplicationItemGetNameList (
IterWStringCallback pfCallback // 回调函数指针
);
/// <summary>
/// 更新内部的应用项名称列表(设置要查询的项)
/// </summary>
/// <param name="names">要设置的项名称集合</param>
public static void SetApplicationItemNames (IEnumerable<string> names)
{
if (names == null)
{
// 传入空数组,清空列表
UpdatePackageApplicationItemGetName (new IntPtr [0], 0);
return;
}
var nameList = names.ToList ();
if (nameList.Count == 0)
{
UpdatePackageApplicationItemGetName (new IntPtr [0], 0);
return;
}
// 为每个字符串分配非托管内存
IntPtr [] ptrs = new IntPtr [nameList.Count];
try
{
for (int i = 0; i < nameList.Count; i++)
{
ptrs [i] = Marshal.StringToHGlobalUni (nameList [i]);
}
UpdatePackageApplicationItemGetName (ptrs, (uint)nameList.Count);
}
finally
{
// 释放分配的内存
foreach (var ptr in ptrs)
{
if (ptr != IntPtr.Zero)
Marshal.FreeHGlobal (ptr);
}
}
}
/// <summary>
/// 获取当前内部的应用项名称列表(通过回调收集所有项)
/// </summary>
/// <returns>应用项名称数组</returns>
public static string [] GetApplicationItemNames ()
{
var result = new List<string> ();
// 定义回调:将收到的字符串添加到列表
IterWStringCallback callback = (str) =>
{
if (!string.IsNullOrEmpty (str))
result.Add (str);
};
// 调用本机函数,传入委托
GetPackageApplicationItemGetNameList (callback);
// 注意GC 需要保持 callback 的存活直到本机调用结束,这里通过局部变量引用即可,
// 因为本机函数是同步调用的,不会在函数返回后继续使用回调。
return result.ToArray ();
}
} }
} }

67
AppxPackage/Utils.cs Normal file
View File

@@ -0,0 +1,67 @@
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
internal static class Utils
{
public static string PascalToCamel (string pascalCase)
{
if (string.IsNullOrEmpty (pascalCase))
return pascalCase;
// 已经是小驼峰或首字母小写,直接返回
if (char.IsLower (pascalCase [0]))
return pascalCase;
// 按大写字母边界拆分单词(处理连续大写字母作为一个单词)
// 正则解释:
// (?<=[a-z])(?=[A-Z]) 小写后跟大写 -> 分割
// | 或
// (?<=[A-Z])(?=[A-Z][a-z]) 大写后跟大写+小写(如 XMLR 中的 X 和 MLR-> 分割
string [] words = Regex.Split (pascalCase, @"(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])");
StringBuilder result = new StringBuilder ();
for (int i = 0; i < words.Length; i++)
{
string word = words [i];
if (string.IsNullOrEmpty (word))
continue;
if (i == 0)
{
// 第一个单词:全部转为小写
result.Append (word.ToLowerInvariant ());
}
else
{
// 后续单词:首字母大写,其余小写
result.Append (char.ToUpperInvariant (word [0]));
if (word.Length > 1)
result.Append (word.Substring (1).ToLowerInvariant ());
}
}
return result.ToString ();
}
/// <summary>
/// 表示应用清单中用于定义文件/资源路径的属性名称
/// </summary>
public static readonly List<string> AppFileProperties = new List<string>
{
"Executable",
"LockScreenLogo",
"Logo",
"SmallLogo",
"Square150x150Logo",
"Square30x30Logo",
"Square310x310Logo",
"Square44x44Logo",
"Square70x70Logo",
"Square71x71Logo",
"StartPage",
"Tall150x310Logo",
"WideLogo",
"Wide310x150Logo"
};
}

View File

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Newtonsoft.Json" version="13.0.4" targetFramework="net40" /> <package id="Newtonsoft.Json" version="13.0.4" targetFramework="net40" />
<package id="SharpZipLib" version="0.86.0" targetFramework="net40" />
</packages> </packages>

62
ArmBuild.ps1 Normal file
View File

@@ -0,0 +1,62 @@
# ArmBuild.ps1
$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
$staging = Join-Path $root "_staging"
$outZip = Join-Path $root "ArmPackage.zip"
$packageFolderName = "Desktop App Installer"
$destRoot = Join-Path $staging $packageFolderName
function Copy-Binaries-ToDest($src, $dest)
{
if (!(Test-Path $src)) { return }
Get-ChildItem $src -File | Where-Object {
$_.Extension -in ".exe", ".dll"
} | ForEach-Object {
Copy-Item -Path $_.FullName -Destination $dest -Force
}
}
Write-Host "Preparing staging..."
# 清理旧的 staging
if (Test-Path $staging) { Remove-Item $staging -Recurse -Force }
New-Item $destRoot -ItemType Directory | Out-Null
# ① 先放 Release
Copy-Binaries-ToDest (Join-Path $root "Release") $destRoot
# ② 再放 ARM\Release覆盖同名
Copy-Binaries-ToDest (Join-Path $root "ARM\Release") $destRoot
# ③ shared 全部铺到 Desktop App Installer 里
$shared = Join-Path $root "shared"
if (Test-Path $shared) {
Get-ChildItem $shared -Recurse | ForEach-Object {
$relativePath = $_.FullName.Substring($shared.Length).TrimStart('\')
$destinationPath = Join-Path $destRoot $relativePath
if ($_.PSIsContainer) {
if (!(Test-Path $destinationPath)) {
New-Item -Path $destinationPath -ItemType Directory | Out-Null
}
} else {
$parentDir = Split-Path $destinationPath -Parent
if (!(Test-Path $parentDir)) {
New-Item -Path $parentDir -ItemType Directory | Out-Null
}
Copy-Item -Path $_.FullName -Destination $destinationPath -Force
}
}
}
Write-Host "Creating ZIP..."
if (Test-Path $outZip) { Remove-Item $outZip -Force }
# 压缩 _staging 下的 Desktop App Installer 文件夹
Compress-Archive -Path $destRoot -DestinationPath $outZip -CompressionLevel Optimal
# 清理 staging
Remove-Item $staging -Recurse -Force
Write-Host "Done: $outZip"

10
ArmDesktopSdk.props Normal file
View File

@@ -0,0 +1,10 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup Condition="'$(Platform)'=='ARM'">
<ClCompile>
<PreprocessorDefinitions>_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM'">
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
</PropertyGroup>
</Project>

View File

@@ -11,6 +11,8 @@ using ModernNotice;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Linq;
using System.Collections.Generic;
namespace Bridge namespace Bridge
{ {
@@ -762,6 +764,44 @@ namespace Bridge
} }
public bool AddApplicationItem (string itemName) => PackageReader.AddApplicationItem (itemName); public bool AddApplicationItem (string itemName) => PackageReader.AddApplicationItem (itemName);
public bool RemoveApplicationItem (string itemName) => PackageReader.RemoveApplicationItem (itemName); public bool RemoveApplicationItem (string itemName) => PackageReader.RemoveApplicationItem (itemName);
private List<object> JsArrayToList (object jsArray)
{
var result = new List<object> ();
if (jsArray == null)
return result;
// JS Array 有 length 属性和数字索引器
var type = jsArray.GetType ();
int length = (int)type.InvokeMember (
"length",
BindingFlags.GetProperty,
null,
jsArray,
null);
for (int i = 0; i < length; i++)
{
object value = type.InvokeMember (
i.ToString (),
BindingFlags.GetProperty,
null,
jsArray,
null);
result.Add (value);
}
return result;
}
public void UpdateApplicationItems (object items)
{
var stritems = JsArrayToList (items).Select (e => e?.ToString ()).ToList ();
PackageReader.UpdateApplicationItems (stritems);
}
public string [] GetApplicationItems () => PackageReader.GetApplicationItems ();
public string GetApplicationItemsToJson () => JsonConvert.SerializeObject (GetApplicationItems ());
// Cache about // Cache about
private const int MaxCacheItems = 64; // 最大缓存数量 private const int MaxCacheItems = 64; // 最大缓存数量
private static readonly TimeSpan CacheDuration = TimeSpan.FromMinutes (30); private static readonly TimeSpan CacheDuration = TimeSpan.FromMinutes (30);
@@ -895,6 +935,8 @@ namespace Bridge
public _I_System System => system; public _I_System System => system;
public _I_Notice Notice => new _I_Notice (); public _I_Notice Notice => new _I_Notice ();
public _I_Process Process => proc; public _I_Process Process => proc;
public _I_Web Web => new _I_Web ();
public _I_Utilities Utilities => new _I_Utilities ();
public string CmdArgs public string CmdArgs
{ {
get get

816
DataUtils/Calendar.cs Normal file
View File

@@ -0,0 +1,816 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Runtime.InteropServices;
using System.Linq;
using System.Reflection;
namespace DataUtils
{
[ComVisible (true)]
[ClassInterface (ClassInterfaceType.AutoDual)]
public class _I_Calendar
{
private DateTime _utcDateTime; // 存储 UTC 时间(所有算术的基础)
private Calendar _calendar; // 当前日历系统
private TimeZoneInfo _timeZone; // 当前时区
private bool _is24HourClock; // true = 24小时制false = 12小时制
private List<string> _languages; // 语言优先级列表
private string _numeralSystem = "Latn"; // 数字系统(简化实现,仅存储)
private const long TicksPerNanosecond = 100; // 1 tick = 100 ns
// 缓存的本地时间(根据时区从 _utcDateTime 转换得到)
private DateTime _localDateTime;
// 更新本地时间(当 UTC 时间或时区改变时调用)
private void UpdateLocalDateTime ()
{
_localDateTime = TimeZoneInfo.ConvertTimeFromUtc (_utcDateTime, _timeZone);
}
// 当本地时间被修改后,同步回 UTC 时间
private void UpdateUtcDateTime ()
{
_utcDateTime = TimeZoneInfo.ConvertTimeToUtc (_localDateTime, _timeZone);
}
// 辅助:日历字段的读取
private int GetCalendarField (Func<Calendar, DateTime, int> fieldGetter)
{
return fieldGetter (_calendar, _localDateTime);
}
// 辅助:日历字段的设置(返回新的本地时间)
private DateTime SetCalendarField (DateTime currentLocal, Func<Calendar, DateTime, int, DateTime> fieldSetter, int value)
{
return fieldSetter (_calendar, currentLocal, value);
}
// 根据日历标识符创建日历实例
private static Calendar CreateCalendar (string calendarId)
{
switch (calendarId)
{
case "GregorianCalendar":
return new GregorianCalendar ();
case "HebrewCalendar":
return new HebrewCalendar ();
case "HijriCalendar":
return new HijriCalendar ();
case "JapaneseCalendar":
return new JapaneseCalendar ();
case "KoreanCalendar":
return new KoreanCalendar ();
case "TaiwanCalendar":
return new TaiwanCalendar ();
case "ThaiBuddhistCalendar":
return new ThaiBuddhistCalendar ();
case "UmAlQuraCalendar":
return new UmAlQuraCalendar ();
// 可根据需要增加更多日历
default:
return new GregorianCalendar ();
}
}
private _I_Language GetFormatCulture ()
{
if (_languages == null || _languages.Count == 0)
return new _I_Language (CultureInfo.CurrentCulture.Name);
try
{
return new _I_Language (_languages [0]);
}
catch
{
return new _I_Language (CultureInfo.CurrentCulture.Name);
}
}
private List<object> JsArrayToList (object jsArray)
{
var result = new List<object> ();
if (jsArray == null)
return result;
// JS Array 有 length 属性和数字索引器
var type = jsArray.GetType ();
int length = (int)type.InvokeMember (
"length",
BindingFlags.GetProperty,
null,
jsArray,
null);
for (int i = 0; i < length; i++)
{
object value = type.InvokeMember (
i.ToString (),
BindingFlags.GetProperty,
null,
jsArray,
null);
result.Add (value);
}
return result;
}
public _I_Calendar ()
: this (new List<string> { CultureInfo.CurrentCulture.Name },
"GregorianCalendar", "24HourClock", TimeZoneInfo.Local.Id)
{
}
public _I_Calendar (object languages)
: this (languages, "GregorianCalendar", "24HourClock", TimeZoneInfo.Local.Id)
{
}
public _I_Calendar (object languages, string calendar, string clock)
: this (languages, calendar, clock, TimeZoneInfo.Local.Id)
{
}
public _I_Calendar (object languages, string calendar, string clock, string timeZoneId)
{
_languages = languages == null ? new List<string> () : new List<string> (JsArrayToList (languages).Select (e => e as string));
if (_languages.Count == 0)
_languages.Add (CultureInfo.CurrentCulture.Name);
_calendar = CreateCalendar (calendar);
_is24HourClock = (clock == "24HourClock");
_timeZone = TimeZoneInfo.FindSystemTimeZoneById (timeZoneId);
_utcDateTime = DateTime.UtcNow;
UpdateLocalDateTime ();
}
public int Day
{
get
{
return _calendar.GetDayOfMonth (_localDateTime);
}
set
{
int currentDay = _calendar.GetDayOfMonth (_localDateTime);
if (value == currentDay) return;
// 通过加减天数来设置日期
DateTime newLocal = _calendar.AddDays (_localDateTime, value - currentDay);
_localDateTime = newLocal;
UpdateUtcDateTime ();
}
}
public int DayOfWeek
{
get
{
// 返回 0-60 表示星期日
return (int)_calendar.GetDayOfWeek (_localDateTime);
}
}
public int Era
{
get
{
return _calendar.GetEra (_localDateTime);
}
set
{
// 更改纪元较复杂,简化:仅当值不同时不做任何操作(可根据需求实现)
// 这里忽略设置,或者可以抛出 NotSupportedException
if (value != Era)
throw new NotSupportedException ("Setting Era directly is not supported in this implementation.");
}
}
public int FirstDayInThisMonth
{
get { return 1; }
}
public int FirstEra
{
get { return _calendar.GetEra (_calendar.MinSupportedDateTime); }
}
public int FirstHourInThisPeriod
{
get
{
if (_is24HourClock)
return 0;
else
return (Period == 0) ? 1 : 13;
}
}
public int FirstMinuteInThisHour
{
get { return 0; }
}
public int FirstMonthInThisYear
{
get { return 1; }
}
public int FirstPeriodInThisDay
{
get { return 0; } // 0 = AM
}
public int FirstSecondInThisMinute
{
get { return 0; }
}
public int FirstYearInThisEra
{
get
{
DateTime eraStart = _calendar.MinSupportedDateTime;
int targetEra = Era;
while (_calendar.GetEra (eraStart) != targetEra && eraStart < DateTime.MaxValue)
{
eraStart = _calendar.AddYears (eraStart, 1);
}
return _calendar.GetYear (eraStart);
}
}
public int Hour
{
get
{
int hour24 = _calendar.GetHour (_localDateTime);
if (_is24HourClock)
return hour24;
int hour12 = hour24 % 12;
return (hour12 == 0) ? 12 : hour12;
}
set
{
if (_is24HourClock)
{
if (value < 0 || value > 23)
throw new ArgumentOutOfRangeException (nameof (value), "Hour must be between 0 and 23 for 24-hour clock.");
DateTime newLocal = _localDateTime.Date.AddHours (value).AddMinutes (Minute).AddSeconds (Second);
_localDateTime = newLocal;
}
else
{
if (value < 1 || value > 12)
throw new ArgumentOutOfRangeException (nameof (value), "Hour must be between 1 and 12 for 12-hour clock.");
int hour24 = value % 12;
if (Period == 1) hour24 += 12;
DateTime newLocal = _localDateTime.Date.AddHours (hour24).AddMinutes (Minute).AddSeconds (Second);
_localDateTime = newLocal;
}
UpdateUtcDateTime ();
}
}
public bool IsDaylightSavingTime
{
get { return _timeZone.IsDaylightSavingTime (_localDateTime); }
}
public _I_List Languages
{
get { return new _I_List (_languages.AsReadOnly ().Select (e => (object)e), true) ; }
}
public int LastDayInThisMonth
{
get { return _calendar.GetDaysInMonth (_calendar.GetYear (_localDateTime), _calendar.GetMonth (_localDateTime)); }
}
public int LastEra
{
get { return _calendar.GetEra (_calendar.MaxSupportedDateTime); }
}
public int LastHourInThisPeriod
{
get
{
if (_is24HourClock)
return 23;
else
return (Period == 0) ? 11 : 23;
}
}
public int LastMinuteInThisHour
{
get { return 59; }
}
public int LastMonthInThisYear
{
get { return _calendar.GetMonthsInYear (_calendar.GetYear (_localDateTime)); }
}
public int LastPeriodInThisDay
{
get { return 1; } // 1 = PM
}
public int LastSecondInThisMinute
{
get { return 59; }
}
public int LastYearInThisEra
{
get
{
DateTime eraEnd = _calendar.MaxSupportedDateTime;
int targetEra = Era;
while (_calendar.GetEra (eraEnd) != targetEra && eraEnd > DateTime.MinValue)
{
eraEnd = _calendar.AddYears (eraEnd, -1);
}
return _calendar.GetYear (eraEnd);
}
}
public int Minute
{
get { return _calendar.GetMinute (_localDateTime); }
set
{
if (value < 0 || value > 59)
throw new ArgumentOutOfRangeException (nameof (value), "Minute must be between 0 and 59.");
DateTime newLocal = _localDateTime.AddMinutes (value - _calendar.GetMinute (_localDateTime));
_localDateTime = newLocal;
UpdateUtcDateTime ();
}
}
public int Month
{
get { return _calendar.GetMonth (_localDateTime); }
set
{
if (value < 1 || value > _calendar.GetMonthsInYear (_calendar.GetYear (_localDateTime)))
throw new ArgumentOutOfRangeException (nameof (value), "Month is out of range for current year.");
DateTime newLocal = SetCalendarField (_localDateTime, (cal, dt, val) => cal.AddMonths (dt, val - cal.GetMonth (dt)), value);
_localDateTime = newLocal;
UpdateUtcDateTime ();
}
}
public int Nanosecond
{
get
{
long ticksInSecond = _localDateTime.Ticks % TimeSpan.TicksPerSecond;
return (int)(ticksInSecond * 100); // 1 tick = 100 ns
}
set
{
if (value < 0 || value > 999999999)
throw new ArgumentOutOfRangeException (nameof (value), "Nanosecond must be between 0 and 999,999,999.");
long ticks = (_localDateTime.Ticks / TimeSpan.TicksPerSecond) * TimeSpan.TicksPerSecond + (value / 100);
_localDateTime = new DateTime (ticks, _localDateTime.Kind);
UpdateUtcDateTime ();
}
}
public int NumberOfDaysInThisMonth
{
get { return LastDayInThisMonth; }
}
public int NumberOfEras
{
get { return _calendar.Eras.Length; }
}
public int NumberOfHoursInThisPeriod
{
get { return _is24HourClock ? 24 : 12; }
}
public int NumberOfMinutesInThisHour
{
get { return 60; }
}
public int NumberOfMonthsInThisYear
{
get { return _calendar.GetMonthsInYear (_calendar.GetYear (_localDateTime)); }
}
public int NumberOfPeriodsInThisDay
{
get { return 2; }
}
public int NumberOfSecondsInThisMinute
{
get { return 60; }
}
public int NumberOfYearsInThisEra
{
get { return LastYearInThisEra - FirstYearInThisEra + 1; }
}
public string NumeralSystem
{
get { return _numeralSystem; }
set { _numeralSystem = value; } // 简化:未实现实际数字转换
}
public int Period
{
get
{
int hour24 = _calendar.GetHour (_localDateTime);
return (hour24 >= 12) ? 1 : 0;
}
set
{
if (value != 0 && value != 1)
throw new ArgumentOutOfRangeException (nameof (value), "Period must be 0 (AM) or 1 (PM).");
int currentPeriod = Period;
if (currentPeriod == value) return;
// 切换 AM/PM加减 12 小时
DateTime newLocal = _localDateTime.AddHours (value == 0 ? -12 : 12);
_localDateTime = newLocal;
UpdateUtcDateTime ();
}
}
public string ResolvedLanguage
{
get
{
if (_languages != null && _languages.Count > 0)
return _languages [0];
return CultureInfo.CurrentCulture.Name;
}
}
public int Second
{
get { return _calendar.GetSecond (_localDateTime); }
set
{
if (value < 0 || value > 59)
throw new ArgumentOutOfRangeException (nameof (value), "Second must be between 0 and 59.");
DateTime newLocal = _localDateTime.AddSeconds (value - _calendar.GetSecond (_localDateTime));
_localDateTime = newLocal;
UpdateUtcDateTime ();
}
}
public int Year
{
get { return _calendar.GetYear (_localDateTime); }
set
{
if (value < _calendar.GetYear (_calendar.MinSupportedDateTime) || value > _calendar.GetYear (_calendar.MaxSupportedDateTime))
throw new ArgumentOutOfRangeException (nameof (value), "Year is out of range for this calendar.");
DateTime newLocal = SetCalendarField (_localDateTime, (cal, dt, val) => cal.AddYears (dt, val - cal.GetYear (dt)), value);
_localDateTime = newLocal;
UpdateUtcDateTime ();
}
}
public void AddDays (int days)
{
_localDateTime = _calendar.AddDays (_localDateTime, days);
UpdateUtcDateTime ();
}
public void AddEras (int eras)
{
// 简化:每个纪元按 1000 年估算(实际应基于日历的纪元范围)
// 大多数情况下不应频繁使用此方法
_localDateTime = _calendar.AddYears (_localDateTime, eras * 1000);
UpdateUtcDateTime ();
}
public void AddHours (int hours)
{
_localDateTime = _localDateTime.AddHours (hours);
UpdateUtcDateTime ();
}
public void AddMinutes (int minutes)
{
_localDateTime = _localDateTime.AddMinutes (minutes);
UpdateUtcDateTime ();
}
public void AddMonths (int months)
{
_localDateTime = _calendar.AddMonths (_localDateTime, months);
UpdateUtcDateTime ();
}
public void AddNanoseconds (int nanoseconds)
{
long ticksToAdd = nanoseconds / 100;
_localDateTime = _localDateTime.AddTicks (ticksToAdd);
UpdateUtcDateTime ();
}
public void AddPeriods (int periods)
{
_localDateTime = _localDateTime.AddHours (periods * 12);
UpdateUtcDateTime ();
}
public void AddSeconds (int seconds)
{
_localDateTime = _localDateTime.AddSeconds (seconds);
UpdateUtcDateTime ();
}
public void AddWeeks (int weeks)
{
AddDays (weeks * 7);
}
public void AddYears (int years)
{
_localDateTime = _calendar.AddYears (_localDateTime, years);
UpdateUtcDateTime ();
}
public void ChangeCalendarSystem (string calendarId)
{
Calendar newCalendar = CreateCalendar (calendarId);
// 注意:日历改变不会改变绝对时间,但会影响组件(年、月、日等)
// 只需替换日历实例_localDateTime 保持不变(但解释方式变了)
_calendar = newCalendar;
}
public void ChangeClock (string clock)
{
_is24HourClock = (clock == "24HourClock");
}
public void ChangeTimeZone (string timeZoneId)
{
_timeZone = TimeZoneInfo.FindSystemTimeZoneById (timeZoneId);
UpdateLocalDateTime (); // 重新计算本地时间UTC 不变)
}
public _I_Calendar Clone ()
{
var clone = new _I_Calendar (_languages, GetCalendarSystem (), GetClock (), GetTimeZone ());
clone.SetDateTime (GetDateTime ());
return clone;
}
public int Compare (_I_Calendar other)
{
if (other == null) return 1;
return DateTime.Compare (this.GetDateTime (), other.GetDateTime ());
}
public static DateTime JsDateToDateTime (object jsDate)
{
if (jsDate == null)
throw new ArgumentNullException (nameof (jsDate));
Type type = jsDate.GetType ();
double milliseconds = (double)type.InvokeMember (
"getTime",
BindingFlags.InvokeMethod,
null,
jsDate,
null);
DateTimeOffset epoch = new DateTimeOffset (1970, 1, 1, 0, 0, 0, TimeSpan.Zero);
DateTimeOffset dateTimeOffset = epoch.AddMilliseconds (milliseconds);
return dateTimeOffset.UtcDateTime;
}
public int CompareDateTime (object other)
{
return DateTime.Compare (this.GetDateTime (), JsDateToDateTime (other));
}
public void CopyTo (_I_Calendar other)
{
if (other == null) throw new ArgumentNullException (nameof (other));
other._utcDateTime = this._utcDateTime;
other._localDateTime = this._localDateTime;
other._calendar = this._calendar;
other._timeZone = this._timeZone;
other._is24HourClock = this._is24HourClock;
other._languages = new List<string> (this._languages);
other._numeralSystem = this._numeralSystem;
}
public string DayAsPaddedString (int minDigits)
{
return Day.ToString ().PadLeft (minDigits, '0');
}
public string DayAsString ()
{
return Day.ToString ();
}
public string DayOfWeekAsSoloString ()
{
return DayOfWeekAsString ();
}
public string DayOfWeekAsSoloString (int idealLength)
{
// 简化:忽略 idealLength
return DayOfWeekAsString ();
}
public string DayOfWeekAsString ()
{
return _localDateTime.ToString ("dddd", GetFormatCulture ());
}
public string DayOfWeekAsString (int idealLength)
{
return DayOfWeekAsString ();
}
public string EraAsString ()
{
// 简化:返回纪元索引的字符串
return Era.ToString ();
}
public string EraAsString (int idealLength)
{
return EraAsString ();
}
public string GetCalendarSystem ()
{
if (_calendar is GregorianCalendar) return "GregorianCalendar";
if (_calendar is HebrewCalendar) return "HebrewCalendar";
if (_calendar is HijriCalendar) return "HijriCalendar";
if (_calendar is JapaneseCalendar) return "JapaneseCalendar";
if (_calendar is KoreanCalendar) return "KoreanCalendar";
if (_calendar is TaiwanCalendar) return "TaiwanCalendar";
if (_calendar is ThaiBuddhistCalendar) return "ThaiBuddhistCalendar";
if (_calendar is UmAlQuraCalendar) return "UmAlQuraCalendar";
return "GregorianCalendar";
}
public string GetClock ()
{
return _is24HourClock ? "24HourClock" : "12HourClock";
}
public DateTime GetDateTime ()
{
// 返回 UTC 时间
return _utcDateTime;
}
public string GetTimeZone ()
{
return _timeZone.Id;
}
public string HourAsPaddedString (int minDigits)
{
return Hour.ToString ().PadLeft (minDigits, '0');
}
public string HourAsString ()
{
return Hour.ToString ();
}
public string MinuteAsPaddedString (int minDigits)
{
return Minute.ToString ().PadLeft (minDigits, '0');
}
public string MinuteAsString ()
{
return Minute.ToString ();
}
public string MonthAsNumericString ()
{
return Month.ToString ();
}
public string MonthAsPaddedNumericString (int minDigits)
{
return Month.ToString ().PadLeft (minDigits, '0');
}
public string MonthAsSoloString ()
{
return _localDateTime.ToString ("MMMM", GetFormatCulture ());
}
public string MonthAsSoloString (int idealLength)
{
return MonthAsSoloString ();
}
public string MonthAsString ()
{
return _localDateTime.ToString ("MMM", GetFormatCulture ());
}
public string MonthAsString (int idealLength)
{
return MonthAsString ();
}
public string NanosecondAsPaddedString (int minDigits)
{
return Nanosecond.ToString ().PadLeft (minDigits, '0');
}
public string NanosecondAsString ()
{
return Nanosecond.ToString ();
}
public string PeriodAsString ()
{
return PeriodAsString (0);
}
public string PeriodAsString (int idealLength)
{
return _localDateTime.ToString ("tt", GetFormatCulture ());
}
public string SecondAsPaddedString (int minDigits)
{
return Second.ToString ().PadLeft (minDigits, '0');
}
public string SecondAsString ()
{
return Second.ToString ();
}
public void SetDateTime (DateTime value)
{
_utcDateTime = value.ToUniversalTime ();
UpdateLocalDateTime ();
}
public void SetToMax ()
{
SetDateTime (DateTime.MaxValue);
}
public void SetToMin ()
{
SetDateTime (DateTime.MinValue);
}
public void SetToNow ()
{
SetDateTime (DateTime.UtcNow);
}
public string TimeZoneAsString ()
{
return TimeZoneAsString (0);
}
public string TimeZoneAsString (int idealLength)
{
// 简化:返回标准显示名称
return _timeZone.DisplayName;
}
public string YearAsPaddedString (int minDigits)
{
return Year.ToString ().PadLeft (minDigits, '0');
}
public string YearAsString ()
{
return Year.ToString ();
}
public string YearAsTruncatedString (int remainingDigits)
{
string yearStr = Year.ToString ();
if (yearStr.Length <= remainingDigits)
return yearStr;
return yearStr.Substring (yearStr.Length - remainingDigits);
}
}
}

View File

@@ -45,7 +45,10 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Calendar.cs" />
<Compile Include="DateTimeFormat.cs" />
<Compile Include="Download.cs" /> <Compile Include="Download.cs" />
<Compile Include="Enumerable.cs" />
<Compile Include="HResult.cs" /> <Compile Include="HResult.cs" />
<Compile Include="IE.cs" /> <Compile Include="IE.cs" />
<Compile Include="Locale.cs" /> <Compile Include="Locale.cs" />
@@ -61,6 +64,7 @@
<Compile Include="Utils.cs" /> <Compile Include="Utils.cs" />
<Compile Include="Version.cs" /> <Compile Include="Version.cs" />
<Compile Include="VisualElements.cs" /> <Compile Include="VisualElements.cs" />
<Compile Include="Web.cs" />
<Compile Include="WebBrowser.cs" /> <Compile Include="WebBrowser.cs" />
<Compile Include="Window.cs" /> <Compile Include="Window.cs" />
</ItemGroup> </ItemGroup>

494
DataUtils/DateTimeFormat.cs Normal file
View File

@@ -0,0 +1,494 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
namespace DataUtils
{
public enum YearFormat
{
None = 0,
Default = 1,
Abbreviated = 2,
Full = 3,
}
public enum MonthFormat
{
None = 0,
Default = 1,
Abbreviated = 2,
Full = 3,
Numeric = 4,
}
public enum DayFormat
{
None = 0,
Default = 1,
}
public enum DayOfWeekFormat
{
None = 0,
Default = 1,
Abbreviated = 2,
Full = 3,
}
public enum HourFormat
{
None = 0,
Default = 1,
}
public enum MinuteFormat
{
None = 0,
Default = 1,
}
public enum SecondFormat
{
None = 0,
Default = 1,
}
[ComVisible (true)]
[ClassInterface (ClassInterfaceType.AutoDual)]
public class _I_DateTimeFormatter
{
// ---------- 私有字段 ----------
private string _formatTemplate; // 原始模板字符串
private string _formatPattern; // 实际用于 .NET 格式化的模式
private List<string> _languages; // 语言优先级列表
private string _geographicRegion; // 地理区域
private string _calendar = "GregorianCalendar";
private string _clock = "24HourClock";
private string _numeralSystem = "Latn";
private CultureInfo _culture; // 解析后的 CultureInfo
private string _resolvedLanguage; // 实际使用的语言
private string _resolvedGeographicRegion; // 实际使用的区域
// 存储构造时传入的枚举值(用于 IncludeXXX 属性)
private YearFormat _yearFormat = YearFormat.None;
private MonthFormat _monthFormat = MonthFormat.None;
private DayFormat _dayFormat = DayFormat.None;
private DayOfWeekFormat _dayOfWeekFormat = DayOfWeekFormat.None;
private HourFormat _hourFormat = HourFormat.None;
private MinuteFormat _minuteFormat = MinuteFormat.None;
private SecondFormat _secondFormat = SecondFormat.None;
// ---------- 辅助方法 ----------
private static string MapTemplateToPattern (string template, CultureInfo culture, string clock)
{
if (string.IsNullOrEmpty (template))
return string.Empty;
switch (template.ToLowerInvariant ())
{
case "longdate":
return culture.DateTimeFormat.LongDatePattern;
case "shortdate":
return culture.DateTimeFormat.ShortDatePattern;
case "longtime":
return culture.DateTimeFormat.LongTimePattern;
case "shorttime":
return culture.DateTimeFormat.ShortTimePattern;
case "dayofweek":
return culture.DateTimeFormat.ShortestDayNames? [0] ?? "dddd"; // 近似
case "dayofweek.full":
return "dddd";
case "dayofweek.abbreviated":
return "ddd";
case "day":
return "dd";
case "month":
return "MMMM";
case "month.full":
return "MMMM";
case "month.abbreviated":
return "MMM";
case "month.numeric":
return "MM";
case "year":
return "yyyy";
case "year.full":
return "yyyy";
case "year.abbreviated":
return "yy";
case "hour":
return clock == "24HourClock" ? "HH" : "hh";
case "minute":
return "mm";
case "second":
return "ss";
case "timezone":
return "zzz";
default:
// 如果不是预定义模板,则当作自定义模式直接返回
return template;
}
}
// 根据枚举组合构建格式模式
private static string BuildPatternFromEnums (YearFormat year, MonthFormat month, DayFormat day, DayOfWeekFormat dayOfWeek,
HourFormat hour, MinuteFormat minute, SecondFormat second,
string clock, CultureInfo culture)
{
var parts = new List<string> ();
// 日期部分
if (dayOfWeek != DayOfWeekFormat.None)
{
if (dayOfWeek == DayOfWeekFormat.Abbreviated)
parts.Add ("ddd");
else // Full or Default
parts.Add ("dddd");
}
if (year != YearFormat.None)
{
if (year == YearFormat.Abbreviated)
parts.Add ("yy");
else
parts.Add ("yyyy");
}
if (month != MonthFormat.None)
{
switch (month)
{
case MonthFormat.Numeric:
parts.Add ("MM");
break;
case MonthFormat.Abbreviated:
parts.Add ("MMM");
break;
case MonthFormat.Full:
parts.Add ("MMMM");
break;
default:
parts.Add ("MM");
break;
}
}
if (day != DayFormat.None)
{
parts.Add ("dd");
}
string datePart = string.Join (" ", parts);
// 时间部分
var timeParts = new List<string> ();
if (hour != HourFormat.None)
{
if (clock == "24HourClock")
timeParts.Add ("HH");
else
timeParts.Add ("hh");
}
if (minute != MinuteFormat.None)
{
timeParts.Add ("mm");
}
if (second != SecondFormat.None)
{
timeParts.Add ("ss");
}
string timePart = timeParts.Count > 0 ? string.Join (":", timeParts) : "";
if (!string.IsNullOrEmpty (datePart) && !string.IsNullOrEmpty (timePart))
return datePart + " " + timePart;
if (!string.IsNullOrEmpty (datePart))
return datePart;
return timePart;
}
// 将 JS Date 对象转换为 DateTime
private DateTime ConvertJsDateToDateTime (object jsDate)
{
if (jsDate == null)
throw new ArgumentNullException (nameof (jsDate));
Type type = jsDate.GetType ();
// 调用 getTime() 获取毫秒数 (double)
double milliseconds = (double)type.InvokeMember (
"getTime",
BindingFlags.InvokeMethod,
null,
jsDate,
null);
// 手动计算 Unix 纪元转换(兼容低版本 .NET
DateTime epoch = new DateTime (1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
DateTime utcDateTime = epoch.AddMilliseconds (milliseconds);
// 返回本地时间(可根据需求调整)
return utcDateTime.ToLocalTime ();
}
// 初始化文化信息
private void InitializeCulture ()
{
string lang = (_languages != null && _languages.Count > 0) ? _languages [0] : CultureInfo.CurrentCulture.Name;
try
{
_culture = new CultureInfo (lang);
_resolvedLanguage = _culture.Name;
}
catch
{
_culture = CultureInfo.CurrentCulture;
_resolvedLanguage = _culture.Name;
}
_resolvedGeographicRegion = _geographicRegion ?? _culture.Name;
// 根据区域和语言更新格式模式(如果使用模板)
if (!string.IsNullOrEmpty (_formatTemplate))
{
_formatPattern = MapTemplateToPattern (_formatTemplate, _culture, _clock);
}
else if (_yearFormat != YearFormat.None || _monthFormat != MonthFormat.None ||
_dayFormat != DayFormat.None || _dayOfWeekFormat != DayOfWeekFormat.None ||
_hourFormat != HourFormat.None || _minuteFormat != MinuteFormat.None ||
_secondFormat != SecondFormat.None)
{
_formatPattern = BuildPatternFromEnums (_yearFormat, _monthFormat, _dayFormat, _dayOfWeekFormat,
_hourFormat, _minuteFormat, _secondFormat, _clock, _culture);
}
}
// ---------- 构造函数 ----------
public _I_DateTimeFormatter (string formatTemplate)
: this (formatTemplate, null, null, null, null)
{
}
public _I_DateTimeFormatter (string formatTemplate, IEnumerable<string> languages)
: this (formatTemplate, languages, null, null, null)
{
}
public _I_DateTimeFormatter (string formatTemplate, IEnumerable<string> languages, string geographicRegion, string calendar, string clock)
{
_formatTemplate = formatTemplate;
_languages = languages == null ? new List<string> () : new List<string> (languages);
_geographicRegion = geographicRegion;
if (!string.IsNullOrEmpty (calendar))
_calendar = calendar;
if (!string.IsNullOrEmpty (clock))
_clock = clock;
InitializeCulture ();
}
public _I_DateTimeFormatter (YearFormat year, MonthFormat month, DayFormat day, DayOfWeekFormat dayOfWeek)
: this (year, month, day, dayOfWeek, HourFormat.None, MinuteFormat.None, SecondFormat.None, null, null, null, null)
{
}
public _I_DateTimeFormatter (HourFormat hour, MinuteFormat minute, SecondFormat second)
: this (YearFormat.None, MonthFormat.None, DayFormat.None, DayOfWeekFormat.None, hour, minute, second, null, null, null, null)
{
}
public _I_DateTimeFormatter (YearFormat year, MonthFormat month, DayFormat day, DayOfWeekFormat dayOfWeek,
HourFormat hour, MinuteFormat minute, SecondFormat second,
IEnumerable<string> languages)
: this (year, month, day, dayOfWeek, hour, minute, second, languages, null, null, null)
{
}
public _I_DateTimeFormatter (YearFormat year, MonthFormat month, DayFormat day, DayOfWeekFormat dayOfWeek,
HourFormat hour, MinuteFormat minute, SecondFormat second,
IEnumerable<string> languages, string geographicRegion, string calendar, string clock)
{
_yearFormat = year;
_monthFormat = month;
_dayFormat = day;
_dayOfWeekFormat = dayOfWeek;
_hourFormat = hour;
_minuteFormat = minute;
_secondFormat = second;
_languages = languages == null ? new List<string> () : new List<string> (languages);
_geographicRegion = geographicRegion;
if (!string.IsNullOrEmpty (calendar))
_calendar = calendar;
if (!string.IsNullOrEmpty (clock))
_clock = clock;
InitializeCulture ();
}
// ---------- 属性 ----------
public string Calendar
{
get { return _calendar; }
set
{
_calendar = value;
// 日历更改可能需要重新初始化模式,这里简化处理
}
}
public string Clock
{
get { return _clock; }
set
{
_clock = value;
InitializeCulture (); // 重新生成模式(因为小时格式可能变化)
}
}
public string GeographicRegion
{
get { return _geographicRegion; }
set
{
_geographicRegion = value;
InitializeCulture ();
}
}
public int IncludeDay
{
get { return (int)_dayFormat; }
}
public int IncludeDayOfWeek
{
get { return (int)_dayOfWeekFormat; }
}
public int IncludeHour
{
get { return (int)_hourFormat; }
}
public int IncludeMinute
{
get { return (int)_minuteFormat; }
}
public int IncludeMonth
{
get { return (int)_monthFormat; }
}
public int IncludeSecond
{
get { return (int)_secondFormat; }
}
public int IncludeYear
{
get { return (int)_yearFormat; }
}
public _I_List Languages
{
get { return new _I_List (_languages.AsReadOnly ().Select (e => (object)e), true); }
}
public static _I_DateTimeFormatter LongDate
{
get
{
return new _I_DateTimeFormatter ("longdate");
}
}
public static _I_DateTimeFormatter LongTime
{
get
{
return new _I_DateTimeFormatter ("longtime");
}
}
public string NumeralSystem
{
get { return _numeralSystem; }
set { _numeralSystem = value; }
}
public _I_List Patterns
{
get
{
return new _I_List (new List<string> { _formatPattern }.AsReadOnly ().Select (e => (object)e), true);
}
}
public string ResolvedGeographicRegion
{
get { return _resolvedGeographicRegion; }
}
public string ResolvedLanguage
{
get { return _resolvedLanguage; }
}
public static _I_DateTimeFormatter ShortDate
{
get
{
return new _I_DateTimeFormatter ("shortdate");
}
}
public static _I_DateTimeFormatter ShortTime
{
get
{
return new _I_DateTimeFormatter ("shorttime");
}
}
public string Template
{
get
{
if (!string.IsNullOrEmpty (_formatTemplate))
return _formatTemplate;
// 从枚举组合生成模板描述(简化)
return _formatPattern;
}
}
// ---------- 方法 ----------
public string FormatC (DateTime dateTime)
{
return dateTime.ToString (_formatPattern, _culture);
}
public string FormatC (DateTime dateTime, string timeZoneId)
{
if (!string.IsNullOrEmpty (timeZoneId))
{
try
{
TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById (timeZoneId);
DateTime targetTime = TimeZoneInfo.ConvertTime (dateTime, tzi);
return targetTime.ToString (_formatPattern, _culture);
}
catch
{
// 时区无效,回退到原始时间
return dateTime.ToString (_formatPattern, _culture);
}
}
return dateTime.ToString (_formatPattern, _culture);
}
// 为方便 JS 调用,提供接受 object 的重载(自动识别 JS Date
public string Format (object jsDate)
{
DateTime dt = ConvertJsDateToDateTime (jsDate);
return FormatC (dt);
}
public string FormatWithTimeZone (object jsDate, string timeZoneId)
{
DateTime dt = ConvertJsDateToDateTime (jsDate);
return FormatC (dt, timeZoneId);
}
}
}

173
DataUtils/Enumerable.cs Normal file
View File

@@ -0,0 +1,173 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
namespace DataUtils
{
[ComVisible (true)]
[InterfaceType (ComInterfaceType.InterfaceIsDual)]
public interface _I_Enumerable: IDisposable
{
int Length { get; set; }
object this [int index] { get; set; }
void Add (object value); // push
void Push (object value);
object Pop (); // 删除并返回末尾元素
object Shift (); // 删除并返回开头元素
void Unshift (object value); // 在开头插入
void RemoveAt (int index); // 删除任意索引
void Clear (); // 清空数组
_I_Enumerable Slice (int start, int end); // 返回子数组
void Splice (int start, int deleteCount, object [] items); // 删除并插入
int IndexOf (object value); // 查找索引
bool Includes (object value); // 是否包含
void ForEach (object callback, bool suppressExceptions = false); // 遍历callback(item, index)
_I_Enumerable Concat (_I_Enumerable other); // 拼接
string Join (string separator); // 转字符串
object GetItem (int index); // 返回 { key, data } 或直接 data
void SetAt (int index, object value); // 替换元素
int IndexOfKey (int key); // 按内部 key 查找
void Move (int index, int newIndex); // 移动元素
void PushAll (object [] items); // 一次性 push 多个
object Get (int index);
object Set (int index, object value);
object At (int index);
}
public class _I_List: _I_Enumerable, IList
{
public _I_List (IEnumerable<object> initArr, bool readOnly = false, bool fixedSize = false, bool sync = true)
{
_list = initArr?.ToList () ?? new List<object> ();
IsFixedSize = fixedSize;
IsReadOnly = readOnly;
IsSynchronized = sync;
}
public _I_List (bool readOnly = false, bool fixedSize = false, bool sync = true) :
this (null, readOnly, fixedSize, sync)
{ }
protected List<object> _list;
protected object _lock = new object ();
public object this [int index] { get { return _list [index]; } set { _list [index] = value; } }
public int Count => _list.Count;
public bool IsFixedSize { get; }
public bool IsReadOnly { get; }
public bool IsSynchronized { get; }
public int Length
{
get { return _list.Count; }
set
{
if (!IsFixedSize && !IsReadOnly)
{
_list.Capacity = value;
}
}
}
public object SyncRoot => _lock;
public void Add (object value) => _list.Add (value);
public void Push (object value) => _list.Add (value);
public void RemoveAt (int index) => _list.RemoveAt (index);
public void Clear () => _list.Clear ();
public int IndexOf (object value) => _list.IndexOf (value);
int IList.Add (object value)
{
_list.Add (value);
return _list.Count - 1;
}
public bool Contains (object value) => _list.Contains (value);
public void Insert (int index, object value) => _list.Insert (index, value);
public void Remove (object value) => _list.Remove (value);
public void ForEach (object callback, bool suppressExceptions = false)
{
for (int i = 0; i < _list.Count; i++)
{
var item = _list [i];
if (suppressExceptions)
{
try { JsUtils.Call (callback, item, i); } catch { }
}
else JsUtils.Call (callback, item, i);
}
}
public IEnumerator GetEnumerator () => _list.GetEnumerator ();
public _I_Enumerable Slice (int start, int end)
{
if (end < 0) end = _list.Count + end;
start = Math.Max (0, start);
end = Math.Min (_list.Count, end);
var arr = _list.GetRange (start, Math.Max (0, end - start));
return new _I_List (arr);
}
public void Splice (int start, int deleteCount, object [] items)
{
if (start < 0) start = Math.Max (0, _list.Count + start);
int count = Math.Min (deleteCount, _list.Count - start);
_list.RemoveRange (start, count);
if (items != null && items.Length > 0)
_list.InsertRange (start, items);
}
public bool Includes (object value) => _list.Contains (value);
public _I_Enumerable Concat (_I_Enumerable other)
{
var newList = new List<object> (_list);
if (other is _I_List)
newList.AddRange ((other as _I_List)._list);
return new _I_List (newList);
}
public string Join (string separator)
{
return string.Join (separator ?? ",", _list.Select (x => x?.ToString () ?? ""));
}
public object GetItem (int index) => _list [index];
public void SetAt (int index, object value) => _list [index] = value;
public int IndexOfKey (int key)
{
return key >= 0 && key < _list.Count ? key : -1;
}
public void Move (int index, int newIndex)
{
if (index < 0 || index >= _list.Count || newIndex < 0 || newIndex >= _list.Count) return;
var item = _list [index];
_list.RemoveAt (index);
_list.Insert (newIndex, item);
}
public void PushAll (object [] items)
{
if (items == null || items.Length == 0) return;
_list.AddRange (items);
}
public void CopyTo (Array array, int index)
{
if (array == null) throw new ArgumentNullException (nameof (array));
for (int i = 0; i < _list.Count && index + i < array.Length; i++)
array.SetValue (_list [i], index + i);
}
public object Pop ()
{
if (_list.Count == 0) return null;
var last = _list [_list.Count - 1];
_list.RemoveAt (_list.Count - 1);
return last;
}
public object Shift ()
{
if (_list.Count == 0) return null;
var first = _list [0];
_list.RemoveAt (0);
return first;
}
public void Unshift (object value) => _list.Insert (0, value);
public void Dispose ()
{
_list?.Clear ();
_list = null;
}
public object Get (int index) => this [index];
public object Set (int index, object value) => this [index] = value;
public object At (int index) => this [index];
}
}

View File

@@ -1,29 +1,116 @@
using System; using System;
using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using System.Text.RegularExpressions;
namespace DataUtils namespace DataUtils
{ {
internal static class NativeMethods internal static class NativeMethods
{ {
public const int LOCALE_SSHORTESTSCRIPT = 0x0000004F; // 获取四字母脚本代码
public const uint KLF_ACTIVATE = 0x00000001; // 激活键盘布局
// GetLocaleInfoW for LCID-based queries // GetLocaleInfoW for LCID-based queries
[DllImport ("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] [DllImport ("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
public static extern int GetLocaleInfoW (int Locale, int LCType, [Out] StringBuilder lpLCData, int cchData); public static extern int GetLocaleInfoW (int Locale, int LCType, [Out] StringBuilder lpLCData, int cchData);
// GetLocaleInfoEx for locale name based queries // GetLocaleInfoEx for locale name based queries
[DllImport ("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] [DllImport ("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
public static extern int GetLocaleInfoEx (string lpLocaleName, int LCType, [Out] StringBuilder lpLCData, int cchData); public static extern int GetLocaleInfoEx (string lpLocaleName, int LCType, [Out] StringBuilder lpLCData, int cchData);
// LocaleNameToLCID - available on Vista+; fallback is to use CultureInfo // LocaleNameToLCID - available on Vista+; fallback is to use CultureInfo
[DllImport ("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] [DllImport ("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
public static extern int LocaleNameToLCID (string lpName, uint dwFlags); public static extern int LocaleNameToLCID (string lpName, uint dwFlags);
// LCIDToLocaleName (Vista+) // LCIDToLocaleName (Vista+)
[DllImport ("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] [DllImport ("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
public static extern int LCIDToLocaleName (int Locale, [Out] StringBuilder lpName, int cchName, uint dwFlags); public static extern int LCIDToLocaleName (int Locale, [Out] StringBuilder lpName, int cchName, uint dwFlags);
[DllImport ("user32.dll")]
public static extern IntPtr GetKeyboardLayout (uint dwLayout);
[DllImport ("user32.dll", CharSet = CharSet.Auto)]
public static extern IntPtr LoadKeyboardLayout (string pwszKLID, uint Flags);
} }
[ComVisible (true)]
[ClassInterface (ClassInterfaceType.AutoDual)]
public class _I_Language: System.Globalization.CultureInfo
{
public _I_Language (string localeName) : base (localeName) { }
public string AbbreviatedName => this.ThreeLetterISOLanguageName;
public string LanguageTag => this.IetfLanguageTag ?? this.Name;
public int LayoutDirection
{
get
{
if (base.TextInfo.IsRightToLeft) return 1;
string tag = this.LanguageTag;
bool isVerticalCandidate = false;
if (tag != null)
{
var scriptMatch = Regex.Match (tag, @"-([A-Za-z]{4})(?:-|$)");
if (scriptMatch.Success)
{
string script = scriptMatch.Groups [1].Value;
if (script == "Hani" || script == "Hira" || script == "Kana" || script == "Jpan" || script == "Kore" || script == "Hans" || script == "Hant")
isVerticalCandidate = true;
}
if (!isVerticalCandidate)
{
var regionMatch = Regex.Match (tag, @"-([A-Za-z]{2})$");
if (regionMatch.Success)
{
string region = regionMatch.Groups [1].Value.ToUpperInvariant ();
if (region == "JP" || region == "CN" || region == "TW" || region == "HK" || region == "MO" || region == "KR")
isVerticalCandidate = true;
}
}
}
if (isVerticalCandidate)
{
return 2;
}
return 0;
}
}
public string Script
{
get
{
StringBuilder sb = new StringBuilder (10);
if (NativeMethods.GetLocaleInfoEx (this.Name, NativeMethods.LOCALE_SSHORTESTSCRIPT, sb, sb.Capacity) > 0)
return sb.ToString ();
// 如果失败,尝试从语言标记中解析脚本子标记(如 "zh-Hans-CN" 中的 "Hans"
var match = Regex.Match (this.Name, @"-([A-Za-z]{4})(?:-|$)");
if (match.Success)
return match.Groups [1].Value;
return "Unknown";
}
}
public _I_List GetExtensionSubtags (string singleton)
{
if (string.IsNullOrEmpty (singleton) || singleton.Length != 1)
throw new ArgumentException ("Singleton must be a single character", nameof (singleton));
var subtags = new List<string> ();
string tag = this.LanguageTag;
string pattern = $@"-{Regex.Escape (singleton)}-([a-zA-Z0-9](?:-[a-zA-Z0-9]+)*)";
var match = Regex.Match (tag, pattern);
if (match.Success)
{
string extPart = match.Groups [1].Value;
subtags.AddRange (extPart.Split ('-'));
}
return new _I_List (subtags.Select (i => (object)i));
}
public bool TrySetInputMethodLanguageTag (string languageTag)
{
int lcid = NativeMethods.LocaleNameToLCID (languageTag, 0);
if (lcid == 0)
return false;
string klid = $"{lcid:X8}";
IntPtr hkl = NativeMethods.LoadKeyboardLayout (klid, NativeMethods.KLF_ACTIVATE);
return hkl != IntPtr.Zero;
}
}
[ComVisible (true)] [ComVisible (true)]
[ClassInterface (ClassInterfaceType.AutoDual)] [ClassInterface (ClassInterfaceType.AutoDual)]
public class _I_Locale public class _I_Locale
@@ -47,7 +134,6 @@ namespace DataUtils
} }
} }
} }
// Current LCID (int) // Current LCID (int)
public int CurrentLCID public int CurrentLCID
{ {
@@ -63,7 +149,6 @@ namespace DataUtils
} }
} }
} }
// Convert LCID -> locale name (e.g. 1033 -> "en-US") // Convert LCID -> locale name (e.g. 1033 -> "en-US")
public string ToLocaleName (int lcid) public string ToLocaleName (int lcid)
{ {
@@ -87,7 +172,6 @@ namespace DataUtils
} }
return string.Empty; return string.Empty;
} }
// Convert locale name -> LCID // Convert locale name -> LCID
public int ToLCID (string localeName) public int ToLCID (string localeName)
{ {
@@ -111,7 +195,6 @@ namespace DataUtils
// fallback: invariant culture // fallback: invariant culture
return CultureInfo.InvariantCulture.LCID; return CultureInfo.InvariantCulture.LCID;
} }
// Return a locale info string for given LCID and LCTYPE. LCTYPE is the Win32 LOCALE_* constant. // Return a locale info string for given LCID and LCTYPE. LCTYPE is the Win32 LOCALE_* constant.
// Returns a string (or empty string on failure). // Returns a string (or empty string on failure).
public object LocaleInfo (int lcid, int lctype) public object LocaleInfo (int lcid, int lctype)
@@ -177,7 +260,6 @@ namespace DataUtils
return string.Empty; return string.Empty;
} }
} }
// LocaleInfoEx: query by locale name string and LCTYPE // LocaleInfoEx: query by locale name string and LCTYPE
// Returns string if available; otherwise returns the integer result code (as int) if string empty (mimic C++ behavior). // Returns string if available; otherwise returns the integer result code (as int) if string empty (mimic C++ behavior).
public object LocaleInfoEx (string localeName, int lctype) public object LocaleInfoEx (string localeName, int lctype)
@@ -239,7 +321,6 @@ namespace DataUtils
return 0; return 0;
} }
} }
// Helpers similar to the C++: restricted (language) and elaborated (region) codes // Helpers similar to the C++: restricted (language) and elaborated (region) codes
public string GetLocaleRestrictedCode (string localeName) public string GetLocaleRestrictedCode (string localeName)
{ {
@@ -257,7 +338,6 @@ namespace DataUtils
return string.Empty; return string.Empty;
} }
} }
public string GetLocaleElaboratedCode (string localeName) public string GetLocaleElaboratedCode (string localeName)
{ {
if (string.IsNullOrEmpty (localeName)) localeName = CurrentLocale; if (string.IsNullOrEmpty (localeName)) localeName = CurrentLocale;
@@ -284,7 +364,6 @@ namespace DataUtils
} }
return string.Empty; return string.Empty;
} }
// LCID -> combined code like "en-US" (with configurable separator) // LCID -> combined code like "en-US" (with configurable separator)
public string LcidToLocaleCode (int lcid) public string LcidToLocaleCode (int lcid)
{ {
@@ -304,7 +383,6 @@ namespace DataUtils
} }
return string.Empty; return string.Empty;
} }
// Get the user default locale name // Get the user default locale name
public string GetUserDefaultLocaleName () public string GetUserDefaultLocaleName ()
{ {
@@ -317,7 +395,6 @@ namespace DataUtils
catch { } catch { }
return LcidToLocaleCode (CultureInfo.CurrentCulture.LCID); return LcidToLocaleCode (CultureInfo.CurrentCulture.LCID);
} }
// Get system default locale name (machine) // Get system default locale name (machine)
public string GetSystemDefaultLocaleName () public string GetSystemDefaultLocaleName ()
{ {
@@ -330,7 +407,6 @@ namespace DataUtils
catch { } catch { }
return LcidToLocaleCode (CultureInfo.InstalledUICulture.LCID); return LcidToLocaleCode (CultureInfo.InstalledUICulture.LCID);
} }
// Get computer locale code similar to C++ approach // Get computer locale code similar to C++ approach
public string GetComputerLocaleCode () public string GetComputerLocaleCode ()
{ {
@@ -350,7 +426,38 @@ namespace DataUtils
// fallback to invariant // fallback to invariant
return CultureInfo.InvariantCulture.Name ?? string.Empty; return CultureInfo.InvariantCulture.Name ?? string.Empty;
} }
public _I_List RecommendLocaleNames
{
get
{
var arr = new string [] {
System.Threading.Thread.CurrentThread.CurrentCulture.Name,
GetUserDefaultLocaleName (),
GetSystemDefaultLocaleName (),
LcidToLocaleCode (CurrentLCID),
GetLocaleRestrictedCode (System.Threading.Thread.CurrentThread.CurrentCulture.Name),
GetLocaleRestrictedCode (GetUserDefaultLocaleName ()),
GetLocaleRestrictedCode (GetSystemDefaultLocaleName ()),
"en-US",
"en"
};
var list = new _I_List ();
foreach (var loc in arr)
{
var lloc = loc.Trim ().ToLowerInvariant ();
var isfind = false;
foreach (var item in list)
{
var str = item as string;
if (string.IsNullOrWhiteSpace (str)) isfind = true;
isfind = str.Trim ().ToLowerInvariant () == lloc;
if (isfind) break;
}
if (!isfind) list.Add (loc);
}
return list;
}
}
// Compare two locale names; returns true if equal by name or LCID // Compare two locale names; returns true if equal by name or LCID
public bool LocaleNameCompare (string left, string right) public bool LocaleNameCompare (string left, string right)
{ {
@@ -366,8 +473,62 @@ namespace DataUtils
return false; return false;
} }
} }
// Constants // Constants
private const int LOCALE_NAME_MAX_LENGTH = 85; // defined by Windows private const int LOCALE_NAME_MAX_LENGTH = 85; // defined by Windows
public _I_Language CreateLanguage (string localeName) => new _I_Language (localeName);
public static string CurrentInputMethodLanguageTag
{
get
{
IntPtr hkl = NativeMethods.GetKeyboardLayout (0);
int lcid = hkl.ToInt32 () & 0xFFFF;
StringBuilder sb = new StringBuilder (85);
int result = NativeMethods.LCIDToLocaleName (lcid, sb, sb.Capacity, 0);
if (result > 0)
return sb.ToString ();
return null;
}
}
public static bool IsWellFormed (string languageTag)
{
if (string.IsNullOrEmpty (languageTag))
return false;
try
{
var _ = new CultureInfo (languageTag);
return true;
}
catch
{
return false;
}
}
public static _I_List GetMuiCompatibleLanguageListFromLanguageTags (IEnumerable<string> languageTags)
{
var result = new List<string> ();
foreach (string tag in languageTags)
{
if (string.IsNullOrEmpty (tag))
continue;
result.Add (tag);
try
{
var ci = new CultureInfo (tag);
string parent = ci.Parent.Name;
if (!string.IsNullOrEmpty (parent) && parent != tag && !result.Contains (parent))
result.Add (parent);
}
catch { }
string neutral = Regex.Replace (tag, @"-.*$", "");
if (neutral != tag && !result.Contains (neutral))
result.Add (neutral);
}
if (!result.Contains ("neutral"))
result.Add ("neutral");
return new _I_List (result.Select (t => (object)t));
}
} }
} }

View File

@@ -131,6 +131,8 @@ namespace DataUtils
[ClassInterface (ClassInterfaceType.AutoDual)] [ClassInterface (ClassInterfaceType.AutoDual)]
public class _I_Process public class _I_Process
{ {
public Process Start (string filename, string args) => Process.Start (filename, args);
public Process Open (string url) => Process.Start (url);
public int Run ( public int Run (
string cmdline, string cmdline,
string filepath, string filepath,

View File

@@ -539,8 +539,7 @@ namespace DataUtils
public void File (string filter, string initDir, object jsCallback) public void File (string filter, string initDir, object jsCallback)
{ {
IWin32Window owner = GetActiveWindowOwner (); IWin32Window owner = GetActiveWindowOwner ();
Thread t = new Thread (() => Thread t = new Thread (() => {
{
string result = string.Empty; string result = string.Empty;
try try
{ {
@@ -565,8 +564,7 @@ namespace DataUtils
public void Files (string filter, string initDir, object jsCallback) public void Files (string filter, string initDir, object jsCallback)
{ {
IWin32Window owner = GetActiveWindowOwner (); IWin32Window owner = GetActiveWindowOwner ();
Thread t = new Thread (() => Thread t = new Thread (() => {
{
string result = "[]"; string result = "[]";
try try
{ {
@@ -591,8 +589,7 @@ namespace DataUtils
public void Dir (string initDir, object jsCallback) public void Dir (string initDir, object jsCallback)
{ {
IWin32Window owner = GetActiveWindowOwner (); IWin32Window owner = GetActiveWindowOwner ();
Thread t = new Thread (() => Thread t = new Thread (() => {
{
string result = string.Empty; string result = string.Empty;
try try
{ {
@@ -616,8 +613,7 @@ namespace DataUtils
public void Dirs (string initDir, object jsCallback) public void Dirs (string initDir, object jsCallback)
{ {
IWin32Window owner = GetActiveWindowOwner (); IWin32Window owner = GetActiveWindowOwner ();
Thread t = new Thread (() => Thread t = new Thread (() => {
{
string result = "[]"; string result = "[]";
try try
{ {
@@ -649,8 +645,71 @@ namespace DataUtils
} }
[ComVisible (true)] [ComVisible (true)]
[ClassInterface (ClassInterfaceType.AutoDual)] [ClassInterface (ClassInterfaceType.AutoDual)]
public class _I_Folder
{
[DllImport ("shell32.dll")]
private static extern int SHGetKnownFolderPath (
[MarshalAs (UnmanagedType.LPStruct)] Guid rfid,
uint dwFlags,
IntPtr hToken,
out IntPtr ppszPath);
private static string KF (Guid g)
{
IntPtr p;
SHGetKnownFolderPath (g, 0, IntPtr.Zero, out p);
string s = Marshal.PtrToStringUni (p);
Marshal.FreeCoTaskMem (p);
return s;
}
private static readonly Guid FOLDERID_Downloads = new Guid ("374DE290-123F-4565-9164-39C4925E467B");
private static readonly Guid FOLDERID_SavedPictures = new Guid ("3B193882-D3AD-4EAB-965A-69829D1FB59F");
private static readonly Guid FOLDERID_SavedGames = new Guid ("4C5C32FF-BB9D-43B0-BF90-45A0FEEB6D0E");
private static readonly Guid FOLDERID_Links = new Guid ("BFB9D5E0-C6A9-404C-B2B2-AE6DB6AF4968");
private static readonly Guid FOLDERID_Contacts = new Guid ("56784854-C6CB-462B-8169-88E350ACB882");
private static readonly Guid FOLDERID_Searches = new Guid ("7D1D3A04-DEBB-4115-95CF-2F29DA2920DA");
public string ProgramFiles => Environment.GetFolderPath (Environment.SpecialFolder.ProgramFiles);
public string ProgramFilesX86 => Environment.GetFolderPath (Environment.SpecialFolder.ProgramFilesX86);
public string Windows => Environment.GetFolderPath (Environment.SpecialFolder.Windows);
public string System32 => Environment.SystemDirectory;
public string UserProfile => Environment.GetFolderPath (Environment.SpecialFolder.UserProfile);
public string Desktop => Environment.GetFolderPath (Environment.SpecialFolder.Desktop);
public string Documents => Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments);
public string Pictures => Environment.GetFolderPath (Environment.SpecialFolder.MyPictures);
public string Music => Environment.GetFolderPath (Environment.SpecialFolder.MyMusic);
public string Videos => Environment.GetFolderPath (Environment.SpecialFolder.MyVideos);
public string AppDataRoaming => Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData);
public string AppDataLocal => Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData);
public string AppDataLocalLow => Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData) + "\\Low";
public string Temp => System.IO.Path.GetTempPath ();
public string PublicDesktop => Environment.GetFolderPath (Environment.SpecialFolder.CommonDesktopDirectory);
public string PublicDocuments => Environment.GetFolderPath (Environment.SpecialFolder.CommonDocuments);
public string PublicPictures => Environment.GetFolderPath (Environment.SpecialFolder.CommonPictures);
public string PublicMusic => Environment.GetFolderPath (Environment.SpecialFolder.CommonMusic);
public string PublicVideos => Environment.GetFolderPath (Environment.SpecialFolder.CommonVideos);
public string Downloads => KF (FOLDERID_Downloads);
public string SavedPictures => KF (FOLDERID_SavedPictures);
public string SavedGames => KF (FOLDERID_SavedGames);
public string Links => KF (FOLDERID_Links);
public string Contacts => KF (FOLDERID_Contacts);
public string Searches => KF (FOLDERID_Searches);
}
[ComVisible (true)]
[ClassInterface (ClassInterfaceType.AutoDual)]
public class _I_Storage public class _I_Storage
{ {
[DllImport ("user32.dll")]
private static extern IntPtr GetForegroundWindow ();
class WindowWrapper: IWin32Window
{
private IntPtr _hwnd;
public WindowWrapper (IntPtr handle) { _hwnd = handle; }
public IntPtr Handle { get { return _hwnd; } }
}
private static IWin32Window GetActiveWindowOwner ()
{
IntPtr hWnd = GetForegroundWindow ();
return hWnd != IntPtr.Zero ? new WindowWrapper (hWnd) : null;
}
private static void CallJS (object jsFunc, params object [] args) private static void CallJS (object jsFunc, params object [] args)
{ {
if (jsFunc == null) return; if (jsFunc == null) return;
@@ -680,6 +739,35 @@ namespace DataUtils
public _I_Directory GetDirectory (string path) { return new _I_Directory (path); } public _I_Directory GetDirectory (string path) { return new _I_Directory (path); }
public _I_Directory GetDir (string path) { return GetDirectory (path); } public _I_Directory GetDir (string path) { return GetDirectory (path); }
public _I_Explorer Explorer => new _I_Explorer (); public _I_Explorer Explorer => new _I_Explorer ();
public void Save (string filter, string initDir, string defaultName, object jsCallback)
{
IWin32Window owner = GetActiveWindowOwner ();
Thread t = new Thread (() => {
string result = string.Empty;
try
{
using (SaveFileDialog dlg = new SaveFileDialog ())
{
dlg.Filter = filter;
dlg.InitialDirectory = string.IsNullOrEmpty (initDir)
? Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments)
: initDir;
if (!string.IsNullOrEmpty (defaultName))
dlg.FileName = defaultName;
dlg.OverwritePrompt = true;
dlg.AddExtension = true;
if (dlg.ShowDialog (owner) == DialogResult.OK)
result = dlg.FileName;
}
}
catch { }
CallJS (jsCallback, result);
});
t.IsBackground = true;
t.SetApartmentState (ApartmentState.STA);
t.Start ();
}
public _I_Folder Folders => new _I_Folder ();
} }
// Small shell helpers that P/Invoke for folder retrieval using CSIDL or Known Folder GUIDs // Small shell helpers that P/Invoke for folder retrieval using CSIDL or Known Folder GUIDs
internal static class ShellHelpers internal static class ShellHelpers

View File

@@ -1,8 +1,14 @@
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Text; using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Xml; using System.Xml;
using Newtonsoft.Json; using Newtonsoft.Json;
@@ -186,4 +192,428 @@ namespace DataUtils
object BuildJSON (); object BuildJSON ();
} }
} }
public static class JsUtils
{
/// <summary>
/// 调用 JS 函数。第一个参数作为 this其余作为 JS 函数参数。
/// </summary>
/// <param name="callback">JS 函数对象</param>
/// <param name="args">JS 函数参数,可选</param>
/// <returns>JS 函数返回值</returns>
public static void Call (object jsFunc, params object [] args)
{
if (jsFunc == null) return;
object [] invokeArgs = new object [(args?.Length ?? 0) + 1];
invokeArgs [0] = jsFunc; // this
if (args != null)
for (int i = 0; i < args.Length; i++)
invokeArgs [i + 1] = args [i];
jsFunc.GetType ().InvokeMember (
"call",
BindingFlags.InvokeMethod,
null,
jsFunc,
invokeArgs);
}
}
[ComVisible (true)]
[InterfaceType (ComInterfaceType.InterfaceIsDual)]
public interface _I_IAsyncAction
{
_I_IAsyncAction Then (object resolve, object reject = null, object progress = null);
void Done (object resolve, object reject = null);
void Catch (object reject);
bool IsCompleted { get; }
bool IsCancelled { get; }
bool IsError { get; }
void Cancel ();
void ReportProgress (object progress);
object Error { get; }
}
[ComVisible (true)]
[ClassInterface (ClassInterfaceType.AutoDual)]
public class _I_Task: _I_IAsyncAction
{
private object _result;
private Exception _error;
private bool _completed;
private bool _cancelled;
private List<object> _resolveCallbacks = new List<object> ();
private List<object> _rejectCallbacks = new List<object> ();
private List<object> _progressCallbacks = new List<object> ();
private CancellationTokenSource _cts = new CancellationTokenSource ();
public _I_Task (Func<object> func)
{
ThreadPool.QueueUserWorkItem (_ => {
try
{
if (_cts.Token.IsCancellationRequested)
{
_cancelled = true;
return;
}
_result = func ();
_completed = true;
foreach (var cb in _resolveCallbacks)
JsUtils.Call (cb, _result);
}
catch (Exception ex)
{
_error = ex;
foreach (var cb in _rejectCallbacks)
JsUtils.Call (cb, ex);
}
});
}
public _I_IAsyncAction Then (object resolve, object reject = null, object progress = null)
{
if (resolve != null) _resolveCallbacks.Add (resolve);
if (reject != null) _rejectCallbacks.Add (reject);
if (progress != null) _progressCallbacks.Add (progress);
return this;
}
public void Done (object resolve, object reject = null)
{
if (resolve != null) _resolveCallbacks.Add (resolve);
if (reject != null) _rejectCallbacks.Add (reject);
}
public void Catch (object reject)
{
if (reject != null) _rejectCallbacks.Add (reject);
}
public bool IsCompleted => _completed;
public bool IsCancelled => _cancelled;
public bool IsError => _error != null;
public object Error => _error;
public void Cancel ()
{
_cts.Cancel ();
_cancelled = true;
}
public void ReportProgress (object progress)
{
foreach (var cb in _progressCallbacks)
JsUtils.Call (cb, progress);
}
public object Result => _result;
}
[ComVisible (true)]
[ClassInterface (ClassInterfaceType.AutoDual)]
public class _I_Thread: _I_IAsyncAction
{
private Thread _thread;
private bool _completed;
private bool _cancelled;
private Exception _error;
private List<object> _resolveCallbacks = new List<object> ();
private List<object> _rejectCallbacks = new List<object> ();
private List<object> _progressCallbacks = new List<object> ();
private CancellationTokenSource _cts = new CancellationTokenSource ();
public _I_Thread (Action action)
{
_thread = new Thread (() => {
try
{
if (_cts.Token.IsCancellationRequested)
{
_cancelled = true;
return;
}
action ();
_completed = true;
foreach (var cb in _resolveCallbacks)
JsUtils.Call (cb);
}
catch (Exception ex)
{
_error = ex;
foreach (var cb in _rejectCallbacks)
JsUtils.Call (cb, ex);
}
});
_thread.IsBackground = true;
_thread.Start ();
}
public _I_IAsyncAction Then (object resolve, object reject = null, object progress = null)
{
if (resolve != null) _resolveCallbacks.Add (resolve);
if (reject != null) _rejectCallbacks.Add (reject);
if (progress != null) _progressCallbacks.Add (progress);
return this;
}
public void Done (object resolve, object reject = null)
{
if (resolve != null) _resolveCallbacks.Add (resolve);
if (reject != null) _rejectCallbacks.Add (reject);
}
public void Catch (object reject)
{
if (reject != null) _rejectCallbacks.Add (reject);
}
public bool IsCompleted => _completed;
public bool IsCancelled => _cancelled;
public bool IsError => _error != null;
public object Error => _error;
public void Cancel ()
{
_cts.Cancel ();
_cancelled = true;
}
public void ReportProgress (object progress)
{
foreach (var cb in _progressCallbacks)
JsUtils.Call (cb, progress);
}
}
[ComVisible (true)]
[ClassInterface (ClassInterfaceType.AutoDual)]
public class _I_Exception: Exception, IDisposable
{
private Exception bex = null;
public _I_Exception (Exception ex) { bex = ex; }
public _I_Exception (string message) { bex = new Exception (message); }
public _I_Exception (string msg, Exception innerEx) { bex = new Exception (msg, innerEx); }
public override IDictionary Data => bex.Data;
public override Exception GetBaseException () => bex.GetBaseException ();
public override void GetObjectData (SerializationInfo info, StreamingContext context) => bex.GetObjectData (info, context);
public override string HelpLink
{
get { return bex.HelpLink; }
set { bex.HelpLink = value; }
}
public override string Message => bex.Message;
public override string Source
{
get { return bex.Source; }
set { bex.Source = value; }
}
public override string StackTrace => bex.StackTrace;
public override string ToString () => bex.ToString ();
public override int GetHashCode () => bex.GetHashCode ();
public override bool Equals (object obj) => bex.Equals (obj);
public void Dispose () { bex = null; }
}
[ComVisible (true)]
[ClassInterface (ClassInterfaceType.AutoDual)]
public class _I_KeyValuePair: IDisposable
{
object key = null;
object value = null;
public _I_KeyValuePair (object k, object v)
{
key = k;
value = v;
}
public object Key { get { return key; } set { key = value; } }
public object Value { get { return value; } set { this.value = value; } }
public void Dispose ()
{
key = null;
value = null;
}
~_I_KeyValuePair ()
{
key = null;
value = null;
}
}
[ComVisible (true)]
[ClassInterface (ClassInterfaceType.AutoDual)]
public class _I_WwwFormUrlDecoder
{
private readonly Dictionary<string, string> _params = new Dictionary<string, string> ();
public _I_WwwFormUrlDecoder (string query)
{
if (string.IsNullOrEmpty (query)) return;
if (query.StartsWith ("?")) query = query.Substring (1);
foreach (var pair in query.Split ('&'))
{
var kv = pair.Split ('=');
if (kv.Length == 2)
_params [Uri.UnescapeDataString (kv [0])] = Uri.UnescapeDataString (kv [1]);
}
}
public string GetFirstValueByName (string name)
{
string value = null;
return _params.TryGetValue (name, out value) ? value : null;
}
public int Size => _params.Count;
public _I_KeyValuePair GetAt (uint index)
{
var pair = _params.ElementAt ((int)index);
return new _I_KeyValuePair (pair.Key, pair.Value);
}
}
[ComVisible (true)]
[ClassInterface (ClassInterfaceType.AutoDual)]
public class _I_Uri: Uri
{
public _I_Uri (string uri): base (uri) { }
public _I_Uri (string baseUri, string relativeUri) : base (new Uri (baseUri), relativeUri) { }
public string AbsoluteCanonicalUri => this.GetLeftPart (UriPartial.Authority) + this.PathAndQuery + this.Fragment;
public string DisplayIri => Uri.UnescapeDataString (this.OriginalString);
public string DisplayUri => Uri.UnescapeDataString (this.OriginalString);
public string Domain => ExtractDomain (this.Host);
public string Extension => System.IO.Path.GetExtension (this.AbsolutePath)?.TrimStart ('.') ?? "";
public string Password => ExtractPassword (this.UserInfo);
public string Path => this.AbsolutePath;
public object QueryParsed => new _I_WwwFormUrlDecoder (this.Query);
public string RawUri => this.OriginalString;
public string SchemeName => this.Scheme;
public bool Suspicious => !Uri.IsWellFormedUriString (this.OriginalString, UriKind.Absolute);
public string UserName => ExtractUserName (this.UserInfo);
public _I_Uri CombineUri (string relativeUri)
{
return new _I_Uri (this.AbsoluteUri, relativeUri);
}
public static string EscapeComponent (string component)
{
return Uri.EscapeDataString (component);
}
public static string UnescapeComponent (string component)
{
return Uri.UnescapeDataString (component);
}
private static string ExtractDomain (string host)
{
var parts = host.Split ('.');
if (parts.Length >= 2)
return string.Join (".", parts.Skip (1));
return host;
}
private static string ExtractUserName (string userInfo)
{
if (string.IsNullOrEmpty (userInfo)) return "";
var parts = userInfo.Split (':');
return parts [0];
}
private static string ExtractPassword (string userInfo)
{
if (string.IsNullOrEmpty (userInfo)) return "";
var parts = userInfo.Split (':');
return parts.Length > 1 ? parts [1] : "";
}
}
[ComVisible (true)]
[ClassInterface (ClassInterfaceType.AutoDual)]
public class _I_Utilities
{
public _I_Uri CreateUri (string uri) => new _I_Uri (uri);
public _I_Uri CreateUri2 (string baseUri, string relaUri) => new _I_Uri (baseUri, relaUri);
public _I_Exception CreateException (string message) => new _I_Exception (message);
public _I_Exception CreateException2 (string message, _I_Exception innerEx) => new _I_Exception (message, innerEx);
public _I_Calendar CreateCalendar () => new _I_Calendar ();
public _I_Calendar CreateCalendar2 (object list) => new _I_Calendar (list);
public _I_Calendar CreateCalendar3 (object list, string arg1, string arg2) => new _I_Calendar (list, arg1, arg2);
public _I_Calendar CreateCalendar4 (object list, string arg1, string arg2, string arg3) => new _I_Calendar (list, arg1, arg2, arg3);
public _I_DateTimeFormatter CreateDateTimeFormatterFromTemplate (string formatTemplate)
{
return new _I_DateTimeFormatter (formatTemplate);
}
public _I_DateTimeFormatter CreateDateTimeFormatterFromTemplateAndLanguages (string formatTemplate, object languagesArray)
{
List<string> languages = JsArrayToStringList (languagesArray);
return new _I_DateTimeFormatter (formatTemplate, languages);
}
public _I_DateTimeFormatter CreateDateTimeFormatterFromTemplateFull (string formatTemplate, object languagesArray,
string geographicRegion, string calendar, string clock)
{
List<string> languages = JsArrayToStringList (languagesArray);
return new _I_DateTimeFormatter (formatTemplate, languages, geographicRegion, calendar, clock);
}
public _I_DateTimeFormatter CreateDateTimeFormatterFromDateEnums (int year, int month, int day, int dayOfWeek)
{
return new _I_DateTimeFormatter (
(YearFormat)year,
(MonthFormat)month,
(DayFormat)day,
(DayOfWeekFormat)dayOfWeek
);
}
public _I_DateTimeFormatter CreateDateTimeFormatterFromTimeEnums (int hour, int minute, int second)
{
return new _I_DateTimeFormatter (
(HourFormat)hour,
(MinuteFormat)minute,
(SecondFormat)second
);
}
public _I_DateTimeFormatter CreateDateTimeFormatterFromDateTimeEnums (int year, int month, int day, int dayOfWeek,
int hour, int minute, int second, object languagesArray)
{
List<string> languages = JsArrayToStringList (languagesArray);
return new _I_DateTimeFormatter (
(YearFormat)year,
(MonthFormat)month,
(DayFormat)day,
(DayOfWeekFormat)dayOfWeek,
(HourFormat)hour,
(MinuteFormat)minute,
(SecondFormat)second,
languages
);
}
public _I_DateTimeFormatter CreateDateTimeFormatterFromDateTimeEnumsFull (int year, int month, int day, int dayOfWeek,
int hour, int minute, int second, object languagesArray,
string geographicRegion, string calendar, string clock)
{
List<string> languages = JsArrayToStringList (languagesArray);
return new _I_DateTimeFormatter (
(YearFormat)year,
(MonthFormat)month,
(DayFormat)day,
(DayOfWeekFormat)dayOfWeek,
(HourFormat)hour,
(MinuteFormat)minute,
(SecondFormat)second,
languages,
geographicRegion,
calendar,
clock
);
}
private List<string> JsArrayToStringList (object jsArray)
{
var result = new List<string> ();
if (jsArray == null) return result;
Type type = jsArray.GetType ();
try
{
int length = (int)type.InvokeMember ("length", BindingFlags.GetProperty, null, jsArray, null);
for (int i = 0; i < length; i++)
{
object value = type.InvokeMember (i.ToString (), BindingFlags.GetProperty, null, jsArray, null);
if (value != null)
result.Add (value.ToString ());
}
}
catch
{
// 如果无法获取 length则假设是单个字符串
string single = jsArray.ToString ();
if (!string.IsNullOrEmpty (single))
result.Add (single);
}
return result;
}
}
} }

328
DataUtils/Web.cs Normal file
View File

@@ -0,0 +1,328 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Runtime.InteropServices;
using System.Text;
using Newtonsoft.Json;
namespace DataUtils
{
[ComVisible (true)]
[InterfaceType (ComInterfaceType.InterfaceIsDual)]
public interface IHttpResponse: IDisposable
{
int Status { get; } // 兼容旧版,等同于 StatusCode
int StatusCode { get; }
string StatusText { get; } // 等同于 StatusDescription
string StatusDescription { get; }
string ResponseUrl { get; }
Uri ResponseUri { get; }
string ContentType { get; }
long ContentLength { get; } // 注意JS 中 Number 可表示 2^53 以内整数
string CharacterSet { get; }
string ContentEncoding { get; }
DateTime LastModified { get; }
string Method { get; } // 原始请求方法 (GET, POST...)
Version ProtocolVersion { get; } // 如 1.1JS 中可能转为字符串
bool IsFromCache { get; }
bool IsMutuallyAuthenticated { get; }
string Text ();
_I_Enumerable Bytes ();
}
[ComVisible (true)]
[ClassInterface (ClassInterfaceType.AutoDual)]
public class HttpResponse: IHttpResponse, IDisposable
{
private readonly byte [] _data;
private readonly Dictionary<string, string> _headersDict;
private bool _disposed = false;
public int Status => StatusCode;
public int StatusCode { get; private set; }
public string StatusText => StatusDescription;
public string StatusDescription { get; private set; }
public string ResponseUrl => ResponseUri?.ToString ();
public Uri ResponseUri { get; private set; }
public string ContentType { get; private set; }
public long ContentLength { get; private set; }
public string CharacterSet { get; private set; }
public string ContentEncoding { get; private set; }
public DateTime LastModified { get; private set; }
public string Method { get; private set; }
public Version ProtocolVersion { get; private set; }
public bool IsFromCache { get; private set; }
public bool IsMutuallyAuthenticated { get; private set; }
public HttpResponse (HttpWebResponse response)
{
if (response == null) throw new ArgumentNullException (nameof (response));
using (var stream = response.GetResponseStream ())
using (var ms = new MemoryStream ())
{
stream.CopyTo (ms);
_data = ms.ToArray ();
}
StatusCode = (int)response.StatusCode;
StatusDescription = response.StatusDescription;
ResponseUri = response.ResponseUri;
Method = response.Method;
ProtocolVersion = new Version ((ushort)response.ProtocolVersion.Major, (ushort)response.ProtocolVersion.Minor, (ushort)response.ProtocolVersion.Build, (ushort)response.ProtocolVersion.Revision);
IsFromCache = response.IsFromCache;
IsMutuallyAuthenticated = response.IsMutuallyAuthenticated;
ContentType = response.ContentType ?? "";
ContentLength = response.ContentLength;
CharacterSet = response.CharacterSet ?? "";
ContentEncoding = response.ContentEncoding ?? "";
LastModified = response.LastModified;
_headersDict = new Dictionary<string, string> (StringComparer.OrdinalIgnoreCase);
foreach (string key in response.Headers.AllKeys)
{
if (!string.IsNullOrEmpty (key))
_headersDict [key] = response.Headers [key];
}
}
public HttpResponse (int statusCode, string statusDescription, string responseUrl, byte [] data, Dictionary<string, string> headers)
{
StatusCode = statusCode;
StatusDescription = statusDescription ?? "";
ResponseUri = string.IsNullOrEmpty (responseUrl) ? null : new Uri (responseUrl);
_data = data ?? new byte [0];
_headersDict = headers ?? new Dictionary<string, string> ();
ContentType = GetHeader ("Content-Type") ?? "";
ContentLength = _data.Length;
CharacterSet = "";
ContentEncoding = "";
LastModified = DateTime.MinValue;
Method = "";
ProtocolVersion = new Version (0, 0);
IsFromCache = false;
IsMutuallyAuthenticated = false;
}
public string GetHeader (string sName)
{
if (string.IsNullOrEmpty (sName)) return null;
try
{
return _headersDict [sName];
}
catch { return null; }
}
public string GetHeadersToJson ()
{
return JsonConvert.SerializeObject (_headersDict);
}
public string Text ()
{
string charset = CharacterSet;
Encoding enc = Encoding.UTF8;
if (!string.IsNullOrEmpty (charset))
{
try { enc = Encoding.GetEncoding (charset); }
catch { /* 保持 UTF-8 */ }
}
return enc.GetString (_data);
}
public _I_Enumerable Bytes ()
{
var list = new List<object> ();
foreach (byte b in _data)
list.Add (b);
return new _I_List (list);
}
public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
}
protected virtual void Dispose (bool disposing)
{
if (!_disposed)
{
_disposed = true;
}
}
}
[ComVisible (true)]
[ClassInterface (ClassInterfaceType.AutoDual)]
public class HttpRequest: IDisposable
{
private string _method;
private string _url;
private Dictionary<string, string> _headers = new Dictionary<string, string> ();
public int Timeout { get; set; } = 100000; // 毫秒,默认 100 秒
public int ReadWriteTimeout { get; set; } = 300000; // 读写超时,默认 5 分钟
public bool AllowAutoRedirect { get; set; } = true;
public bool AllowWriteStreamBuffering { get; set; } = true;
public bool KeepAlive { get; set; } = true;
public int MaximumAutomaticRedirections { get; set; } = 50;
public string UserAgent
{
get { return GetHeader ("User-Agent"); }
set { SetHeader ("User-Agent", value); }
}
public string Referer
{
get { return GetHeader ("Referer"); }
set { SetHeader ("Referer", value); }
}
public string ContentType
{
get { return GetHeader ("Content-Type"); }
set { SetHeader ("Content-Type", value); }
}
public string Accept
{
get { return GetHeader ("Accept"); }
set { SetHeader ("Accept", value); }
}
public IWebProxy Proxy { get; set; } = null;
public CookieContainer CookieContainer { get; set; } = null;
private string _httpver = "1.1";
public string ProtocolVersion
{
get { return _httpver; }
set { _httpver = value; }
}
public System.Version ProtVer
{
get
{
switch (_httpver)
{
case "1.0": return HttpVersion.Version10;
default:
case "1.1": return HttpVersion.Version11;
}
}
}
public bool PreAuthenticate { get; set; } = false;
public ICredentials Credentials { get; set; } = null;
public bool AutomaticDecompression { get; set; } = false;
public Action<long, long> UploadProgressCallback { get; set; } = null;
public void Open (string sMethod, string sUrl)
{
_method = sMethod;
_url = sUrl;
}
public void SetHeader (string sName, string sValue) => _headers [sName] = sValue;
public string GetHeader (string sName) => _headers [sName];
public string GetHeadersToJson () => JsonConvert.SerializeObject (_headers);
public void RemoveHeader (string sName) => _headers.Remove (sName);
public void ClearHeader () => _headers.Clear ();
public IHttpResponse Send (string sBody, string encoding)
{
var req = (HttpWebRequest)WebRequest.Create (_url);
req.Method = _method;
req.Timeout = Timeout;
req.ReadWriteTimeout = ReadWriteTimeout;
req.AllowAutoRedirect = AllowAutoRedirect;
req.AllowWriteStreamBuffering = AllowWriteStreamBuffering;
req.KeepAlive = KeepAlive;
req.MaximumAutomaticRedirections = MaximumAutomaticRedirections;
if (Proxy != null) req.Proxy = Proxy;
if (CookieContainer != null) req.CookieContainer = CookieContainer;
req.ProtocolVersion = ProtVer;
req.PreAuthenticate = PreAuthenticate;
if (Credentials != null) req.Credentials = Credentials;
if (AutomaticDecompression)
req.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
if (_headers.ContainsKey ("User-Agent"))
req.UserAgent = _headers ["User-Agent"];
foreach (var h in _headers)
{
if (string.Equals (h.Key, "User-Agent", StringComparison.OrdinalIgnoreCase))
continue;
if (string.Equals (h.Key, "Content-Type", StringComparison.OrdinalIgnoreCase))
{
string ct = h.Value;
if (!string.IsNullOrEmpty (sBody) && !ct.Contains ("charset"))
{
Encoding enc = Encoding.GetEncoding (encoding);
ct = ct + "; charset=" + enc.WebName;
}
req.ContentType = ct;
}
else if (string.Equals (h.Key, "Accept", StringComparison.OrdinalIgnoreCase))
{
req.Accept = h.Value;
}
else if (string.Equals (h.Key, "Referer", StringComparison.OrdinalIgnoreCase))
{
req.Referer = h.Value;
}
else
{
req.Headers [h.Key] = h.Value;
}
}
// 如果没有显式设置 Content-Type 且是 POST/PUT 且有请求体,设置默认值
bool hasContentType = _headers.Keys.Any (k => string.Equals (k, "Content-Type", StringComparison.OrdinalIgnoreCase));
if (!hasContentType && (string.Equals (_method, "POST", StringComparison.OrdinalIgnoreCase) ||
string.Equals (_method, "PUT", StringComparison.OrdinalIgnoreCase)) &&
!string.IsNullOrEmpty (sBody))
{
Encoding enc = Encoding.GetEncoding (encoding);
req.ContentType = "application/x-www-form-urlencoded; charset=" + enc.WebName;
}
// 写入请求体
if (!string.IsNullOrEmpty (sBody))
{
Encoding enc = Encoding.GetEncoding (encoding);
byte [] bytes = enc.GetBytes (sBody);
req.ContentLength = bytes.Length;
using (var stream = req.GetRequestStream ())
{
if (UploadProgressCallback != null)
{
int totalWritten = 0;
int bufferSize = 8192;
for (int offset = 0; offset < bytes.Length; offset += bufferSize)
{
int chunkSize = Math.Min (bufferSize, bytes.Length - offset);
stream.Write (bytes, offset, chunkSize);
totalWritten += chunkSize;
UploadProgressCallback (totalWritten, bytes.Length);
}
}
else
{
stream.Write (bytes, 0, bytes.Length);
}
}
}
using (var res = (HttpWebResponse)req.GetResponse ())
{
return new HttpResponse (res);
}
}
public void SendAsync (string sBody, string encoding, object pfResolve, object pfReject)
{
System.Threading.ThreadPool.QueueUserWorkItem (delegate
{
try
{
JsUtils.Call (pfResolve, Send (sBody, encoding));
}
catch (Exception ex)
{
JsUtils.Call (pfReject, new _I_Exception (ex));
}
});
}
public void Dispose () { }
}
[ComVisible (true)]
[ClassInterface (ClassInterfaceType.AutoDual)]
public class _I_Http
{
public HttpRequest CreateHttpRequest () => new HttpRequest ();
}
[ComVisible (true)]
[ClassInterface (ClassInterfaceType.AutoDual)]
public class _I_Web
{
public _I_Http Http => new _I_Http ();
}
}

5
Directory.Build.props Normal file
View File

@@ -0,0 +1,5 @@
<Project>
<PropertyGroup Condition="'$(MSBuildProjectExtension)'=='.vcxproj'">
<ForceImportAfterCppProps>$(MSBuildThisFileDirectory)ArmDesktopSdk.props</ForceImportAfterCppProps>
</PropertyGroup>
</Project>

Binary file not shown.

View File

@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}</ProjectGuid> <ProjectGuid>{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}</ProjectGuid>
@@ -33,6 +33,13 @@
<CLRSupport>true</CLRSupport> <CLRSupport>true</CLRSupport>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CLRSupport>true</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
@@ -40,14 +47,7 @@
<CLRSupport>true</CLRSupport> <CLRSupport>true</CLRSupport>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CLRSupport>true</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
@@ -62,26 +62,26 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -95,15 +95,16 @@
<AdditionalDependencies /> <AdditionalDependencies />
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies /> <AdditionalDependencies>
</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -116,14 +117,15 @@
<AdditionalDependencies /> <AdditionalDependencies />
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies /> <AdditionalDependencies>
</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
@@ -142,9 +144,9 @@
<ClCompile Include="IEHelper.cpp" /> <ClCompile Include="IEHelper.cpp" />
<ClCompile Include="Stdafx.cpp"> <ClCompile Include="Stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

17
LICENSE.SharpZipLib Normal file
View File

@@ -0,0 +1,17 @@
Copyright © 2000-2018 SharpZipLib Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

View File

@@ -23,7 +23,7 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>..\Release\</OutputPath> <OutputPath>..\Release\</OutputPath>

View File

@@ -11,6 +11,21 @@
<AssemblyName>Manager</AssemblyName> <AssemblyName>Manager</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
@@ -23,7 +38,7 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>..\Release\</OutputPath> <OutputPath>..\Release\</OutputPath>
@@ -36,7 +51,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath> <OutputPath>..\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
@@ -44,7 +59,7 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath> <OutputPath>..\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@@ -175,6 +190,13 @@
<None Include="Resources\32_manager.ico" /> <None Include="Resources\32_manager.ico" />
<None Include="Resources\IconMetro.ico" /> <None Include="Resources\IconMetro.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -29,7 +29,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />

83
PkgCLI/PkgCLI.csproj Normal file
View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8D333AF6-E901-4301-B3EE-923088E81062}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PkgCLI</RootNamespace>
<AssemblyName>PkgCLI</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>..\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AppxPackage\AppxPackage.csproj">
<Project>{bd681a4f-eb60-4bb8-90b5-65968fc7da59}</Project>
<Name>AppxPackage</Name>
</ProjectReference>
<ProjectReference Include="..\PrivateInit\PrivateInit.csproj">
<Project>{8e708d9a-6325-4aa9-b5a5-d1b5eca8eef7}</Project>
<Name>PrivateInit</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

14
PkgCLI/Program.cs Normal file
View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PkgCLI
{
class Program
{
static void Main (string [] args)
{
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle ("PkgCLI")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyProduct ("PkgCLI")]
[assembly: AssemblyCopyright ("Copyright © 2026")]
[assembly: AssemblyTrademark ("")]
[assembly: AssemblyCulture ("")]
//将 ComVisible 设置为 false 将使此程序集中的类型
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible (false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid ("8d333af6-e901-4301-b3ee-923088e81062")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion ("1.0.0.0")]
[assembly: AssemblyFileVersion ("1.0.0.0")]

View File

@@ -14,8 +14,8 @@
<p>Note: There is no official release yet, but the test version still does not have the Pre-released label; this is for testing upgrade functionality. Once the official release is complete, previous versions will be marked as Pre-released.</p> <p>Note: There is no official release yet, but the test version still does not have the Pre-released label; this is for testing upgrade functionality. Once the official release is complete, previous versions will be marked as Pre-released.</p>
<h2>Attention</h2> <h2>Attention</h2>
<ul> <ul>
<li>This program is an x86 program, not an ARM application, not cross-platform, and cannot be used on Windows RT.</li> <li><del>This program is an x86 program, not an ARM application, not cross-platform, and cannot be used on Windows RT.</del></li>
<li>This program uses some third-party libraries and other Github projects, and is completed using AI (ChatGTP). This project can be used for learning and communication purposes.</li> <li>The program uses some third-party libraries and other GitHub projects, and is completed with the assistance of AI (ChatGTP). This project can be used for learning and communication purposes.</li>
<li>(Important) Internet Explorer must support TLS 1.2 (requiring the use of IE's XMLHttpRequest to retrieve update information), especially IE10. You can do this by opening the "Advanced" tab in Control Panel/Internet Explorer's "Internet Options," finding "Use TLS 1.2" and checking the box, then clicking "OK" and saving. The settings will take effect the next time you open the browser.<br><img width="300" height="395" alt="屏幕截图 2025-12-08 103450" src="https://github.com/user-attachments/assets/69ee21ca-7f47-4d56-8dde-37e5704776c1" /></li> <li>(Important) Internet Explorer must support TLS 1.2 (requiring the use of IE's XMLHttpRequest to retrieve update information), especially IE10. You can do this by opening the "Advanced" tab in Control Panel/Internet Explorer's "Internet Options," finding "Use TLS 1.2" and checking the box, then clicking "OK" and saving. The settings will take effect the next time you open the browser.<br><img width="300" height="395" alt="屏幕截图 2025-12-08 103450" src="https://github.com/user-attachments/assets/69ee21ca-7f47-4d56-8dde-37e5704776c1" /></li>
</ul> </ul>
<hr> <hr>

View File

@@ -18,10 +18,6 @@ namespace Reader
static void Main () static void Main ()
{ {
Directory.SetCurrentDirectory (AppDomain.CurrentDomain.BaseDirectory); Directory.SetCurrentDirectory (AppDomain.CurrentDomain.BaseDirectory);
AppxPackage.PackageReader.AddApplicationItem ("SmallLogo");
AppxPackage.PackageReader.AddApplicationItem ("Square30x30Logo");
AppxPackage.PackageReader.AddApplicationItem ("Logo");
AppxPackage.PackageReader.AddApplicationItem ("Square44x44Logo");
DataUtils.BrowserEmulation.SetWebBrowserEmulation (); DataUtils.BrowserEmulation.SetWebBrowserEmulation ();
Application.EnableVisualStyles (); Application.EnableVisualStyles ();
Application.SetCompatibleTextRenderingDefault (false); Application.SetCompatibleTextRenderingDefault (false);

BIN
Reader/Project2.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 KiB

View File

@@ -30,7 +30,7 @@
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
@@ -40,7 +40,7 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>..\Release\</OutputPath> <OutputPath>..\Release\</OutputPath>
@@ -53,6 +53,27 @@
<PropertyGroup> <PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>..\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Project2.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net40\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
@@ -152,6 +173,9 @@
<Install>false</Install> <Install>false</Install>
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Include="Project2.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -31,14 +31,14 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ReaderShell)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ReaderShell));
this.SuspendLayout(); this.SuspendLayout();
// //
// ManagerShell // ReaderShell
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(657, 414); this.ClientSize = new System.Drawing.Size(657, 414);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Location = new System.Drawing.Point(0, 0); this.Location = new System.Drawing.Point(0, 0);
this.Name = "ManagerShell"; this.Name = "ReaderShell";
this.PageScale = 125; this.PageScale = 125;
this.Text = "Form1"; this.Text = "Form1";
this.WindowIcon = ((System.Drawing.Icon)(resources.GetObject("$this.WindowIcon"))); this.WindowIcon = ((System.Drawing.Icon)(resources.GetObject("$this.WindowIcon")));

View File

@@ -26,7 +26,7 @@ namespace Reader
} }
catch { } catch { }
InitSize (); InitSize ();
Text = Bridge.ResXmlStore.StringRes.Get ("MANAGER_APPTITLE"); Text = Bridge.ResXmlStore.StringRes.Get ("READER_APPTITLE");
this.Load += Form_Load; this.Load += Form_Load;
} }
private void InitSize () private void InitSize ()

File diff suppressed because it is too large Load Diff

View File

@@ -71,6 +71,45 @@ Original Project:
License: MIT License License: MIT License
License File: LICENSE.WinJS License File: LICENSE.WinJS
----------------------------------------------------------------------
CodeMirror
----------------------------------------------------------------------
This product includes CodeMirror, which is licensed under the MIT License.
Original Project:
Name: CodeMirror
Author: Marijn Haverbeke and contributors
Project Homepage: https://codemirror.net/
License: MIT License
License File: LICENSE.CodeMirror
----------------------------------------------------------------------
Json.NET (Newtonsoft.Json)
----------------------------------------------------------------------
This product includes Json.NET (also known as Newtonsoft.Json), which is licensed under the MIT License.
Original Project:
Name: Json.NET
Author: James Newton-King
Project Homepage: https://www.newtonsoft.com/json
License: MIT License
License File: LICENSE.Newtonsoft.Json
----------------------------------------------------------------------
SharpZipLib
----------------------------------------------------------------------
This product includes SharpZipLib, which is licensed under the MIT License.
Original Project:
Name: SharpZipLib
Author: SharpZipLib Contributors
Project Homepage: https://icsharpcode.github.io/SharpZipLib/
License: MIT License
License File: LICENSE.SharpZipLib
---------------------------------------------------------------------- ----------------------------------------------------------------------
End of notices. End of notices.

View File

@@ -60,9 +60,9 @@ namespace WAShell
if (!issetdpi) if (!issetdpi)
{ {
issetdpi = true; issetdpi = true;
ExecScript ("Bridge.Frame.scale = Bridge.Frame.scale * Bridge.UI.dpi"); ExecScript ("if (typeof Bridge !== \"undefined\") Bridge.Frame.scale = Bridge.Frame.scale * Bridge.UI.dpi");
} }
ExecScript ("Windows.UI.DPI.mode = 1"); ExecScript ("if (typeof Windows !== \"undefined\") Windows.UI.DPI.mode = 1");
if (e.Url.ToString () == webui.Url.ToString ()) if (e.Url.ToString () == webui.Url.ToString ())
{ {
splash.FadeOut (); splash.FadeOut ();

Binary file not shown.

View File

@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}</ProjectGuid> <ProjectGuid>{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}</ProjectGuid>
@@ -32,6 +32,13 @@
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport> <CLRSupport>true</CLRSupport>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
@@ -40,18 +47,13 @@
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport> <CLRSupport>true</CLRSupport>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@@ -61,26 +63,26 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -102,19 +104,27 @@
<AdditionalManifestFiles>app.manifest</AdditionalManifestFiles> <AdditionalManifestFiles>app.manifest</AdditionalManifestFiles>
</Manifest> </Manifest>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile> <ClCompile>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;HMODULE_MODE_EXE;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<CompileAsManaged>true</CompileAsManaged>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>shlwapi.lib;version.lib;dwmapi.lib;$(OutDir)pkgread.lib;$(OutDir)pkgmgr.lib;$(OutDir)certmgr.lib;$(OutDir)priformatcli.lib;$(OutDir)notice.lib;winhttp.lib;Psapi.lib;advapi32.lib;gdi32.lib;comdlg32.lib;shell32.lib;ole32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<IgnoreSpecificDefaultLibraries>comsupp.lib</IgnoreSpecificDefaultLibraries>
</Link> </Link>
<Manifest>
<AdditionalManifestFiles>app.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
@@ -139,7 +149,7 @@
<AdditionalManifestFiles>app.manifest</AdditionalManifestFiles> <AdditionalManifestFiles>app.manifest</AdditionalManifestFiles>
</Manifest> </Manifest>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader> <PrecompiledHeader>
@@ -147,7 +157,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;HMODULE_MODE_EXE;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
</ClCompile> </ClCompile>
<Link> <Link>
@@ -155,7 +165,14 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>shlwapi.lib;version.lib;dwmapi.lib;$(OutDir)pkgread.lib;$(OutDir)pkgmgr.lib;$(OutDir)certmgr.lib;$(OutDir)priformatcli.lib;$(OutDir)notice.lib;winhttp.lib;Psapi.lib;advapi32.lib;gdi32.lib;comdlg32.lib;shell32.lib;ole32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<IgnoreSpecificDefaultLibraries>
</IgnoreSpecificDefaultLibraries>
</Link> </Link>
<Manifest>
<AdditionalManifestFiles>app.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\certmgr\certmgr.h" /> <ClInclude Include="..\certmgr\certmgr.h" />

View File

@@ -72,6 +72,12 @@
<ClInclude Include="appxinfo.h"> <ClInclude Include="appxinfo.h">
<Filter>头文件</Filter> <Filter>头文件</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="localeex.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="bridge.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="..\certmgr\certmgr.h"> <ClInclude Include="..\certmgr\certmgr.h">
<Filter>头文件</Filter> <Filter>头文件</Filter>
</ClInclude> </ClInclude>
@@ -84,12 +90,6 @@
<ClInclude Include="..\pkgread\pkgread.h"> <ClInclude Include="..\pkgread\pkgread.h">
<Filter>头文件</Filter> <Filter>头文件</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="localeex.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="bridge.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="..\priformatcli\priformatcli.h"> <ClInclude Include="..\priformatcli\priformatcli.h">
<Filter>头文件</Filter> <Filter>头文件</Filter>
</ClInclude> </ClInclude>

View File

@@ -10,8 +10,8 @@
#include <codecvt> #include <codecvt>
#include <locale> #include <locale>
#include "nstring.h" #include "nstring.h"
#include "priformatcli.h" #include "../priformatcli/priformatcli.h"
#include "pkgread.h" #include "../pkgread/pkgread.h"
static std::string ws2utf8 (const std::wstring &ws) static std::string ws2utf8 (const std::wstring &ws)
{ {

View File

@@ -1 +0,0 @@
E:/Profiles/Bruce/Documents/Visual Studio 2015/Projects/AppInstallerReset/certmgr/certmgr.h

View File

@@ -49,6 +49,17 @@ bool IsURI (const std::wstring &str)
} }
catch (...) { return false; } catch (...) { return false; }
} }
std::wstring TrimQuotes (const std::wstring& str) {
if (str.empty ()) return str;
size_t len = str.size ();
size_t start = (str.front () == L'"') ? 1 : 0;
size_t end = len;
if (str.back () == L'"')
{
if (end > start) end = len - 1;
}
return str.substr (start, end - start);
}
enum class paramtype enum class paramtype
{ {
string, string,
@@ -87,6 +98,7 @@ void ParseCmdArgs (LPWSTR *argv, DWORD argc, std::map <cmdkey, cmdvalue> &parser
arg = arg.trim (); arg = arg.trim ();
if (IsFile (arg)) parseresult [cmdkey (arg, paramtype::file)] = cmdvalue {L"", paramtype::file, true}; if (IsFile (arg)) parseresult [cmdkey (arg, paramtype::file)] = cmdvalue {L"", paramtype::file, true};
else if (IsURI (arg)) parseresult [cmdkey (arg, paramtype::uri)] = cmdvalue {L"", paramtype::uri, true}; else if (IsURI (arg)) parseresult [cmdkey (arg, paramtype::uri)] = cmdvalue {L"", paramtype::uri, true};
else if (IsFile (TrimQuotes (arg))) parseresult [cmdkey (TrimQuotes (arg), paramtype::file)] = cmdvalue { L"", paramtype::file, true };
else else
{ {
for (auto &it : g_argslist) for (auto &it : g_argslist)
@@ -140,6 +152,11 @@ void ParseCmdArgs (LPWSTR *argv, DWORD argc, std::map <cmdkey, cmdvalue> &parser
auto value = rightpart.substr (valuehead); auto value = rightpart.substr (valuehead);
paramtype ptype = paramtype::string; paramtype ptype = paramtype::string;
if (IsFile (value)) ptype = paramtype::file; if (IsFile (value)) ptype = paramtype::file;
else if (IsFile (TrimQuotes (value)))
{
value = TrimQuotes (value);
ptype = paramtype::file;
}
else if (IsURI (StringTrim (value))) ptype = paramtype::uri; else if (IsURI (StringTrim (value))) ptype = paramtype::uri;
parseresult [cmdkey (it.uniquelabel, paramtype::string)] = cmdvalue {value, ptype, false}; parseresult [cmdkey (it.uniquelabel, paramtype::string)] = cmdvalue {value, ptype, false};
} }

View File

@@ -502,6 +502,7 @@ namespace Win32
using namespace System; using namespace System;
using namespace System::Runtime::InteropServices; using namespace System::Runtime::InteropServices;
[ComVisible (true)] [ComVisible (true)]
[ClassInterface (ClassInterfaceType::AutoDual)]
public ref class Key public ref class Key
{ {
private: private:
@@ -523,6 +524,7 @@ namespace Win32
); );
return CStringToMPString (res); return CStringToMPString (res);
} }
Object ^GetWithDefault (Object ^dflt) { return Get (dflt); }
Object ^Get () Object ^Get ()
{ {
auto res = GetPrivateProfileStringW ( auto res = GetPrivateProfileStringW (

View File

@@ -20,9 +20,9 @@
#include "resmap.h" #include "resmap.h"
#include "appxinfo.h" #include "appxinfo.h"
#include "localeex.h" #include "localeex.h"
#include "pkgmgr.h" #include "../pkgmgr/pkgmgr.h"
#include "notice.h" #include "../notice/notice.h"
#include "certmgr.h" #include "../certmgr/certmgr.h"
#include "bridge.h" #include "bridge.h"
#include "filepath.h" #include "filepath.h"
@@ -39,7 +39,7 @@ enum class CMDPARAM: DWORD
{ {
NONE = 0b000, NONE = 0b000,
SILENT = 0b001, SILENT = 0b001,
VERYSILENT = 0b011, VERYSILENT = 0b010,
MULTIPLE = 0b100 MULTIPLE = 0b100
}; };
@@ -1810,6 +1810,8 @@ std::vector <std::wstring> LoadFileListW (const std::wstring &filePath)
{ {
if (!line.empty () && line.back () == L'\r') line.pop_back (); if (!line.empty () && line.back () == L'\r') line.pop_back ();
if (!line.empty () && !std::wnstring::empty (line) && IsFileExists (line)) result.push_back (line); if (!line.empty () && !std::wnstring::empty (line) && IsFileExists (line)) result.push_back (line);
auto fullFile = CombinePath (GetFileDirectoryW (filePath), line);
if (!line.empty () && !std::wnstring::empty (fullFile) && IsFileExists (fullFile)) result.push_back (fullFile);
} }
return result; return result;
} }
@@ -1844,7 +1846,7 @@ DWORD CmdMapsToFlags (std::map <cmdkey, cmdvalue> cmdpairs, std::vector <std::wn
auto &key = it.first; auto &key = it.first;
auto &value = it.second; auto &value = it.second;
if (key.key.equals (L"silent")) dwret |= (DWORD)CMDPARAM::SILENT; if (key.key.equals (L"silent")) dwret |= (DWORD)CMDPARAM::SILENT;
else if (key.key.equals (L"verysilent")) dwret |= (DWORD)CMDPARAM::SILENT; else if (key.key.equals (L"verysilent")) dwret |= (DWORD)CMDPARAM::VERYSILENT;
else if (key.key.equals (L"multiple")) else if (key.key.equals (L"multiple"))
{ {
if (value.type == paramtype::file) if (value.type == paramtype::file)

View File

@@ -1 +0,0 @@
E:/Profiles/Bruce/Documents/Visual Studio 2015/Projects/AppInstallerReset/notice/notice.h

View File

@@ -1 +0,0 @@
E:/Profiles/Bruce/Documents/Visual Studio 2015/Projects/AppInstallerReset/pkgmgr/pkgmgr.h

View File

@@ -1 +0,0 @@
E:/Profiles/Bruce/Documents/Visual Studio 2015/Projects/AppInstallerReset/pkgread/pkgread.h

View File

@@ -1 +0,0 @@
../priformatcli/priformatcli.h

View File

@@ -90,7 +90,8 @@ std::map <std::string, unsigned> g_nameToId = {
MAKENAMEIDMAP (IDS_MSGBOX_TRYAGAIN), MAKENAMEIDMAP (IDS_MSGBOX_TRYAGAIN),
MAKENAMEIDMAP (IDS_MSGBOX_CONTINUE), MAKENAMEIDMAP (IDS_MSGBOX_CONTINUE),
MAKENAMEIDMAP (IDS_PREINSTALL_SUPPOS), MAKENAMEIDMAP (IDS_PREINSTALL_SUPPOS),
MAKENAMEIDMAP (IDS_PREINSTALL_NOSUPPOS) MAKENAMEIDMAP (IDS_PREINSTALL_NOSUPPOS),
MAKENAMEIDMAP (IDS_PREINSTALL_SUITCONDITION)
}; };
#ifdef MAKENAMEIDMAP #ifdef MAKENAMEIDMAP

Binary file not shown.

5
arm_build.bat Normal file
View File

@@ -0,0 +1,5 @@
@echo off
cd /d "%~dp0"
set SCRIPT_DIR=%~dp0
powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%ArmBuild.ps1"
pause

View File

@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{E04CCAB9-35DB-495C-A279-5B483C707CD0}</ProjectGuid> <ProjectGuid>{E04CCAB9-35DB-495C-A279-5B483C707CD0}</ProjectGuid>
@@ -31,6 +31,12 @@
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
@@ -38,13 +44,7 @@
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
@@ -59,26 +59,26 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -95,17 +95,18 @@
<AdditionalDependencies>crypt32.lib;wintrust.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>crypt32.lib;wintrust.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;CERTMGR_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CERTMGR_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>crypt32.lib;wintrust.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -126,14 +127,14 @@
<AdditionalDependencies>crypt32.lib;wintrust.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>crypt32.lib;wintrust.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;CERTMGR_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CERTMGR_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
</ClCompile> </ClCompile>
<Link> <Link>
@@ -141,6 +142,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>crypt32.lib;wintrust.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
@@ -156,23 +158,23 @@
<ClCompile Include="certmgr.cpp" /> <ClCompile Include="certmgr.cpp" />
<ClCompile Include="dllmain.cpp"> <ClCompile Include="dllmain.cpp">
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader> </PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader> </PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader> </PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader> </PrecompiledHeader>
</ClCompile> </ClCompile>
<ClCompile Include="stdafx.cpp"> <ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}</ProjectGuid> <ProjectGuid>{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}</ProjectGuid>
@@ -31,6 +31,12 @@
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
@@ -38,13 +44,7 @@
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
@@ -59,26 +59,26 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -97,18 +97,20 @@
<AdditionalDependencies>shlwapi.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>shlwapi.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile> <ClCompile>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<AdditionalDependencies>shlwapi.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -131,7 +133,7 @@
<AdditionalDependencies>shlwapi.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>shlwapi.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader> <PrecompiledHeader>
@@ -139,7 +141,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
</ClCompile> </ClCompile>
<Link> <Link>
@@ -147,6 +149,8 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<AdditionalDependencies>shlwapi.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>

76
notes/symlinks.md Normal file
View File

@@ -0,0 +1,76 @@
# 关于该项目中的一些符号链接
该项目由于原作者开发方便,使用了一些符号链接。在迁移时会遇到问题。
符号链接主要是位于 \appinstaller 目录中。
使用了符号链接的文件有:
- certmgr.h
- notice.h
- pkgmgr.h
- pkgread.h
- priformatcli.h
以上文件分别指向的是 `..\<ProjectName>\<ProjectName>.h`
但是我将源代码当中 appxinfo.h 和 main.cpp 这两个文件的 #include 语句改为了 `#include "../<ProjectName>/<ProjectName>.h"` ,因此就不需要原来的符号链接了。
# 一些最终运行所需文件位于 shared 目录
此外,在生成完成后,最终生成的程序需要一些文件,但是这些文件位于的是解决方案的 `shared` 目录。
因此,你在测试时,需要将 `shared` 目录中的每一个子目录都在输出目录下(`Debug``Release`)创建一个目录符号链接 (`SYMLINKD`),指向 `..\shared\<子目录>`
例如:
``` for /d %A in (D:\GitHub\App-Installer-For-Windows-8.x-Reset\shared\*) do @mklink /d "D:\GitHub\App-Installer-For-Windows-8.x-Reset\Debug\%~nA" "%A" ```
``` for /d %A in (D:\GitHub\App-Installer-For-Windows-8.x-Reset\shared\*) do @mklink /d "D:\GitHub\App-Installer-For-Windows-8.x-Reset\Release\%~nA" "%A" ```
最终发布时,你也需要将 `shared` 目录中的每一个子目录都复制到发布目录,再打包发布。
# pkgread 项目需要引用 pugixml 代码文件
最后pkgread 项目引用了我新建的一个叫 pugixml 的项目,包含如下文件:
- `pugixml.cpp`
- `pugixml.hpp`
- `pugiconfig.hpp`
如果没有这个的话,链接器会报错 LNK2019 无法解析的外部符号:
- `pugi::xml_document::load_file`
- `pugi::as_utf8`
- `pugi::as_wide`
和 LNK1120 n 个无法解析的外部命令。
因为这个解决方案需要一个 NuGet 包叫 `pugixml`
但是这个包默认只有 x86 和 x64 的版本,因此为了编译出 ARM32 版本,我就把 pugixml.cpp 等文件单开了一个项目。
迁移之后,你应该需要在 pugixml 项目中重新添加这几个“现有项”的引用。
路径示例:
```D:\GitHub\App-Installer-For-Windows-8.x-Reset\packages\pugixml.1.15.0\build\native\include\pugixml.cpp```
我的做法是在整个解决方案中添加了一个新的项目 `pugixml`,这个项目的唯一作用就是编译 pugixml.cpp 生成 pugixml.lib 。
暂时还需要手动将 Debug 和 Release 版本的 pugixml.lib 从生成的路径分别复制到项目生成时所引用的 Debug 和 Release 目录下,才能成功链接。
例如:
生成的目标路径:
```D:\GitHub\App-Installer-For-Windows-8.x-Reset\ARM\Debug\pugixml.lib```
```D:\GitHub\App-Installer-For-Windows-8.x-Reset\ARM\Release\pugixml.lib```
你需要复制到的路径:
```D:\GitHub\App-Installer-For-Windows-8.x-Reset\packages\pugixml.1.15.0\build\native\lib\ARM\v140\dynamic\Debug\pugixml.lib```
```D:\GitHub\App-Installer-For-Windows-8.x-Reset\packages\pugixml.1.15.0\build\native\lib\ARM\v140\dynamic\Release\pugixml.lib```

View File

@@ -1,10 +1,18 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
@@ -24,6 +32,13 @@
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
<CLRSupport>false</CLRSupport> <CLRSupport>false</CLRSupport>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
<CLRSupport>false</CLRSupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
@@ -31,21 +46,40 @@
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
<CLRSupport>false</CLRSupport> <CLRSupport>false</CLRSupport>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
<CLRSupport>false</CLRSupport>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" /> <ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ReferencePath>$(VCINSTALLDIR)\vcpackages;$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib;$(WindowsSdkDir)\References\CommonConfiguration\Neutral;$(VSSDK140Install)..\VC\atlmfc\lib;$(ReferencePath)</ReferencePath> <ReferencePath>$(VCINSTALLDIR)\vcpackages;$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib;$(WindowsSdkDir)\References\CommonConfiguration\Neutral;$(VSSDK140Install)..\VC\atlmfc\lib;$(ReferencePath)</ReferencePath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ReferencePath>$(VCINSTALLDIR)\vcpackages;$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib;$(WindowsSdkDir)\References\CommonConfiguration\Neutral;$(VSSDK140Install)..\VC\atlmfc\lib;$(ReferencePath)</ReferencePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ReferencePath>$(VCINSTALLDIR)\vcpackages;$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib;$(WindowsSdkDir)\References\CommonConfiguration\Neutral;$(VSSDK140Install)..\VC\atlmfc\lib;$(ReferencePath)</ReferencePath> <ReferencePath>$(VCINSTALLDIR)\vcpackages;$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib;$(WindowsSdkDir)\References\CommonConfiguration\Neutral;$(VSSDK140Install)..\VC\atlmfc\lib;$(ReferencePath)</ReferencePath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ReferencePath>$(VCINSTALLDIR)\vcpackages;$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib;$(WindowsSdkDir)\References\CommonConfiguration\Neutral;$(VSSDK140Install)..\VC\atlmfc\lib;$(ReferencePath)</ReferencePath>
</PropertyGroup>
<!-- 关键:启用 WinRT 扩展 --> <!-- 关键:启用 WinRT 扩展 -->
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
@@ -64,6 +98,23 @@
<AdditionalDependencies>shlwapi.lib;crypt32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>shlwapi.lib;crypt32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<AdditionalOptions>/ZW:nostdlib /FUplatform.winmd /FUwindows.winmd %(AdditionalOptions)</AdditionalOptions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;NOTICE_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>true</CompileAsWinRT>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<AdditionalDependencies>shlwapi.lib;crypt32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
@@ -83,6 +134,25 @@
<AdditionalDependencies>shlwapi.lib;crypt32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>shlwapi.lib;crypt32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalOptions>/ZW:nostdlib /FUplatform.winmd /FUWindows.winmd %(AdditionalOptions)</AdditionalOptions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;NOTICE_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>true</CompileAsWinRT>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>shlwapi.lib;crypt32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="dllmain.cpp" /> <ClCompile Include="dllmain.cpp" />
<ClCompile Include="notice.cpp" /> <ClCompile Include="notice.cpp" />

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

View File

@@ -1,10 +1,18 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
@@ -24,6 +32,13 @@
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
<CLRSupport>false</CLRSupport> <CLRSupport>false</CLRSupport>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
<CLRSupport>false</CLRSupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
@@ -31,21 +46,40 @@
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
<CLRSupport>false</CLRSupport> <CLRSupport>false</CLRSupport>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
<CLRSupport>false</CLRSupport>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" /> <ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ReferencePath>$(VCINSTALLDIR)\vcpackages;$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib;$(WindowsSdkDir)\References\CommonConfiguration\Neutral;$(ReferencePath)</ReferencePath> <ReferencePath>$(VCINSTALLDIR)\vcpackages;$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib;$(WindowsSdkDir)\References\CommonConfiguration\Neutral;$(ReferencePath)</ReferencePath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ReferencePath>$(VCINSTALLDIR)\vcpackages;$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib;$(WindowsSdkDir)\References\CommonConfiguration\Neutral;$(ReferencePath)</ReferencePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ReferencePath>$(VCINSTALLDIR)\vcpackages;$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib;$(WindowsSdkDir)\References\CommonConfiguration\Neutral;$(ReferencePath)</ReferencePath> <ReferencePath>$(VCINSTALLDIR)\vcpackages;$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib;$(WindowsSdkDir)\References\CommonConfiguration\Neutral;$(ReferencePath)</ReferencePath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ReferencePath>$(VCINSTALLDIR)\vcpackages;$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib;$(WindowsSdkDir)\References\CommonConfiguration\Neutral;$(ReferencePath)</ReferencePath>
</PropertyGroup>
<!-- 关键:启用 WinRT 扩展 --> <!-- 关键:启用 WinRT 扩展 -->
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
@@ -63,6 +97,25 @@
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<AdditionalOptions>/ZW:nostdlib /FUplatform.winmd /FUwindows.winmd %(AdditionalOptions)</AdditionalOptions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PKGMGR_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>true</CompileAsWinRT>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<AdditionalDependencies>shlwapi.lib;version.lib;dwmapi.lib;winhttp.lib;Psapi.lib;advapi32.lib;gdi32.lib;comdlg32.lib;shell32.lib;ole32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
@@ -81,6 +134,27 @@
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalOptions>/ZW:nostdlib /FUplatform.winmd /FUWindows.winmd %(AdditionalOptions)</AdditionalOptions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PKGMGR_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>true</CompileAsWinRT>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<AdditionalDependencies>shlwapi.lib;version.lib;dwmapi.lib;winhttp.lib;Psapi.lib;advapi32.lib;gdi32.lib;comdlg32.lib;shell32.lib;ole32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="dllmain.cpp" /> <ClCompile Include="dllmain.cpp" />
<ClCompile Include="pkgmgr.cpp" /> <ClCompile Include="pkgmgr.cpp" />

View File

@@ -1221,6 +1221,124 @@ void PackageReaderFreeString (LPWSTR lpStrFromThisDll)
free (lpStrFromThisDll); free (lpStrFromThisDll);
} }
HLIST_PVOID GetAppxBundleAllResourcePackageFileNames (_In_ HPKGREAD hReader)
{
auto ptr = ToPtrPackage (hReader);
if (!ptr) return nullptr;
if (ptr->type () == PackageType::bundle)
{
auto br = ptr->bundle_reader ();
std::vector <appx_info::appx_iditem> rpi;
br.package_id_items ().resource_packages (rpi);
auto buf = (HLIST_PVOID)malloc (sizeof (LIST_PVOID) + sizeof (LPWSTR) * rpi.size ());
buf->dwSize = rpi.size ();
for (size_t i = 0; i < rpi.size (); i ++)
{
auto &it = rpi [i];
buf->alpVoid [i] = _wcsdup (it.file_name ().c_str ());
}
return buf;
}
return nullptr;
}
HLIST_PVOID GetAppxBundleAllLocaleResourcePackageFileNames (_In_ HPKGREAD hReader)
{
auto ptr = ToPtrPackage (hReader);
if (!ptr) return nullptr;
if (ptr->type () == PackageType::bundle)
{
auto br = ptr->bundle_reader ();
std::vector <appx_info::appx_iditem> rpi;
br.package_id_items ().resource_packages (rpi);
std::vector <std::wstring> localePkgNames;
for (size_t i = 0; i < rpi.size (); i ++)
{
auto &it = rpi [i];
auto qres = it.qualified_resources ();
std::vector <std::wstring> langs;
std::vector <UINT32> temp;
std::vector <DX_FEATURE_LEVEL> dxt;
qres.qualified_resources (&langs, &temp, &dxt);
if (temp.size () > 0 || dxt.size () > 0) continue;
localePkgNames.push_back (it.file_name ());
}
auto buf = (HLIST_PVOID)malloc (sizeof (LIST_PVOID) + sizeof (LPWSTR) * localePkgNames.size ());
buf->dwSize = localePkgNames.size ();
for (size_t i = 0; i < localePkgNames.size (); i ++)
{
buf->alpVoid [i] = _wcsdup (localePkgNames [i].c_str ());
}
return buf;
}
return nullptr;
}
HLIST_PVOID GetAppxBundleAllFileResourcePackageFileNames (_In_ HPKGREAD hReader)
{
auto ptr = ToPtrPackage (hReader);
if (!ptr) return nullptr;
if (ptr->type () == PackageType::bundle)
{
auto br = ptr->bundle_reader ();
std::vector <appx_info::appx_iditem> rpi;
br.package_id_items ().resource_packages (rpi);
std::vector <std::wstring> filePkgNames;
for (size_t i = 0; i < rpi.size (); i ++)
{
auto &it = rpi [i];
auto qres = it.qualified_resources ();
std::vector <std::wstring> langs;
std::vector <UINT32> temp;
std::vector <DX_FEATURE_LEVEL> dxt;
qres.qualified_resources (&langs, &temp, &dxt);
if (temp.size () > 0)
filePkgNames.push_back (it.file_name ());
}
auto buf = (HLIST_PVOID)malloc (sizeof (LIST_PVOID) + sizeof (LPWSTR) * filePkgNames.size ());
buf->dwSize = filePkgNames.size ();
for (size_t i = 0; i < filePkgNames.size (); i ++)
{
buf->alpVoid [i] = _wcsdup (filePkgNames [i].c_str ());
}
return buf;
}
return nullptr;
}
void FreeAppxBundlePayloadsFileNameList (_In_ HLIST_PVOID hStringList)
{
if (!hStringList) return;
for (size_t i = 0; i < hStringList->dwSize; i ++)
{
auto ptr = hStringList->alpVoid [i];
if (!ptr) continue;
free (ptr);
}
free (hStringList);
}
void UpdatePackageApplicationItemGetName (_In_ LPCWSTR *lpNames, _In_ DWORD dwArrLen)
{
bool clearAll = !lpNames || !dwArrLen;
if (clearAll)
{
appitems.clear ();
return;
}
appitems.clear ();
for (size_t i = 0; i < dwArrLen; i ++)
{
auto ptr = lpNames [i];
if (strnull (ptr)) continue;
push_unique (appitems, std::wstring (ptr));
}
}
void GetPackageApplicationItemGetNameList (_In_ ITER_WSTRING_CALLBACK pfCallback)
{
if (!pfCallback) return;
for (auto &it : appitems)
{
pfCallback (it.c_str ());
}
}
// ========== 以下是对清单文件的读取 ========== // ========== 以下是对清单文件的读取 ==========
#define ToHandleMRead(_cpp_ptr_) reinterpret_cast <HPKGMANIFESTREAD> (_cpp_ptr_) #define ToHandleMRead(_cpp_ptr_) reinterpret_cast <HPKGMANIFESTREAD> (_cpp_ptr_)
#define ToPtrManifest(_cpp_ptr_) reinterpret_cast <manifest *> (_cpp_ptr_) #define ToPtrManifest(_cpp_ptr_) reinterpret_cast <manifest *> (_cpp_ptr_)

View File

@@ -290,6 +290,16 @@ extern "C"
// 其实通过 free 释放即可,但考虑到环境问题,那么另写了个函数 // 其实通过 free 释放即可,但考虑到环境问题,那么另写了个函数
PKGREAD_API void PackageReaderFreeString (LPWSTR lpStrFromThisDll); PKGREAD_API void PackageReaderFreeString (LPWSTR lpStrFromThisDll);
PKGREAD_API HLIST_PVOID GetAppxBundleAllResourcePackageFileNames (_In_ HPKGREAD hReader);
PKGREAD_API HLIST_PVOID GetAppxBundleAllLocaleResourcePackageFileNames (_In_ HPKGREAD hReader);
PKGREAD_API HLIST_PVOID GetAppxBundleAllFileResourcePackageFileNames (_In_ HPKGREAD hReader);
PKGREAD_API void FreeAppxBundlePayloadsFileNameList (_In_ HLIST_PVOID hStringList);
PKGREAD_API void UpdatePackageApplicationItemGetName (_In_ LPCWSTR *lpNames, _In_ DWORD dwArrLen);
typedef void (*ITER_WSTRING_CALLBACK) (LPCWSTR lpString);
PKGREAD_API void GetPackageApplicationItemGetNameList (_In_ ITER_WSTRING_CALLBACK pfCallback);
// ========= 以下是针对于应用清单的读取器,一些常量和类型等是复用的 ========= // ========= 以下是针对于应用清单的读取器,一些常量和类型等是复用的 =========
TEMPLATE_STRUCT (PKGMANIFESTREAD); TEMPLATE_STRUCT (PKGMANIFESTREAD);

View File

@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{A7753282-AA16-43D9-8ACA-7065239DD702}</ProjectGuid> <ProjectGuid>{A7753282-AA16-43D9-8ACA-7065239DD702}</ProjectGuid>
@@ -31,6 +31,12 @@
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
@@ -38,13 +44,7 @@
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
@@ -59,26 +59,26 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -88,6 +88,8 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PKGREAD_EXPORTS;HMODULE_MODE_DLL1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PKGREAD_EXPORTS;HMODULE_MODE_DLL1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>
</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
@@ -95,17 +97,30 @@
<AdditionalDependencies>urlmon.lib;crypt32.lib;version.lib;xmllite.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>urlmon.lib;crypt32.lib;version.lib;xmllite.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;PKGREAD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PKGREAD_EXPORTS;HMODULE_MODE_DLL1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>
</AdditionalIncludeDirectories>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<WholeProgramOptimization>false</WholeProgramOptimization>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ConformanceMode>Default</ConformanceMode>
<ShowIncludes>false</ShowIncludes>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>shlwapi.lib;version.lib;dwmapi.lib;winhttp.lib;Psapi.lib;advapi32.lib;gdi32.lib;comdlg32.lib;shell32.lib;ole32.lib;urlmon.lib;crypt32.lib;xmllite.lib;pugixml.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>
</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(SolutionDir)packages\pugixml.1.15.0\build\native\lib\$(PlatformTarget)\$(PlatformToolset)\dynamic\$(Configuration)</AdditionalLibraryDirectories>
<IgnoreAllDefaultLibraries>
</IgnoreAllDefaultLibraries>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -117,6 +132,8 @@
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PKGREAD_EXPORTS;HMODULE_MODE_DLL1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PKGREAD_EXPORTS;HMODULE_MODE_DLL1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>
</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
@@ -126,21 +143,25 @@
<AdditionalDependencies>urlmon.lib;crypt32.lib;version.lib;xmllite.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>urlmon.lib;crypt32.lib;version.lib;xmllite.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;PKGREAD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PKGREAD_EXPORTS;HMODULE_MODE_DLL1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>
</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>shlwapi.lib;version.lib;dwmapi.lib;winhttp.lib;Psapi.lib;advapi32.lib;gdi32.lib;comdlg32.lib;shell32.lib;ole32.lib;urlmon.lib;crypt32.lib;xmllite.lib;pugixml.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)packages\pugixml.1.15.0\build\native\lib\$(PlatformTarget)\$(PlatformToolset)\dynamic\$(Configuration)</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
@@ -169,24 +190,24 @@
<ItemGroup> <ItemGroup>
<ClCompile Include="dllmain.cpp"> <ClCompile Include="dllmain.cpp">
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader> </PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader> </PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader> </PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader> </PrecompiledHeader>
</ClCompile> </ClCompile>
<ClCompile Include="pkgread.cpp" /> <ClCompile Include="pkgread.cpp" />
<ClCompile Include="stdafx.cpp"> <ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -195,6 +216,11 @@
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\pugixml\pugixml.vcxproj">
<Project>{b1df139f-cef1-404f-8255-31ef4bf0ec4c}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\pugixml.1.15.0\build\native\pugixml.targets" Condition="Exists('..\packages\pugixml.1.15.0\build\native\pugixml.targets')" /> <Import Project="..\packages\pugixml.1.15.0\build\native\pugixml.targets" Condition="Exists('..\packages\pugixml.1.15.0\build\native\pugixml.targets')" />

View File

@@ -1055,6 +1055,10 @@ size_t GetPriScaleAndTargetSizeFileList (
auto value = quali->Value; auto value = quali->Value;
qualis->Add (type, value); qualis->Add (type, value);
} }
if (qualis->Count == 0 && tasktype == 1)
{
qualis->Add (QualifierType::Scale, 100);
}
if (qualis->ContainsKey (QualifierType::Language)) if (qualis->ContainsKey (QualifierType::Language))
{ {
resc = PRI_MAKE_STRING (LocaleCodeToLcidW (MPStringToStdW (qualis [QualifierType::Language]->ToString ()))); resc = PRI_MAKE_STRING (LocaleCodeToLcidW (MPStringToStdW (qualis [QualifierType::Language]->ToString ())));

View File

@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{33D91B58-1981-4A3C-B4D1-86EE406CDE12}</ProjectGuid> <ProjectGuid>{33D91B58-1981-4A3C-B4D1-86EE406CDE12}</ProjectGuid>
@@ -33,6 +33,13 @@
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport> <CLRSupport>true</CLRSupport>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
@@ -41,18 +48,13 @@
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport> <CLRSupport>true</CLRSupport>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@@ -62,26 +64,26 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -98,18 +100,21 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile> <ClCompile>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;PRIFORMATCLI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PRIFORMATCLI_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<AdditionalDependencies>shlwapi.lib;version.lib;dwmapi.lib;winhttp.lib;Psapi.lib;advapi32.lib;gdi32.lib;comdlg32.lib;shell32.lib;ole32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -130,7 +135,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader> <PrecompiledHeader>
@@ -138,7 +143,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;PRIFORMATCLI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PRIFORMATCLI_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
</ClCompile> </ClCompile>
<Link> <Link>
@@ -146,6 +151,9 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<AdditionalDependencies>shlwapi.lib;version.lib;dwmapi.lib;winhttp.lib;Psapi.lib;advapi32.lib;gdi32.lib;comdlg32.lib;shell32.lib;ole32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
@@ -168,16 +176,16 @@
<ItemGroup> <ItemGroup>
<ClCompile Include="dllmain.cpp"> <ClCompile Include="dllmain.cpp">
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader> </PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader> </PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader> </PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader> </PrecompiledHeader>
</ClCompile> </ClCompile>
<ClCompile Include="priformatcli.cpp" /> <ClCompile Include="priformatcli.cpp" />

153
pugixml/pugixml.vcxproj Normal file
View File

@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\packages\pugixml.1.15.0\build\native\include\pugiconfig.hpp" />
<ClInclude Include="..\packages\pugixml.1.15.0\build\native\include\pugixml.hpp" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\packages\pugixml.1.15.0\build\native\include\pugixml.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{b1df139f-cef1-404f-8255-31ef4bf0ec4c}</ProjectGuid>
<RootNamespace>pugixml</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<OutDir>$(SolutionDir)packages\pugixml.1.15.0\build\native\lib\$(PlatformTarget)\$(PlatformToolset)\dynamic\$(Configuration)</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<OutDir>$(SolutionDir)packages\pugixml.1.15.0\build\native\lib\$(PlatformTarget)\$(PlatformToolset)\dynamic\$(Configuration)</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>
</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>
</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>
</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>
</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\packages\pugixml.1.15.0\build\native\include\pugiconfig.hpp">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="..\packages\pugixml.1.15.0\build\native\include\pugixml.hpp">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\packages\pugixml.1.15.0\build\native\include\pugixml.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>

Binary file not shown.

View File

@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{3AE2A022-ED83-41F1-948A-12A7593CBD00}</ProjectGuid> <ProjectGuid>{3AE2A022-ED83-41F1-948A-12A7593CBD00}</ProjectGuid>
@@ -31,6 +31,12 @@
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
@@ -38,13 +44,7 @@
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
@@ -59,26 +59,26 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -94,12 +94,12 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;RESLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;RESLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
</ClCompile> </ClCompile>
<Link> <Link>
@@ -124,14 +124,14 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;RESLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;RESLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
</ClCompile> </ClCompile>
<Link> <Link>
@@ -153,24 +153,24 @@
<ItemGroup> <ItemGroup>
<ClCompile Include="dllmain.cpp"> <ClCompile Include="dllmain.cpp">
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader> </PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader> </PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader> </PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader> </PrecompiledHeader>
</ClCompile> </ClCompile>
<ClCompile Include="reslib.cpp" /> <ClCompile Include="reslib.cpp" />
<ClCompile Include="stdafx.cpp"> <ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

Binary file not shown.

View File

@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}</ProjectGuid> <ProjectGuid>{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}</ProjectGuid>
@@ -33,6 +33,13 @@
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport> <CLRSupport>true</CLRSupport>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
@@ -41,18 +48,13 @@
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport> <CLRSupport>true</CLRSupport>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@@ -62,13 +64,13 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
@@ -76,15 +78,17 @@
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath)</IncludePath> <IncludePath>$(IncludePath)</IncludePath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath)</IncludePath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath)</IncludePath> <IncludePath>$(IncludePath)</IncludePath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath)</IncludePath>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
@@ -102,18 +106,24 @@
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile> <ClCompile>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;HMODULE_MODE_EXE;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>shlwapi.lib;version.lib;dwmapi.lib;winhttp.lib;Psapi.lib;advapi32.lib;gdi32.lib;comdlg32.lib;shell32.lib;ole32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>comsupp.lib</IgnoreSpecificDefaultLibraries>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -136,7 +146,7 @@
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader> <PrecompiledHeader>
@@ -144,7 +154,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;HMODULE_MODE_EXE;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
</ClCompile> </ClCompile>
<Link> <Link>
@@ -152,6 +162,11 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>shlwapi.lib;version.lib;dwmapi.lib;winhttp.lib;Psapi.lib;advapi32.lib;gdi32.lib;comdlg32.lib;shell32.lib;ole32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>

View File

@@ -1,169 +0,0 @@
#Requires -RunAsAdministrator
Push-Location $PSScriptRoot
try {
# 语言检测函数
function Get-Language {
$lang = [System.Globalization.CultureInfo]::CurrentUICulture.TwoLetterISOLanguageName
if ($lang -eq "zh") { return "zh" }
return "en"
}
$lang = Get-Language
# 本地化消息
$messages = @{
en = @{
title = "Desktop App Installer Setup"
confirm = "Do you want to install Desktop App Installer? (y/n)"
invalid = "Invalid input. Please enter y or n."
cancelled = "Installation cancelled."
arch_error = "Error: Cannot continue installation because the computer's processor architecture is not ARM."
creating_shortcuts = "Creating shortcuts in Start Screen..."
registering = "Registering..."
complete = "Installation complete!"
}
zh = @{
title = "Desktop App Installer 安装程序"
confirm = "是否安装 Desktop App Installer(y/n)"
invalid = "无效输入,请输入 y 或 n。"
cancelled = "安装已取消。"
arch_error = "错误:无法继续安装,因为计算机的处理器架构不是 ARM。"
creating_shortcuts = "正在创建开始屏幕快捷方式..."
registering = "正在注册..."
complete = "安装完成!"
}
}
$msg = $messages[$lang]
# 函数定义
function Create-Shortcut {
param(
[string]$LnkPath,
[string]$TargetPath,
[string]$AppId
)
$toolShortcutPath = Join-Path $PSScriptRoot "shortcut.exe"
if (-not (Test-Path $toolShortcutPath)) {
throw "Error: cannot find file 'shortcut.exe' in folder '$PSScriptRoot'"
}
& $toolShortcutPath $LnkPath $TargetPath $AppId
return $LASTEXITCODE
}
function Set-DesktopInit {
param(
[string]$IniPath,
[string]$Section,
[string]$Key,
[string]$Value
)
$toolDesktopIniPath = Join-Path $PSScriptRoot "desktopini.exe"
if (-not (Test-Path $toolDesktopIniPath)) {
throw "Error: cannot find file 'desktopini.exe' in folder '$PSScriptRoot'"
}
& $toolDesktopIniPath $IniPath $Section $Key $Value
return $LASTEXITCODE
}
# 检查处理器架构
if ($env:PROCESSOR_ARCHITECTURE.Trim() -ne "ARM") {
throw $msg.arch_error
}
# 确认安装
do {
$response = Read-Host $msg.confirm
$response = $response.ToLower()
if ($response -eq 'y') {
$confirmed = $true
break
} elseif ($response -eq 'n') {
Write-Host $msg.cancelled
exit 0
} else {
Write-Host $msg.invalid
}
} while ($true)
# 安装目录和快捷方式目录
$appStartMenuFolder = "Desktop App Installer"
$appPublicStartMenuFolder = [System.IO.Path]::Combine($env:ProgramData, "Microsoft\Windows\Start Menu\Programs")
$startitemfolder = [System.IO.Path]::Combine($appPublicStartMenuFolder, $appStartMenuFolder)
$AppFolder = $PSScriptRoot
Write-Output $msg.creating_shortcuts
if (-not (Test-Path $startitemfolder)) {
New-Item -ItemType Directory -Path $startitemfolder -Force | Out-Null
}
$shortcuts = @(
@{
LnkPath = Join-Path $startitemfolder "App Installer.lnk"
TargetPath = Join-Path $AppFolder "appinstaller.exe"
AppId = "Microsoft.DesktopAppInstaller!App"
},
@{
LnkPath = Join-Path $startitemfolder "Settings.lnk"
TargetPath = Join-Path $AppFolder "settings.exe"
AppId = "WindowsModern.PracticalToolsProject!Settings"
},
@{
LnkPath = Join-Path $startitemfolder "Package Manager.lnk"
TargetPath = Join-Path $AppFolder "Manager.exe"
AppId = "WindowsModern.PracticalToolsProject!Manager"
},
@{
LnkPath = Join-Path $startitemfolder "Update.lnk"
TargetPath = Join-Path $AppFolder "Update.exe"
AppId = "WindowsModern.PracticalToolsProject!Update"
},
@{
LnkPath = Join-Path $startitemfolder "Package Reader.lnk"
TargetPath = Join-Path $AppFolder "Reader.exe"
AppId = "WindowsModern.PracticalToolsProject!Reader"
}
)
foreach ($item in $shortcuts) {
$exitCode = Create-Shortcut -LnkPath $item.LnkPath -TargetPath $item.TargetPath -AppId $item.AppId
}
# $desktopini = Join-Path $startitemfolder "desktop.ini"
$desktopini = $startitemfolder
Set-DesktopInit -IniPath $desktopini -Section ".ShellClassInfo" -Key "ConfirmFileOp" -Value 0
Set-DesktopInit -IniPath $desktopini -Section "LocalizedFileNames" -Key "App Installer.lnk" -Value "@$AppFolder\appinstaller.exe,-300"
Set-DesktopInit -IniPath $desktopini -Section "LocalizedFileNames" -Key "Settings.lnk" -Value "@$AppFolder\settings.exe,-200"
Set-DesktopInit -IniPath $desktopini -Section "LocalizedFileNames" -Key "Update.lnk" -Value "@$AppFolder\reslib.dll,-103"
Set-DesktopInit -IniPath $desktopini -Section "LocalizedFileNames" -Key "Package Manager.lnk" -Value "@$AppFolder\reslib.dll,-228"
Set-DesktopInit -IniPath $desktopini -Section "LocalizedFileNames" -Key "Uninstall.lnk" -Value "@$AppFolder\reslib.dll,-131"
Set-DesktopInit -IniPath $desktopini -Section ".ShellClassInfo" -Key "LocalizedResourceName" -Value "@$AppFolder\appinstaller.exe,-300"
Write-Output $msg.registering
$reg = [Microsoft.Win32.Registry]::ClassesRoot
$key = $reg.CreateSubKey("Microsoft.DesktopAppInstaller")
$key.SetValue("", "Windows Store App Package")
$key.Close()
$subKey = $reg.CreateSubKey("Microsoft.DesktopAppInstaller\Shell\Open\Command")
$subKey.SetValue("", "`"$AppFolder\appinstaller.exe`" `"%1`"")
$subKey.Close()
$subKey = $reg.CreateSubKey("Microsoft.DesktopAppInstaller\DefaultIcon")
$subKey.SetValue("", "$AppFolder\appinstaller.exe,2")
$subKey.Close()
$subKey = $reg.CreateSubKey("Applications\AppInstaller.exe\DefaultIcon")
$subKey.SetValue("", "$AppFolder\appinstaller.exe,-136")
$subKey.Close()
$subKey = $reg.CreateSubKey(".appx")
$subKey.SetValue("", "Microsoft.DesktopAppInstaller")
$subKey.Close()
$subKey = $reg.CreateSubKey(".appxbundle")
$subKey.SetValue("", "Microsoft.DesktopAppInstaller")
$subKey.Close()
Write-Output ""
Write-Output $msg.complete
Start-Sleep -Seconds 5
} finally {
Pop-Location
}

BIN
shared/ArmInstaller.exe Normal file

Binary file not shown.

View File

@@ -1,153 +0,0 @@
#Requires -RunAsAdministrator
Push-Location $PSScriptRoot
try {
# 语言检测函数
function Get-Language {
$lang = [System.Globalization.CultureInfo]::CurrentUICulture.TwoLetterISOLanguageName
if ($lang -eq "zh") { return "zh" }
return "en"
}
$lang = Get-Language
# 本地化消息
$messages = @{
en = @{
title = "Uninstall Desktop App Installer"
confirm = "Are you sure you want to uninstall Desktop App Installer? (y/n)"
invalid = "Invalid input. Please enter y or n."
removing_start = "Removing Start Menu folder..."
removing_reg = "Removing registry entries..."
removing_dir = "Removing installation directory..."
confirm_dir = "Do you also want to delete the installation directory? (y/n)"
complete = "Uninstallation complete."
error = "Error: "
cancelled = "Uninstall cancelled."
}
zh = @{
title = "卸载 Desktop App Installer"
confirm = "确定要卸载 Desktop App Installer 吗?(y/n)"
invalid = "无效输入,请输入 y 或 n。"
removing_start = "正在删除开始菜单文件夹..."
removing_reg = "正在删除注册表项..."
removing_dir = "正在删除安装目录..."
confirm_dir = "是否同时删除安装目录?(y/n)"
complete = "卸载完成。"
error = "错误:"
cancelled = "卸载已取消。"
}
}
$msg = $messages[$lang]
if ($env:PROCESSOR_ARCHITECTURE.Trim() -ne "ARM") {
throw "Error: Cannot continue installation because the computer's processor architecture is not ARM."
}
# 确认卸载(控制台交互)
do {
$response = Read-Host $msg.confirm
$response = $response.ToLower()
if ($response -eq 'y') {
$confirmed = $true
break
} elseif ($response -eq 'n') {
Write-Host $msg.cancelled
exit 0
} else {
Write-Host $msg.invalid
}
} while ($true)
# 定义路径
$appStartMenuFolder = "Desktop App Installer"
$appPublicStartMenuFolder = [System.IO.Path]::Combine($env:ProgramData, "Microsoft\Windows\Start Menu\Programs")
$startitemfolder = [System.IO.Path]::Combine($appPublicStartMenuFolder, $appStartMenuFolder)
$AppFolder = $PSScriptRoot
# 删除开始菜单文件夹
Write-Host $msg.removing_start
if (Test-Path $startitemfolder) {
Remove-Item -Path $startitemfolder -Recurse -Force -ErrorAction SilentlyContinue
if (Test-Path $startitemfolder) {
Write-Warning "$msg.error Could not remove $startitemfolder"
} else {
Write-Output "Removed $startitemfolder"
}
} else {
Write-Output "Start Menu folder not found, skipping."
}
# 删除注册表项
Write-Host $msg.removing_reg
$reg = [Microsoft.Win32.Registry]::ClassesRoot
$keysToDelete = @(
"Microsoft.DesktopAppInstaller",
".appx",
".appxbundle"
)
foreach ($keyName in $keysToDelete) {
try {
if ($reg.OpenSubKey($keyName) -ne $null) {
$reg.DeleteSubKeyTree($keyName)
Write-Output "Removed registry key: HKCR\$keyName"
} else {
Write-Output "Registry key not found: HKCR\$keyName"
}
} catch {
Write-Warning "$msg.error Could not remove HKCR\$keyName : $_"
}
}
# 删除 Applications\AppInstaller.exe 下的 DefaultIcon
$appPath = "Applications\AppInstaller.exe"
try {
$appKey = $reg.OpenSubKey($appPath, $true)
if ($appKey) {
$subKeyNames = $appKey.GetSubKeyNames()
if ($subKeyNames -contains "DefaultIcon") {
$appKey.DeleteSubKey("DefaultIcon")
Write-Output "Removed registry key: HKCR\$appPath\DefaultIcon"
}
$appKey.Close()
} else {
Write-Output "Registry key not found: HKCR\$appPath"
}
} catch {
Write-Warning "$msg.error Could not process HKCR\$appPath : $_"
}
# 删除安装目录
Write-Host $msg.removing_dir
do {
$respDir = Read-Host $msg.confirm_dir
$respDir = $respDir.ToLower()
if ($respDir -eq 'y') {
if (Test-Path $AppFolder) {
Remove-Item -Path $AppFolder -Recurse -Force -ErrorAction SilentlyContinue
if (Test-Path $AppFolder) {
Write-Warning "$msg.error Could not delete $AppFolder"
} else {
Write-Output "Deleted installation directory."
}
} else {
Write-Output "Installation directory not found."
}
break
} elseif ($respDir -eq 'n') {
Write-Output "Skipped deleting installation directory."
break
} else {
Write-Host $msg.invalid
}
} while ($true)
Write-Host $msg.complete
Start-Sleep -Seconds 3
} catch {
Write-Error "Uninstall failed: $_"
} finally {
Pop-Location
}

BIN
shared/ArmUninstaller.exe Normal file

Binary file not shown.

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" GeneratedByTileIconifier="true">
<VisualElements ShowNameOnSquare150x150Logo="on" Square150x150Logo="VisualElements\MediumIconReader.png" Square70x70Logo="VisualElements\SmallIconReader.png" ForegroundText="light" BackgroundColor="#004fe2" TileIconifierColorSelection="Default" TileIconifierCreatedWithUpgrade="true" />
</Application>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<ShortcutItemImage xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OriginalBytes>iVBORw0KGgoAAAANSUhEUgAAANIAAADSCAYAAAA/mZ5CAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAnoSURBVHhe7d17qKR1HcdxsbKLS2WWsFBiEUoRGRUZUVhBEOZ1ddW8oKbrHyJUEkkKuRRhRekfUeHSvUgpoljX3dpatXUttYzoQkGEZkpRoNAfQSC7vX/zfGc958yZM7/nPJf5PWfeL/gyc+b53c6Z78f13OYcIUmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJG0whw4d2n7w4MHL4k1JdRGgzxKkEe7/lbo0LknDRjNvo/5GPR0PdYL1vxgZWobH/0JdFMOkYaF5r6GeiH4e4e0n43KrWPfW2GIqxvyZuiCmSGWjWT9ELQvQUlx7NIa2giW3VyvnYf8/UufFdKksNOdH1wrQUoz7XUxrhHWuiyVrY+7vqS2xlDRfNOONVFaAlmLOgVhiXZi/LZZqhHV+S50Vy0r9of+eTaUvM9cO0FLM3x1L1sK8C2KJ1rDmw9TpsYXUHfrtBVTjAC3FWnfE8lmYsrWa2Q3O85CBUiforxdTrQZoKdbdEVutiaGdhmgpzvSAgVIraKSX0VOdBWgp9vh8bLsqhvQWoqU41/0GSutC42ymh3oJ0FLsd1McYRkuzSVES3G2/QZK2eiZ3gO0FHt/OI4ywkNzD9EK9xoorYkGuT6aZa44x5XpPNwtLUSHccZ9BkpT0RyfjF6ZK85xS9wtGufca6C0KhrjE9EnvWPvndy8Kc7xWuqe6krZOOceykBpOXqj1s+wNZUCNK0RuXw1135VjSwb57zLQGkZ+qLzMK0VoJUYdxX1UEwtWp33SwuAnugkTE0ajXlXUg/GUkVr8n5qg6EfWgtTm43FOh+gHoili9bm+60BoxcahanLRmLdK6hfxFZF6/LjoIGgAdLnKE9HT2Tps3HY7nL2ur/auWx9flxUIHrgGBrg0aodpptno7DvZdSBOErR5vlxUgF48lf9/k5JjcE5LqXui6MVraSPm3rEc38CT/zfqzYouxE41yXU/jhq0dLHkZsj4+haBDzp6YVOHqEG8YKMnPNi6udVy5aJ8x0dx9Ui4Yl/jNpBD4x+rGcIOO9FVIk/evTSOKIWDQ359WiC9F/T27gZUqDeT91dnX6+OMcr4lhaRPTAxPeXBhioC6l91en7x94nxlG0qOiDqd+oHWCgzqd+Vp2+H+x3cmyvRUYj3Bw9MdXQAsVZt3Lmn44O3yH2eGtsqUVHM3w5+mKmoQWK855H7a1O3y7WfVdsI42a7fbojWwDDNS51I+r0zfHWqfF0lKFptgT/VHbAAO1pcn7mzD/3FhOegaN0fj7MQMM1DnU7ur0tWyNJaTl2gjS2AADdRZ1V3X6mQyRpmszSGMDDNSZ1K7q9KsyRFpbF0EaG2CgzqDurE5/mCHSbF0GaWyAgfog9SRnTi9w+c42KpbWRtVHkMZKDxRnO5Izfpyq9VvE07DOdyh/fGgR8ET3FqQx9iwqUJzlKM50A/W/0QEbYp0UoFNieS0CnvDegzTG3nMNFPs/n0p/O/e/1YmaYR0DtKh44ucWpDHO0Gug2GsTe15H/Wd0gIZYxwAtOhpg7kEa4yydBoq1X8QeH6GeGm3YEOt8lTJAKitIY5yp1UCx3rHU9dS/qx2aSeejDJCeQUMUF6Sx1LDcrDtQzD+OupH6R7ViM+k8lAHSJBqj2CCNpQbmJjtQjN9MpS9jH36VpCbS/pQB0nQ0SPFBGuOsN8exp2LMtdRjMaUR1jFAykOjDCZI4dNx9Am8LxfHmEYiQG+JZaXZhhYkzrszjj6Ba4/EsHVJAeKmty/DawMZYJDuiaNPWE+QmPMvA6TGNliQ0hcYPkal7xWlHzy9htrGtPRXLtL/9qUfQj2b+++j3sN9f5hU7aChNkyQpLkxSFILNlKQuHx53JX6tVqQeOxH3KTPJ4qzVpDSNSp9wcFAqV8rg8Tb6fXfnhOX03/lizIrSDEsjfsTNwZK/VjRfOn+prg0wtvPGl0sRG6QxnjsYW5qB4o5fkVP+cbNx+0vqZfEw8tw+ag0pgTpvHGsCeP3ZTVc209dGENXxfXxL/o9zhSDpHw0Tfq84jfU5nhoVTTW80YdOWfpvHGkCelaDJuKMXuoM2LKCA8fT23n8SdGgyoGSfmi+U6IN9fE2KOrHpufdN44zoR4X7Iw9p/Ut7j7veqRCQZJ+Wimk+JuFsa/MBptLlJY4igT0rUY1gaDpG7RZMdUvdY/g6QNhaY9NhquVwZJg0IjzXypXhr3uKrn+mOQNBg05B3RTDlh2hxje2GQNAg043ejkcZywvTyGNs5g6Ti0YjfjiZaaWaYGJO+F9M5g6Si0YTfjAaaJudfplfG2M4YJBWLBvxaNM8sOWF6dYzthEFSkWi+r0Tj5MoJ00kxtnUGScWh8XZE09SVE6bXxNhWGSQVhaar+y/RSjlhel2MbY1BUjFokm9UvdJYTphOjrGtMEgqAs027Uvc65UTpjfG2MYMkuaORrs9mqRtOWF6c4xtxCBprmiy70eDdCUnTKfE2HUzSJobGuyH0RxdywnT22LsuhgkzQXNtTMaoy85YXpHjK3NIKl3NNbuaIq+5YTp1Bhbi0FSr2iqvdEQ85ITpmtjbDaDpN7QUHdHM8zbmmHinCfGuGwGSZ3jyT+eZvpD1QfFWDNMMSabQVLnePLfnhqgTtF86/nXa9W11qo44gSu1WKQVCSar/bnUjG1FbFkNoOkItF8e6JxssXUVsSS2QySikTz7YrGyRZTWxFLZjNIKhLNl/4WUi0xtRWxZDaDpCLRfD+IxskWU1sRS2YzSCoSDTPtReSniqkTuLSJZr6pTlUr5mNOX0F6VSwrzUbzrXwdu5li6qq4fDX169HADvQRJNZJf6niubGsNBsNU/sX/WLqmhjWSaB6CtItsaSUh76p/WvnMTULw1sNVNdBYo3HqdfHklIemqb2i6DE1FqY1kqgugwS85+iTovlpHw0zm3RR9li6rowvVGgugoSc9MvP74hlpLqoYG+VLVSvpjaCPtexVK1A9V2kJizmzozlpDWhyb6QvRUtpjaCva/giWzA5XCElMnpGsxbCbG/oTaElOlZmimW6O3ssXUVnGOS1h6ZqBSWGLKhHQthk3FmH3UeTFFagdN9bnosWwxtROc53y2mBqoFJYYOiFdi2GruZc6O4ZK7aL5PlP1Wb6Y2inOdQ5bTQSqbpB47D7q9BgidYMm+1T0XLaY2osUAurB2Do7SNw/QL03LkndotluoNL3T7IrpvaKfd9N7aXujIcmpGvULurUeEiSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJKmuI474P9M94UzlaHRYAAAAAElFTkSuQmCC</OriginalBytes>
<OriginalPath>E:\Profiles\Bruce\Desktop\tilesassets\medium.scale-140.png</OriginalPath>
<Height>100</Height>
<Width>100</Width>
<X>0</X>
<Y>0</Y>
</ShortcutItemImage>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<ShortcutItemImage xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OriginalBytes>iVBORw0KGgoAAAANSUhEUgAAAGIAAABiCAYAAACrpQYOAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAYaSURBVHhe7ZxrqFRVFMclSqKIqLAyMope2DuCoiJIiAj80osoKgr6Zh/K3m8lJKwsRCw0sJBQ1Ii+BPUlIoqIiiCSoAdJZIlaiGWZlff22+f8z25mzpyZPTNn3+7ss37w59yzznrctZZ35p6Z8c4wDMMwDMMwDMMwDMMwDMMwDMMwDMMIY3Jy8na0eGJiYrZMxjC4IaIrdDoQDH8u2kL8JMcfbSFDoAV4GOB8XQqmWEIrtpBA3JCyiXWB4V0nt77g+67CumILqcANJZtQHxjczQqppN8SWrGFCAbwbD6ScIi5Q+ElBllCK41dCA2vykcwHJ3L4PxQNNQSWiFHMxZCg+vzlkeHXLcq52z0vsy1QL50F0JTF+Vt1gc5F6LPdVo7yS6Epi7POqwBhrPa5eS4QAOLRpILoaGRlsEw1qALlS7DDQg9gX6QWxTIn9ZCaGbgZdD8WtS2gE64fgx6DG1VWBTIn85CaCRoGTS7Dp2vsCDwn4UeQT8pTRTIn8ZCaGBO3lIZrm1EZ8l1KIg/ilQPcdyeZ40D+cd/IRqWh/NX0Wm6XAukPYKcD6CdeZU4kH+8F8I3fht6GZ0kUxQY0uHUuB/9kk0uAuSe4DBTJccPDcf9azpOpmhQ4zB0L9qVTa8myLfP5VaZ8YQGvlAz29CT6HhdigY13Esj96Bfs0mOADn2oFlKPb7QxIfqKYPz7WgJX54gl2hQ4xBq3Yf2ZMUHhLhdaI7SjTc0Unojx4F9J3oKRX3+cFDuYOo8iP7Iq/cH3x3oFKUYf2hmn3rrCtfdc8hSjicrJBrUmUmdh9GfWfEKuL4VjfQr9rRDvfWFxt3DwDPoVIVGg3IHUudR9Fde/T+wuZ/gC+SaDnl74TCI3WgZOl0pokG5A6jzONqv2l+js3U5LVyDw8BAfkPPo7lKFRXqrKCse2s3VCcqdDzgGx4JBvQ7Wo7OVMraIL17znA/EaWHqG7g9wYa+JMn0wL1MDIMYC9agUZ+6CCHu89wd+JBv9bi9zq6SuHjiXqpDQbi7nJXonNVIhjC3WtT7r4i6M4bv9c4DPVBuGlH3lL9MKS/0Yuo70vp+ByN3MvnOxTeE/zcQ9A8haeBeosGA9uPVqFzVLIN7ItQ0Dt8+L2JLlNoWqjHKUElPQz1Y13qCX5vo0sUlibqdUpQSY/MlTD8d9Clck8b9TwlqKQHk3vbtlJyawY0PGWopNENzahgEw8F7m3HKKikh1pL0JE6bTaakWOTzs9jOJtzU71kBVuQ2T0XvIB6vrqL20H6Mk3yUeRLKGAoZ8RYhtJ7ZPZQczWHtldWOT8W+9McF8uUJjTYtoSCGMtQao/MJaj7CrqWL9176cVNXtqL6EXdy1Baj8yhNHcRjjqXoZQemUNpziJcs27wOvXUtQyl88gcSjMWwaDdJzfc4/PmWMtQKo/MoaS/CJpcmveaE2sZSuOROZS0F8Fgl6nRNmIsQyk8MoeS7iIY6HI12ZW6l6Fwj8yhpLkIBrlSDfakzmUo1CNzKOktggG6O9hg6lqGwjwyh5LWIhjcGjU2EHUsQyEemUNJZxEMbK2aGopRlyF3j8yhpLEIBrVODY1Ej2VcLJdK5OqROZTxXgQNuI+obMx7qYcey+j5IQC5eWQOZbwXwXDuQu6TElX6R42W4Jr7OxvdPs6Yietty+D8LeyVyM0jcyhpPVl3wvD2qtESbhFyCwL/DQrtitw8MoeS/CJ2q9ESQyziJYV2RW4emUNJfhE/q9ESQyziOYV2RW4emUNJfhHb1GiJzkVwPg9z5/PEog5bJUrjkTkI6lyjsDShwe/Va4nORRRgvxIN/LeaFO6ROQjqRf+vY/8rNPitei1RtYgCrs9HH8m9LwrzyNwXatytkHShyS/Vb4l+iyjA9Wr0aRbUA7l7ZK6E+p+hm+SeNjRa+ZfIQhdRgP/1vfLJzSNzCXK4G8Y75dYMaPgT9V+CawMtooC4G1HpJ02XPTJ7iPkKLdTlZkHjbX95oBWuDbWIAuJvQd8oXeUi8NmCFsjcTBjABvRdhdbLbSTI4x6yPtCpB9t76AadGoZhGIZhGIZhGIZhGIZhGIZhGIbRcGbM+BeN+q7PrwKDyAAAAABJRU5ErkJggg==</OriginalBytes>
<OriginalPath>E:\Profiles\Bruce\Desktop\tilesassets\small.scale-140.png</OriginalPath>
<Height>50</Height>
<Width>50</Width>
<X>0</X>
<Y>0</Y>
</ShortcutItemImage>

View File

@@ -34,4 +34,11 @@
<scale dpi="180">splash\manager\splash.scale-180.png</scale> <scale dpi="180">splash\manager\splash.scale-180.png</scale>
<scale dpi="default">splash\manager\splash.png</scale> <scale dpi="default">splash\manager\splash.png</scale>
</resource> </resource>
<resource id="reader">
<scale dpi="80">splash\reader\splash.scale-80.png</scale>
<scale dpi="100">splash\reader\splash.scale-100.png</scale>
<scale dpi="140">splash\reader\splash.scale-140.png</scale>
<scale dpi="180">splash\reader\splash.scale-180.png</scale>
<scale dpi="default">splash\reader\splash.png</scale>
</resource>
</resources> </resources>

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

@@ -24,6 +24,18 @@
BackgroundColor="#159d9d" DarkModeBackgroundColor='#2e1e5c' /> BackgroundColor="#159d9d" DarkModeBackgroundColor='#2e1e5c' />
</VisualElements> </VisualElements>
</Application> </Application>
<Application Id='Reader'>
<VisualElements
DisplayName='Package Manager'
Logo='Settings.Assets\Logo.png'
SmallLogo='Settings.Assets\SmallLogo.png'
ForegroundText='light'
BackgroundColor='#004fe2'>
<DefaultTile ShowName='allLogos' />
<SplashScreen Image="VisualElements\splash\reader\splash.png"
BackgroundColor="#004fe2" DarkModeBackgroundColor='#002770' />
</VisualElements>
</Application>
<Application Id='Settings'> <Application Id='Settings'>
<VisualElements <VisualElements
DisplayName='Settings' DisplayName='Settings'

View File

@@ -1,13 +0,0 @@
@echo off
if exist "%SystemRoot%\SysWOW64" path %path%;%windir%\SysNative;%SystemRoot%\SysWOW64;%~dp0
bcdedit >nul
if '%errorlevel%' NEQ '0' (goto UACPrompt) else (goto UACAdmin)
:UACPrompt
%1 start "" mshta vbscript:createobject("shell.application").shellexecute("""%~0""","::",,"runas",1)(window.close)&exit
exit /B
:UACAdmin
cd /d "%~dp0"
set SCRIPT_DIR=%~dp0
powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%ArmInstall.ps1"
pause

View File

@@ -1,6 +1,12 @@
对于 Windows RT 用户,请以管理员身份运行 arm_install.batarm_uninstall.bat 进行安装或卸载。安装前请务必将压缩包中的所有文件放置在一个独立的文件夹中,该文件夹请勿随意移动或删除,不建议放置在桌面上。若需更新或移动程序,请先执行卸载脚本,然后再进行安装操作。x86、x64 以及支持 x86 兼容层的 ARM64 系统请使用标准安装程序,本方案仅适用于 ARM 设备。 对于 Windows RT 用户,请以管理员身份运行 ArmInstaller.exeArmUninstaller.exe 进行安装或卸载。安装前请务必将压缩包中的所有文件放置在一个独立的文件夹中,该文件夹请勿随意移动或删除,不建议放置在桌面上。若需更新或移动程序,请先执行卸载程序,然后再进行安装操作。请不要使用程序中具有的安装程序来更新。 x86、x64 以及 具有 Windows on ARM 的 ARM64 系统 请使用标准安装程序,本方案仅适用于 ARM 设备。
感谢“冰糖XH”主页https://github.com/bingtangxh帮助我完成了针对 ARM 架构的程序编译。 感谢“冰糖XH”主页https://github.com/bingtangxh帮助我完成了针对 ARM 架构的程序编译。
适用于 ARM 设备的项目发行https://github.com/bingtangxh/App-Installer-For-Windows-8.x-Reset/releases
其余设备的项目发行https://github.com/modernw/App-Installer-For-Windows-8.x-Reset/releases
(Translated by DeepSeek) (Translated by DeepSeek)
For Windows RT users, please run arm_install.bat or arm_uninstall.bat as an administrator to install or uninstall. Before installation, extract all files from the compressed package into a dedicated folder; do not move or delete this folder arbitrarily, and it is not recommended to place it on the desktop. If you need to update or relocate the program, first run the original uninstall script, then proceed with the installation. For x86, x64, and ARM64 systems that support the x86 compatibility layer, please use the standard installer; this solution is specifically for ARM devices. For Windows RT users, please run ArmInstaller.exe or ArmUninstaller.exe as an administrator to install or uninstall. Before installation, extract all files from the compressed package into a dedicated folder; do not move or delete this folder arbitrarily, and it is not recommended to place it on the desktop. If you need to update or relocate the program, first run the uninstaller, then proceed with the installation. Do not use the installer included in the program to update. For x86, x64, and ARM64 systems with Windows on ARM please use the standard installer; this solution is specifically for ARM devices.
Thanks to "BingTangXH" (Homepage: https://github.com/bingtangxh) for helping me complete the program compilation for the ARM architecture. Thanks to "BingTangXH" (Homepage: https://github.com/bingtangxh) for helping me complete the program compilation for the ARM architecture.
Project release for ARM devices: https://github.com/bingtangxh/App-Installer-For-Windows-8.x-Reset/releases
Project release for other devices: https://github.com/modernw/App-Installer-For-Windows-8.x-Reset/releases

View File

@@ -1,13 +0,0 @@
@echo off
if exist "%SystemRoot%\SysWOW64" path %path%;%windir%\SysNative;%SystemRoot%\SysWOW64;%~dp0
bcdedit >nul
if '%errorlevel%' NEQ '0' (goto UACPrompt) else (goto UACAdmin)
:UACPrompt
%1 start "" mshta vbscript:createobject("shell.application").shellexecute("""%~0""","::",,"runas",1)(window.close)&exit
exit /B
:UACAdmin
cd /d "%~dp0"
set SCRIPT_DIR=%~dp0
powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%ArmUninstall.ps1"
pause

Binary file not shown.

View File

@@ -626,11 +626,11 @@ progress.win-ring:indeterminate::-ms-fill {
@keyframes scale-visible { @keyframes scale-visible {
from { from {
transform: translateX(50px) scale(0.8); transform: translateX(50px) scale(0.8);
opacity: 0; /*opacity: 0;*/
} }
to { to {
transform: translateX(0) scale(1); transform: translateX(0) scale(1);
opacity: 1; /*opacity: 1;*/
} }
} }

View File

@@ -24,6 +24,8 @@
<script type="text/javascript" src="js/pages.js"></script> <script type="text/javascript" src="js/pages.js"></script>
<script type="text/javascript" src="js/load.js"></script> <script type="text/javascript" src="js/load.js"></script>
<script type="text/javascript" src="js/init.js"></script> <script type="text/javascript" src="js/init.js"></script>
<link rel="stylesheet" type="text/css" href="libs/msgbox/contentdlg.css">
<script type="text/javascript" src="libs/msgbox/contentdlg.js"></script>
<link rel="stylesheet" type="text/css" href="libs/msgbox/msgbox.css"> <link rel="stylesheet" type="text/css" href="libs/msgbox/msgbox.css">
<script type="text/javascript" src="libs/msgbox/msgbox.js"></script> <script type="text/javascript" src="libs/msgbox/msgbox.js"></script>
<link rel="stylesheet" type="text/css" href="theme/light/default/default.css" id="theme-style"> <link rel="stylesheet" type="text/css" href="theme/light/default/default.css" id="theme-style">
@@ -141,7 +143,7 @@
<!-- Loading... --> <!-- Loading... -->
<div class="content loading"> <div class="content loading">
<span class="ring-loading">&#57543;</span>&nbsp; <span class="ring-loading">&#57543;</span>&nbsp;
<span data-res-byname="IDS_PLEASEWAIT">Please wait...</span> <span data-res-byname="IDS_PLEASEWAIT"></span>
</div> </div>
<!-- Main Page --> <!-- Main Page -->
<div class="content select preinstall installing installsuccess installfailed main"> <div class="content select preinstall installing installsuccess installfailed main">
@@ -394,7 +396,7 @@
</div> </div>
<div class="controls"> <div class="controls">
<div class="checkbox"> <div class="checkbox">
<input type="checkbox" id="preinst-enablelaunch" class="win-checkbox"> <input type="checkbox" id="preinst-enablelaunch" class="win-checkbox" style="margin-left: 0;">
<label for="preinst-enablelaunch" data-res-byname="IDS_LAUNCHWHENREADY"></label> <label for="preinst-enablelaunch" data-res-byname="IDS_LAUNCHWHENREADY"></label>
</div> </div>
<div class="command"> <div class="command">

View File

@@ -118,4 +118,12 @@
return Bridge.String.toupper(this); return Bridge.String.toupper(this);
}; };
} }
if (typeof String.prototype.format !== "function") {
String.prototype.format = function() {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return typeof args[number] !== "undefined" ? args[number] : match;
});
};
}
})(this); })(this);

View File

@@ -363,6 +363,19 @@
)); ));
} }
}; };
Object.defineProperty(this, "length", {
get: function() {
return _list.length;
},
enumerable: true,
});
this.getDatas = function() { return _list; }
this.forEach = function(callback, args) {
if (typeof callback !== "function") return;
for (var i = 0; i < _list.length; i++) {
callback.apply(this, [_list[i], i].concat(Array.prototype.slice.call(arguments, 1)));
}
};
this._getKey = getKey; this._getKey = getKey;
} }
var MAX_ANIMATE_COUNT = 100; var MAX_ANIMATE_COUNT = 100;
@@ -609,10 +622,16 @@
}); });
PMDataListView.prototype._updateEmptyView = function() { PMDataListView.prototype._updateEmptyView = function() {
if (!this._emptyView) return; if (!this._emptyView) return;
// container 中是否还有 item
var hasItem = this.container.children.length > 0; var hasItem = this.container.children.length > 0;
var itemVisibleLength = 0;
for (var i = 0; i < this.container.children.length; i++) {
var child = this.container.children[i];
if (!child) continue;
if (child.style.display !== "none" && child.style.display !== "hidden" && child.style.opacity !== 0 && child.style.visibility !== "hidden") {
itemVisibleLength++;
}
}
hasItem = hasItem && itemVisibleLength > 0;
if (hasItem) { if (hasItem) {
if (this._emptyView.parentNode) { if (this._emptyView.parentNode) {
this._emptyView.style.display = "none"; this._emptyView.style.display = "none";
@@ -802,6 +821,7 @@
}; };
PMDataListView.prototype.refresh = function() { PMDataListView.prototype.refresh = function() {
this._refreshVisibility(); this._refreshVisibility();
this._updateEmptyView();
}; };
global.DataView.ChangeEvent = PMChangeEvent; global.DataView.ChangeEvent = PMChangeEvent;
global.DataView.DataSource = PMDataSource; global.DataView.DataSource = PMDataSource;

562
shared/html/js/dboxapi.js Normal file
View File

@@ -0,0 +1,562 @@
/**
* DBox API
* Docs: https://dbox.tools/api/docs
*/
(function(global) {
"use strict";
function joinUrl(url, path) {
if (url.charAt(url.length - 1) === "/") {
url = url.slice(0, -1);
}
if (path.charAt(0) === "/") {
path = path.slice(1);
}
return url + "/" + path;
}
function buildParams(params) {
var queryString = "";
var keys = Object.keys(params);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var value = params[key];
if (value === null || value === void 0) {
continue;
}
queryString += encodeURIComponent(key) + "=" + encodeURIComponent(value) + "&";
}
return queryString.slice(0, -1);
}
var baseUrl = "https://dbox.tools/";
var baseApiUrl = joinUrl(baseUrl, "api");
var dboxApi = {
/**
* @enum {string} DBox.API.System
* @readonly
*/
System: {
/** @type {string} Xbox */
xbox: "XBOX",
/** @type {string} Xbox 360 */
xbox360: "XBOX360",
/** @type {string} Xbox One */
xboxOne: "XBOXONE",
/** @type {string} Xbox Series X */
xboxSeriesX: "XBOXSERIESX",
/** @type {string} PC */
pc: "PC",
/** @type {string} PS3 */
mobile: "MOBILE"
},
Discs: {
/**
* Get and filter discs
* @param {string | null} name query
* @param {DBox.API.System} system query
* @param {integer | number} [limit] query, default: 100
* @param {integer | number} [offset] query, default: 0
* @returns {string} request URL, method: GET
*/
getDiscs: function(name, system, limit, offset) {
var params = {};
if (name) params.name = name;
if (system) params.system = system;
if (limit) params.limit = limit;
if (offset) params.offset = offset;
return joinUrl(baseApiUrl, "discs") +
"?" + buildParams(params);
},
/**
* Get single disc by DBox ID
* @param {integer | number} discId path, required
* @returns {string} request URL, method: GET
*/
getSingleDiscById: function(discId) {
return joinUrl(baseApiUrl, "discs/" + discId);
},
/**
* Get single disc by Redump ID
* @param {integer | number} redumpId path, required
* @returns {string} request URL, method: GET
*/
getSingleDiscByRedumpId: function(redumpId) {
return joinUrl(baseApiUrl, "discs/redump/" + redumpId);
},
/**
* Get single disc by its XMID (OG XBOX only)
* @param {string} xmid path, required
* @returns {string} request URL, method: GET
*/
getSingleDiscByXMId: function(xmid) {
return joinUrl(baseApiUrl, "discs/xmid/" + xmid);
},
/**
* Get single disc by its XeMID (XBOX 360 only)
* @param {string} xeMid path, required
* @returns {string} request URL, method: GET
*/
getSingleDiscByXeMId: function(xeMid) {
return joinUrl(baseApiUrl, "discs/xemid/" + xeMid);
},
/**
* Get single disc by its media ID. Media ID v1 (XBOX & XBOX 360) and Media ID v2 (XBOX One & XBOX Series) are combined in a single query
* @param {string} mediaId path, required
* @returns {string} request URL, method: GET
*/
getSingleDiscByMediaId: function(mediaId) {
return joinUrl(baseApiUrl, "discs/media_id/" + mediaId);
},
/**
* Get the dirs and files (if available) for a disc. Filetype indicates if it is a supported filetype that has further metadata available in the database.
* @param {integer | number} discId path, required
* @returns {string} request URL, method: GET
*/
getDiscFiles: function(discId) {
return joinUrl(baseApiUrl, "discs/" + discId + "/files");
}
},
Releases: {
/**
* Get and filter releases
* @param {string | null} name query
* @param {string | null} edition query
* @param {string | null} barcode query
* @param {DBox.API.System} system query
* @param {integer | number} limit query, default: 100
* @param {integer | number} offset query, default: 0
* @returns {string} request URL, method: GET
*/
getReleases: function(name, edition, barcode, system, limit, offset) {
var params = {};
if (name) params.name = name;
if (edition) params.edition = edition;
if (barcode) params.barcode = barcode;
if (system) params.system = system;
if (limit) params.limit = limit;
if (offset) params.offset = offset;
return joinUrl(baseApiUrl, "releases") +
"?" + buildParams(params);
},
/**
* Get single release by DBox ID
* @param {string} releaseId path, required
* @returns {string} request URL, method: GET
*/
getSingleRelease: function(releaseId) {
return joinUrl(baseApiUrl, "releases/" + releaseId);
}
},
Files: {
/**
* Get all discs that contain a particular file. NOTE: not all discs have been parsed on file-level yet
* @param {string} md5 path, required
* @returns {string} request URL, method: GET
*/
getFiles: function(md5) {
return joinUrl(baseApiUrl, "files/" + md5 + "/discs");
},
/**
* Filter all distinct xbe files. NOTE: not all discs have been parsed on file-level yet
* @param {string | null} titleId query
* @param {integer | null} allowrdMedia query
* @param {integer | null} region query, Available values: 1, 2, 3, 4, 7, 2147483648
* @param {integer | null} gameRating query
* @param {integer | null} discNumber query
* @param {integer | null} version query
* @param {integer | number} limit query, default: 100
* @param {integer | number} offset query, default: 0
* @returns
*/
getXbeFiles: function(titleId, allowrdMedia, region, gameRating, discNumber, version, limit, offset) {
if (region !== null && region !== undefined) {
var valid = [1, 2, 3, 4, 7, 2147483648];
if (!valid.includes(region)) throw new Error('Invalid region');
}
var params = {};
if (titleId) params.title_id = titleId;
if (allowrdMedia) params.allowrd_media = allowrdMedia;
if (region) params.region = region;
if (gameRating) params.game_rating = gameRating;
if (discNumber) params.disc_number = discNumber;
if (version) params.version = version;
if (limit) params.limit = limit;
if (offset) params.offset = offset;
return joinUrl(baseApiUrl, "files/xbe") +
"?" + buildParams(params);
},
/**
* Get xbe file by md5. NOTE: not all discs have been parsed on file-level yet
* @param {string} md5 path, required
* @returns {string} request URL, method: GET
*/
getXbeFileByMd5: function(md5) {
return joinUrl(baseApiUrl, "files/xbe/" + md5);
},
/**
* Get stfs file by md5. NOTE: not all discs have been parsed on file-level yet
* @param {string} md5 path, required
* @returns {string} request URL, method: GET
*/
getStfsFileByMd5: function(md5) {
return joinUrl(baseApiUrl, "files/stfs/" + md5);
},
},
TitleIDs: {
/**
* Get and filter title IDs
* @param {string | (string | null)} name query
* @param {DBox.API.System | null} system query
* @param {string | (string | null)($uuid)} bingId query
* @param {string | (string | null)($uuid)} serviceConfigId query
* @param {integer} limit query, default: 100
* @param {integer} offset query, default: 0
* @returns {string} request URL, method: GET
*/
getTitleIds: function(name, system, bingId, serviceConfigId, limit, offset) {
var params = {};
if (name) params.name = name;
if (system) params.system = system;
if (bingId) params.bing_id = bingId;
if (serviceConfigId) params.service_config_id = serviceConfigId;
if (limit) params.limit = limit;
if (offset) params.offset = offset;
return joinUrl(baseApiUrl, "title_ids") +
"?" + buildParams(params);
},
/**
* Get single title ID by its hexadecimal value
* @param {string} titleId path, required
* @returns {string} request URL, method: GET
*/
getSingleTitleId: function(titleId) {
return joinUrl(baseApiUrl, "title_ids/" + titleId);
}
},
Achievements: {
/**
* Get achievements for a title-id. Xbox 360/GFWL only
* @param {string} titleId path, required
* @returns {string} request URL, method: GET
*/
getAchievementsV1: function(titleId) {
return joinUrl(baseApiUrl, "achievements/v1/" + titleId);
},
/**
* Get achievements for a title-id. Xbox One/Series only
* @param {string} titleId path, required
* @returns {string} request URL, method: GET
*/
getAchievementsV2: function(titleId) {
return joinUrl(baseApiUrl, "achievements/v2/" + titleId);
},
},
Marketplace: {
/**
* Get and filter marketplace products
* @param {integer | (integer | null)} productType query
* @param {integer} limit query, default: 100
* @param {integer} offset query, default: 0
* @returns {string} request URL, method: GET
*/
getProducts: function(productType, limit, offset) {
var params = {};
if (productType) params.product_type = productType;
if (limit) params.limit = limit;
if (offset) params.offset = offset;
return joinUrl(baseApiUrl, "marketplace/products") +
"?" + buildParams(params);
},
/**
* Get single marketplace product by marketplace product ID
* @param {string} productId path, required
* @returns {string} request URL, method: GET
*/
getSingleProduct: function(productId) {
return joinUrl(baseApiUrl, "marketplace/products/" + productId);
},
/**
* Get children of a marketplace product
* @param {string} productId path, required
* @param {integer | (integer | null)} productType query
* @returns {string} request URL, method: GET
*/
getProductChildren: function(productId, productType) {
var params = {};
if (productType) params.product_type = productType;
return joinUrl(baseApiUrl, "marketplace/products/" + productId + "/children") +
"?" + buildParams(params);
},
/**
* Get and filter marketplace product instances
* @param {string | (string | null)($uuid)} productId query
* @param {string | (string | null)} hexOfferId query
* @param {integer | (integer | null)} licenseTypeId query
* @param {integer | (integer | null)} packageType query
* @param {integer | (integer | null)} gameRegion query
* @param {integer} limit query, default: 100
* @param {integer} offset query, default: 0
* @returns {string} request URL, method: GET
*/
getProductInstances: function(productId, hexOfferId, licenseTypeId, packageType, gameRegion, limit, offset) {
var params = {};
if (productId) params.product_id = productId;
if (hexOfferId) params.hex_offer_id = hexOfferId;
if (licenseTypeId) params.license_type_id = licenseTypeId;
if (packageType) params.package_type = packageType;
if (gameRegion) params.game_region = gameRegion;
if (limit) params.limit = limit;
if (offset) params.offset = offset;
return joinUrl(baseApiUrl, "marketplace/product-instances") +
"?" + buildParams(params);
},
/**
* Get single marketplace product instance by marketplace product instance ID
* @param {string} instanceId path, required
* @returns {string} request URL, method: GET
*/
getProductInstanceById: function(instanceId) {
return joinUrl(baseApiUrl, "marketplace/product-instances/" + instanceId);
},
/**
* Get all marketplace product types
* @returns {string} request URL, method: GET
*/
getProductTypes: function() {
return joinUrl(baseApiUrl, "marketplace/product-types");
},
/**
* Get single marketplace category
* @param {integer} productTypeId path, required
* @returns {string} request URL, method: GET
*/
getSingleProductType: function(productTypeId) {
return joinUrl(baseApiUrl, "marketplace/product-types/" + productTypeId);
},
/**
* Get and filter all marketplace categories
* @param {integer | (integer | null)} parent query
* @returns {string} request URL, method: GET
*/
getCategories: function(parent) {
var params = {};
if (parent) params.parent = parent;
return joinUrl(baseApiUrl, "marketplace/categories") +
"?" + buildParams(params);
},
/**
* Get single marketplace category
* @param {integer} categoryId path, required
* @returns {string} request URL, method: GET
*/
getSingleCategory: function(categoryId) {
return joinUrl(baseApiUrl, "marketplace/categories/" + categoryId);
},
/**
* Get all marketplace locales
* @returns {string} request URL, method: GET
*/
getLocales: function() {
return joinUrl(baseApiUrl, "marketplace/locales");
},
/**
* Get single marketplace locale by locale string
* @param {string} localeId path, required
* @returns {string} request URL, method: GET
*/
getSingleLocale: function(localeId) {
return joinUrl(baseApiUrl, "marketplace/locales/" + localeId);
},
},
/**
* Enum for product types, used in store API
* @enum {string} DBox.API.ProductType
*/
ProductType: {
application: "Application",
avatarItem: "AvatarItem",
consumable: "Consumable",
durable: "Durable",
game: "Game",
movie: "Movie",
pass: "PASS",
tvSeries: "TvSeries",
tvSeason: "TvSeason",
tvEpisode: "TVEpisode",
unmanagedConsumable: "UnmanagedConsumable",
},
/**
* Enum for product families, used in store API
* @enum {string} DBox.API.ProductFamily
*/
ProductFamily: {
apps: "Apps",
avatars: "Avatars",
games: "Games",
movies: "Movies",
passes: "Passes",
tv: "TV",
},
/**
* Enum for order by, used in store API
* @enum {string} DBox.API.OrderBy
*/
OrderBy: {
productId: "product_id",
titleId: "title_id",
revisionId: "revision_id",
/** such as "23654onetwoonestudio.cctv_kdpw61jgbrs34" */
packageFamilyName: "package_family_name",
/** such as "23654onetwoonestudio.cctv" */
packageIdentityName: "package_identity_name",
},
/**
* Enum for order direction, used in store API
* @enum {string} DBox.API.OrderDirection
*/
OrderDirection: {
/** @type {string} 升序 */
asc: "asc",
/** @type {string} 降序 */
desc: "desc",
},
Store: {
/**
* Get store products
* @param {string | (string | null)} category query
* @param {string | (string | null)} titleId query
* @param {DBox.API.ProductType | null} productType query
* @param {DBox.API.ProductFamily | null} productFamily query
* @param {DBox.API.OrderBy | null} orderBy query, default: productId
* @param {DBox.API.OrderDirection | null} orderDirection query, default: asc
* @param {integer} limit query, default: 100
* @param {integer} offset query, default: 0
* @returns {string} request URL, method: GET
*/
getProducts: function(category, titleId, productType, productFamily, orderBy, orderDirection, limit, offset) {
var params = {};
if (category) params.category = category;
if (titleId) params.title_id = titleId;
if (productType) params.product_type = productType;
if (productFamily) params.product_family = productFamily;
if (orderBy) params.order_by = orderBy;
if (orderDirection) params.order_direction = orderDirection;
if (limit) params.limit = limit;
if (offset) params.offset = offset;
return joinUrl(baseApiUrl, "store/products") +
"?" + buildParams(params);
},
/**
* Get single store product
* @param {string} productId path, required
* @returns {string} request URL, method: GET
*/
getSingleProduct: function(productId) {
return joinUrl(baseApiUrl, "store/products/" + productId);
},
/**
* Get all related products for a product id. Includes both child and parent relationships. Check the product-ids for relationship direction. The relationship_type is parent -> child direction. Same combinations can appear multiple times with different relationship types.
* @param {string} productId path, required
* @returns {string} request URL, method: GET
*/
getAllReleatedProducts: function(productId) {
return joinUrl(baseApiUrl, "store/products/" + productId + "/related");
},
/**
* Get single sku for store product
* @param {string} productId path, required
* @param {string} skuId path, required
* @returns {string} request URL, method: GET
*/
getSingleSkuFromProduct: function(productId, skuId) {
return joinUrl(baseApiUrl, "store/products/" + productId + "/sku/" + skuId);
}
}
};
function getXhr() {
var xmlhttp;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}
return xmlhttp;
}
/**
* Send an HTTP request to the DBox API and return a Promise that resolves with the response.
* @param {string} api DBox API
* @param {string} method
* @param {[boolean]} isAsync default: true
* @param {[string]} username
* @param {[string]} pwd
* @returns {Promise <XMLHttpRequest>} A Promise that resolves with the response.
*/
var dboxXHR = function(api, method, isAsync, username, pwd) {
method = method || "GET";
if (typeof isAsync === "undefined" || isAsync === null) isAsync = true;
var xhr = getXhr();
if (username && pwd) {
try {
xhr.open(method, api, isAsync, username, pwd);
} catch (e) {
xhr.open(method, api, isAsync);
}
} else {
xhr.open(method, api, isAsync);
}
return new Promise(function(c, e) {
try {
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
if (c) c(xhr);
} else {
if (e) e(xhr.statusText + " (" + xhr.status + ")");
}
}
};
xhr.send("");
} catch (ex) {
if (e) e(ex);
}
});
};
/**
* Send an HTTP request to the DBox API and return a Promise that resolves with the response as JSON.
* @param {string} api DBox API
* @param {string} method
* @param {[boolean]} isAsync default: true
* @param {[string]} username
* @param {[string]} pwd
* @returns {Promise <object>} A Promise that resolves with the response as JSON.
*/
dboxXHR.parseJson = function(api, method, isAsync, username, pwd) {
return dboxXHR(api, method, isAsync, username, pwd).then(function(xhr) {
return JSON.parse(xhr.responseText);
});
}
/**
* DBox namespace
* @namespace {DBox}
*/
global.DBox = {
/**
* DBox API namespace
* @namespace {DBox.API}
*/
API: dboxApi,
/**
* @function {DBox.XHR}
*/
xhr: dboxXHR,
};
})(this);

208
shared/html/js/http.js Normal file
View File

@@ -0,0 +1,208 @@
(function(global) {
if (typeof global.Web === "undefined") global.Web = {};
function dataToString(obj) {
if (typeof obj === "string") return obj;
if (typeof obj === "object") return JSON.stringify(obj);
return String(obj);
}
global.Web.Http = {
Request: function() {
var inst = external.Web.Http.createHttpRequest();
this.open = function(method, url) { inst.open(method, url); };
this.getHeaders = function() { return JSON.parse(inst.getHeadersToJson()); };
this.getHeader = function(swName) { try { return inst.getHeader(swName); } catch (e) { return void 0; } };
this.setHeader = function(swName, swValue) { inst.setHeader(swName, swValue); };
this.removeHeader = function(swName) { inst.removeHeader(swName); };
this.clearHeader = function() { inst.clearHeader(); };
this.updateHeaders = function(headers) {
var keys = Object.keys(headers);
this.clearHeader();
for (var i = 0; i < keys.length; i++) {
this.setHeader(keys[i], dataToString(headers[keys[i]]));
}
};
this.setHeaders = function(headers) {
var keys = Object.keys(headers);
for (var i = 0; i < keys.length; i++) {
inst.setHeader(keys[i], dataToString(headers[keys[i]]));
}
};
this.send = function(body, encoding) { return inst.send(body, encoding); };
this.sendAsync = function(body, encoding) {
if (!encoding) encoding = "utf-8";
return new Promise(function(c, e) {
try {
inst.sendAsync(body, encoding, function(resp) {
if (c) c(resp);
}, function(err) {
if (e) e(err);
});
} catch (ex) { if (e) e(ex); }
});
};
Object.defineProperty(this, "timeout", {
get: function() { return inst.timeout; },
set: function(value) { inst.timeout = value; }
});
Object.defineProperty(this, "readWriteTimeout", {
get: function() { return inst.readWriteTimeout; },
set: function(value) { inst.readWriteTimeout = value; }
});
Object.defineProperty(this, "allowAutoRedirect", {
get: function() { return inst.allowAutoRedirect; },
set: function(value) { inst.allowAutoRedirect = value; }
});
Object.defineProperty(this, "allowWriteStreamBuffering", {
get: function() { return inst.allowWriteStreamBuffering; },
set: function(value) { inst.allowWriteStreamBuffering = value; }
});
Object.defineProperty(this, "keepAlive", {
get: function() { return inst.keepAlive; },
set: function(value) { inst.keepAlive = value; }
});
Object.defineProperty(this, "maximumAutomaticRedirections", {
get: function() { return inst.maximumAutomaticRedirections; },
set: function(value) { inst.maximumAutomaticRedirections = value; }
});
Object.defineProperty(this, "userAgent", {
get: function() { return inst.userAgent; },
set: function(value) { inst.userAgent = value; }
});
Object.defineProperty(this, "referer", {
get: function() { return inst.referer; },
set: function(value) { inst.referer = value; }
});
Object.defineProperty(this, "contentType", {
get: function() { return inst.contentType; },
set: function(value) { inst.contentType = value; }
});
Object.defineProperty(this, "accept", {
get: function() { return inst.accept; },
set: function(value) { inst.accept = value; }
});
Object.defineProperty(this, "proxy", {
get: function() { return inst.proxy; },
set: function(value) { inst.proxy = value; }
});
Object.defineProperty(this, "cookieContainer", {
get: function() { return inst.cookieContainer; },
set: function(value) { inst.cookieContainer = value; }
});
Object.defineProperty(this, "protocolVersion", {
get: function() { return inst.protocolVersion; },
set: function(value) { inst.protocolVersion = value; }
});
Object.defineProperty(this, "preAuthenticate", {
get: function() { return inst.preAuthenticate; },
set: function(value) { inst.preAuthenticate = value; }
});
Object.defineProperty(this, "credentials", {
get: function() { return inst.credentials; },
set: function(value) { inst.credentials = value; }
});
Object.defineProperty(this, "automaticDecompression", {
get: function() { return inst.automaticDecompression; },
set: function(value) { inst.automaticDecompression = value; }
});
this.dispose = function() { inst.dispose(); };
},
Header: {
// 通用头(既可用于请求也可用于响应)
General: {
cacheControl: "Cache-Control",
connection: "Connection",
date: "Date",
pragma: "Pragma",
trailer: "Trailer",
transferEncoding: "Transfer-Encoding",
upgrade: "Upgrade",
via: "Via",
warning: "Warning"
},
// 请求头
Request: {
accept: "Accept",
acceptCharset: "Accept-Charset",
acceptEncoding: "Accept-Encoding",
acceptLanguage: "Accept-Language",
authorization: "Authorization",
expect: "Expect",
from: "From",
host: "Host",
ifMatch: "If-Match",
ifModifiedSince: "If-Modified-Since",
ifNoneMatch: "If-None-Match",
ifRange: "If-Range",
ifUnmodifiedSince: "If-Unmodified-Since",
maxForwards: "Max-Forwards",
proxyAuthorization: "Proxy-Authorization",
range: "Range",
referer: "Referer",
te: "TE",
userAgent: "User-Agent"
},
// 响应头
Response: {
acceptRanges: "Accept-Ranges",
age: "Age",
allow: "Allow",
contentEncoding: "Content-Encoding",
contentLanguage: "Content-Language",
contentLength: "Content-Length",
contentLocation: "Content-Location",
contentRange: "Content-Range",
contentType: "Content-Type",
etag: "ETag",
expires: "Expires",
lastModified: "Last-Modified",
location: "Location",
proxyAuthenticate: "Proxy-Authenticate",
retryAfter: "Retry-After",
server: "Server",
setCookie: "Set-Cookie",
vary: "Vary",
wwwAuthenticate: "WWW-Authenticate"
},
// CORS 相关头(常单独列出,也可归入请求/响应)
Cors: {
accessControlAllowOrigin: "Access-Control-Allow-Origin",
accessControlAllowCredentials: "Access-Control-Allow-Credentials",
accessControlAllowHeaders: "Access-Control-Allow-Headers",
accessControlAllowMethods: "Access-Control-Allow-Methods",
accessControlExposeHeaders: "Access-Control-Expose-Headers",
accessControlMaxAge: "Access-Control-Max-Age",
accessControlRequestHeaders: "Access-Control-Request-Headers",
accessControlRequestMethod: "Access-Control-Request-Method",
origin: "Origin"
},
// 安全/非标准常用头
Security: {
xFrameOptions: "X-Frame-Options",
xContentTypeOptions: "X-Content-Type-Options",
xXssProtection: "X-XSS-Protection",
strictTransportSecurity: "Strict-Transport-Security",
contentSecurityPolicy: "Content-Security-Policy",
referrerPolicy: "Referrer-Policy",
xRequestedWith: "X-Requested-With",
xForwardedFor: "X-Forwarded-For",
xForwardedProto: "X-Forwarded-Proto",
xRealIp: "X-Real-IP"
}
},
Method: {
get: "GET",
post: "POST",
put: "PUT",
delete: "DELETE",
head: "HEAD",
options: "OPTIONS",
trace: "TRACE",
connect: "CONNECT"
},
Version: {
v1_0: "1.0",
v1_1: "1.1",
}
}
})(this);

View File

@@ -162,15 +162,16 @@
} }
oldTags.push(k); oldTags.push(k);
promises.push( promises.push(
anime.runAsync(p.page, [ (function(page, key) {
anime.Keyframes.Opacity.hidden // 返回 anime.runAsync 产生的 Promise
]).then((function(page, key) { return anime.runAsync(page, [anime.Keyframes.Opacity.hidden])
return function() { .then(function() {
page.style.display = "none"; page.style.display = "none";
page.style.opacity = 0; page.style.opacity = 0;
page.style.height = 0;
emit("unload", key); emit("unload", key);
}; });
})(p.page, k)) })(p.page, k)
); );
p.guide.classList.remove("selected"); p.guide.classList.remove("selected");
} }

View File

@@ -509,7 +509,7 @@
supportDisplay.classList.add("not-support"); supportDisplay.classList.add("not-support");
supportDisplay.classList.remove("support"); supportDisplay.classList.remove("support");
} }
supportDisplay.setAttribute("title", strutils.format("OS Min Version: {0}, Architecture: {1}", support.showOsminversionText, support.showArchitectureText)); supportDisplay.setAttribute("title", strutils.format(Bridge.Resources.byname("IDS_PREINSTALL_SUITCONDITION"), support.showOsminversionText, support.showArchitectureText));
} }
} }

Some files were not shown because too many files have changed in this diff Show More