diff --git a/7zAll/7zAll.sln b/7zAll/7zAll.sln new file mode 100644 index 00000000..b2e1fa2c --- /dev/null +++ b/7zAll/7zAll.sln @@ -0,0 +1,164 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "7z", "..\CPP\7zip\Bundles\Format7zF\Format7z.vcproj", "{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SFXCon", "..\CPP\7zip\Bundles\SFXCon\SFXCon.vcproj", "{0A87F1E0-6E9A-452C-A209-3968AD375DCA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SFXWin", "..\CPP\7zip\Bundles\SFXWin\SFXWin.vcproj", "{F0A92034-14AA-4347-92D5-CD4886865506}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "..\CPP\7zip\UI\Console\Console.vcproj", "{1A8E1EC5-A03F-4368-ABDF-57C21762F528}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Explorer", "..\CPP\7zip\UI\Explorer\Explorer.vcproj", "{FBA8DA13-7434-409C-83AB-FC6682A8869D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FM", "..\CPP\7zip\UI\FileManager\FM.vcproj", "{2628FF64-E1E1-4CB7-B588-08DE7145B630}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI", "..\CPP\7zip\UI\GUI\GUI.vcproj", "{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + DebugU|Win32 = DebugU|Win32 + DebugU|x64 = DebugU|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseD|Win32 = ReleaseD|Win32 + ReleaseD|x64 = ReleaseD|x64 + ReleaseU|Win32 = ReleaseU|Win32 + ReleaseU|x64 = ReleaseU|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Debug|Win32.ActiveCfg = Debug|Win32 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Debug|Win32.Build.0 = Debug|Win32 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Debug|x64.ActiveCfg = Debug|x64 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Debug|x64.Build.0 = Debug|x64 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.DebugU|Win32.ActiveCfg = Debug|x64 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.DebugU|x64.ActiveCfg = Debug|x64 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.DebugU|x64.Build.0 = Debug|x64 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Release|Win32.ActiveCfg = Release|Win32 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Release|Win32.Build.0 = Release|Win32 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Release|x64.ActiveCfg = Release|x64 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Release|x64.Build.0 = Release|x64 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.ReleaseD|Win32.ActiveCfg = Release|x64 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.ReleaseD|x64.ActiveCfg = Release|x64 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.ReleaseD|x64.Build.0 = Release|x64 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.ReleaseU|Win32.ActiveCfg = Release|x64 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.ReleaseU|x64.ActiveCfg = Release|x64 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.ReleaseU|x64.Build.0 = Release|x64 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Debug|Win32.ActiveCfg = Debug|Win32 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Debug|Win32.Build.0 = Debug|Win32 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Debug|x64.ActiveCfg = Debug|x64 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Debug|x64.Build.0 = Debug|x64 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.DebugU|Win32.ActiveCfg = Debug|x64 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.DebugU|x64.ActiveCfg = Debug|x64 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.DebugU|x64.Build.0 = Debug|x64 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Release|Win32.ActiveCfg = Release|Win32 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Release|Win32.Build.0 = Release|Win32 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Release|x64.ActiveCfg = Release|x64 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Release|x64.Build.0 = Release|x64 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.ReleaseD|Win32.ActiveCfg = Release|x64 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.ReleaseD|x64.ActiveCfg = Release|x64 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.ReleaseD|x64.Build.0 = Release|x64 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.ReleaseU|Win32.ActiveCfg = Release|x64 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.ReleaseU|x64.ActiveCfg = Release|x64 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.ReleaseU|x64.Build.0 = Release|x64 + {F0A92034-14AA-4347-92D5-CD4886865506}.Debug|Win32.ActiveCfg = Debug|Win32 + {F0A92034-14AA-4347-92D5-CD4886865506}.Debug|Win32.Build.0 = Debug|Win32 + {F0A92034-14AA-4347-92D5-CD4886865506}.Debug|x64.ActiveCfg = Debug|x64 + {F0A92034-14AA-4347-92D5-CD4886865506}.Debug|x64.Build.0 = Debug|x64 + {F0A92034-14AA-4347-92D5-CD4886865506}.DebugU|Win32.ActiveCfg = Debug|x64 + {F0A92034-14AA-4347-92D5-CD4886865506}.DebugU|x64.ActiveCfg = Debug|x64 + {F0A92034-14AA-4347-92D5-CD4886865506}.DebugU|x64.Build.0 = Debug|x64 + {F0A92034-14AA-4347-92D5-CD4886865506}.Release|Win32.ActiveCfg = Release|Win32 + {F0A92034-14AA-4347-92D5-CD4886865506}.Release|Win32.Build.0 = Release|Win32 + {F0A92034-14AA-4347-92D5-CD4886865506}.Release|x64.ActiveCfg = Release|x64 + {F0A92034-14AA-4347-92D5-CD4886865506}.Release|x64.Build.0 = Release|x64 + {F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseD|Win32.ActiveCfg = ReleaseD|Win32 + {F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseD|Win32.Build.0 = ReleaseD|Win32 + {F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseD|x64.ActiveCfg = ReleaseD|x64 + {F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseD|x64.Build.0 = ReleaseD|x64 + {F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseU|Win32.ActiveCfg = ReleaseD|x64 + {F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseU|x64.ActiveCfg = ReleaseD|x64 + {F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseU|x64.Build.0 = ReleaseD|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Debug|Win32.ActiveCfg = Debug|Win32 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Debug|Win32.Build.0 = Debug|Win32 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Debug|x64.ActiveCfg = Debug|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Debug|x64.Build.0 = Debug|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.DebugU|Win32.ActiveCfg = DebugU|Win32 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.DebugU|Win32.Build.0 = DebugU|Win32 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.DebugU|x64.ActiveCfg = DebugU|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.DebugU|x64.Build.0 = DebugU|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Release|Win32.ActiveCfg = Release|Win32 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Release|Win32.Build.0 = Release|Win32 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Release|x64.ActiveCfg = Release|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Release|x64.Build.0 = Release|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseD|Win32.ActiveCfg = Release|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseD|x64.ActiveCfg = Release|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseD|x64.Build.0 = Release|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseU|Win32.ActiveCfg = ReleaseU|Win32 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseU|Win32.Build.0 = ReleaseU|Win32 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseU|x64.ActiveCfg = ReleaseU|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseU|x64.Build.0 = ReleaseU|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.Debug|Win32.ActiveCfg = Debug|Win32 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.Debug|Win32.Build.0 = Debug|Win32 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.Debug|x64.ActiveCfg = Debug|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.Debug|x64.Build.0 = Debug|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.DebugU|Win32.ActiveCfg = DebugU|Win32 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.DebugU|Win32.Build.0 = DebugU|Win32 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.DebugU|x64.ActiveCfg = DebugU|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.DebugU|x64.Build.0 = DebugU|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.Release|Win32.ActiveCfg = Release|Win32 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.Release|Win32.Build.0 = Release|Win32 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.Release|x64.ActiveCfg = Release|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.Release|x64.Build.0 = Release|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseD|Win32.ActiveCfg = ReleaseU|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseD|x64.ActiveCfg = ReleaseU|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseD|x64.Build.0 = ReleaseU|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseU|Win32.ActiveCfg = ReleaseU|Win32 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseU|Win32.Build.0 = ReleaseU|Win32 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseU|x64.ActiveCfg = ReleaseU|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseU|x64.Build.0 = ReleaseU|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.Debug|Win32.ActiveCfg = Debug|Win32 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.Debug|Win32.Build.0 = Debug|Win32 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.Debug|x64.ActiveCfg = Debug|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.Debug|x64.Build.0 = Debug|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.DebugU|Win32.ActiveCfg = DebugU|Win32 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.DebugU|Win32.Build.0 = DebugU|Win32 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.DebugU|x64.ActiveCfg = DebugU|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.DebugU|x64.Build.0 = DebugU|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.Release|Win32.ActiveCfg = Release|Win32 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.Release|Win32.Build.0 = Release|Win32 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.Release|x64.ActiveCfg = Release|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.Release|x64.Build.0 = Release|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseD|Win32.ActiveCfg = ReleaseU|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseD|x64.ActiveCfg = ReleaseU|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseD|x64.Build.0 = ReleaseU|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseU|Win32.ActiveCfg = ReleaseU|Win32 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseU|Win32.Build.0 = ReleaseU|Win32 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseU|x64.ActiveCfg = ReleaseU|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseU|x64.Build.0 = ReleaseU|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Debug|Win32.ActiveCfg = Debug|Win32 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Debug|Win32.Build.0 = Debug|Win32 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Debug|x64.ActiveCfg = Debug|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Debug|x64.Build.0 = Debug|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.DebugU|Win32.ActiveCfg = DebugU|Win32 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.DebugU|Win32.Build.0 = DebugU|Win32 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.DebugU|x64.ActiveCfg = DebugU|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.DebugU|x64.Build.0 = DebugU|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Release|Win32.ActiveCfg = Release|Win32 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Release|Win32.Build.0 = Release|Win32 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Release|x64.ActiveCfg = Release|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Release|x64.Build.0 = Release|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseD|Win32.ActiveCfg = Release|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseD|x64.ActiveCfg = Release|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseD|x64.Build.0 = Release|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseU|Win32.ActiveCfg = ReleaseU|Win32 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseU|Win32.Build.0 = ReleaseU|Win32 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseU|x64.ActiveCfg = ReleaseU|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseU|x64.Build.0 = ReleaseU|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/C/7zVersion.h b/C/7zVersion.h index 4f15081d..540bc7f7 100644 --- a/C/7zVersion.h +++ b/C/7zVersion.h @@ -3,6 +3,14 @@ #define MY_VER_BUILD 0 #define MY_VERSION_NUMBERS "16.04" #define MY_VERSION "16.04" + +#ifdef MY_X64 + #define MY_7ZIP_NAME "7-Zip [64-bit]" +#else + #define MY_7ZIP_NAME "7-Zip [32-bit]" +#endif + + #define MY_DATE "2016-10-04" #undef MY_COPYRIGHT #undef MY_VERSION_COPYRIGHT_DATE @@ -17,3 +25,25 @@ #endif #define MY_VERSION_COPYRIGHT_DATE MY_VERSION " : " MY_COPYRIGHT " : " MY_DATE + +#define MY_EASY7ZIP_VER_MAJOR 0 +#define MY_EASY7ZIP_VER_MINOR 1 + +#ifdef MY_X64 + #define MY_EASY7ZIP_7ZIP "Easy 7-Zip [64-bit]" +#else + #define MY_EASY7ZIP_7ZIP "Easy 7-Zip [32-bit]" +#endif + +#define MY_EASY7ZIP_VERSION "0.1.6" + +#ifdef MY_X64 + #define MY_EASY7ZIP_7ZIP_VERSION "Easy 7-Zip v0.1.6 [64-bit]" +#else + #define MY_EASY7ZIP_7ZIP_VERSION "Easy 7-Zip v0.1.6 [32-bit]" +#endif +#define MY_EASY7ZIP_COPYRIGHT "Portions Copyright (C) 2013-2016 James Hoo" + +#define MY_EASY7ZIP_AUTHOR "James Hoo" +#define MY_EASY7ZIP_HOMEPAGE "e7z.org" +#define MY_EASY7ZIP_SPECIAL_BUILD MY_EASY7ZIP_7ZIP_VERSION " (www." MY_EASY7ZIP_HOMEPAGE ") made by " MY_EASY7ZIP_AUTHOR diff --git a/C/7zVersion.rc b/C/7zVersion.rc index e520995d..331a76cd 100644 --- a/C/7zVersion.rc +++ b/C/7zVersion.rc @@ -40,8 +40,9 @@ BEGIN \ VALUE "InternalName", intName \ VALUE "LegalCopyright", MY_COPYRIGHT \ VALUE "OriginalFilename", origName \ - VALUE "ProductName", "7-Zip" \ + VALUE "ProductName", MY_7ZIP_NAME \ VALUE "ProductVersion", MY_VERSION \ + VALUE "SpecialBuild", MY_EASY7ZIP_SPECIAL_BUILD \ END \ END \ BLOCK "VarFileInfo" \ diff --git a/CPP/7zip/Bundles/Format7zF/Format7z.sln b/CPP/7zip/Bundles/Format7zF/Format7z.sln new file mode 100644 index 00000000..6f85f4d3 --- /dev/null +++ b/CPP/7zip/Bundles/Format7zF/Format7z.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "7z", "Format7z.vcproj", "{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Debug|Win32.ActiveCfg = Debug|Win32 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Debug|Win32.Build.0 = Debug|Win32 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Debug|x64.ActiveCfg = Debug|x64 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Debug|x64.Build.0 = Debug|x64 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Release|Win32.ActiveCfg = Release|Win32 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Release|Win32.Build.0 = Release|Win32 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Release|x64.ActiveCfg = Release|x64 + {F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/CPP/7zip/Bundles/Format7zF/Format7z.vcproj b/CPP/7zip/Bundles/Format7zF/Format7z.vcproj new file mode 100644 index 00000000..605dea1e --- /dev/null +++ b/CPP/7zip/Bundles/Format7zF/Format7z.vcproj @@ -0,0 +1,11405 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CPP/7zip/Bundles/SFXCon/SFXCon.sln b/CPP/7zip/Bundles/SFXCon/SFXCon.sln new file mode 100644 index 00000000..add99cb3 --- /dev/null +++ b/CPP/7zip/Bundles/SFXCon/SFXCon.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SFXCon", "SFXCon.vcproj", "{0A87F1E0-6E9A-452C-A209-3968AD375DCA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Debug|Win32.ActiveCfg = Debug|Win32 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Debug|Win32.Build.0 = Debug|Win32 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Debug|x64.ActiveCfg = Debug|x64 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Debug|x64.Build.0 = Debug|x64 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Release|Win32.ActiveCfg = Release|Win32 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Release|Win32.Build.0 = Release|Win32 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Release|x64.ActiveCfg = Release|x64 + {0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/CPP/7zip/Bundles/SFXCon/SFXCon.vcproj b/CPP/7zip/Bundles/SFXCon/SFXCon.vcproj new file mode 100644 index 00000000..daf05d3c --- /dev/null +++ b/CPP/7zip/Bundles/SFXCon/SFXCon.vcproj @@ -0,0 +1,4663 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CPP/7zip/Bundles/SFXWin/SFXWin.sln b/CPP/7zip/Bundles/SFXWin/SFXWin.sln new file mode 100644 index 00000000..159568c7 --- /dev/null +++ b/CPP/7zip/Bundles/SFXWin/SFXWin.sln @@ -0,0 +1,32 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SFXWin", "SFXWin.vcproj", "{F0A92034-14AA-4347-92D5-CD4886865506}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseD|Win32 = ReleaseD|Win32 + ReleaseD|x64 = ReleaseD|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F0A92034-14AA-4347-92D5-CD4886865506}.Debug|Win32.ActiveCfg = Debug|Win32 + {F0A92034-14AA-4347-92D5-CD4886865506}.Debug|Win32.Build.0 = Debug|Win32 + {F0A92034-14AA-4347-92D5-CD4886865506}.Debug|x64.ActiveCfg = Debug|x64 + {F0A92034-14AA-4347-92D5-CD4886865506}.Debug|x64.Build.0 = Debug|x64 + {F0A92034-14AA-4347-92D5-CD4886865506}.Release|Win32.ActiveCfg = Release|Win32 + {F0A92034-14AA-4347-92D5-CD4886865506}.Release|Win32.Build.0 = Release|Win32 + {F0A92034-14AA-4347-92D5-CD4886865506}.Release|x64.ActiveCfg = Release|x64 + {F0A92034-14AA-4347-92D5-CD4886865506}.Release|x64.Build.0 = Release|x64 + {F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseD|Win32.ActiveCfg = ReleaseD|Win32 + {F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseD|Win32.Build.0 = ReleaseD|Win32 + {F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseD|x64.ActiveCfg = ReleaseD|x64 + {F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseD|x64.Build.0 = ReleaseD|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/CPP/7zip/Bundles/SFXWin/SFXWin.vcproj b/CPP/7zip/Bundles/SFXWin/SFXWin.vcproj new file mode 100644 index 00000000..74a32750 --- /dev/null +++ b/CPP/7zip/Bundles/SFXWin/SFXWin.vcproj @@ -0,0 +1,6693 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CPP/7zip/Bundles/SFXWin/resource.rc b/CPP/7zip/Bundles/SFXWin/resource.rc index 91292b2f..10c671d2 100644 --- a/CPP/7zip/Bundles/SFXWin/resource.rc +++ b/CPP/7zip/Bundles/SFXWin/resource.rc @@ -7,8 +7,11 @@ MY_VERSION_INFO_APP("7z SFX", "7z.sfx") -#define xc 240 -#define yc 64 +#define xc 270 +#define yc 75 + +#define bxsOpen 30 +#define xsSpace 4 IDI_ICON ICON "7z.ico" @@ -16,9 +19,13 @@ IDD_EXTRACT DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT CAPTION "7-Zip self-extracting archive" BEGIN LTEXT "E&xtract to:", IDT_EXTRACT_EXTRACT_TO, m, m, xc, 8 - EDITTEXT IDC_EXTRACT_PATH, m, 21, xc - bxsDots - 12, 14, ES_AUTOHSCROLL - PUSHBUTTON "...", IDB_EXTRACT_SET_PATH, xs - m - bxsDots, 20, bxsDots, bys, WS_GROUP - DEFPUSHBUTTON "Extract", IDOK, bx2, by, bxs, bys, WS_GROUP + EDITTEXT IDC_EXTRACT_PATH, m, m + 12 - 1, xc - bxsDots - xsSpace - bxsOpen - xsSpace, 14, ES_AUTOHSCROLL + PUSHBUTTON "...", IDB_EXTRACT_SET_PATH, xs - m - bxsDots - xsSpace - bxsOpen, m + 12 - 1, bxsDots, bys-1, WS_GROUP + PUSHBUTTON "&Open", IDC_EXTRACT_BUTTON_OPEN_PATH, xs - m - bxsOpen, m + 12 - 1, bxsOpen, bys-1, WS_GROUP + LTEXT "", IDC_STATIC_EXTRACT_FREE_SPACE, m, m + 12 + 14 + 1, xc, 8 + CONTROL "O&pen output folder after extracting", IDC_EXTRACT_CHECK_OPEN_OUTPUT_FOLDER, MY_CHECKBOX, m, m + 12 + 14 + 1 + 8 + 6, xc, 10 + + DEFPUSHBUTTON "&Extract", IDOK, bx2, by, bxs, bys, WS_GROUP PUSHBUTTON "Cancel", IDCANCEL, bx1, by, bxs, bys END diff --git a/CPP/7zip/GuiCommon.rc b/CPP/7zip/GuiCommon.rc index 6b26ddd8..3c775818 100644 --- a/CPP/7zip/GuiCommon.rc +++ b/CPP/7zip/GuiCommon.rc @@ -59,7 +59,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #define MY_PAGE_STYLE STYLE WS_CHILD | WS_DISABLED | WS_CAPTION -#define MY_FONT FONT 8, "MS Shell Dlg" +//#define MY_FONT FONT 8, "MS Shell Dlg" +#define MY_FONT FONT 8, "Tahoma" #define SMALL_PAGE_SIZE_X 120 diff --git a/CPP/7zip/UI/Common/ZipRegistry.cpp b/CPP/7zip/UI/Common/ZipRegistry.cpp index a0e692d0..40321ac0 100644 --- a/CPP/7zip/UI/Common/ZipRegistry.cpp +++ b/CPP/7zip/UI/Common/ZipRegistry.cpp @@ -17,8 +17,10 @@ static NSynchronization::CCriticalSection g_CS; #define CS_LOCK NSynchronization::CCriticalSectionLock lock(g_CS); static const TCHAR *kCuPrefix = TEXT("Software") TEXT(STRING_PATH_SEPARATOR) TEXT("7-Zip") TEXT(STRING_PATH_SEPARATOR); +static const TCHAR *kCuFMPrefix = TEXT("Software") TEXT(STRING_PATH_SEPARATOR) TEXT("7-Zip") TEXT(STRING_PATH_SEPARATOR) TEXT("FM"); static CSysString GetKeyPath(const CSysString &path) { return kCuPrefix + path; } +static CSysString GetFMKeyPath() { return kCuFMPrefix; } static LONG OpenMainKey(CKey &key, LPCTSTR keyName) { @@ -30,6 +32,16 @@ static LONG CreateMainKey(CKey &key, LPCTSTR keyName) return key.Create(HKEY_CURRENT_USER, GetKeyPath(keyName)); } +static LONG OpenFMKey(CKey &key) +{ + return key.Open(HKEY_CURRENT_USER, GetFMKeyPath(), KEY_READ); +} + +static LONG CreateFMKey(CKey &key) +{ + return key.Create(HKEY_CURRENT_USER, GetFMKeyPath()); +} + static void Key_Set_BoolPair(CKey &key, LPCTSTR name, const CBoolPair &b) { if (b.Def) @@ -62,6 +74,8 @@ static const TCHAR *kElimDup = TEXT("ElimDup"); // static const TCHAR *kAltStreams = TEXT("AltStreams"); static const TCHAR *kNtSecur = TEXT("Security"); +static const TCHAR *kFMCopyHistoryValueName = TEXT("CopyHistory"); + void CInfo::Save() const { CS_LOCK @@ -79,8 +93,15 @@ void CInfo::Save() const Key_Set_BoolPair(key, kNtSecur, NtSecurity); Key_Set_BoolPair(key, kShowPassword, ShowPassword); - key.RecurseDeleteKey(kPathHistory); - key.SetValue_Strings(kPathHistory, Paths); +// key.RecurseDeleteKey(kPathHistory); +// key.SetValue_Strings(kPathHistory, Paths); + key.Close(); + + if (CreateFMKey(key) == ERROR_SUCCESS) + { + key.SetValue_Strings(kFMCopyHistoryValueName, Paths); + key.Close(); + } } void Save_ShowPassword(bool showPassword) @@ -104,28 +125,37 @@ void CInfo::Load() CS_LOCK CKey key; - if (OpenMainKey(key, kKeyName) != ERROR_SUCCESS) - return; +// if (OpenMainKey(key, kKeyName) != ERROR_SUCCESS) +// return; - key.GetValue_Strings(kPathHistory, Paths); - UInt32 v; - if (key.QueryValue(kExtractMode, v) == ERROR_SUCCESS && v <= NPathMode::kAbsPaths) + if (OpenMainKey(key, kKeyName) == ERROR_SUCCESS) { - PathMode = (NPathMode::EEnum)v; - PathMode_Force = true; +// key.GetValue_Strings(kPathHistory, Paths); + UInt32 v; + if (key.QueryValue(kExtractMode, v) == ERROR_SUCCESS && v <= NPathMode::kAbsPaths) + { + PathMode = (NPathMode::EEnum)v; + PathMode_Force = true; + } + if (key.QueryValue(kOverwriteMode, v) == ERROR_SUCCESS && v <= NOverwriteMode::kRenameExisting) + { + OverwriteMode = (NOverwriteMode::EEnum)v; + OverwriteMode_Force = true; + } + + Key_Get_BoolPair_true(key, kSplitDest, SplitDest); + + Key_Get_BoolPair(key, kElimDup, ElimDup); + // Key_Get_BoolPair(key, kAltStreams, AltStreams); + Key_Get_BoolPair(key, kNtSecur, NtSecurity); + Key_Get_BoolPair(key, kShowPassword, ShowPassword); + key.Close(); } - if (key.QueryValue(kOverwriteMode, v) == ERROR_SUCCESS && v <= NOverwriteMode::kRenameExisting) + if (OpenFMKey(key) == ERROR_SUCCESS) { - OverwriteMode = (NOverwriteMode::EEnum)v; - OverwriteMode_Force = true; + key.GetValue_Strings(kFMCopyHistoryValueName, Paths); + key.Close(); } - - Key_Get_BoolPair_true(key, kSplitDest, SplitDest); - - Key_Get_BoolPair(key, kElimDup, ElimDup); - // Key_Get_BoolPair(key, kAltStreams, AltStreams); - Key_Get_BoolPair(key, kNtSecur, NtSecurity); - Key_Get_BoolPair(key, kShowPassword, ShowPassword); } bool Read_ShowPassword() @@ -373,11 +403,11 @@ void CContextMenuInfo::Save() const void CContextMenuInfo::Load() { - Cascaded.Val = true; + Cascaded.Val = false; Cascaded.Def = false; - MenuIcons.Val = false; - MenuIcons.Def = false; + MenuIcons.Val = true; + MenuIcons.Def = true; ElimDup.Val = true; ElimDup.Def = false; diff --git a/CPP/7zip/UI/Common/ZipRegistry.h b/CPP/7zip/UI/Common/ZipRegistry.h index 935f97bb..7622c9a9 100644 --- a/CPP/7zip/UI/Common/ZipRegistry.h +++ b/CPP/7zip/UI/Common/ZipRegistry.h @@ -31,6 +31,9 @@ namespace NExtract void Save_ShowPassword(bool showPassword); bool Read_ShowPassword(); + +void SaveOptShowPassword(bool bShow); +bool ReadOptShowPassword(); } namespace NCompression diff --git a/CPP/7zip/UI/Console/Console.sln b/CPP/7zip/UI/Console/Console.sln new file mode 100644 index 00000000..8a160b5e --- /dev/null +++ b/CPP/7zip/UI/Console/Console.sln @@ -0,0 +1,38 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "Console.vcproj", "{1A8E1EC5-A03F-4368-ABDF-57C21762F528}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + DebugU|Win32 = DebugU|Win32 + DebugU|x64 = DebugU|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseU|Win32 = ReleaseU|Win32 + ReleaseU|x64 = ReleaseU|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Debug|Win32.ActiveCfg = Debug|Win32 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Debug|Win32.Build.0 = Debug|Win32 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Debug|x64.ActiveCfg = Debug|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Debug|x64.Build.0 = Debug|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.DebugU|Win32.ActiveCfg = DebugU|Win32 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.DebugU|Win32.Build.0 = DebugU|Win32 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.DebugU|x64.ActiveCfg = DebugU|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.DebugU|x64.Build.0 = DebugU|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Release|Win32.ActiveCfg = Release|Win32 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Release|Win32.Build.0 = Release|Win32 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Release|x64.ActiveCfg = Release|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Release|x64.Build.0 = Release|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseU|Win32.ActiveCfg = ReleaseU|Win32 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseU|Win32.Build.0 = ReleaseU|Win32 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseU|x64.ActiveCfg = ReleaseU|x64 + {1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseU|x64.Build.0 = ReleaseU|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/CPP/7zip/UI/Console/Console.vcproj b/CPP/7zip/UI/Console/Console.vcproj new file mode 100644 index 00000000..8085d2ae --- /dev/null +++ b/CPP/7zip/UI/Console/Console.vcproj @@ -0,0 +1,6659 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CPP/7zip/UI/Explorer/Explorer.sln b/CPP/7zip/UI/Explorer/Explorer.sln new file mode 100644 index 00000000..c8dd407c --- /dev/null +++ b/CPP/7zip/UI/Explorer/Explorer.sln @@ -0,0 +1,38 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Explorer", "Explorer.vcproj", "{FBA8DA13-7434-409C-83AB-FC6682A8869D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + DebugU|Win32 = DebugU|Win32 + DebugU|x64 = DebugU|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseU|Win32 = ReleaseU|Win32 + ReleaseU|x64 = ReleaseU|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.Debug|Win32.ActiveCfg = Debug|Win32 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.Debug|Win32.Build.0 = Debug|Win32 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.Debug|x64.ActiveCfg = Debug|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.Debug|x64.Build.0 = Debug|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.DebugU|Win32.ActiveCfg = DebugU|Win32 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.DebugU|Win32.Build.0 = DebugU|Win32 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.DebugU|x64.ActiveCfg = DebugU|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.DebugU|x64.Build.0 = DebugU|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.Release|Win32.ActiveCfg = Release|Win32 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.Release|Win32.Build.0 = Release|Win32 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.Release|x64.ActiveCfg = Release|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.Release|x64.Build.0 = Release|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseU|Win32.ActiveCfg = ReleaseU|Win32 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseU|Win32.Build.0 = ReleaseU|Win32 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseU|x64.ActiveCfg = ReleaseU|x64 + {FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseU|x64.Build.0 = ReleaseU|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/CPP/7zip/UI/Explorer/Explorer.vcproj b/CPP/7zip/UI/Explorer/Explorer.vcproj new file mode 100644 index 00000000..05c70714 --- /dev/null +++ b/CPP/7zip/UI/Explorer/Explorer.vcproj @@ -0,0 +1,3869 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CPP/7zip/UI/Explorer/MenuLogo.bmp b/CPP/7zip/UI/Explorer/MenuLogo.bmp index 906a6c5c..d862e1c8 100644 Binary files a/CPP/7zip/UI/Explorer/MenuLogo.bmp and b/CPP/7zip/UI/Explorer/MenuLogo.bmp differ diff --git a/CPP/7zip/UI/Explorer/StdAfx.h b/CPP/7zip/UI/Explorer/StdAfx.h index 5e4dc640..fce61bac 100644 --- a/CPP/7zip/UI/Explorer/StdAfx.h +++ b/CPP/7zip/UI/Explorer/StdAfx.h @@ -3,9 +3,9 @@ #ifndef __STDAFX_H #define __STDAFX_H -// #define _WIN32_WINNT 0x0400 -#define _WIN32_WINNT 0x0500 -#define WINVER _WIN32_WINNT +//// #define _WIN32_WINNT 0x0400 +//#define _WIN32_WINNT 0x0500 +//#define WINVER _WIN32_WINNT #include "../../../Common/Common.h" diff --git a/CPP/7zip/UI/Explorer/resource.rc b/CPP/7zip/UI/Explorer/resource.rc index 80018b45..c808b8ee 100644 --- a/CPP/7zip/UI/Explorer/resource.rc +++ b/CPP/7zip/UI/Explorer/resource.rc @@ -3,6 +3,6 @@ MY_VERSION_INFO_DLL("7-Zip Shell Extension", "7-zip") -#ifndef UNDER_CE -1 24 MOVEABLE PURE "7-zip.dll.manifest" -#endif +//#ifndef UNDER_CE +//1 24 MOVEABLE PURE "7-zip.dll.manifest" +//#endif diff --git a/CPP/7zip/UI/FileManager/AboutEasy7ZipDialog.cpp b/CPP/7zip/UI/FileManager/AboutEasy7ZipDialog.cpp new file mode 100644 index 00000000..3efbd490 --- /dev/null +++ b/CPP/7zip/UI/FileManager/AboutEasy7ZipDialog.cpp @@ -0,0 +1,42 @@ +// AboutEasy7ZipDialog.cpp + +#include "StdAfx.h" +#include "AboutEasy7ZipDialog.h" + +#include "HelpUtils.h" + +static LPCWSTR kHelpTopic = L"start.htm"; + +bool CAboutEasy7ZipDialog::OnInit() +{ + NormalizePosition(); + return CModalDialog::OnInit(); +} + +void CAboutEasy7ZipDialog::OnHelp() +{ + ShowHelpWindow(NULL, kHelpTopic); +} + +bool CAboutEasy7ZipDialog::OnButtonClicked(int buttonID, HWND buttonHWND) +{ + LPCTSTR url; + switch(buttonID) + { + case IDC_ABOUT_BUTTON_EASY7ZIP_HOMEPAGE: url = TEXT("http://www.e7z.org/"); break; + default: + return CModalDialog::OnButtonClicked(buttonID, buttonHWND); + } + + #ifdef UNDER_CE + SHELLEXECUTEINFO s; + memset(&s, 0, sizeof(s)); + s.cbSize = sizeof(s); + s.lpFile = url; + ::ShellExecuteEx(&s); + #else + ::ShellExecute(NULL, NULL, url, NULL, NULL, SW_SHOWNORMAL); + #endif + + return true; +} diff --git a/CPP/7zip/UI/FileManager/AboutEasy7ZipDialog.h b/CPP/7zip/UI/FileManager/AboutEasy7ZipDialog.h new file mode 100644 index 00000000..2d393599 --- /dev/null +++ b/CPP/7zip/UI/FileManager/AboutEasy7ZipDialog.h @@ -0,0 +1,18 @@ +// AboutEasy7ZipDialog.h + +#ifndef __ABOUT_EASY7ZIP_DIALOG_H +#define __ABOUT_EASY7ZIP_DIALOG_H + +#include "AboutEasy7ZipDialogRes.h" +#include "../../../Windows/Control/Dialog.h" + +class CAboutEasy7ZipDialog: public NWindows::NControl::CModalDialog +{ +public: + virtual bool OnInit(); + virtual void OnHelp(); + virtual bool OnButtonClicked(int buttonID, HWND buttonHWND); + INT_PTR Create(HWND wndParent = 0) { return CModalDialog::Create(IDD_ABOUT_EASY_7ZIP, wndParent); } +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/AboutEasy7ZipDialog.rc b/CPP/7zip/UI/FileManager/AboutEasy7ZipDialog.rc new file mode 100644 index 00000000..0c1d942b --- /dev/null +++ b/CPP/7zip/UI/FileManager/AboutEasy7ZipDialog.rc @@ -0,0 +1,16 @@ +#include "AboutEasy7ZipDialogRes.h" +#include "../../GuiCommon.rc" +#include "../../MyVersion.h" + +#define xc 165 +#define yc 85 + +IDD_ABOUT_EASY_7ZIP DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT +CAPTION "About Easy 7-Zip" +{ + DEFPUSHBUTTON "OK", IDOK, bx1, by, bxs, bys + PUSHBUTTON MY_EASY7ZIP_HOMEPAGE, IDC_ABOUT_BUTTON_EASY7ZIP_HOMEPAGE, bx2, by, bxs, bys + LTEXT MY_EASY7ZIP_7ZIP_VERSION, -1, m, m, xc, 8 + LTEXT MY_EASY7ZIP_COPYRIGHT, -1, m, m + 8 + 4, xc, 8 + LTEXT "Easy 7-Zip is a free software made by James Hoo. The software was built based on 7-Zip 16.04.", -1, m, m + 8 + 4 + 8 + 12, xc, (yc - bys - 36) +} diff --git a/CPP/7zip/UI/FileManager/AboutEasy7ZipDialogRes.h b/CPP/7zip/UI/FileManager/AboutEasy7ZipDialogRes.h new file mode 100644 index 00000000..84510b70 --- /dev/null +++ b/CPP/7zip/UI/FileManager/AboutEasy7ZipDialogRes.h @@ -0,0 +1,2 @@ +#define IDD_ABOUT_EASY_7ZIP 515 +#define IDC_ABOUT_BUTTON_EASY7ZIP_HOMEPAGE 1001 diff --git a/CPP/7zip/UI/FileManager/App.cpp b/CPP/7zip/UI/FileManager/App.cpp index 6d5662de..a69245e8 100644 --- a/CPP/7zip/UI/FileManager/App.cpp +++ b/CPP/7zip/UI/FileManager/App.cpp @@ -37,6 +37,8 @@ using namespace NName; extern DWORD g_ComCtl32Version; extern HINSTANCE g_hInstance; +extern bool g_bProcessError; + static CFSTR kTempDirPrefix = FTEXT("7zE"); void CPanelCallbackImp::OnTab() @@ -542,6 +544,12 @@ UString CPanel::GetItemsInfoString(const CRecordVector &indices) bool IsCorrectFsName(const UString &name); +static bool IsDirectory(LPCWSTR lpszPathFile) +{ + DWORD dwAttr; + dwAttr = GetFileAttributesW(lpszPathFile); + return (dwAttr != (DWORD)-1) && ((dwAttr & FILE_ATTRIBUTE_DIRECTORY) != 0); +} /* Returns true, if path is path that can be used as path for File System functions @@ -578,6 +586,9 @@ void CApp::OnCopy(bool move, bool copyToSame, int srcPanelIndex) CRecordVector indices; UString destPath; + bool openOutputFolder; + bool deleteSourceFile; + bool close7Zip; bool useDestPanel = false; { @@ -614,10 +625,15 @@ void CApp::OnCopy(bool move, bool copyToSame, int srcPanelIndex) LangString(move ? IDS_MOVE : IDS_COPY, copyDialog.Title); LangString(move ? IDS_MOVE_TO : IDS_COPY_TO, copyDialog.Static); copyDialog.Info = srcPanel.GetItemsInfoString(indices); + copyDialog.m_currentFolderPrefix = srcPanel._currentFolderPrefix; if (copyDialog.Create(srcPanel.GetParent()) != IDOK) return; + openOutputFolder = copyDialog.m_bOpenOutputFolder; + deleteSourceFile = copyDialog.m_bDeleteSourceFile; + close7Zip = copyDialog.m_bClose7Zip; + destPath = copyDialog.Value; } @@ -742,11 +758,13 @@ void CApp::OnCopy(bool move, bool copyToSame, int srcPanelIndex) useDestPanel = true; AddUniqueStringToHeadOfList(copyFolders, destPath); - while (copyFolders.Size() > 20) + while (copyFolders.Size() > 30) copyFolders.DeleteBack(); SaveCopyHistory(copyFolders); } + g_bProcessError = false; + bool useSrcPanel = !useDestPanel || !srcPanel.Is_IO_FS_Folder(); bool useTemp = useSrcPanel && useDestPanel; @@ -830,6 +848,62 @@ void CApp::OnCopy(bool move, bool copyToSame, int srcPanelIndex) disableNotify1.Restore(); disableNotify2.Restore(); srcPanel.SetFocusToList(); + + if (!g_bProcessError && result == S_OK) + { + if (openOutputFolder && IsDirectory(destPath)) + { + StartApplicationDontWait(destPath, destPath, (HWND)_window); + } + if (deleteSourceFile) + { + DWORD dwAttr; + + UString srcFilePath(srcPanel._currentFolderPrefix); + srcPanel.OpenParentFolder(); + + while (!srcFilePath.IsEmpty()) + { + if (srcFilePath.Back() == '\\') + { + srcFilePath.DeleteBack(); + } + dwAttr = GetFileAttributesW(srcFilePath); + + if (dwAttr == INVALID_FILE_ATTRIBUTES) + { + int n = srcFilePath.ReverseFind(L'\\'); + if (n != -1) + { + srcPanel.OpenParentFolder(); + srcFilePath.ReleaseBuf_SetEnd(n); + } + else + { + break; + } + } + else if (dwAttr & FILE_ATTRIBUTE_ARCHIVE) + { + if (dwAttr & FILE_ATTRIBUTE_READONLY) + { + dwAttr &= (~FILE_ATTRIBUTE_READONLY); + SetFileAttributesW(srcFilePath, dwAttr); + } + ::DeleteFileW(srcFilePath); + break; + } + else //if (dwAttr & FILE_ATTRIBUTE_DIRECTORY) + { + break; + } + } // while + } + if (close7Zip) + { + PostMessage (_window, WM_CLOSE, 0, 0); + } + } } void CApp::OnSetSameFolder(int srcPanelIndex) diff --git a/CPP/7zip/UI/FileManager/ComboDialog.cpp b/CPP/7zip/UI/FileManager/ComboDialog.cpp index 729743e8..35a3fb6e 100644 --- a/CPP/7zip/UI/FileManager/ComboDialog.cpp +++ b/CPP/7zip/UI/FileManager/ComboDialog.cpp @@ -39,23 +39,23 @@ bool CComboDialog::OnInit() return CModalDialog::OnInit(); } -bool CComboDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize) -{ - int mx, my; - GetMargins(8, mx, my); - int bx1, bx2, by; - GetItemSizes(IDCANCEL, bx1, by); - GetItemSizes(IDOK, bx2, by); - int y = ySize - my - by; - int x = xSize - mx - bx1; - - InvalidateRect(NULL); - - MoveItem(IDCANCEL, x, y, bx1, by); - MoveItem(IDOK, x - mx - bx2, y, bx2, by); - ChangeSubWindowSizeX(_comboBox, xSize - mx * 2); - return false; -} +//bool CComboDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize) +//{ +// int mx, my; +// GetMargins(8, mx, my); +// int bx1, bx2, by; +// GetItemSizes(IDCANCEL, bx1, by); +// GetItemSizes(IDOK, bx2, by); +// int y = ySize - my - by; +// int x = xSize - mx - bx1; +// +// InvalidateRect(NULL); +// +// MoveItem(IDCANCEL, x, y, bx1, by); +// MoveItem(IDOK, x - mx - bx2, y, bx2, by); +// ChangeSubWindowSizeX(_comboBox, xSize - mx * 2); +// return false; +//} void CComboDialog::OnOK() { diff --git a/CPP/7zip/UI/FileManager/ComboDialog.h b/CPP/7zip/UI/FileManager/ComboDialog.h index 29b28b5b..8a9d1d50 100644 --- a/CPP/7zip/UI/FileManager/ComboDialog.h +++ b/CPP/7zip/UI/FileManager/ComboDialog.h @@ -13,7 +13,7 @@ class CComboDialog: public NWindows::NControl::CModalDialog NWindows::NControl::CComboBox _comboBox; virtual void OnOK(); virtual bool OnInit(); - virtual bool OnSize(WPARAM wParam, int xSize, int ySize); +// virtual bool OnSize(WPARAM wParam, int xSize, int ySize); public: // bool Sorted; UString Title; diff --git a/CPP/7zip/UI/FileManager/ComboDialog.rc b/CPP/7zip/UI/FileManager/ComboDialog.rc index fddb7484..341076e3 100644 --- a/CPP/7zip/UI/FileManager/ComboDialog.rc +++ b/CPP/7zip/UI/FileManager/ComboDialog.rc @@ -1,14 +1,14 @@ #include "ComboDialogRes.h" #include "../../GuiCommon.rc" -#define xc 240 +#define xc 260 #define yc 64 -IDD_COMBO DIALOG 0, 0, xs, ys MY_MODAL_RESIZE_DIALOG_STYLE MY_FONT +IDD_COMBO DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT CAPTION "Combo" { LTEXT "", IDT_COMBO, m, m, xc, 8 - COMBOBOX IDC_COMBO, m, 20, xc, 65, MY_COMBO_WITH_EDIT + COMBOBOX IDC_COMBO, m, 20, xc, 160, MY_COMBO_WITH_EDIT OK_CANCEL } diff --git a/CPP/7zip/UI/FileManager/CopyDialog.cpp b/CPP/7zip/UI/FileManager/CopyDialog.cpp index 4b17110d..df6ef01f 100644 --- a/CPP/7zip/UI/FileManager/CopyDialog.cpp +++ b/CPP/7zip/UI/FileManager/CopyDialog.cpp @@ -9,12 +9,31 @@ #include "BrowseDialog.h" #include "CopyDialog.h" +#include "Panel.h" +#include "ViewSettings.h" + #ifdef LANG #include "LangUtils.h" #endif using namespace NWindows; +static bool IsFileExistentAndNotDir(const wchar_t * lpszFile) +{ + DWORD dwAttr; + dwAttr = GetFileAttributesW(lpszFile); + return (dwAttr != INVALID_FILE_ATTRIBUTES) + && ((dwAttr & FILE_ATTRIBUTE_ARCHIVE) != 0) + && ((dwAttr & FILE_ATTRIBUTE_DIRECTORY) == 0); +} + +static bool IsDirectory(LPCWSTR lpszPathFile) +{ + DWORD dwAttr; + dwAttr = GetFileAttributesW(lpszPathFile); + return (dwAttr != (DWORD)-1) && ((dwAttr & FILE_ATTRIBUTE_DIRECTORY) != 0); +} + bool CCopyDialog::OnInit() { #ifdef LANG @@ -23,6 +42,9 @@ bool CCopyDialog::OnInit() _path.Attach(GetItem(IDC_COPY)); SetText(Title); + _freeSpace.Attach(GetItem(IDC_FREE_SPACE)); + _freeSpace.SetText(L""); + NControl::CStatic staticContol; staticContol.Attach(GetItem(IDT_COPY)); staticContol.SetText(Static); @@ -33,8 +55,70 @@ bool CCopyDialog::OnInit() FOR_VECTOR (i, Strings) _path.AddString(Strings[i]); _path.SetText(Value); + ShowPathFreeSpace(Value); + + m_bOpenOutputFolder = ReadOptOpenOutputFolder(); + m_bClose7Zip = ReadOptClose7Zip(); + + CheckButton(IDC_CHECK_OPEN_OUTPUT_FOLDER, m_bOpenOutputFolder); + CheckButton(IDC_CHECK_CLOSE_7ZIP, m_bClose7Zip); + SetItemText(IDT_COPY_INFO, Info); NormalizeSize(true); + + RECT rc; + GetWindowRect(&rc); + m_sizeMinWindow.cx = (RECT_SIZE_X(rc))*4/5; + m_sizeMinWindow.cy = (RECT_SIZE_Y(rc))*4/5; + + ///////////////////////////////////////////////////////// + + m_strRealFileName.Empty(); + if (IsDirectory(m_currentFolderPrefix)) + { + EnableItem(IDC_COPY_ADD_FILE_NAME, false); + EnableItem(IDC_CHECK_DELETE_SOURCE_FILE, false); + } + else + { + while (!m_currentFolderPrefix.IsEmpty()) + { + if (m_currentFolderPrefix.Back() == '\\') + { + m_currentFolderPrefix.DeleteBack(); + } + + if (IsFileExistentAndNotDir(m_currentFolderPrefix)) + { + int n = m_currentFolderPrefix.ReverseFind(L'\\'); + int m = m_currentFolderPrefix.ReverseFind(L'.'); + if (n != -1) + { + n++; + } + else + { + n = 0; + } + if (m == -1 || m <= n) m = m_currentFolderPrefix.Len(); + m_strRealFileName = m_currentFolderPrefix.Mid(n, m - n); + break; + } + else + { + int n = m_currentFolderPrefix.ReverseFind(L'\\'); + if (n != -1) + { + m_currentFolderPrefix.ReleaseBuf_SetEnd(n); + } + else + { + break; + } + } + } + } + return CModalDialog::OnInit(); } @@ -48,28 +132,49 @@ bool CCopyDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize) int y = ySize - my - by; int x = xSize - mx - bx1; - InvalidateRect(NULL); +// InvalidateRect(NULL); { RECT r; - GetClientRectOfItem(IDB_COPY_SET_PATH, r); - int bx = RECT_SIZE_X(r); - MoveItem(IDB_COPY_SET_PATH, xSize - mx - bx, r.top, bx, RECT_SIZE_Y(r)); - ChangeSubWindowSizeX(_path, xSize - mx - mx - bx - mx); + + GetClientRectOfItem(IDC_COPY_ADD_FILE_NAME, r); + int bxAddFileName = r.right - r.left; + int byAddFileName = r.bottom - r.top; + MoveItem(IDC_COPY_ADD_FILE_NAME, xSize - mx - bxAddFileName, r.top, bxAddFileName, byAddFileName, false); + + GetClientRectOfItem(IDC_COPY_OPEN_PATH, r); + int bxOpen = r.right - r.left; + int byOpen = r.bottom - r.top; + MoveItem(IDC_COPY_OPEN_PATH, xSize - mx - bxOpen - mx/2 - bxAddFileName, r.top, bxOpen, byOpen, false); + + GetClientRectOfItem(IDB_COPY_SET_PATH, r); +// int bx = RECT_SIZE_X(r); + int bxSet = RECT_SIZE_X(r); + int bySet = RECT_SIZE_Y(r); +// MoveItem(IDB_COPY_SET_PATH, xSize - mx - bx, r.top, bx, RECT_SIZE_Y(r)); +// ChangeSubWindowSizeX(_path, xSize - mx - mx - bx - mx); + MoveItem(IDB_COPY_SET_PATH, xSize - mx - bxSet - bxOpen - mx - bxAddFileName, r.top, bxSet, bySet, false); + ChangeSubWindowSizeX(_path, xSize - mx - mx - bxSet - bxOpen - mx - mx/2 - bxAddFileName, false); } { RECT r; GetClientRectOfItem(IDT_COPY_INFO, r); - NControl::CStatic staticContol; - staticContol.Attach(GetItem(IDT_COPY_INFO)); +// NControl::CStatic staticContol; +// staticContol.Attach(GetItem(IDT_COPY_INFO)); int yPos = r.top; - staticContol.Move(mx, yPos, xSize - mx * 2, y - 2 - yPos); + int xc = xSize - mx * 2; +// staticContol.Move(mx, yPos, xSize - mx * 2, y - 2 - yPos); + MoveItem(IDT_COPY_INFO, mx, yPos, xc, y - 2 - yPos, false); + + GetClientRectOfItem(IDC_AFTER_EXTRACT, r); + MoveItem(IDC_AFTER_EXTRACT, mx, r.top, xc, r.bottom-r.top, false); } - MoveItem(IDCANCEL, x, y, bx1, by); - MoveItem(IDOK, x - mx - bx2, y, bx2, by); + MoveItem(IDCANCEL, x, y, bx1, by, false); + MoveItem(IDOK, x - mx - bx2, y, bx2, by, false); + InvalidateRect(NULL); return false; } @@ -80,6 +185,25 @@ bool CCopyDialog::OnButtonClicked(int buttonID, HWND buttonHWND) case IDB_COPY_SET_PATH: OnButtonSetPath(); return true; + case IDC_COPY_OPEN_PATH: + OnButtonOpenPath(); + return true; + + case IDC_COPY_ADD_FILE_NAME: + OnButtonAddFileName(); + return true; + + case IDC_CHECK_OPEN_OUTPUT_FOLDER: + m_bOpenOutputFolder = IsButtonCheckedBool(IDC_CHECK_OPEN_OUTPUT_FOLDER); + return true; + + case IDC_CHECK_DELETE_SOURCE_FILE: + m_bDeleteSourceFile = IsButtonCheckedBool(IDC_CHECK_DELETE_SOURCE_FILE); + return true; + + case IDC_CHECK_CLOSE_7ZIP: + m_bClose7Zip = IsButtonCheckedBool(IDC_CHECK_CLOSE_7ZIP); + return true; } return CModalDialog::OnButtonClicked(buttonID, buttonHWND); } @@ -97,10 +221,191 @@ void CCopyDialog::OnButtonSetPath() NFile::NName::NormalizeDirPathPrefix(resultPath); _path.SetCurSel(-1); _path.SetText(resultPath); + ShowPathFreeSpace(resultPath); } void CCopyDialog::OnOK() { + SaveOptOpenOutputFolder(m_bOpenOutputFolder); + SaveOptClose7Zip(m_bClose7Zip); + _path.GetText(Value); CModalDialog::OnOK(); } + +void CCopyDialog::OnButtonOpenPath() +{ + UString currentPath; + _path.GetText(currentPath); + + if (IsDirectory(currentPath)) + { + StartApplicationDontWait(currentPath, currentPath, (HWND)_window); + } + else + { + WCHAR szMsg[1024]; + wsprintfW(szMsg, L"Folder \"%s\" is not available yet.\n\n" + L"Note: the program will create the folder automatically when extracting.", (LPCWSTR)currentPath); + MessageBoxW((HWND)_window, szMsg, L"7-Zip", MB_ICONEXCLAMATION); + } + +} + +void CCopyDialog::OnButtonAddFileName() +{ + UString currentPath; + _path.GetText(currentPath); + + currentPath.Trim(); + if (currentPath.Back() == '\\') + { + currentPath.DeleteBack(); + } + + UString strLastDir; + int n = currentPath.ReverseFind(L'\\'); + if (n != -1) + { + strLastDir = currentPath.Mid(n+1); + } + else + { + strLastDir = currentPath; + } + if (strLastDir != m_strRealFileName) + { + currentPath += L'\\'; + currentPath += m_strRealFileName; + + _path.SetText(currentPath); + } + _path.SetFocus(); +} + +bool CCopyDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) +{ + switch(message) + { + case WM_GETMINMAXINFO: + { + return OnGetMinMaxInfo((PMINMAXINFO)lParam); + } + } + return CModalDialog::OnMessage(message, wParam, lParam); +} + +bool CCopyDialog::OnGetMinMaxInfo(PMINMAXINFO pMMI) +{ + pMMI->ptMinTrackSize.x = m_sizeMinWindow.cx; + pMMI->ptMinTrackSize.y = m_sizeMinWindow.cy; + return false; +} + +static int MakeByteSizeString64(wchar_t * lpszBuf, size_t ccBuf, unsigned __int64 n64Byte) +{ + int nRet = 0; + + if (n64Byte < 1000ui64) + { + // < 1K + nRet = swprintf(lpszBuf, ccBuf, + L"%I64d B", n64Byte); + } + else if (n64Byte < 1024000ui64) // 1024 * 1000 + { + // 1K <= n64Byte < 1M + nRet = swprintf(lpszBuf, ccBuf, + L"%.1f KB", (double)n64Byte / 1024.0); + } + else if (n64Byte < 1048576000ui64) // 1024 * 1024 * 1000 + { + // 1M <= n64Byte < 1G + nRet = swprintf(lpszBuf, ccBuf, + L"%.2f MB", (double)n64Byte / 1048576.0); // 1024 * 1024 + } + else if (n64Byte < 1073741824000ui64) // 1024 * 1024 * 1024 * 1000 + { + // 1 G <= n64Byte < 1T + nRet = swprintf(lpszBuf, ccBuf, + L"%.2f GB", (double)n64Byte / 1073741824.0); // 1024.0F * 1024.0F * 1024.0F + } + else + { + // n64Byte >= 1T + nRet = swprintf(lpszBuf, ccBuf, + L"%.2f TB", (double)n64Byte / 1099511627776.0); + // 1024.0F * 1024.0F * 1024.0F * 1024.0F + } + + return nRet; +} + +void CCopyDialog::ShowPathFreeSpace(UString & strPath) +{ + bool bBadPath; + UString strText; + + strText.Empty(); + + bBadPath = false; + strPath.Trim(); + for (; !IsDirectory(strPath); ) + { + int n = strPath.ReverseFind(L'\\'); + if (n == -1) + { + bBadPath = true; + break; + } + else + { + strPath.ReleaseBuf_SetEnd(n); + } + } + if (!bBadPath) + { + unsigned __int64 n64FreeBytesAvailable; + unsigned __int64 n64TotalNumberOfBytes; + unsigned __int64 n64TotalNumberOfFreeBytes; + + if (GetDiskFreeSpaceExW(strPath, (PULARGE_INTEGER)&n64FreeBytesAvailable, + (PULARGE_INTEGER)&n64TotalNumberOfBytes, (PULARGE_INTEGER)&n64TotalNumberOfFreeBytes)) + { + wchar_t szFreeBytes[1024]; + wchar_t szTotalBytes[1024]; + MakeByteSizeString64(szFreeBytes, 1024-4, n64TotalNumberOfFreeBytes); + MakeByteSizeString64(szTotalBytes, 1024-4, n64TotalNumberOfBytes); + int nLen = swprintf(strText.GetBuf(1024), 1024-4, L"%s Free (Total: %s)", szFreeBytes, szTotalBytes); + strText.ReleaseBuf_SetEnd(nLen); + } + } + _freeSpace.SetText(strText); +} + +bool CCopyDialog::OnCommand(int code, int itemID, LPARAM lParam) +{ + if (itemID == IDC_COPY) + { + if (code == CBN_EDITCHANGE) + { + UString strPath; + _path.GetText(strPath); + + ShowPathFreeSpace(strPath); + return true; + } + else if (code == CBN_SELCHANGE) + { + int nSel = _path.GetCurSel(); + if (nSel != CB_ERR) + { + UString strPath; + _path.GetLBText(nSel, strPath); + ShowPathFreeSpace(strPath); + } + return true; + } + } + return CModalDialog::OnCommand(code, itemID, lParam); +} diff --git a/CPP/7zip/UI/FileManager/CopyDialog.h b/CPP/7zip/UI/FileManager/CopyDialog.h index 30fde71f..8c15ce94 100644 --- a/CPP/7zip/UI/FileManager/CopyDialog.h +++ b/CPP/7zip/UI/FileManager/CopyDialog.h @@ -8,24 +8,46 @@ #include "CopyDialogRes.h" -const int kCopyDialog_NumInfoLines = 11; +const int kCopyDialog_NumInfoLines = 14; class CCopyDialog: public NWindows::NControl::CModalDialog { NWindows::NControl::CComboBox _path; + NWindows::NControl::CStatic _freeSpace; virtual void OnOK(); virtual bool OnInit(); virtual bool OnSize(WPARAM wParam, int xSize, int ySize); void OnButtonSetPath(); + void OnButtonOpenPath(); + void OnButtonAddFileName(); bool OnButtonClicked(int buttonID, HWND buttonHWND); + bool OnCommand(int code, int itemID, LPARAM lParam); + bool OnGetMinMaxInfo(PMINMAXINFO pMMI); + + void ShowPathFreeSpace(UString & strPath); + +protected: + SIZE m_sizeMinWindow; + public: + CCopyDialog(): m_bOpenOutputFolder(false), m_bDeleteSourceFile(false), m_bClose7Zip (false) { m_sizeMinWindow.cx = 0; m_sizeMinWindow.cy = 0; } + UString Title; UString Static; UString Value; UString Info; UStringVector Strings; + bool m_bOpenOutputFolder; + bool m_bDeleteSourceFile; + bool m_bClose7Zip; + + UString m_currentFolderPrefix; + UString m_strRealFileName; + INT_PTR Create(HWND parentWindow = 0) { return CModalDialog::Create(IDD_COPY, parentWindow); } + + bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam); }; #endif diff --git a/CPP/7zip/UI/FileManager/CopyDialog.rc b/CPP/7zip/UI/FileManager/CopyDialog.rc index 73d3ea80..f09cd341 100644 --- a/CPP/7zip/UI/FileManager/CopyDialog.rc +++ b/CPP/7zip/UI/FileManager/CopyDialog.rc @@ -1,20 +1,75 @@ #include "CopyDialogRes.h" #include "../../GuiCommon.rc" -#define xc 320 -#define yc 144 +//#define xc 320 +//#define yc 144 +// +//#define y 40 +// +//IDD_COPY DIALOG 0, 0, xs, ys MY_MODAL_RESIZE_DIALOG_STYLE MY_FONT +//CAPTION "Copy" +//{ +// LTEXT "", IDT_COPY, m, m, xc, 8 +// COMBOBOX IDC_COPY, m, 20, xc - bxsDots - m, 65, MY_COMBO_WITH_EDIT +// PUSHBUTTON "...", IDB_COPY_SET_PATH, xs - m - bxsDots, 18, bxsDots, bys, WS_GROUP +// LTEXT "", IDT_COPY_INFO, m, y, xc, by - y - 1, SS_NOPREFIX | SS_LEFTNOWORDWRAP +// OK_CANCEL +//} -#define y 40 + + +#define xc 340 +#define yc 190 + +#define y 78 + +#define OPEN_XS 28 +#define FILENAME_XS 40 +#define SPACE_XS 4 + +#define FILENAME_X (xs - m - FILENAME_XS) +#define OPEN_X (FILENAME_X - OPEN_XS - SPACE_XS) +#define DOTS_X (OPEN_X - bxsDots - SPACE_XS) +#define PATH_Y (m + 12) +#define PATH_XS (DOTS_X - m - SPACE_XS) + +#define FREE_SPACE_Y (PATH_Y + 15) + +#define AFTER_EXTRACTION_Y (FREE_SPACE_Y + 12) + +#define OPTION_SPACE 10 + +#define OPEN_OUTPUT_FOLDER_X (m + 6) +#define OPEN_OUTPUT_FOLDER_XS 80 +#define OPEN_OUTPUT_FOLDER_Y (AFTER_EXTRACTION_Y + 12) + +#define DELETE_SOURCE_X (OPEN_OUTPUT_FOLDER_X + OPEN_OUTPUT_FOLDER_XS + OPTION_SPACE) +#define DELETE_SOURCE_XS 88 + +#define CLOSE_7ZIP_X (DELETE_SOURCE_X + DELETE_SOURCE_XS + OPTION_SPACE) +#define CLOSE_7ZIP_XS 54 + +#define INFO_Y (AFTER_EXTRACTION_Y + 27 + 4) +#define INFO_YS (by - m - 12 - 15 - 12 - 27 - 4 - 1) IDD_COPY DIALOG 0, 0, xs, ys MY_MODAL_RESIZE_DIALOG_STYLE MY_FONT CAPTION "Copy" { - LTEXT "", IDT_COPY, m, m, xc, 8 - COMBOBOX IDC_COPY, m, 20, xc - bxsDots - m, 65, MY_COMBO_WITH_EDIT - PUSHBUTTON "...", IDB_COPY_SET_PATH, xs - m - bxsDots, 18, bxsDots, bys, WS_GROUP - LTEXT "", IDT_COPY_INFO, m, y, xc, by - y - 1, SS_NOPREFIX | SS_LEFTNOWORDWRAP + LTEXT "", IDT_COPY, m, m, xc, 9 + COMBOBOX IDC_COPY, m, PATH_Y, PATH_XS, 160, MY_COMBO_WITH_EDIT + PUSHBUTTON "...", IDB_COPY_SET_PATH, DOTS_X, PATH_Y - 1, bxsDots, bys - 1, WS_GROUP + PUSHBUTTON "&Open", IDC_COPY_OPEN_PATH, OPEN_X, PATH_Y - 1, OPEN_XS, bys - 1, WS_GROUP + PUSHBUTTON "&Filename", IDC_COPY_ADD_FILE_NAME, FILENAME_X, PATH_Y - 1, FILENAME_XS, bys - 1, WS_GROUP + LTEXT "", IDC_FREE_SPACE, m, FREE_SPACE_Y, xc, 9 + GROUPBOX "After extraction completes successfully", IDC_AFTER_EXTRACT, m, AFTER_EXTRACTION_Y, xc, 27 + CONTROL "O&pen output folder", IDC_CHECK_OPEN_OUTPUT_FOLDER, MY_CHECKBOX, OPEN_OUTPUT_FOLDER_X, OPEN_OUTPUT_FOLDER_Y, OPEN_OUTPUT_FOLDER_XS, 10 + CONTROL "&Delete source archive", IDC_CHECK_DELETE_SOURCE_FILE, MY_CHECKBOX, DELETE_SOURCE_X, OPEN_OUTPUT_FOLDER_Y, DELETE_SOURCE_XS, 10 + CONTROL "&Close 7-Zip", IDC_CHECK_CLOSE_7ZIP, MY_CHECKBOX, CLOSE_7ZIP_X, OPEN_OUTPUT_FOLDER_Y, CLOSE_7ZIP_XS, 10 + LTEXT "", IDT_COPY_INFO, m, INFO_Y, xc, INFO_YS, SS_NOPREFIX | SS_LEFTNOWORDWRAP OK_CANCEL } + + #undef xc #undef yc diff --git a/CPP/7zip/UI/FileManager/CopyDialogRes.h b/CPP/7zip/UI/FileManager/CopyDialogRes.h index 85f5a39a..7c47283c 100644 --- a/CPP/7zip/UI/FileManager/CopyDialogRes.h +++ b/CPP/7zip/UI/FileManager/CopyDialogRes.h @@ -5,4 +5,12 @@ #define IDB_COPY_SET_PATH 102 #define IDT_COPY_INFO 103 +#define IDC_CHECK_OPEN_OUTPUT_FOLDER 104 +#define IDC_COPY_OPEN_PATH 105 +#define IDC_FREE_SPACE 106 +#define IDC_COPY_ADD_FILE_NAME 107 +#define IDC_CHECK_DELETE_SOURCE_FILE 108 +#define IDC_CHECK_CLOSE_7ZIP 109 +#define IDC_AFTER_EXTRACT 110 + #define IDS_SET_FOLDER 6007 diff --git a/CPP/7zip/UI/FileManager/FM.sln b/CPP/7zip/UI/FileManager/FM.sln new file mode 100644 index 00000000..058e12fb --- /dev/null +++ b/CPP/7zip/UI/FileManager/FM.sln @@ -0,0 +1,38 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FM", "FM.vcproj", "{2628FF64-E1E1-4CB7-B588-08DE7145B630}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + DebugU|Win32 = DebugU|Win32 + DebugU|x64 = DebugU|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseU|Win32 = ReleaseU|Win32 + ReleaseU|x64 = ReleaseU|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.Debug|Win32.ActiveCfg = Debug|Win32 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.Debug|Win32.Build.0 = Debug|Win32 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.Debug|x64.ActiveCfg = Debug|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.Debug|x64.Build.0 = Debug|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.DebugU|Win32.ActiveCfg = DebugU|Win32 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.DebugU|Win32.Build.0 = DebugU|Win32 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.DebugU|x64.ActiveCfg = DebugU|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.DebugU|x64.Build.0 = DebugU|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.Release|Win32.ActiveCfg = Release|Win32 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.Release|Win32.Build.0 = Release|Win32 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.Release|x64.ActiveCfg = Release|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.Release|x64.Build.0 = Release|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseU|Win32.ActiveCfg = ReleaseU|Win32 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseU|Win32.Build.0 = ReleaseU|Win32 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseU|x64.ActiveCfg = ReleaseU|x64 + {2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseU|x64.Build.0 = ReleaseU|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/CPP/7zip/UI/FileManager/FM.vcproj b/CPP/7zip/UI/FileManager/FM.vcproj new file mode 100644 index 00000000..d3186d06 --- /dev/null +++ b/CPP/7zip/UI/FileManager/FM.vcproj @@ -0,0 +1,11771 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CPP/7zip/UI/FileManager/ListViewDialog.cpp b/CPP/7zip/UI/FileManager/ListViewDialog.cpp index 80cdd7f6..f8ed3606 100644 --- a/CPP/7zip/UI/FileManager/ListViewDialog.cpp +++ b/CPP/7zip/UI/FileManager/ListViewDialog.cpp @@ -42,6 +42,11 @@ bool CListViewDialog::OnInit() _listView.SetColumnWidthAuto(0); StringsWereChanged = false; + RECT rc; + GetWindowRect(&rc); + m_sizeMinWindow.cx = (RECT_SIZE_X(rc))*3/4; + m_sizeMinWindow.cy = (RECT_SIZE_Y(rc))*3/4; + NormalizeSize(); return CModalDialog::OnInit(); } @@ -62,15 +67,15 @@ bool CListViewDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize) rect.top = y - my; InvalidateRect(&rect); */ - InvalidateRect(NULL); - MoveItem(IDCANCEL, x, y, bx1, by); - MoveItem(IDOK, x - mx - bx2, y, bx2, by); + MoveItem(IDCANCEL, x, y, bx1, by, false); + MoveItem(IDOK, x - mx - bx2, y, bx2, by, false); /* if (wParam == SIZE_MAXSHOW || wParam == SIZE_MAXIMIZED || wParam == SIZE_MAXHIDE) mx = 0; */ - _listView.Move(mx, my, xSize - mx * 2, y - my * 2); + _listView.Move(mx, my, xSize - mx * 2, y - my * 2, false); + InvalidateRect(NULL); return false; } @@ -141,3 +146,23 @@ void CListViewDialog::OnOK() FocusedItemIndex = _listView.GetFocusedItem(); CModalDialog::OnOK(); } + +bool CListViewDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) +{ + switch(message) + { + case WM_GETMINMAXINFO: + { + return OnGetMinMaxInfo((PMINMAXINFO)lParam); + } + } + return CModalDialog::OnMessage(message, wParam, lParam); +} + +bool CListViewDialog::OnGetMinMaxInfo(PMINMAXINFO pMMI) +{ + pMMI->ptMinTrackSize.x = m_sizeMinWindow.cx; + pMMI->ptMinTrackSize.y = m_sizeMinWindow.cy; + return false; +} + diff --git a/CPP/7zip/UI/FileManager/ListViewDialog.h b/CPP/7zip/UI/FileManager/ListViewDialog.h index b7ba3830..dffaa386 100644 --- a/CPP/7zip/UI/FileManager/ListViewDialog.h +++ b/CPP/7zip/UI/FileManager/ListViewDialog.h @@ -15,6 +15,9 @@ class CListViewDialog: public NWindows::NControl::CModalDialog virtual bool OnInit(); virtual bool OnSize(WPARAM wParam, int xSize, int ySize); virtual bool OnNotify(UINT controlID, LPNMHDR header); + bool OnGetMinMaxInfo(PMINMAXINFO pMMI); +protected: + SIZE m_sizeMinWindow; public: UString Title; bool DeleteIsAllowed; @@ -24,7 +27,8 @@ public: INT_PTR Create(HWND wndParent = 0) { return CModalDialog::Create(IDD_LISTVIEW, wndParent); } - CListViewDialog(): DeleteIsAllowed(false) {} + CListViewDialog(): DeleteIsAllowed(false) { m_sizeMinWindow.cx = 0; m_sizeMinWindow.cy = 0; } + virtual bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam); }; #endif diff --git a/CPP/7zip/UI/FileManager/MessagesDialog.cpp b/CPP/7zip/UI/FileManager/MessagesDialog.cpp index 41248277..556ede17 100644 --- a/CPP/7zip/UI/FileManager/MessagesDialog.cpp +++ b/CPP/7zip/UI/FileManager/MessagesDialog.cpp @@ -55,6 +55,12 @@ bool CMessagesDialog::OnInit() _messageList.SetColumnWidthAuto(0); _messageList.SetColumnWidthAuto(1); + + RECT rc; + GetWindowRect(&rc); + m_sizeMinWindow.cx = (RECT_SIZE_X(rc))*3/4; + m_sizeMinWindow.cy = (RECT_SIZE_Y(rc))*3/4; + NormalizeSize(); return CModalDialog::OnInit(); } @@ -68,9 +74,28 @@ bool CMessagesDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize) int y = ySize - my - by; int x = xSize - mx - bx; - InvalidateRect(NULL); - MoveItem(IDOK, x, y, bx, by); - _messageList.Move(mx, my, xSize - mx * 2, y - my * 2); + MoveItem(IDOK, x, y, bx, by, false); + _messageList.Move(mx, my, xSize - mx * 2, y - my * 2, false); + InvalidateRect(NULL); return false; } + +bool CMessagesDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) +{ + switch(message) + { + case WM_GETMINMAXINFO: + { + return OnGetMinMaxInfo((PMINMAXINFO)lParam); + } + } + return CModalDialog::OnMessage(message, wParam, lParam); +} + +bool CMessagesDialog::OnGetMinMaxInfo(PMINMAXINFO pMMI) +{ + pMMI->ptMinTrackSize.x = m_sizeMinWindow.cx; + pMMI->ptMinTrackSize.y = m_sizeMinWindow.cy; + return false; +} diff --git a/CPP/7zip/UI/FileManager/MessagesDialog.h b/CPP/7zip/UI/FileManager/MessagesDialog.h index 5c017eb4..af9fa1af 100644 --- a/CPP/7zip/UI/FileManager/MessagesDialog.h +++ b/CPP/7zip/UI/FileManager/MessagesDialog.h @@ -16,10 +16,15 @@ class CMessagesDialog: public NWindows::NControl::CModalDialog void AddMessage(LPCWSTR message); virtual bool OnInit(); virtual bool OnSize(WPARAM wParam, int xSize, int ySize); + bool OnGetMinMaxInfo(PMINMAXINFO pMMI); +protected: + SIZE m_sizeMinWindow; public: const UStringVector *Messages; + CMessagesDialog() { m_sizeMinWindow.cx = 0; m_sizeMinWindow.cy = 0; } INT_PTR Create(HWND parent = 0) { return CModalDialog::Create(IDD_MESSAGES, parent); } + virtual bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam); }; #endif diff --git a/CPP/7zip/UI/FileManager/MyLoadMenu.cpp b/CPP/7zip/UI/FileManager/MyLoadMenu.cpp index d3031f5a..c96f116e 100644 --- a/CPP/7zip/UI/FileManager/MyLoadMenu.cpp +++ b/CPP/7zip/UI/FileManager/MyLoadMenu.cpp @@ -10,6 +10,7 @@ #include "../Common/CompressCall.h" #include "AboutDialog.h" +#include "AboutEasy7ZipDialog.h" #include "App.h" #include "HelpUtils.h" #include "LangUtils.h" @@ -622,6 +623,12 @@ bool OnMenuCommand(HWND hWnd, int id) dialog.Create(hWnd); break; } + case IDM_ABOUT_EASY_7ZIP: + { + CAboutEasy7ZipDialog dialog; + dialog.Create(hWnd); + break; + } default: { if (id >= kOpenBookmarkMenuID && id <= kOpenBookmarkMenuID + 9) diff --git a/CPP/7zip/UI/FileManager/Panel.h b/CPP/7zip/UI/FileManager/Panel.h index 0110ee9d..abf00460 100644 --- a/CPP/7zip/UI/FileManager/Panel.h +++ b/CPP/7zip/UI/FileManager/Panel.h @@ -189,6 +189,7 @@ enum MyMessages }; UString GetFolderPath(IFolderFolder *folder); +void StartApplicationDontWait(const UString &dir, const UString &path, HWND window); class CPanel; diff --git a/CPP/7zip/UI/FileManager/PanelItemOpen.cpp b/CPP/7zip/UI/FileManager/PanelItemOpen.cpp index cfbc5770..1347e80a 100644 --- a/CPP/7zip/UI/FileManager/PanelItemOpen.cpp +++ b/CPP/7zip/UI/FileManager/PanelItemOpen.cpp @@ -879,7 +879,7 @@ static HRESULT StartApplication(const UString &dir, const UString &path, HWND wi return S_OK; } -static void StartApplicationDontWait(const UString &dir, const UString &path, HWND window) +void StartApplicationDontWait(const UString &dir, const UString &path, HWND window) { CProcess process; StartApplication(dir, path, window, process); diff --git a/CPP/7zip/UI/FileManager/PanelMenu.cpp b/CPP/7zip/UI/FileManager/PanelMenu.cpp index c5b07825..ab620d3e 100644 --- a/CPP/7zip/UI/FileManager/PanelMenu.cpp +++ b/CPP/7zip/UI/FileManager/PanelMenu.cpp @@ -306,7 +306,7 @@ void CPanel::Properties() } } } - ::MessageBoxW(*(this), message, LangString(IDS_PROPERTIES), MB_OK); + ::MessageBoxW(*(this), message, LangString(IDS_PROPERTIES), MB_OK | MB_ICONINFORMATION); } } diff --git a/CPP/7zip/UI/FileManager/PanelSplitFile.cpp b/CPP/7zip/UI/FileManager/PanelSplitFile.cpp index 7aaa97b1..e852deb4 100644 --- a/CPP/7zip/UI/FileManager/PanelSplitFile.cpp +++ b/CPP/7zip/UI/FileManager/PanelSplitFile.cpp @@ -422,6 +422,9 @@ void CApp::Combine() AddInfoFileName(info, fs2us(combiner.Names.Back())); } + bool openOutputFolder; + bool deleteSourceFile; + bool close7Zip; { CCopyDialog copyDialog; copyDialog.Value = path; @@ -430,9 +433,13 @@ void CApp::Combine() copyDialog.Title += srcPanel.GetItemRelPath(index); LangString(IDS_COMBINE_TO, copyDialog.Static); copyDialog.Info = info; + copyDialog.m_currentFolderPrefix = srcPanel.GetItemFullPath(index); if (copyDialog.Create(srcPanel.GetParent()) != IDOK) return; path = copyDialog.Value; + openOutputFolder = copyDialog.m_bOpenOutputFolder; + deleteSourceFile = copyDialog.m_bDeleteSourceFile; + close7Zip = copyDialog.m_bClose7Zip; } NName::NormalizeDirPathPrefix(path); @@ -479,6 +486,37 @@ void CApp::Combine() if (combiner.Create(title, _window) != 0) return; + + if (openOutputFolder) + { + StartApplicationDontWait(path, path, (HWND)_window); + } + if (deleteSourceFile) + { + DWORD dwAttr; + UString strFilePath; + for (i = 0; i < combiner.Names.Size(); i++) + { + strFilePath = srcPath + combiner.Names[i]; + dwAttr = GetFileAttributesW(strFilePath); + + if ((dwAttr != INVALID_FILE_ATTRIBUTES) + && (dwAttr & FILE_ATTRIBUTE_ARCHIVE)) + { + if (dwAttr & FILE_ATTRIBUTE_READONLY) + { + dwAttr &= (~FILE_ATTRIBUTE_READONLY); + SetFileAttributesW(strFilePath, dwAttr); + } + ::DeleteFileW(strFilePath); + } + } + } + if (close7Zip) + { + PostMessage (_window, WM_CLOSE, 0, 0); + } + } RefreshTitleAlways(); diff --git a/CPP/7zip/UI/FileManager/ProgressDialog2.cpp b/CPP/7zip/UI/FileManager/ProgressDialog2.cpp index 8c38b81a..e239e012 100644 --- a/CPP/7zip/UI/FileManager/ProgressDialog2.cpp +++ b/CPP/7zip/UI/FileManager/ProgressDialog2.cpp @@ -9,16 +9,19 @@ #include "../../../Windows/ErrorMsg.h" #include "../GUI/ExtractRes.h" +#include "resourceGui.h" #include "LangUtils.h" #include "DialogSize.h" #include "ProgressDialog2.h" #include "ProgressDialog2Res.h" +#include "ProgressDialog2IconRes.h" using namespace NWindows; extern HINSTANCE g_hInstance; +bool g_bProcessError = false; static const UINT_PTR kTimerID = 3; @@ -66,6 +69,38 @@ static const UInt32 kLangIDs_Colon[] = #endif +////////////////// + +#define WM_TRAY_ICON_NOTIFY (WM_APP+10) +#define ID_SYSTRAY_ICON 100 + +BOOL SetSysTray(HWND hDlg, + DWORD dwMessage, + UINT uID, + UINT uFlags, + UINT uCallbackMessage, + HICON hIcon, + const wchar_t * pszTip) +{ + NOTIFYICONDATAW tnd; + + ZeroMemory(&tnd, sizeof(NOTIFYICONDATAW)); + + tnd.cbSize = sizeof(NOTIFYICONDATAW); + tnd.hWnd = hDlg; + tnd.uID = uID; + tnd.uFlags = uFlags; + tnd.uCallbackMessage = uCallbackMessage; + tnd.hIcon = hIcon; + + if (pszTip != NULL && *pszTip != 0) + { + ::lstrcpynW(tnd.szTip, pszTip, sizeof(tnd.szTip) / sizeof(WCHAR)); + } + + return Shell_NotifyIconW(dwMessage, &tnd); +} + #define UNDEFINED_VAL ((UInt64)(Int64)-1) #define INIT_AS_UNDEFINED(v) v = UNDEFINED_VAL; @@ -238,6 +273,13 @@ void CProgressSync::AddError_Code_Name(DWORD systemError, const wchar_t *name) CProgressDialog::CProgressDialog(): _timer(0), CompressingMode(true), MainWindow(0) { + for (int i = 0; i < 15; i++) + { + m_hIconSysTrayArray[i] = NULL; + } + m_nSysTrayIconArrayID = -1; + m_hSysTrayMenu = NULL; + _isDir = false; _numMessages = 0; @@ -372,6 +414,7 @@ bool CProgressDialog::OnInit() LangString(IDS_PROGRESS_FOREGROUND, _foreground_String); LangString(IDS_CONTINUE, _continue_String); LangString(IDS_PROGRESS_PAUSED, _paused_String); + LangString(IDS_CANCEL, cancelString); SetText(_title); SetPauseText(); @@ -412,6 +455,11 @@ bool CProgressDialog::OnInit() SetTaskbarProgressState(); + RECT rc; + GetWindowRect(&rc); + m_sizeMinWindow.cx = (RECT_SIZE_X(rc))*2/3; + m_sizeMinWindow.cy = (RECT_SIZE_Y(rc))*3/4; + return CModalDialog::OnInit(); } @@ -444,7 +492,7 @@ bool CProgressDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize) sStep = r.top - my; } - InvalidateRect(NULL); +// InvalidateRect(NULL); int xSizeClient = xSize - mx * 2; @@ -458,9 +506,19 @@ bool CProgressDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize) int yPos = ySize - my - _buttonSizeY; - ChangeSubWindowSizeX(GetItem(IDT_PROGRESS_STATUS), xSize - mx * 2); - ChangeSubWindowSizeX(GetItem(IDT_PROGRESS_FILE_NAME), xSize - mx * 2); - ChangeSubWindowSizeX(GetItem(IDC_PROGRESS1), xSize - mx * 2); + ChangeSubWindowSizeX(GetItem(IDT_PROGRESS_STATUS), xSize - mx * 2, false); +// ChangeSubWindowSizeX(GetItem(IDT_PROGRESS_FILE_NAME), xSize - mx * 2); + { + int percent_width; + RECT rect; + GetClientRectOfItem(IDC_PROGRESS_PERCENT, rect); + percent_width = rect.right - rect.left; + MoveItem(IDC_PROGRESS_PERCENT, xSize - mx - percent_width, rect.top, percent_width, rect.bottom - rect.top, false); + + ChangeSubWindowSizeX(GetItem(IDT_PROGRESS_FILE_NAME), xSize - (mx * 2) - percent_width, false); + } + ChangeSubWindowSizeX(GetItem(IDC_PROGRESS1), xSize - mx * 2, false); + int bSizeX = _buttonSizeX; int mx2 = mx; @@ -492,17 +550,17 @@ bool CProgressDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize) xx -= bSizeX; } - _messageList.Move(mx, y, xx, ySize2); + _messageList.Move(mx, y, xx, ySize2, false); } { int xPos = xSize - mx; xPos -= bSizeX; - MoveItem(IDCANCEL, xPos, yPos, bSizeX, _buttonSizeY); + MoveItem(IDCANCEL, xPos, yPos, bSizeX, _buttonSizeY, false); xPos -= (mx2 + bSizeX); - MoveItem(IDB_PAUSE, xPos, yPos, bSizeX, _buttonSizeY); + MoveItem(IDB_PAUSE, xPos, yPos, bSizeX, _buttonSizeY, false); xPos -= (mx2 + bSizeX); - MoveItem(IDB_PROGRESS_BACKGROUND, xPos, yPos, bSizeX, _buttonSizeY); + MoveItem(IDB_PROGRESS_BACKGROUND, xPos, yPos, bSizeX, _buttonSizeY, false); } int valueSize; @@ -543,10 +601,11 @@ bool CProgressDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize) yPos = my; x = mx + gSize + padSize; } - MoveItem(kIDs[i], x, yPos, labelSize, sY); - MoveItem(kIDs[i + 1], x + labelSize, yPos, valueSize, sY); + MoveItem(kIDs[i], x, yPos, labelSize, sY, false); + MoveItem(kIDs[i + 1], x + labelSize, yPos, valueSize, sY, false); yPos += sStep; } + InvalidateRect(NULL); return false; } @@ -672,6 +731,39 @@ static UInt64 MyMultAndDiv(UInt64 mult1, UInt64 mult2, UInt64 divider) return res; } +void CProgressDialog::UpdateSysTrayIcon(bool bAddIcon, bool bUpdateTip) +{ + int nNewIconID = (_prevPercentValue / 7) % 15; + bool bUpdateIcon = nNewIconID > m_nSysTrayIconArrayID; + + if (bUpdateIcon || bUpdateTip || bAddIcon) + { + wchar_t szTip[64]; + ConvertUInt64ToString(_prevPercentValue, szTip); + lstrcatW(szTip, L"%"); +/* +#ifdef _DEBUG +wchar_t szDebug[1024]; +swprintf(szDebug, 1024, L"Percent: %d; Icon: %d\n", _prevPercentValue, nNewIconID); +OutputDebugStringW(szDebug); +#endif +*/ + UINT uFlags = NIF_TIP; + if (bUpdateIcon) + { + uFlags |= NIF_ICON; + } + if (!SetSysTray(_window, NIM_MODIFY, ID_SYSTRAY_ICON, uFlags, 0, m_hIconSysTrayArray[nNewIconID], szTip)) + { + SetSysTray(_window, NIM_DELETE, ID_SYSTRAY_ICON, 0, 0, NULL, NULL); + SetSysTray(_window, NIM_ADD, ID_SYSTRAY_ICON, NIF_ICON | NIF_MESSAGE | NIF_TIP, WM_TRAY_ICON_NOTIFY, + m_hIconSysTrayArray[nNewIconID], szTip); + } + + m_nSysTrayIconArrayID = nNewIconID; + } +} + void CProgressDialog::UpdateStatInfo(bool showAll) { UInt64 total, completed, totalFiles, completedFiles, inSize, outSize; @@ -725,6 +817,37 @@ void CProgressDialog::UpdateStatInfo(bool showAll) ShowSize(IDT_PROGRESS_TOTAL_VAL, total, _totalBytes_Prev); + { + bool bPercentChanged = false; + UInt64 percent = 0; + { + if (IS_DEFINED_VAL(progressTotal)) + { + percent = progressCompleted * 100; + if (progressTotal != 0) + percent /= progressTotal; + } + } + if (percent != _prevPercentValue) + { + _prevPercentValue = percent; + bPercentChanged = true; + } + if (bPercentChanged || titleFileName_Changed) SetTitleText(); + if (bPercentChanged) + { + wchar_t szPercent[32]; + ConvertUInt64ToString(percent, szPercent); + lstrcatW(szPercent, L"%"); + SetItemText(IDC_PROGRESS_PERCENT, szPercent); + + if (!_foreground && m_hIconSysTrayArray[0] != NULL) + { // background + UpdateSysTrayIcon(false, true); + } + } + } + _elapsedTime += (curTime - _prevTime); _prevTime = curTime; UInt64 elapsedSec = _elapsedTime / 1000; @@ -738,7 +861,7 @@ void CProgressDialog::UpdateStatInfo(bool showAll) SetItemText(IDT_PROGRESS_ELAPSED_VAL, s); } - bool needSetTitle = false; +// bool needSetTitle = false; if (elapsedChanged || showAll) { if (numErrors > _numPostedMessages) @@ -806,22 +929,22 @@ void CProgressDialog::UpdateStatInfo(bool showAll) } } - { - UInt64 percent = 0; - { - if (IS_DEFINED_VAL(progressTotal)) - { - percent = progressCompleted * 100; - if (progressTotal != 0) - percent /= progressTotal; - } - } - if (percent != _prevPercentValue) - { - _prevPercentValue = percent; - needSetTitle = true; - } - } + //{ + // UInt64 percent = 0; + // { + // if (IS_DEFINED_VAL(progressTotal)) + // { + // percent = progressCompleted * 100; + // if (progressTotal != 0) + // percent /= progressTotal; + // } + // } + // if (percent != _prevPercentValue) + // { + // _prevPercentValue = percent; + // needSetTitle = true; + // } + //} { wchar_t s[64]; @@ -869,8 +992,8 @@ void CProgressDialog::UpdateStatInfo(bool showAll) } } - if (needSetTitle || titleFileName_Changed) - SetTitleText(); +// if (needSetTitle || titleFileName_Changed) +// SetTitleText(); if (status_Changed) { @@ -996,7 +1119,7 @@ bool CProgressDialog::OnExternalCloseMessage() { if (fm.OkMessage.Title.IsEmpty()) fm.OkMessage.Title = L"7-Zip"; - MessageBoxW(*this, fm.OkMessage.Message, fm.OkMessage.Title, MB_OK); + MessageBoxW(*this, fm.OkMessage.Message, fm.OkMessage.Title, MB_OK | MB_ICONINFORMATION); } } @@ -1011,10 +1134,58 @@ bool CProgressDialog::OnExternalCloseMessage() return true; } +bool CProgressDialog::CreateSysTrayMenu() +{ + if (m_hSysTrayMenu != NULL) return true; + + m_hSysTrayMenu = CreatePopupMenu(); + AppendMenuW(m_hSysTrayMenu, MF_STRING, IDB_PROGRESS_BACKGROUND, _foreground_String); + AppendMenuW(m_hSysTrayMenu, MF_STRING, IDB_PAUSE, Sync.Get_Paused() ? _continue_String : _pause_String); + AppendMenuW(m_hSysTrayMenu, MF_STRING, IDCANCEL, cancelString); + return m_hSysTrayMenu != NULL; +} + +bool CProgressDialog::OnTrayNotification(LPARAM lParam) +{ + switch (lParam) + { + case WM_RBUTTONUP: + if (CreateSysTrayMenu()) + { + POINT point; + ::GetCursorPos(&point); + ::TrackPopupMenu(m_hSysTrayMenu, TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, point.x, point.y, 0, _window, NULL); + + // BUGFIX: See "PRB: Menus for Notification Icons Don't Work Correctly" + ::PostMessage(_window, WM_NULL, 0, 0); + } + break; + + case WM_LBUTTONUP: + OnPriorityButton(); + break; + + default: + break; + } + + return false; +} + bool CProgressDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { + case WM_GETMINMAXINFO: + { + return OnGetMinMaxInfo((PMINMAXINFO)lParam); + } + + case WM_TRAY_ICON_NOTIFY: + { + return OnTrayNotification(lParam); + } + case kCloseMessage: { KillTimer(_timer); @@ -1024,6 +1195,30 @@ bool CProgressDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) _externalCloseMessageWasReceived = true; break; } + if (!_foreground) + { // background + SetSysTray(_window, NIM_DELETE, ID_SYSTRAY_ICON, 0, 0, NULL, NULL); + +//#ifndef _SFX + if (MainWindow != 0) + { + ShowWindow(MainWindow, SW_SHOW); + } +//#endif + } + if (m_hIconSysTrayArray[0] != NULL) + { + for (int i = 0; i < 15; i++) + { + DestroyIcon(m_hIconSysTrayArray[i]); + m_hIconSysTrayArray[i] = NULL; + } + } + if (m_hSysTrayMenu != NULL) + { + ::DestroyMenu(m_hSysTrayMenu); + m_hSysTrayMenu = NULL; + } return OnExternalCloseMessage(); } /* @@ -1038,6 +1233,13 @@ bool CProgressDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) return CModalDialog::OnMessage(message, wParam, lParam); } +bool CProgressDialog::OnGetMinMaxInfo(PMINMAXINFO pMMI) +{ + pMMI->ptMinTrackSize.x = m_sizeMinWindow.cx; + pMMI->ptMinTrackSize.y = m_sizeMinWindow.cy; + return false; +} + void CProgressDialog::SetTitleText() { UString s; @@ -1082,8 +1284,15 @@ void CProgressDialog::SetTitleText() void CProgressDialog::SetPauseText() { - SetItemText(IDB_PAUSE, Sync.Get_Paused() ? _continue_String : _pause_String); + LPCWSTR pszText = (Sync.Get_Paused() ? _continue_String : _pause_String); + + SetItemText(IDB_PAUSE, pszText); SetTitleText(); + + if (m_hSysTrayMenu != NULL) + { + ModifyMenuW(m_hSysTrayMenu, IDB_PAUSE, MF_BYCOMMAND, IDB_PAUSE, pszText); + } } void CProgressDialog::OnPauseButton() @@ -1106,11 +1315,53 @@ void CProgressDialog::SetPriorityText() SetTitleText(); } +bool CProgressDialog::LoadSysTrayIcons() +{ + if (m_hIconSysTrayArray[0] != NULL) return true; + + int id = IDI_SYSTRAY_0; + for (int n=0; n<15; n++, id++) + { + m_hIconSysTrayArray[n] = (HICON)LoadImage(g_hInstance, MAKEINTRESOURCE(id), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); + } + + return m_hIconSysTrayArray[0] != NULL; +} + void CProgressDialog::OnPriorityButton() { _foreground = !_foreground; #ifndef UNDER_CE SetPriorityClass(GetCurrentProcess(), _foreground ? NORMAL_PRIORITY_CLASS: IDLE_PRIORITY_CLASS); + if (_foreground) + { + if (m_hIconSysTrayArray[0] != NULL) + { +//#ifndef _SFX + if (MainWindow != 0) + { + ShowWindow(MainWindow, SW_SHOW); + } +//#endif + Show(SW_SHOW); + SetSysTray(_window, NIM_DELETE, ID_SYSTRAY_ICON, 0, 0, NULL, NULL); + } + } + else + { // background + if (LoadSysTrayIcons()) + { +//#ifndef _SFX + if (MainWindow != 0) + { + ShowWindow(MainWindow, SW_HIDE); + } +//#endif + Show(SW_HIDE); + + UpdateSysTrayIcon(true, true); + } + } #endif SetPriorityText(); } @@ -1167,6 +1418,8 @@ void CProgressDialog::UpdateMessagesDialog() } if (!messages.IsEmpty()) { + g_bProcessError = true; + FOR_VECTOR (i, messages) AddMessage(messages[i]); if (_numAutoSizeMessages < 256 || GetNumDigits(_numPostedMessages) > GetNumDigits(_numAutoSizeMessages)) @@ -1197,11 +1450,11 @@ bool CProgressDialog::OnButtonClicked(int buttonID, HWND buttonHWND) if (!paused) OnPauseButton(); _inCancelMessageBox = true; - int res = ::MessageBoxW(*this, LangString(IDS_PROGRESS_ASK_CANCEL), _title, MB_YESNOCANCEL); + int res = ::MessageBoxW(*this, LangString(IDS_PROGRESS_ASK_CANCEL), _title, MB_YESNO | MB_ICONQUESTION); _inCancelMessageBox = false; if (!paused) OnPauseButton(); - if (res == IDCANCEL || res == IDNO) + if (res == IDNO) { if (_externalCloseMessageWasReceived) OnExternalCloseMessage(); diff --git a/CPP/7zip/UI/FileManager/ProgressDialog2.h b/CPP/7zip/UI/FileManager/ProgressDialog2.h index 03f836da..7591200c 100644 --- a/CPP/7zip/UI/FileManager/ProgressDialog2.h +++ b/CPP/7zip/UI/FileManager/ProgressDialog2.h @@ -114,6 +114,7 @@ class CProgressDialog: public NWindows::NControl::CModalDialog UString _pause_String; UString _continue_String; UString _paused_String; + UString cancelString; int _buttonSizeX; int _buttonSizeY; @@ -122,6 +123,10 @@ class CProgressDialog: public NWindows::NControl::CModalDialog UString _title; + HICON m_hIconSysTrayArray [15]; + int m_nSysTrayIconArrayID; + HMENU m_hSysTrayMenu; + class CU64ToI32Converter { unsigned _numShiftBits; @@ -192,6 +197,11 @@ class CProgressDialog: public NWindows::NControl::CModalDialog bool _inCancelMessageBox; bool _externalCloseMessageWasReceived; + SIZE m_sizeMinWindow; + + bool CreateSysTrayMenu(); + bool LoadSysTrayIcons(); + void UpdateSysTrayIcon(bool bAddIcon, bool bUpdateTip); #ifdef __ITaskbarList3_INTERFACE_DEFINED__ void SetTaskbarProgressState(TBPFLAG tbpFlags) @@ -222,6 +232,8 @@ class CProgressDialog: public NWindows::NControl::CModalDialog void OnPriorityButton(); bool OnButtonClicked(int buttonID, HWND buttonHWND); bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam); + bool OnGetMinMaxInfo(PMINMAXINFO pMMI); + bool OnTrayNotification(LPARAM lParam); void SetTitleText(); void ShowSize(int id, UInt64 val, UInt64 &prev); diff --git a/CPP/7zip/UI/FileManager/ProgressDialog2.rc b/CPP/7zip/UI/FileManager/ProgressDialog2.rc index 4d0e0c7b..f17a5dd7 100644 --- a/CPP/7zip/UI/FileManager/ProgressDialog2.rc +++ b/CPP/7zip/UI/FileManager/ProgressDialog2.rc @@ -1,6 +1,8 @@ #include "ProgressDialog2Res.h" #include "../../GuiCommon.rc" +#include "ProgressDialog2Icon.rc" + #undef DIALOG_ID #define DIALOG_ID IDD_PROGRESS #define xc 360 @@ -37,4 +39,5 @@ STRINGTABLE DISCARDABLE IDS_CONTINUE "&Continue" IDS_PROGRESS_ASK_CANCEL "Are you sure you want to cancel?" IDS_CLOSE "&Close" + IDS_CANCEL "&Cancel" } diff --git a/CPP/7zip/UI/FileManager/ProgressDialog2Icon.rc b/CPP/7zip/UI/FileManager/ProgressDialog2Icon.rc new file mode 100644 index 00000000..257220b1 --- /dev/null +++ b/CPP/7zip/UI/FileManager/ProgressDialog2Icon.rc @@ -0,0 +1,19 @@ +#include "ProgressDialog2IconRes.h" + +IDI_SYSTRAY_0 ICON "../../UI/FileManager/trayico/tray00.ico" +IDI_SYSTRAY_1 ICON "../../UI/FileManager/trayico/tray01.ico" +IDI_SYSTRAY_2 ICON "../../UI/FileManager/trayico/tray02.ico" +IDI_SYSTRAY_3 ICON "../../UI/FileManager/trayico/tray03.ico" +IDI_SYSTRAY_4 ICON "../../UI/FileManager/trayico/tray04.ico" +IDI_SYSTRAY_5 ICON "../../UI/FileManager/trayico/tray05.ico" +IDI_SYSTRAY_6 ICON "../../UI/FileManager/trayico/tray06.ico" +IDI_SYSTRAY_7 ICON "../../UI/FileManager/trayico/tray07.ico" +IDI_SYSTRAY_8 ICON "../../UI/FileManager/trayico/tray08.ico" +IDI_SYSTRAY_9 ICON "../../UI/FileManager/trayico/tray09.ico" +IDI_SYSTRAY_10 ICON "../../UI/FileManager/trayico/tray10.ico" +IDI_SYSTRAY_11 ICON "../../UI/FileManager/trayico/tray11.ico" +IDI_SYSTRAY_12 ICON "../../UI/FileManager/trayico/tray12.ico" +IDI_SYSTRAY_13 ICON "../../UI/FileManager/trayico/tray13.ico" +IDI_SYSTRAY_14 ICON "../../UI/FileManager/trayico/tray14.ico" +//IDI_SYSTRAY_15 ICON "../../UI/FileManager/trayico/tray15.ico" +//IDI_SYSTRAY_16 ICON "../../UI/FileManager/trayico/tray16.ico" diff --git a/CPP/7zip/UI/FileManager/ProgressDialog2IconRes.h b/CPP/7zip/UI/FileManager/ProgressDialog2IconRes.h new file mode 100644 index 00000000..80cd282b --- /dev/null +++ b/CPP/7zip/UI/FileManager/ProgressDialog2IconRes.h @@ -0,0 +1,17 @@ +#define IDI_SYSTRAY_0 310 +#define IDI_SYSTRAY_1 311 +#define IDI_SYSTRAY_2 312 +#define IDI_SYSTRAY_3 313 +#define IDI_SYSTRAY_4 314 +#define IDI_SYSTRAY_5 315 +#define IDI_SYSTRAY_6 316 +#define IDI_SYSTRAY_7 317 +#define IDI_SYSTRAY_8 318 +#define IDI_SYSTRAY_9 319 +#define IDI_SYSTRAY_10 320 +#define IDI_SYSTRAY_11 321 +#define IDI_SYSTRAY_12 322 +#define IDI_SYSTRAY_13 323 +#define IDI_SYSTRAY_14 324 +//#define IDI_SYSTRAY_15 325 +//#define IDI_SYSTRAY_16 326 diff --git a/CPP/7zip/UI/FileManager/ProgressDialog2Res.h b/CPP/7zip/UI/FileManager/ProgressDialog2Res.h index b45d7b49..edc03661 100644 --- a/CPP/7zip/UI/FileManager/ProgressDialog2Res.h +++ b/CPP/7zip/UI/FileManager/ProgressDialog2Res.h @@ -3,6 +3,7 @@ #define IDS_CLOSE 408 #define IDS_CONTINUE 411 +#define IDS_CANCEL 415 #define IDB_PROGRESS_BACKGROUND 444 #define IDS_PROGRESS_FOREGROUND 445 @@ -25,6 +26,7 @@ #define IDL_PROGRESS_MESSAGES 101 #define IDT_PROGRESS_FILE_NAME 102 #define IDT_PROGRESS_STATUS 103 +#define IDC_PROGRESS_PERCENT 104 #define IDT_PROGRESS_PACKED_VAL 110 #define IDT_PROGRESS_FILES_VAL 111 diff --git a/CPP/7zip/UI/FileManager/ProgressDialog2a.rc b/CPP/7zip/UI/FileManager/ProgressDialog2a.rc index e9713930..9110f973 100644 --- a/CPP/7zip/UI/FileManager/ProgressDialog2a.rc +++ b/CPP/7zip/UI/FileManager/ProgressDialog2a.rc @@ -39,6 +39,7 @@ #define yc (z0 + z0s + bys) +#define percent_width 23 DIALOG_ID DIALOG 0, 0, xs, ys MY_MODAL_RESIZE_DIALOG_STYLE MY_FONT CAPTION "Progress" @@ -70,8 +71,9 @@ CAPTION "Progress" RTEXT "", IDT_PROGRESS_PACKED_VAL, x3, y3, x3s, MY_TEXT_NOPREFIX LTEXT "", IDT_PROGRESS_STATUS, m, z3, xc, MY_TEXT_NOPREFIX - CONTROL "", IDT_PROGRESS_FILE_NAME, "Static", SS_NOPREFIX | SS_LEFTNOWORDWRAP, m, z2, xc, z2s - + CONTROL "", IDT_PROGRESS_FILE_NAME, "Static", SS_NOPREFIX | SS_LEFTNOWORDWRAP, m, z2, xc - percent_width, z2s + RTEXT "", IDC_PROGRESS_PERCENT, m + xc - percent_width, z2, percent_width, z2s, SS_NOPREFIX | SS_CENTERIMAGE + CONTROL "Progress1", IDC_PROGRESS1, "msctls_progress32", PBS_SMOOTH | WS_BORDER, m, z1, xc, z1s CONTROL "List1", IDL_PROGRESS_MESSAGES, "SysListView32", diff --git a/CPP/7zip/UI/FileManager/SplitDialog.cpp b/CPP/7zip/UI/FileManager/SplitDialog.cpp index 455874ef..9aacb875 100644 --- a/CPP/7zip/UI/FileManager/SplitDialog.cpp +++ b/CPP/7zip/UI/FileManager/SplitDialog.cpp @@ -49,31 +49,31 @@ bool CSplitDialog::OnInit() return CModalDialog::OnInit(); } -bool CSplitDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize) -{ - int mx, my; - GetMargins(8, mx, my); - int bx1, bx2, by; - GetItemSizes(IDCANCEL, bx1, by); - GetItemSizes(IDOK, bx2, by); - int yPos = ySize - my - by; - int xPos = xSize - mx - bx1; - - InvalidateRect(NULL); - - { - RECT r; - GetClientRectOfItem(IDB_SPLIT_PATH, r); - int bx = RECT_SIZE_X(r); - MoveItem(IDB_SPLIT_PATH, xSize - mx - bx, r.top, bx, RECT_SIZE_Y(r)); - ChangeSubWindowSizeX(_pathCombo, xSize - mx - mx - bx - mx); - } - - MoveItem(IDCANCEL, xPos, yPos, bx1, by); - MoveItem(IDOK, xPos - mx - bx2, yPos, bx2, by); - - return false; -} +//bool CSplitDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize) +//{ +// int mx, my; +// GetMargins(8, mx, my); +// int bx1, bx2, by; +// GetItemSizes(IDCANCEL, bx1, by); +// GetItemSizes(IDOK, bx2, by); +// int yPos = ySize - my - by; +// int xPos = xSize - mx - bx1; +// +// InvalidateRect(NULL); +// +// { +// RECT r; +// GetClientRectOfItem(IDB_SPLIT_PATH, r); +// int bx = RECT_SIZE_X(r); +// MoveItem(IDB_SPLIT_PATH, xSize - mx - bx, r.top, bx, RECT_SIZE_Y(r)); +// ChangeSubWindowSizeX(_pathCombo, xSize - mx - mx - bx - mx); +// } +// +// MoveItem(IDCANCEL, xPos, yPos, bx1, by); +// MoveItem(IDOK, xPos - mx - bx2, yPos, bx2, by); +// +// return false; +//} bool CSplitDialog::OnButtonClicked(int buttonID, HWND buttonHWND) { diff --git a/CPP/7zip/UI/FileManager/SplitDialog.h b/CPP/7zip/UI/FileManager/SplitDialog.h index 00aae658..89e7b49e 100644 --- a/CPP/7zip/UI/FileManager/SplitDialog.h +++ b/CPP/7zip/UI/FileManager/SplitDialog.h @@ -14,7 +14,7 @@ class CSplitDialog: public NWindows::NControl::CModalDialog NWindows::NControl::CComboBox _volumeCombo; virtual void OnOK(); virtual bool OnInit(); - virtual bool OnSize(WPARAM wParam, int xSize, int ySize); +// virtual bool OnSize(WPARAM wParam, int xSize, int ySize); virtual bool OnButtonClicked(int buttonID, HWND buttonHWND); void OnButtonSetPath(); public: diff --git a/CPP/7zip/UI/FileManager/SplitDialog.rc b/CPP/7zip/UI/FileManager/SplitDialog.rc index 5a026e8a..e8394e16 100644 --- a/CPP/7zip/UI/FileManager/SplitDialog.rc +++ b/CPP/7zip/UI/FileManager/SplitDialog.rc @@ -4,7 +4,7 @@ #define xc 288 #define yc 96 -IDD_SPLIT DIALOG 0, 0, xs, ys MY_MODAL_RESIZE_DIALOG_STYLE MY_FONT +IDD_SPLIT DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT CAPTION "Split File" BEGIN LTEXT "&Split to:", IDT_SPLIT_PATH, m, m, xc, 8 diff --git a/CPP/7zip/UI/FileManager/StdAfx.h b/CPP/7zip/UI/FileManager/StdAfx.h index e6d96041..fe93b01d 100644 --- a/CPP/7zip/UI/FileManager/StdAfx.h +++ b/CPP/7zip/UI/FileManager/StdAfx.h @@ -6,9 +6,9 @@ /* we used 0x0400 for Windows NT supporting (MENUITEMINFOW) But now menu problem is fixed. So it's OK to use 0x0500 (Windows 2000) */ -// #define _WIN32_WINNT 0x0400 -#define _WIN32_WINNT 0x0500 -#define WINVER _WIN32_WINNT +//// #define _WIN32_WINNT 0x0400 +//#define _WIN32_WINNT 0x0500 +//#define WINVER _WIN32_WINNT #include "../../../Common/Common.h" diff --git a/CPP/7zip/UI/FileManager/ViewSettings.cpp b/CPP/7zip/UI/FileManager/ViewSettings.cpp index 9292d120..8ac44a6c 100644 --- a/CPP/7zip/UI/FileManager/ViewSettings.cpp +++ b/CPP/7zip/UI/FileManager/ViewSettings.cpp @@ -30,6 +30,9 @@ static const TCHAR *kFolderHistoryValueName = TEXT("FolderHistory"); static const TCHAR *kFastFoldersValueName = TEXT("FolderShortcuts"); static const TCHAR *kCopyHistoryValueName = TEXT("CopyHistory"); +static const TCHAR *kOpenOutputFolderValueName = TEXT("OpenOutputFolder"); +static const TCHAR *kClose7ZipValueName = TEXT("Close7Zip"); + static NSynchronization::CCriticalSection g_CS; #define Set32(p, v) SetUi32(((Byte *)p), v) @@ -310,3 +313,39 @@ void AddUniqueStringToHeadOfList(UStringVector &list, const UString &s) i++; list.Insert(0, s); } + +void SaveOptOpenOutputFolder(bool bOpen) +{ + CKey key; + key.Create(HKEY_CURRENT_USER, kCUBasePath); + key.SetValue(kOpenOutputFolderValueName, bOpen); +} + +bool ReadOptOpenOutputFolder() +{ + CKey key; + if (key.Open(HKEY_CURRENT_USER, kCUBasePath, KEY_READ) != ERROR_SUCCESS) + return false; + bool bOpen; + if (key.QueryValue(kOpenOutputFolderValueName, bOpen) != ERROR_SUCCESS) + return false; + return bOpen; +} + +void SaveOptClose7Zip(bool bClose7Zip) +{ + CKey key; + key.Create(HKEY_CURRENT_USER, kCUBasePath); + key.SetValue(kClose7ZipValueName, bClose7Zip); +} + +bool ReadOptClose7Zip() +{ + CKey key; + if (key.Open(HKEY_CURRENT_USER, kCUBasePath, KEY_READ) != ERROR_SUCCESS) + return false; + bool bOpen; + if (key.QueryValue(kClose7ZipValueName, bOpen) != ERROR_SUCCESS) + return false; + return bOpen; +} diff --git a/CPP/7zip/UI/FileManager/ViewSettings.h b/CPP/7zip/UI/FileManager/ViewSettings.h index aeb68979..cb57fe83 100644 --- a/CPP/7zip/UI/FileManager/ViewSettings.h +++ b/CPP/7zip/UI/FileManager/ViewSettings.h @@ -112,4 +112,10 @@ void ReadCopyHistory(UStringVector &folders); void AddUniqueStringToHeadOfList(UStringVector &list, const UString &s); +void SaveOptOpenOutputFolder(bool bOpen); +bool ReadOptOpenOutputFolder(); + +void SaveOptClose7Zip(bool bClose7Zip); +bool ReadOptClose7Zip(); + #endif diff --git a/CPP/7zip/UI/FileManager/resource.h b/CPP/7zip/UI/FileManager/resource.h index b7ca17f1..6c85b993 100644 --- a/CPP/7zip/UI/FileManager/resource.h +++ b/CPP/7zip/UI/FileManager/resource.h @@ -93,6 +93,7 @@ #define IDM_HELP_CONTENTS 960 #define IDM_ABOUT 961 +#define IDM_ABOUT_EASY_7ZIP 962 #define IDS_OPTIONS 2100 diff --git a/CPP/7zip/UI/FileManager/resource.rc b/CPP/7zip/UI/FileManager/resource.rc index 7db5d3a1..52e6e16f 100644 --- a/CPP/7zip/UI/FileManager/resource.rc +++ b/CPP/7zip/UI/FileManager/resource.rc @@ -124,15 +124,16 @@ BEGIN #endif MENUITEM SEPARATOR MENUITEM "&About 7-Zip...", IDM_ABOUT + MENUITEM "&About Easy 7-Zip...", IDM_ABOUT_EASY_7ZIP END END IDI_ICON ICON "../../UI/FileManager/FM.ico" -#ifndef UNDER_CE -1 24 MOVEABLE PURE "../../UI/FileManager/7zFM.exe.manifest" -#endif +//#ifndef UNDER_CE +//1 24 MOVEABLE PURE "../../UI/FileManager/7zFM.exe.manifest" +//#endif IDB_ADD BITMAP "../../UI/FileManager/Add.bmp" IDB_EXTRACT BITMAP "../../UI/FileManager/Extract.bmp" @@ -237,6 +238,7 @@ BEGIN END #include "AboutDialog.rc" +#include "AboutEasy7ZipDialog.rc" #include "BrowseDialog.rc" #include "ComboDialog.rc" #include "CopyDialog.rc" diff --git a/CPP/7zip/UI/FileManager/trayico/tray00.ico b/CPP/7zip/UI/FileManager/trayico/tray00.ico new file mode 100644 index 00000000..8899fae6 Binary files /dev/null and b/CPP/7zip/UI/FileManager/trayico/tray00.ico differ diff --git a/CPP/7zip/UI/FileManager/trayico/tray01.ico b/CPP/7zip/UI/FileManager/trayico/tray01.ico new file mode 100644 index 00000000..ac8c7205 Binary files /dev/null and b/CPP/7zip/UI/FileManager/trayico/tray01.ico differ diff --git a/CPP/7zip/UI/FileManager/trayico/tray02.ico b/CPP/7zip/UI/FileManager/trayico/tray02.ico new file mode 100644 index 00000000..0eb0d027 Binary files /dev/null and b/CPP/7zip/UI/FileManager/trayico/tray02.ico differ diff --git a/CPP/7zip/UI/FileManager/trayico/tray03.ico b/CPP/7zip/UI/FileManager/trayico/tray03.ico new file mode 100644 index 00000000..7c6d19ff Binary files /dev/null and b/CPP/7zip/UI/FileManager/trayico/tray03.ico differ diff --git a/CPP/7zip/UI/FileManager/trayico/tray04.ico b/CPP/7zip/UI/FileManager/trayico/tray04.ico new file mode 100644 index 00000000..42953770 Binary files /dev/null and b/CPP/7zip/UI/FileManager/trayico/tray04.ico differ diff --git a/CPP/7zip/UI/FileManager/trayico/tray05.ico b/CPP/7zip/UI/FileManager/trayico/tray05.ico new file mode 100644 index 00000000..e0419234 Binary files /dev/null and b/CPP/7zip/UI/FileManager/trayico/tray05.ico differ diff --git a/CPP/7zip/UI/FileManager/trayico/tray06.ico b/CPP/7zip/UI/FileManager/trayico/tray06.ico new file mode 100644 index 00000000..ab203559 Binary files /dev/null and b/CPP/7zip/UI/FileManager/trayico/tray06.ico differ diff --git a/CPP/7zip/UI/FileManager/trayico/tray07.ico b/CPP/7zip/UI/FileManager/trayico/tray07.ico new file mode 100644 index 00000000..38fec32c Binary files /dev/null and b/CPP/7zip/UI/FileManager/trayico/tray07.ico differ diff --git a/CPP/7zip/UI/FileManager/trayico/tray08.ico b/CPP/7zip/UI/FileManager/trayico/tray08.ico new file mode 100644 index 00000000..746de561 Binary files /dev/null and b/CPP/7zip/UI/FileManager/trayico/tray08.ico differ diff --git a/CPP/7zip/UI/FileManager/trayico/tray09.ico b/CPP/7zip/UI/FileManager/trayico/tray09.ico new file mode 100644 index 00000000..5f9a865f Binary files /dev/null and b/CPP/7zip/UI/FileManager/trayico/tray09.ico differ diff --git a/CPP/7zip/UI/FileManager/trayico/tray10.ico b/CPP/7zip/UI/FileManager/trayico/tray10.ico new file mode 100644 index 00000000..8542a9b0 Binary files /dev/null and b/CPP/7zip/UI/FileManager/trayico/tray10.ico differ diff --git a/CPP/7zip/UI/FileManager/trayico/tray11.ico b/CPP/7zip/UI/FileManager/trayico/tray11.ico new file mode 100644 index 00000000..c34cae78 Binary files /dev/null and b/CPP/7zip/UI/FileManager/trayico/tray11.ico differ diff --git a/CPP/7zip/UI/FileManager/trayico/tray12.ico b/CPP/7zip/UI/FileManager/trayico/tray12.ico new file mode 100644 index 00000000..4105ed1f Binary files /dev/null and b/CPP/7zip/UI/FileManager/trayico/tray12.ico differ diff --git a/CPP/7zip/UI/FileManager/trayico/tray13.ico b/CPP/7zip/UI/FileManager/trayico/tray13.ico new file mode 100644 index 00000000..4f043eb1 Binary files /dev/null and b/CPP/7zip/UI/FileManager/trayico/tray13.ico differ diff --git a/CPP/7zip/UI/FileManager/trayico/tray14.ico b/CPP/7zip/UI/FileManager/trayico/tray14.ico new file mode 100644 index 00000000..4788031d Binary files /dev/null and b/CPP/7zip/UI/FileManager/trayico/tray14.ico differ diff --git a/CPP/7zip/UI/GUI/CompressDialog.rc b/CPP/7zip/UI/GUI/CompressDialog.rc index d6ce5ac0..4e5b11c5 100644 --- a/CPP/7zip/UI/GUI/CompressDialog.rc +++ b/CPP/7zip/UI/GUI/CompressDialog.rc @@ -38,7 +38,7 @@ #define g4xs (xc - gSize - gSpace) #define g4xs2 (g4xs - m - m) -#define yOpt 80 +#define yOpt (80+1) #define xArcFolderOffs 40 @@ -52,15 +52,15 @@ #define GROUP_Y_SIZE_ENCRYPT 128 #endif -#define yPsw (yOpt + GROUP_Y_SIZE + 8) +#define yPsw (yOpt + GROUP_Y_SIZE + 8 + 2) IDD_COMPRESS DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT CAPTION "Add to Archive" BEGIN LTEXT "", IDT_COMPRESS_ARCHIVE_FOLDER, m + xArcFolderOffs, m, xc - xArcFolderOffs, 8 LTEXT "&Archive:", IDT_COMPRESS_ARCHIVE, m, 12, xArcFolderOffs, 8 - COMBOBOX IDC_COMPRESS_ARCHIVE, m + xArcFolderOffs, 18, xc - bxsDots - 12 - xArcFolderOffs, 126, MY_COMBO_WITH_EDIT - PUSHBUTTON "...", IDB_COMPRESS_SET_ARCHIVE, xs - m - bxsDots, 16, bxsDots, bys, WS_GROUP + COMBOBOX IDC_COMPRESS_ARCHIVE, m + xArcFolderOffs, 18, xc - bxsDots - 4 - xArcFolderOffs, 160, MY_COMBO_WITH_EDIT + PUSHBUTTON "...", IDB_COMPRESS_SET_ARCHIVE, xs - m - bxsDots, 16+1, bxsDots, bys-1, WS_GROUP LTEXT "Archive &format:", IDT_COMPRESS_FORMAT, m, 41, g0xs, 8 COMBOBOX IDC_COMPRESS_FORMAT, g1x, 39, g1xs, 80, MY_COMBO | CBS_SORT diff --git a/CPP/7zip/UI/GUI/ExtractDialog.cpp b/CPP/7zip/UI/GUI/ExtractDialog.cpp index af47fc2d..bdd19303 100644 --- a/CPP/7zip/UI/GUI/ExtractDialog.cpp +++ b/CPP/7zip/UI/GUI/ExtractDialog.cpp @@ -18,6 +18,8 @@ #include "../FileManager/LangUtils.h" #include "../FileManager/resourceGui.h" +#include "../FileManager/ViewSettings.h" + #include "ExtractDialog.h" #include "ExtractDialogRes.h" #include "ExtractRes.h" @@ -88,7 +90,7 @@ static const UInt32 kLangIDs[] = // static const int kWildcardsButtonIndex = 2; #ifndef NO_REGISTRY -static const unsigned kHistorySize = 16; +static const unsigned kHistorySize = 30; #endif #ifndef _SFX @@ -133,6 +135,21 @@ void CExtractDialog::GetButton_Bools(UINT id, CBoolPair &b1, CBoolPair &b2) #endif +void StartApplication(const UString &dir, const UString &path) +{ + SHELLEXECUTEINFOW execInfo; + ZeroMemory(&execInfo, sizeof(execInfo)); + execInfo.cbSize = sizeof(execInfo); + execInfo.fMask = SEE_MASK_FLAG_DDEWAIT; + execInfo.hwnd = NULL; + execInfo.lpVerb = NULL; + execInfo.lpFile = path; + execInfo.lpParameters = NULL; + execInfo.lpDirectory = dir.IsEmpty() ? NULL : (LPCWSTR)dir; + execInfo.nShow = SW_SHOWNORMAL; + ShellExecuteExW(&execInfo); +} + bool CExtractDialog::OnInit() { #ifdef LANG @@ -159,6 +176,9 @@ bool CExtractDialog::OnInit() _pathName.Attach(GetItem(IDE_EXTRACT_NAME)); #endif + _freeSpace.Attach(GetItem(IDC_STATIC_EXTRACT_FREE_SPACE)); + _freeSpace.SetText(L""); + #ifdef NO_REGISTRY PathMode = NExtract::NPathMode::kFullPaths; @@ -207,6 +227,7 @@ bool CExtractDialog::OnInit() #endif _path.SetText(pathPrefix); + ShowPathFreeSpace(pathPrefix); #ifndef NO_REGISTRY for (unsigned i = 0; i < _info.Paths.Size() && i < kHistorySize; i++) @@ -220,6 +241,11 @@ bool CExtractDialog::OnInit() _path.SetCurSel(-1); */ +#ifndef _SFX + m_bOpenOutputFolder = ReadOptOpenOutputFolder(); + CheckButton(IDC_EXTRACT_CHECK_OPEN_OUTPUT_FOLDER, m_bOpenOutputFolder); +#endif + #ifndef _SFX _pathMode.Attach(GetItem(IDC_EXTRACT_PATH_MODE)); @@ -253,11 +279,26 @@ void CExtractDialog::UpdatePasswordControl() bool CExtractDialog::OnButtonClicked(int buttonID, HWND buttonHWND) { - switch (buttonID) + switch(buttonID) { case IDB_EXTRACT_SET_PATH: OnButtonSetPath(); return true; + + case IDC_EXTRACT_BUTTON_OPEN_PATH: + OnButtonOpenPath(); + return true; + + case IDC_EXTRACT_CHECK_OPEN_OUTPUT_FOLDER: + m_bOpenOutputFolder = IsButtonCheckedBool(IDC_EXTRACT_CHECK_OPEN_OUTPUT_FOLDER); + return true; + +#ifndef _SFX + case IDC_CHECK_DELETE_SOURCE_FILE: + m_bDeleteSourceFile = IsButtonCheckedBool(IDC_CHECK_DELETE_SOURCE_FILE); + return true; +#endif + #ifndef _SFX case IDX_EXTRACT_NAME_ENABLE: ShowItem_Bool(IDE_EXTRACT_NAME, IsButtonCheckedBool(IDX_EXTRACT_NAME_ENABLE)); @@ -284,6 +325,7 @@ void CExtractDialog::OnButtonSetPath() _path.SetCurSel(-1); #endif _path.SetText(resultPath); + ShowPathFreeSpace(resultPath); } void AddUniqueString(UStringVector &list, const UString &s) @@ -296,6 +338,10 @@ void AddUniqueString(UStringVector &list, const UString &s) void CExtractDialog::OnOK() { +#ifndef _SFX + SaveOptOpenOutputFolder(m_bOpenOutputFolder); +#endif + #ifndef _SFX int pathMode2 = kPathModeButtonsVals[_pathMode.GetCurSel()]; if (PathMode != NExtract::NPathMode::kCurPaths || @@ -416,3 +462,147 @@ void CExtractDialog::OnHelp() CModalDialog::OnHelp(); } #endif + + +BOOL IsDirectory(const wchar_t * lpszPathFile) +{ + DWORD dwAttr; + + dwAttr = GetFileAttributesW(lpszPathFile); + return (dwAttr != (DWORD)-1) && (dwAttr & FILE_ATTRIBUTE_DIRECTORY); +} + +void CExtractDialog::OnButtonOpenPath() +{ + UString currentPath; + _path.GetText(currentPath); + + if (IsDirectory(currentPath)) + { + StartApplication(currentPath, currentPath); + } + else + { + wchar_t szMsg[1024]; + wsprintfW(szMsg, L"Folder \"%s\" is not available yet.\n\n" + L"Note: the program will create the folder automatically when extracting.", (LPCWSTR)currentPath); + MessageBoxW((HWND)_window, szMsg, L"7-Zip", MB_ICONEXCLAMATION); + } + +} + +static int MakeByteSizeString64(wchar_t * lpszBuf, size_t ccBuf, unsigned __int64 n64Byte) +{ + int nRet = 0; + + if (n64Byte < 1000ui64) + { + // < 1K + nRet = swprintf(lpszBuf, ccBuf, + L"%I64d B", n64Byte); + } + else if (n64Byte < 1024000ui64) // 1024 * 1000 + { + // 1K <= n64Byte < 1M + nRet = swprintf(lpszBuf, ccBuf, + L"%.1f KB", (double)n64Byte / 1024.0); + } + else if (n64Byte < 1048576000ui64) // 1024 * 1024 * 1000 + { + // 1M <= n64Byte < 1G + nRet = swprintf(lpszBuf, ccBuf, + L"%.2f MB", (double)n64Byte / 1048576.0); // 1024 * 1024 + } + else if (n64Byte < 1073741824000ui64) // 1024 * 1024 * 1024 * 1000 + { + // 1 G <= n64Byte < 1T + nRet = swprintf(lpszBuf, ccBuf, + L"%.2f GB", (double)n64Byte / 1073741824.0); // 1024.0F * 1024.0F * 1024.0F + } + else + { + // n64Byte >= 1T + nRet = swprintf(lpszBuf, ccBuf, + L"%.2f TB", (double)n64Byte / 1099511627776.0); + // 1024.0F * 1024.0F * 1024.0F * 1024.0F + } + + return nRet; +} + +void CExtractDialog::ShowPathFreeSpace(UString & strPath) +{ + bool bBadPath; + UString strText; + + strText.Empty(); + + bBadPath = false; + strPath.Trim(); + for (; !IsDirectory(strPath); ) + { + int n = strPath.ReverseFind(L'\\'); + if (n == -1) + { + bBadPath = true; + break; + } + else + { + strPath.ReleaseBuf_SetEnd(n); + } + } + if (!bBadPath) + { + unsigned __int64 n64FreeBytesAvailable; + unsigned __int64 n64TotalNumberOfBytes; + unsigned __int64 n64TotalNumberOfFreeBytes; + + if (GetDiskFreeSpaceExW(strPath, (PULARGE_INTEGER)&n64FreeBytesAvailable, + (PULARGE_INTEGER)&n64TotalNumberOfBytes, (PULARGE_INTEGER)&n64TotalNumberOfFreeBytes)) + { + wchar_t szFreeBytes[1024]; + wchar_t szTotalBytes[1024]; + MakeByteSizeString64(szFreeBytes, 1024-4, n64TotalNumberOfFreeBytes); + MakeByteSizeString64(szTotalBytes, 1024-4, n64TotalNumberOfBytes); + int nLen = swprintf(strText.GetBuf(1024), 1024-4, L"%s Free (Total: %s)", szFreeBytes, szTotalBytes); + strText.ReleaseBuf_SetEnd(nLen); + } + } + _freeSpace.SetText(strText); +} + + +bool CExtractDialog::OnCommand(int code, int itemID, LPARAM lParam) +{ + if (itemID == IDC_EXTRACT_PATH) + { +#ifdef NO_REGISTRY + if (code == EN_CHANGE) +#else + if (code == CBN_EDITCHANGE) +#endif + { + UString strPath; + _path.GetText(strPath); + + ShowPathFreeSpace(strPath); + return true; + } +#ifndef NO_REGISTRY + else if (code == CBN_SELCHANGE) + { + int nSel = _path.GetCurSel(); + if (nSel != CB_ERR) + { + UString strPath; + _path.GetLBText(nSel, strPath); + ShowPathFreeSpace(strPath); + } + return true; + } +#endif + } + return CModalDialog::OnCommand(code, itemID, lParam); +} + diff --git a/CPP/7zip/UI/GUI/ExtractDialog.h b/CPP/7zip/UI/GUI/ExtractDialog.h index 33349ffc..dd2145b2 100644 --- a/CPP/7zip/UI/GUI/ExtractDialog.h +++ b/CPP/7zip/UI/GUI/ExtractDialog.h @@ -7,6 +7,7 @@ #include "../../../Windows/Control/ComboBox.h" #include "../../../Windows/Control/Edit.h" +#include "../../../Windows/Control/Static.h" #include "../Common/ExtractMode.h" @@ -31,6 +32,8 @@ namespace NExtractionDialog */ } +void StartApplication(const UString &dir, const UString &path); + class CExtractDialog: public NWindows::NControl::CModalDialog { #ifdef NO_REGISTRY @@ -45,6 +48,7 @@ class CExtractDialog: public NWindows::NControl::CModalDialog NWindows::NControl::CComboBox _pathMode; NWindows::NControl::CComboBox _overwriteMode; #endif + NWindows::NControl::CStatic _freeSpace; #ifndef _SFX // int GetFilesMode() const; @@ -58,6 +62,8 @@ class CExtractDialog: public NWindows::NControl::CModalDialog virtual bool OnInit(); virtual bool OnButtonClicked(int buttonID, HWND buttonHWND); virtual void OnOK(); + void OnButtonOpenPath(); + virtual bool OnCommand(int code, int itemID, LPARAM lParam); #ifndef NO_REGISTRY @@ -67,6 +73,7 @@ class CExtractDialog: public NWindows::NControl::CModalDialog #endif + void ShowPathFreeSpace(UString & strPath); bool IsShowPasswordChecked() const { return IsButtonCheckedBool(IDX_PASSWORD_SHOW); } public: // bool _enableSelectedFilesButton; @@ -84,6 +91,9 @@ public: NExtract::NPathMode::EEnum PathMode; NExtract::NOverwriteMode::EEnum OverwriteMode; + bool m_bOpenOutputFolder; + bool m_bDeleteSourceFile; + #ifndef _SFX // CBoolPair AltStreams; CBoolPair NtSecurity; @@ -103,7 +113,8 @@ public: CExtractDialog(): PathMode_Force(false), - OverwriteMode_Force(false) + OverwriteMode_Force(false), + m_bOpenOutputFolder(false), m_bDeleteSourceFile(false) { ElimDup.Val = true; } diff --git a/CPP/7zip/UI/GUI/ExtractDialog.rc b/CPP/7zip/UI/GUI/ExtractDialog.rc index 3728b96d..4b4821f7 100644 --- a/CPP/7zip/UI/GUI/ExtractDialog.rc +++ b/CPP/7zip/UI/GUI/ExtractDialog.rc @@ -2,7 +2,7 @@ #include "../../GuiCommon.rc" #define xc 336 -#define yc 168 +#define yc 200 #undef g1xs #undef g2x @@ -18,6 +18,13 @@ #define g2xs (xc - g1xs - gSpace) #define g2xs2 (g2xs - m - m) +#define bxsOpen 30 +#define xsSpace 4 + +#define e7zYbase 58 +#define newControlHeight 42 +#define newControlHeight2 58 + #undef GROUP_Y_SIZE #ifdef UNDER_CE #define GROUP_Y_SIZE 8 @@ -29,30 +36,36 @@ IDD_EXTRACT DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT CAPTION "Extract" BEGIN LTEXT "E&xtract to:", IDT_EXTRACT_EXTRACT_TO, m, m, xc, 8 - COMBOBOX IDC_EXTRACT_PATH, m, m + 12, xc - bxsDots - 12, 100, MY_COMBO_WITH_EDIT - PUSHBUTTON "...", IDB_EXTRACT_SET_PATH, xs - m - bxsDots, m + 12 - 2, bxsDots, bys, WS_GROUP + COMBOBOX IDC_EXTRACT_PATH, m, m + 12, xc - bxsDots - xsSpace - bxsOpen - xsSpace, 160, MY_COMBO_WITH_EDIT + PUSHBUTTON "...", IDB_EXTRACT_SET_PATH, xs - m - bxsDots - xsSpace - bxsOpen, m + 12 - 1, bxsDots, bys-1, WS_GROUP + PUSHBUTTON "&Open", IDC_EXTRACT_BUTTON_OPEN_PATH, xs - m - bxsOpen, m + 12 - 1, bxsOpen, bys-1, WS_GROUP CONTROL "", IDX_EXTRACT_NAME_ENABLE, MY_CHECKBOX, m, m + 34, 12, 10 - EDITTEXT IDE_EXTRACT_NAME, m + 12 + 2, m + 32, g1xs - 12 - 2, 14, ES_AUTOHSCROLL + EDITTEXT IDE_EXTRACT_NAME, m + 12 + 2, m + 32, xc - 12 - 2, 14, ES_AUTOHSCROLL - LTEXT "Path mode:", IDT_EXTRACT_PATH_MODE, m, m + 52, g1xs, 8 - COMBOBOX IDC_EXTRACT_PATH_MODE, m, m + 64, g1xs, 140, MY_COMBO + LTEXT "", IDC_STATIC_EXTRACT_FREE_SPACE, m, e7zYbase, xc, 8 + GROUPBOX "After extraction completes successfully", IDC_GUI_AFTER_EXTRACT, m, e7zYbase+12, xc, 27 + CONTROL "O&pen output folder", IDC_EXTRACT_CHECK_OPEN_OUTPUT_FOLDER, MY_CHECKBOX, 14, e7zYbase+24, 100, 10 + CONTROL "&Delete source archives", IDC_CHECK_DELETE_SOURCE_FILE, MY_CHECKBOX, 125, e7zYbase+24, 120, 10 + + LTEXT "Path mode:", IDT_EXTRACT_PATH_MODE, m, m + 52 + newControlHeight, g1xs, 8 + COMBOBOX IDC_EXTRACT_PATH_MODE, m, m + 64 + newControlHeight, g1xs, 140, MY_COMBO CONTROL "Eliminate duplication of root folder", IDX_EXTRACT_ELIM_DUP, MY_CHECKBOX, - m, m + 84, g1xs, 10 + m, m + 84 + newControlHeight, g1xs, 10 - LTEXT "Overwrite mode:", IDT_EXTRACT_OVERWRITE_MODE, m, m + 104, g1xs, 8 - COMBOBOX IDC_EXTRACT_OVERWRITE_MODE, m, m + 116, g1xs, 140, MY_COMBO + LTEXT "Overwrite mode:", IDT_EXTRACT_OVERWRITE_MODE, m, m + 104 + newControlHeight, g1xs, 8 + COMBOBOX IDC_EXTRACT_OVERWRITE_MODE, m, m + 116 + newControlHeight, g1xs, 140, MY_COMBO - GROUPBOX "Password", IDG_PASSWORD, g2x, m + 36, g2xs, GROUP_Y_SIZE - EDITTEXT IDE_EXTRACT_PASSWORD, g2x2, m + 50, g2xs2, 14, ES_PASSWORD | ES_AUTOHSCROLL - CONTROL "Show Password", IDX_PASSWORD_SHOW, MY_CHECKBOX, g2x2, m + 72, g2xs2, 10 + GROUPBOX "Password", IDG_PASSWORD, g2x, m + 36 + newControlHeight2, g2xs, GROUP_Y_SIZE + EDITTEXT IDE_EXTRACT_PASSWORD, g2x2, m + 50 + newControlHeight2, g2xs2, 14, ES_PASSWORD | ES_AUTOHSCROLL + CONTROL "Show Password", IDX_PASSWORD_SHOW, MY_CHECKBOX, g2x2, m + 72 + newControlHeight2, g2xs2, 10 // CONTROL "Restore alternate data streams", IDX_EXTRACT_ALT_STREAMS, MY_CHECKBOX, // g2x, m + 104, g2xs, 10 CONTROL "Restore file security", IDX_EXTRACT_NT_SECUR, MY_CHECKBOX, - g2x, m + 104, g2xs, 10 + g2x, m + 100 + newControlHeight2, g2xs, 10 DEFPUSHBUTTON "OK", IDOK, bx3, by, bxs, bys, WS_GROUP PUSHBUTTON "Cancel", IDCANCEL, bx2, by, bxs, bys diff --git a/CPP/7zip/UI/GUI/ExtractDialogRes.h b/CPP/7zip/UI/GUI/ExtractDialogRes.h index ed12bfb3..f2266c4c 100644 --- a/CPP/7zip/UI/GUI/ExtractDialogRes.h +++ b/CPP/7zip/UI/GUI/ExtractDialogRes.h @@ -6,6 +6,12 @@ #define IDC_EXTRACT_PATH_MODE 102 #define IDC_EXTRACT_OVERWRITE_MODE 103 +#define IDC_EXTRACT_BUTTON_OPEN_PATH 105 +#define IDC_EXTRACT_CHECK_OPEN_OUTPUT_FOLDER 106 +#define IDC_STATIC_EXTRACT_FREE_SPACE 107 +#define IDC_CHECK_DELETE_SOURCE_FILE 108 +#define IDC_GUI_AFTER_EXTRACT 109 + #define IDE_EXTRACT_PASSWORD 120 #define IDE_EXTRACT_NAME 130 @@ -18,7 +24,8 @@ #define IDX_EXTRACT_ELIM_DUP 3430 #define IDX_EXTRACT_NT_SECUR 3431 -// #define IDX_EXTRACT_ALT_STREAMS 3432 +// #define IDX_EXTRACT_ALT_STREAMS 3432 #define IDX_PASSWORD_SHOW 3803 #define IDG_PASSWORD 3807 + diff --git a/CPP/7zip/UI/GUI/ExtractGUI.cpp b/CPP/7zip/UI/GUI/ExtractGUI.cpp index 7fb843a1..e3178b4e 100644 --- a/CPP/7zip/UI/GUI/ExtractGUI.cpp +++ b/CPP/7zip/UI/GUI/ExtractGUI.cpp @@ -34,6 +34,8 @@ using namespace NWindows; using namespace NFile; using namespace NDir; +extern bool g_bProcessError; + static const wchar_t *kIncorrectOutDir = L"Incorrect output directory path"; #ifndef _SFX @@ -160,7 +162,11 @@ HRESULT ExtractGUI( CExtractCallbackImp *extractCallback, HWND hwndParent) { + bool openOutputFolder = false; + bool deleteSourceFile = false; + messageWasDisplayed = false; + g_bProcessError = false; CThreadExtracting extracter; extracter.codecs = codecs; @@ -213,6 +219,9 @@ HRESULT ExtractGUI( options.PathMode = dialog.PathMode; options.ElimDup = dialog.ElimDup; + openOutputFolder = dialog.m_bOpenOutputFolder; + deleteSourceFile = dialog.m_bDeleteSourceFile; + #ifndef _SFX // options.NtOptions.AltStreams = dialog.AltStreams; options.NtOptions.NtSecurity = dialog.NtSecurity; @@ -229,7 +238,7 @@ HRESULT ExtractGUI( NName::NormalizeDirPathPrefix(options.OutputDir); /* - if (!CreateComplexDirectory(options.OutputDir)) + if(!CreateComplexDirectory(options.OutputDir)) { UString s = GetUnicodeString(NError::MyFormatMessage(GetLastError())); UString s2 = MyFormatNew(IDS_CANNOT_CREATE_FOLDER, @@ -268,5 +277,34 @@ HRESULT ExtractGUI( RINOK(extracter.Create(title, hwndParent)); messageWasDisplayed = extracter.ThreadFinishedOK & extracter.ProgressDialog.MessagesDisplayed; + + if (extracter.ThreadFinishedOK && !g_bProcessError) + { + if (openOutputFolder) + { + StartApplication(options.OutputDir, options.OutputDir); + } + if (deleteSourceFile) + { + DWORD dwAttr; + UString strFilePath; + for (unsigned i = 0; i < archivePathsFull.Size(); i++) + { + strFilePath = archivePathsFull[i]; + dwAttr = GetFileAttributesW(strFilePath); + + if ((dwAttr != INVALID_FILE_ATTRIBUTES) + && (dwAttr & FILE_ATTRIBUTE_ARCHIVE)) + { + if (dwAttr & FILE_ATTRIBUTE_READONLY) + { + dwAttr &= (~FILE_ATTRIBUTE_READONLY); + SetFileAttributesW(strFilePath, dwAttr); + } + ::DeleteFileW(strFilePath); + } + } + } + } return extracter.Result; } diff --git a/CPP/7zip/UI/GUI/GUI.sln b/CPP/7zip/UI/GUI/GUI.sln new file mode 100644 index 00000000..695360ed --- /dev/null +++ b/CPP/7zip/UI/GUI/GUI.sln @@ -0,0 +1,38 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI", "GUI.vcproj", "{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + DebugU|Win32 = DebugU|Win32 + DebugU|x64 = DebugU|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseU|Win32 = ReleaseU|Win32 + ReleaseU|x64 = ReleaseU|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Debug|Win32.ActiveCfg = Debug|Win32 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Debug|Win32.Build.0 = Debug|Win32 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Debug|x64.ActiveCfg = Debug|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Debug|x64.Build.0 = Debug|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.DebugU|Win32.ActiveCfg = DebugU|Win32 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.DebugU|Win32.Build.0 = DebugU|Win32 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.DebugU|x64.ActiveCfg = DebugU|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.DebugU|x64.Build.0 = DebugU|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Release|Win32.ActiveCfg = Release|Win32 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Release|Win32.Build.0 = Release|Win32 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Release|x64.ActiveCfg = Release|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Release|x64.Build.0 = Release|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseU|Win32.ActiveCfg = ReleaseU|Win32 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseU|Win32.Build.0 = ReleaseU|Win32 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseU|x64.ActiveCfg = ReleaseU|x64 + {D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseU|x64.Build.0 = ReleaseU|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/CPP/7zip/UI/GUI/GUI.vcproj b/CPP/7zip/UI/GUI/GUI.vcproj new file mode 100644 index 00000000..ef575fe6 --- /dev/null +++ b/CPP/7zip/UI/GUI/GUI.vcproj @@ -0,0 +1,8401 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CPP/7zip/UI/GUI/StdAfx.h b/CPP/7zip/UI/GUI/StdAfx.h index 64290769..ce13040d 100644 --- a/CPP/7zip/UI/GUI/StdAfx.h +++ b/CPP/7zip/UI/GUI/StdAfx.h @@ -3,9 +3,9 @@ #ifndef __STDAFX_H #define __STDAFX_H -// #define _WIN32_WINNT 0x0400 -#define _WIN32_WINNT 0x0500 -#define WINVER _WIN32_WINNT +//// #define _WIN32_WINNT 0x0400 +//#define _WIN32_WINNT 0x0500 +//#define WINVER _WIN32_WINNT #include "../../../Common/Common.h" diff --git a/CPP/7zip/UI/GUI/resource.rc b/CPP/7zip/UI/GUI/resource.rc index 13a09c64..a297185b 100644 --- a/CPP/7zip/UI/GUI/resource.rc +++ b/CPP/7zip/UI/GUI/resource.rc @@ -10,9 +10,9 @@ MY_VERSION_INFO(MY_VFT_APP, "7-Zip GUI", "7zg", "7zg.exe") IDI_ICON ICON "FM.ico" -#ifndef UNDER_CE -1 24 MOVEABLE PURE "7zG.exe.manifest" -#endif +//#ifndef UNDER_CE +//1 24 MOVEABLE PURE "7zG.exe.manifest" +//#endif #include "../FileManager/PropertyName.rc" #include "../FileManager/OverwriteDialog.rc" diff --git a/CPP/Common/Common.h b/CPP/Common/Common.h index 9dd30f4b..7f29db7e 100644 --- a/CPP/Common/Common.h +++ b/CPP/Common/Common.h @@ -3,11 +3,17 @@ #ifndef __COMMON_COMMON_H #define __COMMON_COMMON_H +#define _WIN32_WINNT 0x0500 +#define WINVER 0x0500 +#define _WIN32_IE 0x0501 + #include "../../C/Compiler.h" #include "MyWindows.h" #include "NewHandler.h" +#include + #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[1])) #endif diff --git a/CPP/Common/MyString.h b/CPP/Common/MyString.h index 02308555..27ca712f 100644 --- a/CPP/Common/MyString.h +++ b/CPP/Common/MyString.h @@ -364,7 +364,14 @@ public: void Delete(unsigned index) throw(); void Delete(unsigned index, unsigned count) throw(); void DeleteFrontal(unsigned num) throw(); - void DeleteBack() { _chars[--_len] = 0; } +// void DeleteBack() { _chars[--_len] = 0; } + void DeleteBack() + { + if (_len >= 1) + { + _chars[--_len] = 0; + } + } void DeleteFrom(unsigned index) { if (index < _len) @@ -537,6 +544,7 @@ public: void SetFromAscii(const char *s); void AddAscii(const char *s); + UString Mid(unsigned startIndex) const { return Mid(startIndex, _len - startIndex); } UString Mid(unsigned startIndex, unsigned count) const { return UString(count, _chars + startIndex); } UString Left(unsigned count) const { return UString(count, *this); } @@ -600,7 +608,14 @@ public: void Delete(unsigned index) throw(); void Delete(unsigned index, unsigned count) throw(); void DeleteFrontal(unsigned num) throw(); - void DeleteBack() { _chars[--_len] = 0; } +// void DeleteBack() { _chars[--_len] = 0; } + void DeleteBack() + { + if (_len >= 1) + { + _chars[--_len] = 0; + } + } void DeleteFrom(unsigned index) { if (index < _len) diff --git a/CPP/Windows/Window.h b/CPP/Windows/Window.h index 3bda6795..08910e8f 100644 --- a/CPP/Windows/Window.h +++ b/CPP/Windows/Window.h @@ -133,7 +133,7 @@ public: bool Move(int x, int y, int width, int height, bool repaint = true) { return BOOLToBool(::MoveWindow(_window, x, y, width, height, BoolToBOOL(repaint))); } - bool ChangeSubWindowSizeX(HWND hwnd, int xSize) + bool ChangeSubWindowSizeX(HWND hwnd, int xSize, bool repaint = true) { RECT rect; ::GetWindowRect(hwnd, &rect); @@ -141,7 +141,7 @@ public: p1.x = rect.left; p1.y = rect.top; ScreenToClient(&p1); - return BOOLToBool(::MoveWindow(hwnd, p1.x, p1.y, xSize, rect.bottom - rect.top, TRUE)); + return BOOLToBool(::MoveWindow(hwnd, p1.x, p1.y, xSize, rect.bottom - rect.top, BoolToBOOL(repaint))); } void ScreenToClient(RECT *rect)