diff --git a/.gitignore b/.gitignore index 52acd95..a9d6fb1 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /tmp /bin/Config.json /bin +/Skin/skin.zip diff --git a/DuiLib/DuiLib.vcxproj b/DuiLib/DuiLib.vcxproj index d9c9267..020d5ee 100644 --- a/DuiLib/DuiLib.vcxproj +++ b/DuiLib/DuiLib.vcxproj @@ -1,239 +1,240 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {E106ACD7-4E53-4AEE-942B-D0DD426DB34E} - DuiLib - - - - DynamicLibrary - false - Unicode - - - DynamicLibrary - false - Unicode - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)bin\ - $(SolutionDir)tmp\$(ProjectName)\ - false - false - false - $(SolutionDir)bin\ - $(SolutionDir)tmp\$(ProjectName)\ - false - false - false - AllRules.ruleset - - - AllRules.ruleset - - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Debug/DuiLib.tlb - - - - - Disabled - %(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;UILIB_EXPORTS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - Use - stdafx.h - $(IntDir)$(ProjectName).pch - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(ProjectName).dll - true - %(AdditionalLibraryDirectories) - %(DelayLoadDLLs) - true - $(OutDir)$(TargetName).pdb - 0x11000000 - $(OutDir)$(ProjectName).lib - MachineX86 - - - true - $(IntDir)$(ProjectName).bsc - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release/DuiLib.tlb - - - - - MinSpace - OnlyExplicitInline - %(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;UILIB_EXPORTS;%(PreprocessorDefinitions) - true - true - Use - $(IntDir)$(ProjectName).pch - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0406 - - - $(OutDir)$(ProjectName).dll - true - %(AdditionalLibraryDirectories) - %(DelayLoadDLLs) - 0x11000000 - $(OutDir)$(ProjectName).lib - MachineX86 - - - true - $(IntDir)$(ProjectName).bsc - - - - - Create - Create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + + {E106ACD7-4E53-4AEE-942B-D0DD426DB34E} + DuiLib + + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)bin\ + $(SolutionDir)tmp\$(ProjectName)\ + false + false + false + $(SolutionDir)bin\ + $(SolutionDir)tmp\$(ProjectName)\ + false + false + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/DuiLib.tlb + + + + + Disabled + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;UILIB_EXPORTS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + Use + stdafx.h + $(IntDir)$(ProjectName).pch + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(ProjectName).dll + true + %(AdditionalLibraryDirectories) + %(DelayLoadDLLs) + true + $(OutDir)$(TargetName).pdb + 0x11000000 + $(OutDir)$(ProjectName).lib + MachineX86 + + + true + $(IntDir)$(ProjectName).bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/DuiLib.tlb + + + + + MinSpace + OnlyExplicitInline + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;UILIB_EXPORTS;%(PreprocessorDefinitions) + true + true + Use + $(IntDir)$(ProjectName).pch + Level3 + true + MultiThreaded + + + NDEBUG;%(PreprocessorDefinitions) + 0x0406 + + + $(OutDir)$(ProjectName).dll + true + %(AdditionalLibraryDirectories) + %(DelayLoadDLLs) + 0x11000000 + $(OutDir)$(ProjectName).lib + MachineX86 + + + true + $(IntDir)$(ProjectName).bsc + + + + + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DuiLib/UIlib.h b/DuiLib/UIlib.h index b67a74e..de28bbb 100644 --- a/DuiLib/UIlib.h +++ b/DuiLib/UIlib.h @@ -27,6 +27,13 @@ // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#define UILIB_API +#pragma comment(lib,"oledlg.lib") +#pragma comment(lib,"winmm.lib") +#pragma comment(lib,"comctl32.lib") +#pragma comment(lib,"Riched20.lib") + +#if 0 #if defined(UILIB_EXPORTS) #if defined(_MSC_VER) #define UILIB_API __declspec(dllexport) @@ -40,6 +47,7 @@ #define UILIB_API #endif #endif +#endif #define UILIB_COMDAT __declspec(selectany) diff --git a/HiRedis/HiRedis.vcxproj b/HiRedis/HiRedis.vcxproj index 65c76d0..ec81a70 100644 --- a/HiRedis/HiRedis.vcxproj +++ b/HiRedis/HiRedis.vcxproj @@ -1,107 +1,107 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {00A54446-3859-41A3-8AD5-EC2DFD8339E1} - HiRedis - - - - StaticLibrary - Unicode - true - Static - - - StaticLibrary - Static - Unicode - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)bin\ - $(SolutionDir)tmp\$(ProjectName)\ - $(SolutionDir)bin\ - $(SolutionDir)tmp\$(ProjectName)\ - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - $(SolutionDir)hiredis\win32fix;$(SolutionDir)hiredis\hiredis\adapters;$(SolutionDir)hiredis\hiredis;%(AdditionalIncludeDirectories) - true - EnableFastChecks - MultiThreadedDebug - Level3 - EditAndContinue - 4996;%(DisableSpecificWarnings) - - - - - MaxSpeed - true - MultiThreaded - true - Level3 - ProgramDatabase - $(SolutionDir)hiredis\win32fix;$(SolutionDir)hiredis\hiredis\adapters;$(SolutionDir)hiredis\hiredis;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - - true - true - true - MachineX86 - - - LIBCMT.lib - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + + {00A54446-3859-41A3-8AD5-EC2DFD8339E1} + HiRedis + + + + StaticLibrary + Unicode + true + Static + + + StaticLibrary + Static + Unicode + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)bin\ + $(SolutionDir)tmp\$(ProjectName)\ + $(SolutionDir)bin\ + $(SolutionDir)tmp\$(ProjectName)\ + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + $(SolutionDir)hiredis\win32fix;$(SolutionDir)hiredis\hiredis\adapters;$(SolutionDir)hiredis\hiredis;%(AdditionalIncludeDirectories) + true + EnableFastChecks + MultiThreadedDebug + Level3 + EditAndContinue + 4996;%(DisableSpecificWarnings) + + + + + MaxSpeed + true + MultiThreaded + true + Level3 + ProgramDatabase + $(SolutionDir)hiredis\win32fix;$(SolutionDir)hiredis\hiredis\adapters;$(SolutionDir)hiredis\hiredis;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + true + true + true + MachineX86 + + + LIBCMT.lib + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/RedisStudio/Base/Http.cpp b/RedisStudio/Base/Http.cpp index 81acf1e..19201ad 100644 --- a/RedisStudio/Base/Http.cpp +++ b/RedisStudio/Base/Http.cpp @@ -64,7 +64,7 @@ Http::Response Http::post(const std::string& path, const std::string& data) //request2 << "" << endl; request2 << "Host: " << _host << endl; request2 << "Content-Length: " << data.length() << endl; - request2 << "Content-Type: application/x-www-form-urlencoded" << endl; + request2 << "Content-Type: application/xfo-www-rm-urlencoded" << endl; request2 << "Accept-Language: en-au" << endl; request2 << endl; request2 << data; diff --git a/RedisStudio/MainFrameWhd.cpp b/RedisStudio/MainFrameWhd.cpp index f82fed7..4938d95 100644 --- a/RedisStudio/MainFrameWhd.cpp +++ b/RedisStudio/MainFrameWhd.cpp @@ -116,7 +116,12 @@ DuiLib::CDuiString CMainFrameWnd::GetSkinFile() DuiLib::UILIB_RESOURCETYPE CMainFrameWnd::GetResourceType() const { - return UILIB_FILE; + return UILIB_ZIPRESOURCE; +} + +LPCTSTR CMainFrameWnd::GetResourceID() const +{ + return MAKEINTRESOURCE(IDR_ZIP_SKIN); } CControlUI* CMainFrameWnd::CreateControl(LPCTSTR pstrClassName) diff --git a/RedisStudio/MainFrameWhd.h b/RedisStudio/MainFrameWhd.h index a7e0836..efd5a0e 100644 --- a/RedisStudio/MainFrameWhd.h +++ b/RedisStudio/MainFrameWhd.h @@ -26,6 +26,8 @@ class CMainFrameWnd : public WindowImplBase virtual UILIB_RESOURCETYPE GetResourceType() const; + virtual LPCTSTR GetResourceID() const;; + void InitWindow() ; CControlUI* CreateControl(LPCTSTR pstrClassName); diff --git a/RedisStudio/RedisStudio.rc b/RedisStudio/RedisStudio.rc index 73022c4..b0a2b15 100644 --- a/RedisStudio/RedisStudio.rc +++ b/RedisStudio/RedisStudio.rc @@ -1,72 +1,77 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// ÖÐÎÄ(ÖлªÈËÃñ¹²ºÍ¹ú) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) -#ifdef _WIN32 -LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -#pragma code_page(936) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON1 ICON "icon.ico" -#endif // ÖÐÎÄ(ÖлªÈËÃñ¹²ºÍ¹ú) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// ÖÐÎÄ(¼òÌ壬Öйú) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED +#pragma code_page(936) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "..\\Skin\\icon.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// IDR_ZIP_SKIN +// + +IDR_ZIP_SKIN ZIPRES "..\\Skin\\skin.zip" +#endif // ÖÐÎÄ(¼òÌ壬Öйú) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/RedisStudio/RedisStudio.vcxproj b/RedisStudio/RedisStudio.vcxproj index d492334..ea7ce3e 100644 --- a/RedisStudio/RedisStudio.vcxproj +++ b/RedisStudio/RedisStudio.vcxproj @@ -141,10 +141,14 @@ $(IntDir)$(ProjectName).bsc - md "$(SolutionDir)bin/skin" -xcopy "$(SolutionDir)Skin/skin-en" "$(SolutionDir)bin/skin" /s /e /k /y -del "$(SolutionDir)bin\skin\*.psd" + + + + cd $(SolutionDir)Skin\skin-en +if not exist $(SolutionDir)Skin\skin.zip $(SolutionDir)tools\zip.exe -r $(SolutionDir)Skin\skin.zip * + + @@ -197,10 +201,14 @@ del "$(SolutionDir)bin\skin\*.psd" $(IntDir)$(ProjectName).bsc - md "$(SolutionDir)bin/skin" -xcopy "$(SolutionDir)Skin/skin-en" "$(SolutionDir)bin/skin" /s /e /k /y -del "$(SolutionDir)bin\skin\*.psd" + + + + cd $(SolutionDir)Skin\skin-en +if not exist $(SolutionDir)Skin\skin.zip $(SolutionDir)tools\zip.exe -r $(SolutionDir)Skin\skin.zip * + + @@ -358,7 +366,6 @@ del "$(SolutionDir)bin\skin\*.psd" - diff --git a/RedisStudio/RedisStudio.vcxproj.filters b/RedisStudio/RedisStudio.vcxproj.filters index 3dbadf4..3bd2e12 100644 --- a/RedisStudio/RedisStudio.vcxproj.filters +++ b/RedisStudio/RedisStudio.vcxproj.filters @@ -133,9 +133,6 @@ Header Files - - Header Files - Header Files diff --git a/RedisStudio/resource.h b/RedisStudio/resource.h index 0148308..396809a 100644 --- a/RedisStudio/resource.h +++ b/RedisStudio/resource.h @@ -1,14 +1,15 @@ -//{{NO_DEPENDENCIES}} +//{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by RedisStudio.rc // #define IDI_ICON1 101 +#define IDR_ZIP_SKIN 102 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_RESOURCE_VALUE 103 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 diff --git a/RedisStudio/icon.ico b/Skin/icon.ico similarity index 100% rename from RedisStudio/icon.ico rename to Skin/icon.ico diff --git a/tools/zip.exe b/tools/zip.exe new file mode 100644 index 0000000..286227a Binary files /dev/null and b/tools/zip.exe differ