Skip to content

Commit

Permalink
v1.1.0
Browse files Browse the repository at this point in the history
Settings dialog
Tray icon customization
Support ACPI Thermal Zone in Pi4 (optional)
Support more clock sources
  • Loading branch information
driver1998 committed Sep 16, 2020
1 parent 138f9b5 commit 6920f15
Show file tree
Hide file tree
Showing 19 changed files with 971 additions and 491 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 driver1998
Copyright (c) 2020 driver1998

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
7 changes: 0 additions & 7 deletions src/PiMon.exe.manifest
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*' />
Expand Down
162 changes: 141 additions & 21 deletions src/PiMon.rc
Original file line number Diff line number Diff line change
@@ -1,45 +1,165 @@

#include <windows.h>
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#include "version.h"
/////////////////////////////////////////////////////////////////////////////
// Ӣ��(����) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)

/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

IDI_MAIN ICON "icon.ico"
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_MAIN ICON "icon.ico"


/////////////////////////////////////////////////////////////////////////////
//
// Menu
//

IDM_TRAY MENU
BEGIN
POPUP "TRAY_POPUP"
BEGIN
MENUITEM "Always on &Top" , IDM_ALWAYS_TOP
MENUITEM "&Hide on Minimize", IDM_HIDE_MINIMIZE
MENUITEM "&About..." , IDM_ABOUT
MENUITEM "Always on &Top", IDM_ALWAYS_TOP
MENUITEM "&Hide on Minimize", IDM_HIDE_MINIMIZE
MENUITEM SEPARATOR
MENUITEM "S&ettings...", IDM_SETTINGS
MENUITEM "&About...", IDM_ABOUT
MENUITEM SEPARATOR
MENUITEM "&Exit" , IDM_EXIT
MENUITEM "&Exit", IDM_EXIT
END
END


/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_CONFIG DIALOGEX 0, 0, 220, 155
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_NOFAILCREATE | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "&OK", IDOK, 105, 130, 50, 15
PUSHBUTTON "&Cancel", IDCANCEL, 160, 130, 50, 15
GROUPBOX "Data Source", IDC_STATIC, 10, 10, 200, 35
CONTROL "Use ACPI Thermal Zone for temperature\n (Admin Required)", IDC_ACPI_THERMAL, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | BS_MULTILINE, 20, 20, 180, 20
GROUPBOX "Tray Icon Temperature Meter", IDC_STATIC, 10, 55, 200, 65
CTEXT "Preview", IDC_PREVIEW, 20, 70, 72, 12, SS_CENTERIMAGE
PUSHBUTTON "&Foreground", IDC_FOREGROUND, 20, 85, 72, 12
PUSHBUTTON "&Background", IDC_BACKGROUND, 20, 100, 72, 12
END


/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION PIMON_FILE_VERSION
PRODUCTVERSION PIMON_FILE_VERSION
FILEOS VOS_NT
FILESUBTYPE VFT2_UNKNOWN
FILETYPE VFT_APP
FILEVERSION PIMON_FILE_VERSION
PRODUCTVERSION PIMON_FILE_VERSION
FILEFLAGSMASK 0x0L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40000L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "driver1998\0"
VALUE "FileDescription", "PiMon\0"
VALUE "FileVersion", PIMON_VERSION "\0"
VALUE "InternalName", "PiMon\0"
VALUE "LegalCopyright", "Copyright (c) driver1998\0"
VALUE "OriginalFilename", "PiMon.exe\0"
VALUE "ProductName", "PiMon\0"
VALUE "ProductVersion", PIMON_VERSION "\0"
VALUE "CompanyName", "driver1998"
VALUE "FileDescription", PIMON_APPNAME
VALUE "FileVersion", "1.0.6"
VALUE "InternalName", PIMON_APPNAME
VALUE "LegalCopyright", "Copyright (c) driver1998"
VALUE "OriginalFilename", PIMON_APPNAME ".exe"
VALUE "ProductName", PIMON_APPNAME
VALUE "ProductVersion", PIMON_VERSION
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END


#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE
BEGIN
"resource.h\0"
END

2 TEXTINCLUDE
BEGIN
"\0"
END

3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END

#endif // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_CONFIG, DIALOG
BEGIN
END
END
#endif // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// AFX_DIALOG_LAYOUT
//

IDD_CONFIG AFX_DIALOG_LAYOUT
BEGIN
0
END

#endif // Ӣ��(����) resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//


/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

29 changes: 15 additions & 14 deletions src/PiMon.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Pathcch.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>wbemuuid.lib;Pathcch.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Manifest>
<SuppressStartupBanner>false</SuppressStartupBanner>
Expand All @@ -173,7 +173,7 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Pathcch.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>wbemuuid.lib;Pathcch.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Manifest>
<SuppressStartupBanner>false</SuppressStartupBanner>
Expand All @@ -194,12 +194,13 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Pathcch.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>wbemuuid.lib;Pathcch.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Manifest>
<SuppressStartupBanner>false</SuppressStartupBanner>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
<AdditionalManifestFiles>PiMon.exe.manifest</AdditionalManifestFiles>
<AdditionalManifestFiles>
</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
Expand All @@ -219,7 +220,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Pathcch.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>wbemuuid.lib;Pathcch.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Manifest>
<SuppressStartupBanner>false</SuppressStartupBanner>
Expand All @@ -244,7 +245,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Pathcch.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>wbemuuid.lib;Pathcch.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Manifest>
<SuppressStartupBanner>false</SuppressStartupBanner>
Expand All @@ -269,7 +270,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Pathcch.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>wbemuuid.lib;Pathcch.lib;comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Manifest>
<SuppressStartupBanner>false</SuppressStartupBanner>
Expand All @@ -279,31 +280,31 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="listview.h" />
<ClInclude Include="mailbox.h" />
<ClInclude Include="reg.h" />
<ClInclude Include="data.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="rpiq.h" />
<ClInclude Include="setting.h" />
<ClInclude Include="tray.h" />
<ClInclude Include="utils.h" />
<ClInclude Include="version.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="listview.c" />
<ClCompile Include="mailbox.c" />
<ClCompile Include="data.c" />
<ClCompile Include="main.c" />
<ClCompile Include="reg.c" />
<ClCompile Include="setting.c" />
<ClCompile Include="tray.c" />
<ClCompile Include="utils.c" />
</ItemGroup>
<ItemGroup>
<Manifest Include="PiMon.exe.manifest" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="PiMon.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="icon.ico" />
</ItemGroup>
<ItemGroup>
<Manifest Include="PiMon.exe.manifest" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
26 changes: 13 additions & 13 deletions src/PiMon.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@
<ClInclude Include="rpiq.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="mailbox.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="listview.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="reg.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="tray.h">
<Filter>头文件</Filter>
</ClInclude>
Expand All @@ -39,6 +33,12 @@
<ClInclude Include="version.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="data.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="setting.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.c">
Expand All @@ -50,13 +50,13 @@
<ClCompile Include="utils.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="reg.c">
<ClCompile Include="listview.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="mailbox.c">
<ClCompile Include="data.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="listview.c">
<ClCompile Include="setting.c">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
Expand All @@ -66,13 +66,13 @@
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Manifest Include="PiMon.exe.manifest">
<Image Include="icon.ico">
<Filter>资源文件</Filter>
</Manifest>
</Image>
</ItemGroup>
<ItemGroup>
<Image Include="icon.ico">
<Manifest Include="PiMon.exe.manifest">
<Filter>资源文件</Filter>
</Image>
</Manifest>
</ItemGroup>
</Project>
Loading

0 comments on commit 6920f15

Please sign in to comment.