diff --git a/BuildTools/upx.exe b/BuildTools/upx.exe new file mode 100644 index 0000000..32c1284 Binary files /dev/null and b/BuildTools/upx.exe differ diff --git a/resource.h b/resource.h new file mode 100644 index 0000000..788c1fe --- /dev/null +++ b/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by xpmgr.rc +// +#define IDI_ICON1 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/xpmgr.cpp b/xpmgr.cpp index 221fac6..b97448e 100644 --- a/xpmgr.cpp +++ b/xpmgr.cpp @@ -1,19 +1,9 @@ -#define STRICT -#define UNICODE -#define _UNICODE + #include -#include -#include -#include -#include -#include #include #include -#include #include -#include -#include #include #pragma comment(lib, "comsuppw.lib") @@ -203,7 +193,7 @@ bool IsProcessRunning(const wchar_t* processName) return false; } - PROCESSENTRY32W processEntry; + PROCESSENTRY32W processEntry{}; processEntry.dwSize = sizeof(PROCESSENTRY32W); if (!Process32FirstW(snapshot, &processEntry)) { @@ -234,7 +224,7 @@ bool TerminateProcessByName(const wchar_t* processName) return false; } - PROCESSENTRY32W processEntry; + PROCESSENTRY32W processEntry{}; processEntry.dwSize = sizeof(PROCESSENTRY32W); if (!Process32FirstW(snapshot, &processEntry)) { diff --git a/xpmgr.ico b/xpmgr.ico new file mode 100644 index 0000000..a6eb45d Binary files /dev/null and b/xpmgr.ico differ diff --git a/xpmgr.rc b/xpmgr.rc new file mode 100644 index 0000000..dd3d456 Binary files /dev/null and b/xpmgr.rc differ diff --git a/xpmgr.sln b/xpmgr.sln index 29d5ea9..9915f6f 100644 --- a/xpmgr.sln +++ b/xpmgr.sln @@ -9,6 +9,8 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 + Release with UPX|x64 = Release with UPX|x64 + Release with UPX|x86 = Release with UPX|x86 Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection @@ -17,6 +19,10 @@ Global {F76E79ED-B941-49F6-A040-F560AA2B9E09}.Debug|x64.Build.0 = Debug|x64 {F76E79ED-B941-49F6-A040-F560AA2B9E09}.Debug|x86.ActiveCfg = Debug|Win32 {F76E79ED-B941-49F6-A040-F560AA2B9E09}.Debug|x86.Build.0 = Debug|Win32 + {F76E79ED-B941-49F6-A040-F560AA2B9E09}.Release with UPX|x64.ActiveCfg = Release with UPX|x64 + {F76E79ED-B941-49F6-A040-F560AA2B9E09}.Release with UPX|x64.Build.0 = Release with UPX|x64 + {F76E79ED-B941-49F6-A040-F560AA2B9E09}.Release with UPX|x86.ActiveCfg = Release with UPX|Win32 + {F76E79ED-B941-49F6-A040-F560AA2B9E09}.Release with UPX|x86.Build.0 = Release with UPX|Win32 {F76E79ED-B941-49F6-A040-F560AA2B9E09}.Release|x64.ActiveCfg = Release|x64 {F76E79ED-B941-49F6-A040-F560AA2B9E09}.Release|x64.Build.0 = Release|x64 {F76E79ED-B941-49F6-A040-F560AA2B9E09}.Release|x86.ActiveCfg = Release|Win32 diff --git a/xpmgr.vcxproj b/xpmgr.vcxproj index 7bfb05e..aef57c2 100644 --- a/xpmgr.vcxproj +++ b/xpmgr.vcxproj @@ -5,6 +5,14 @@ Debug Win32 + + Release with UPX + Win32 + + + Release with UPX + x64 + Release Win32 @@ -39,6 +47,13 @@ true Unicode + + Application + false + v141_xp + true + Unicode + Application true @@ -52,6 +67,13 @@ true Unicode + + Application + false + v141_xp + true + Unicode + @@ -63,22 +85,37 @@ + + + + + + .exe $(ProjectName)_x64 + + .exe + $(ProjectName)_x64 + $(ProjectName)_x86 $(Platform)\$(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ + + $(ProjectName)_x86 + $(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(ProjectName)_debug_x64 @@ -87,6 +124,9 @@ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ + + false + Level3 @@ -116,6 +156,31 @@ true true + + + + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + + + Console + true + true + true + + + "$(SolutionDir)BuildTools\upx.exe" "$(TargetPath)" --ultra-brute --best --compress-icons=3 -o"$(TargetDir)xpmgr_upx_x86.exe" +del "$(TargetPath)" + @@ -146,10 +211,44 @@ true true + + + + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + + + Console + true + true + true + + + "$(SolutionDir)BuildTools\upx.exe" "$(TargetPath)" --ultra-brute --best --compress-icons=3 -o"$(TargetDir)xpmgr_upx_x64.exe" +del "$(TargetPath)" + + + + + + + + + + diff --git a/xpmgr.vcxproj.filters b/xpmgr.vcxproj.filters index 9c0fe04..3b779d8 100644 --- a/xpmgr.vcxproj.filters +++ b/xpmgr.vcxproj.filters @@ -19,4 +19,19 @@ Source Files + + + Header Files + + + + + Resource Files + + + + + Resource Files + + \ No newline at end of file