From 40d8f5b119fbb118d2d3a4c96d1f2ecc9d637ba8 Mon Sep 17 00:00:00 2001 From: ge0rdi Date: Sun, 30 Nov 2025 16:02:35 +0100 Subject: [PATCH 01/11] AppVeyor: New deployment token --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index a7d00344c..a9390d421 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,5 +21,5 @@ deploy: on: APPVEYOR_ACCOUNT_NAME: passionate-coder auth_token: - secure: SOu6Y71k0oIxXJR35x+7ZTrqDa3HqUM4kLNJc+DbohPz9zhVHh9O8QYwmI7LI0qslug5L11fo9pZVfVgZttw4eBgooHaX9TNBTTA6sJItkXqMX+M6mKAG7tbI/O3Eg0v + secure: SOu6Y71k0oIxXJR35x+7ZeU/+WRW8kaGnCWcbR3OVOd8HeCJwB1Tw3hUJa5EveLGKaGoMKGqAh01Pwc8tWX4xmphZsYYUr09IVjA0+rqgN5VT87CXD6OQxUxBJ7g+9IN prerelease: true From dd57854da129a78a6d65e6cc418b114069701824 Mon Sep 17 00:00:00 2001 From: ge0rdi Date: Fri, 12 Dec 2025 09:09:21 +0100 Subject: [PATCH 02/11] Scale custom button image according to current DPI (#2248) Fixes #2246 --- Src/Lib/ResourceHelper.cpp | 17 ++++++++++++++--- Src/Lib/ResourceHelper.h | 4 +++- Src/StartMenu/StartMenuDLL/StartButton.cpp | 4 ++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Src/Lib/ResourceHelper.cpp b/Src/Lib/ResourceHelper.cpp index 62a32fb8b..b7388a554 100644 --- a/Src/Lib/ResourceHelper.cpp +++ b/Src/Lib/ResourceHelper.cpp @@ -384,14 +384,14 @@ HICON CreateDisabledIcon( HICON hIcon, int iconSize ) } // Loads an image file into a bitmap and optionally resizes it -HBITMAP LoadImageFile( const wchar_t *path, const SIZE *pSize, bool bUseAlpha, bool bPremultiply, std::vector *pButtonAnim ) +HBITMAP LoadImageFile( const wchar_t *path, const SIZE *pSize, bool bUseAlpha, bool bPremultiply, std::vector *pButtonAnim, UINT dpi ) { HBITMAP srcBmp=NULL; if (_wcsicmp(PathFindExtension(path),L".bmp")==0) { srcBmp=(HBITMAP)LoadImage(NULL,path,IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION|LR_LOADFROMFILE); } - if (srcBmp && !pSize) + if (srcBmp && !pSize && !dpi) return srcBmp; CComPtr pFactory; if (FAILED(pFactory.CoCreateInstance(CLSID_WICImagingFactory))) @@ -482,6 +482,12 @@ HBITMAP LoadImageFile( const wchar_t *path, const SIZE *pSize, bool bUseAlpha, b else frameHeightD=frameWidthD*frameHeightS/frameWidthS; } + + if (dpi) + { + frameWidthD=ScaleForDpi(dpi,frameWidthD); + frameHeightD=ScaleForDpi(dpi,frameHeightD); + } } BITMAPINFO bi={0}; @@ -946,7 +952,12 @@ UINT GetDpi(HWND hwnd) return dpi; } +int ScaleForDpi(UINT dpi, int value) +{ + return MulDiv(value, dpi, USER_DEFAULT_SCREEN_DPI); +} + int ScaleForDpi(HWND hwnd, int value) { - return MulDiv(value, GetDpi(hwnd), USER_DEFAULT_SCREEN_DPI); + return ScaleForDpi(GetDpi(hwnd), value); } diff --git a/Src/Lib/ResourceHelper.h b/Src/Lib/ResourceHelper.h index d44eb6b59..5afc1d1dc 100644 --- a/Src/Lib/ResourceHelper.h +++ b/Src/Lib/ResourceHelper.h @@ -35,7 +35,7 @@ HICON ShExtractIcon( const char *path, int index, int iconSize ); HBITMAP BitmapFromIcon( HICON hIcon, int iconSize, unsigned int **pBits, bool bDestroyIcon ); // Loads an image file into a bitmap and optionally resizes it -HBITMAP LoadImageFile( const wchar_t *path, const SIZE *pSize, bool bUseAlpha, bool bPremultiply, std::vector *pButtonAnim ); +HBITMAP LoadImageFile( const wchar_t *path, const SIZE *pSize, bool bUseAlpha, bool bPremultiply, std::vector *pButtonAnim, UINT dpi=0 ); // Loads a bitmap from a IMAGE resource HBITMAP LoadImageResource( HMODULE hModule, const wchar_t *name, bool bTopDown, bool bPremultiply ); @@ -88,6 +88,8 @@ HFONT CreateFontSetting( const wchar_t *fontStr, int dpi ); // Return DPI of given window (or system DPI on older systems) UINT GetDpi(HWND hwnd = nullptr); +// Scale given value according to given DPI +int ScaleForDpi(UINT dpi, int value); // Scale given value according to DPI of window int ScaleForDpi(HWND hwnd, int value); diff --git a/Src/StartMenu/StartMenuDLL/StartButton.cpp b/Src/StartMenu/StartMenuDLL/StartButton.cpp index 39d07d419..f279fa10f 100644 --- a/Src/StartMenu/StartMenuDLL/StartButton.cpp +++ b/Src/StartMenu/StartMenuDLL/StartButton.cpp @@ -526,16 +526,16 @@ void CStartButton::LoadBitmap( void ) } else { + int dpi=GetDpi(GetParent()); bool bResource=false; std::vector buttonAnim; if (*path) { - m_Bitmap=LoadImageFile(path,&size,true,true,&buttonAnim); + m_Bitmap=LoadImageFile(path,&size,true,true,&buttonAnim,dpi); } if (!m_Bitmap) { int id; - int dpi=GetDpi(GetParent()); if (dpi<120) id=IDB_BUTTON96; else if (dpi<144) From e2758ec37688b00e55ba50ea3db0bba9abe66604 Mon Sep 17 00:00:00 2001 From: Anixx Date: Sat, 24 Jan 2026 12:26:25 +0200 Subject: [PATCH 03/11] Support for unthemed taskbar (#2369) * Support for unthemed taskbar See this discussion: https://github.com/Open-Shell/Open-Shell-Menu/discussions/2367 * Refactor color handling in StartMenuDLL --- Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp | 23 +++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp b/Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp index 9f26f2284..9111cb40c 100644 --- a/Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp +++ b/Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp @@ -1624,7 +1624,7 @@ static void ComputeTaskbarColors( int *data ) { bool bDefLook; int look=GetSettingInt(L"TaskbarLook",bDefLook); - if (GetWinVersion()bCustomLook && SetWindowCompositionAttribute && GetWinVersion()WIN_VER_WIN7) { - color=GetSystemGlassColor8(); - color=((color&0xFF)<<16)|(color&0xFF00)|((color>>16)&0xFF); + if (IsAppThemed()) + { + color=GetSystemGlassColor8(); + color=((color&0xFF)<<16)|(color&0xFF00)|((color>>16)&0xFF); + } + else + { + color=GetSysColor(COLOR_BTNFACE); + } } BITMAPINFO bi={0}; bi.bmiHeader.biSize=sizeof(BITMAPINFOHEADER); @@ -3012,7 +3020,10 @@ static void InitStartMenuDLL( void ) if (GetWinVersion()<=WIN_VER_WIN81) g_DrawThemeBackgroundHook=SetIatHook(module,"uxtheme.dll","DrawThemeBackground",DrawThemeBackground2); g_DrawThemeTextHook=SetIatHook(module,"uxtheme.dll","DrawThemeText",DrawThemeText2); - g_DrawThemeTextExHook=SetIatHook(module,"uxtheme.dll","DrawThemeTextEx",DrawThemeTextEx2); + if (IsAppThemed()) + { + g_DrawThemeTextExHook=SetIatHook(module,"uxtheme.dll","DrawThemeTextEx",DrawThemeTextEx2); + } g_DrawThemeTextCtlHook=SetIatHook(GetModuleHandle(L"comctl32.dll"),"uxtheme.dll","DrawThemeText",DrawThemeText2); if (GetWinVersion()>=WIN_VER_WIN10) g_SetWindowCompositionAttributeHook=SetIatHook(module,"user32.dll","SetWindowCompositionAttribute",SetWindowCompositionAttribute2); From 32ad90f17dadc2744da03d08ab6f4b28c361c3ea Mon Sep 17 00:00:00 2001 From: "Nicholas N." <51804513+nnyj@users.noreply.github.com> Date: Sat, 18 Apr 2026 21:18:23 +0800 Subject: [PATCH 04/11] Fix search auto-selecting wrong item before programs finish loading (#2451) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: defer auto-select until programs loaded to prevent wrong search result selection When search results refresh mid-collection, OnRefresh auto-selects the first result item. If programs haven't loaded yet, Settings category appears first and gets selected. If user hits Enter in that window, wrong item launches. Skip auto-select when search is still in progress and no programs have been found yet. Next refresh after programs load will select correctly. Fixes Open-Shell/Open-Shell-Menu#456 Fixes Open-Shell/Open-Shell-Menu#1982 Fixes Open-Shell/Open-Shell-Menu#4 > 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude --- Src/StartMenu/StartMenuDLL/MenuContainer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Src/StartMenu/StartMenuDLL/MenuContainer.cpp b/Src/StartMenu/StartMenuDLL/MenuContainer.cpp index 52ed2c738..856ead1e4 100644 --- a/Src/StartMenu/StartMenuDLL/MenuContainer.cpp +++ b/Src/StartMenu/StartMenuDLL/MenuContainer.cpp @@ -6366,7 +6366,10 @@ LRESULT CMenuContainer::OnRefresh( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL } } else if (m_Items[m_OriginalCount].id==MENU_SEARCH_CATEGORY) - hotItem=m_OriginalCount+1; + { + if (!bSearching || !s_SearchResults.programs.empty()) + hotItem=m_OriginalCount+1; + } } else hotItem=-1; From 7566280973d46fb7e81efdd94f528b65ab5db085 Mon Sep 17 00:00:00 2001 From: coolvitto <160416811+coolvitto@users.noreply.github.com> Date: Tue, 12 May 2026 02:24:28 +0900 Subject: [PATCH 05/11] Update font face names in Japanese localization (#2409) --- Src/Localization/WixUI/WixUI_ja-jp.wxl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Localization/WixUI/WixUI_ja-jp.wxl b/Src/Localization/WixUI/WixUI_ja-jp.wxl index f6e5e4faf..5487b6ccf 100644 --- a/Src/Localization/WixUI/WixUI_ja-jp.wxl +++ b/Src/Localization/WixUI/WixUI_ja-jp.wxl @@ -31,7 +31,7 @@ 12 9 8 - "MS UI Gothic", "MS PGothic", "ï¼­ï¼³ Pゴシック", "MS Gothic", "ï¼­ï¼³ ゴシック", Osaka, Tahoma + "MS UI Gothic", "MS PGothic", "ï¼­ï¼³ Pゴシック", "MS Gothic", "ï¼­ï¼³ ゴシック", Yu Gothic UI, Tahoma [ProductName] セットアップ 場所(&L): From b2070640ffbe047791de25f83063fb62bbc7d22f Mon Sep 17 00:00:00 2001 From: ge0rdi Date: Tue, 12 May 2026 21:12:51 +0200 Subject: [PATCH 06/11] Fix open/save file dialog getting stuck after Windows 11 update (#2457) We will run those APIs on separate STA thread and pump messages while waiting for the dialog to end. fixes #2431 fixes #2426 fixes #2418 fixes #2417 fixes #2390 fixes #2372 fixes #2371 fixes #2370 fixes #2364 fixes #2361 fixes #2360 fixes #2343 fixes #2332 fixes #2322 fixes #2320 fixes #2319 fixes #2312 fixes #2299 --- Src/Lib/Settings.cpp | 4 +- Src/Lib/SettingsUIHelper.cpp | 93 ++++++++++++++++++++++++++++++++++-- Src/Lib/SettingsUIHelper.h | 4 ++ 3 files changed, 94 insertions(+), 7 deletions(-) diff --git a/Src/Lib/Settings.cpp b/Src/Lib/Settings.cpp index 8937d4c39..599cb9fed 100644 --- a/Src/Lib/Settings.cpp +++ b/Src/Lib/Settings.cpp @@ -1670,7 +1670,7 @@ LRESULT CSettingsDlg::OnBackup( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& ofn.lpstrTitle=title; ofn.lpstrDefExt=L".xml"; ofn.Flags=OFN_DONTADDTORECENT|OFN_ENABLESIZING|OFN_EXPLORER|OFN_PATHMUSTEXIST|OFN_OVERWRITEPROMPT|OFN_HIDEREADONLY|OFN_NOCHANGEDIR; - if (GetSaveFileName(&ofn)) + if (GetSaveFileNameSafe(&ofn)) { CString err=g_SettingsManager.SaveSettingsXml(path); if (!err.IsEmpty()) @@ -1699,7 +1699,7 @@ LRESULT CSettingsDlg::OnBackup( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& CString title=LoadStringEx(IDS_XML_TITLE_LOAD); ofn.lpstrTitle=title; ofn.Flags=OFN_DONTADDTORECENT|OFN_ENABLESIZING|OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_NOCHANGEDIR; - if (GetOpenFileName(&ofn)) + if (GetOpenFileNameSafe(&ofn)) { SetCurTab(m_Index,true); // reload tab once to force-close any active edit boxes CString error=g_SettingsManager.LoadSettingsXml(path); diff --git a/Src/Lib/SettingsUIHelper.cpp b/Src/Lib/SettingsUIHelper.cpp index 9372677c5..9b988e282 100644 --- a/Src/Lib/SettingsUIHelper.cpp +++ b/Src/Lib/SettingsUIHelper.cpp @@ -15,6 +15,7 @@ #include #include #include +#include const KNOWNFOLDERID FOLDERID_DesktopRoot={'DESK', 'TO', 'P', {'D', 'E', 'S', 'K', 'T', 'O', 'P', 0x00}}; @@ -1193,7 +1194,7 @@ bool BrowseCommandHelper( HWND parent, wchar_t *text ) ofn.lpstrFile=text; ofn.nMaxFile=_MAX_PATH; ofn.Flags=OFN_DONTADDTORECENT|OFN_ENABLESIZING|OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_NOCHANGEDIR|OFN_NODEREFERENCELINKS; - if (GetOpenFileName(&ofn)) + if (GetOpenFileNameSafe(&ofn)) { wchar_t buf[_MAX_PATH]; UnExpandEnvStrings(text,buf,_countof(buf)); @@ -1216,7 +1217,8 @@ bool BrowseCommandHelper( HWND parent, wchar_t *text ) return false; } -bool BrowseLinkHelper( HWND parent, wchar_t *text, bool bFoldersOnly ) +// Internal implementation that must be run on an STA thread with COM initialized. +static bool BrowseLinkHelperImpl( HWND parent, wchar_t *text, bool bFoldersOnly ) { DoEnvironmentSubst(text,_MAX_PATH); @@ -1276,6 +1278,41 @@ bool BrowseLinkHelper( HWND parent, wchar_t *text, bool bFoldersOnly ) return pResult!=NULL; } +// Run IFileOpenDialog on a separate STA thread and pump messages on the caller while waiting. +bool BrowseLinkHelper( HWND parent, wchar_t *text, bool bFoldersOnly ) +{ + bool result = false; + + std::thread worker([&parent, &text, &bFoldersOnly, &result]() mutable { + CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + result = BrowseLinkHelperImpl(parent, text, bFoldersOnly); + CoUninitialize(); + }); + + // Pump messages while waiting for the worker (dialog) to finish + while (true) + { + HANDLE hWorker = worker.native_handle(); + if (MsgWaitForMultipleObjects(1, &hWorker, FALSE, INFINITE, QS_ALLINPUT) == WAIT_OBJECT_0) + break; + + MSG msg; + while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { + if (msg.message == WM_QUIT) + { + PostQuitMessage((int)msg.wParam); + break; + } + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } + worker.join(); + + return result; +} + bool BrowseIconHelper( HWND parent, wchar_t *text ) { int id=0; @@ -2011,7 +2048,7 @@ LRESULT CBrowseForIconDlg::OnBrowse( WORD wNotifyCode, WORD wID, HWND hWndCtl, B CString title=LoadStringEx(IDS_ICON_TITLE); ofn.lpstrTitle=title; ofn.Flags=OFN_DONTADDTORECENT|OFN_ENABLESIZING|OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_NOCHANGEDIR; - if (GetOpenFileName(&ofn)) + if (GetOpenFileNameSafe(&ofn)) { wchar_t buf[_MAX_PATH]; UnExpandEnvStrings(path,buf,_countof(buf)); @@ -2210,7 +2247,7 @@ bool BrowseForBitmap( HWND hWndParent, wchar_t *path, bool bAllowJpeg ) CString title=LoadStringEx(IDS_BMP_TITLE); ofn.lpstrTitle=title; ofn.Flags=OFN_DONTADDTORECENT|OFN_ENABLESIZING|OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_NOCHANGEDIR; - if (GetOpenFileName(&ofn)) + if (GetOpenFileNameSafe(&ofn)) { wchar_t buf[_MAX_PATH]; UnExpandEnvStrings(path,buf,_countof(buf)); @@ -2242,7 +2279,7 @@ bool BrowseForSound( HWND hWndParent, wchar_t *path ) CString title=LoadStringEx(IDS_WAV_TITLE); ofn.lpstrTitle=title; ofn.Flags=OFN_DONTADDTORECENT|OFN_ENABLESIZING|OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_NOCHANGEDIR; - if (GetOpenFileName(&ofn)) + if (GetOpenFileNameSafe(&ofn)) { wchar_t buf[_MAX_PATH]; UnExpandEnvStrings(path,buf,_countof(buf)); @@ -3630,3 +3667,49 @@ DWORD ParseColor(const wchar_t* str) wchar_t* end; return wcstoul(str, &end, 16) & 0xFFFFFF; } + +// Run GetOpenFileName/GetSaveFileName on a separate STA thread and pump messages on the caller +template +static BOOL GetFileNameSafe(OPENFILENAME* pOfn) +{ + BOOL result = FALSE; + + std::thread worker([&pOfn, &result]() mutable { + CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + result = Fnc(pOfn); + CoUninitialize(); + }); + + // Pump messages while waiting for the worker (dialog) to finish + while (true) + { + HANDLE hWorker = worker.native_handle(); + if (MsgWaitForMultipleObjects(1, &hWorker, FALSE, INFINITE, QS_ALLINPUT) == WAIT_OBJECT_0) + break; + + MSG msg; + while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { + if (msg.message == WM_QUIT) + { + PostQuitMessage((int)msg.wParam); + break; + } + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } + worker.join(); + + return result; +} + +BOOL GetOpenFileNameSafe(OPENFILENAME* pOfn) +{ + return GetFileNameSafe(pOfn); +} + +BOOL GetSaveFileNameSafe(OPENFILENAME* pOfn) +{ + return GetFileNameSafe(pOfn); +} diff --git a/Src/Lib/SettingsUIHelper.h b/Src/Lib/SettingsUIHelper.h index acdea3f63..8a66f72c3 100644 --- a/Src/Lib/SettingsUIHelper.h +++ b/Src/Lib/SettingsUIHelper.h @@ -395,3 +395,7 @@ DWORD BgrToRgb(DWORD val); // parse color from hexadecimal string DWORD ParseColor(const wchar_t* str); + +// safe versions of GetOpenFileName/GetSaveFileName (run API on a separate STA thread and pump messages on the caller) +BOOL GetOpenFileNameSafe(OPENFILENAME* pOfn); +BOOL GetSaveFileNameSafe(OPENFILENAME* pOfn); From dfb307b3b71d8fee7811bbe6c7b6ca9f7eddd5d8 Mon Sep 17 00:00:00 2001 From: ge0rdi Date: Wed, 13 May 2026 20:07:54 +0200 Subject: [PATCH 07/11] Fix C++23 warnings warning C5333: backslash and newline separated by space is treated as a line continuation in C++23 and later --- Src/StartMenu/StartMenuDLL/ItemManager.h | 2 +- Src/StartMenu/StartMenuHelper/StartMenuExt.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Src/StartMenu/StartMenuDLL/ItemManager.h b/Src/StartMenu/StartMenuDLL/ItemManager.h index 0c273b6ca..e10775bdf 100644 --- a/Src/StartMenu/StartMenuDLL/ItemManager.h +++ b/Src/StartMenu/StartMenuDLL/ItemManager.h @@ -383,7 +383,7 @@ class CItemManager static DWORD CALLBACK StaticRefreshInfoThread( void *param ); static DWORD CALLBACK SaveCacheFileThread( void *param ); - // all paths are in caps and end with \ + // all paths are in caps and end with backslash CString m_RootStartMenu1; CString m_RootStartMenu2; CString m_RootStartMenu3; diff --git a/Src/StartMenu/StartMenuHelper/StartMenuExt.h b/Src/StartMenu/StartMenuHelper/StartMenuExt.h index f7f11aa75..8ad501941 100644 --- a/Src/StartMenu/StartMenuHelper/StartMenuExt.h +++ b/Src/StartMenu/StartMenuHelper/StartMenuExt.h @@ -55,8 +55,8 @@ END_COM_MAP() STDMETHODIMP InvokeCommand( CMINVOKECOMMANDINFO *pInfo ); STDMETHODIMP GetCommandString( UINT_PTR idCmd, UINT uFlags, UINT* pwReserved, LPSTR pszName, UINT cchMax ); - wchar_t m_PinFolder1[_MAX_PATH]; // ending with \ - wchar_t m_PinFolder2[_MAX_PATH]; // ending with \ + wchar_t m_PinFolder1[_MAX_PATH]; // ending with backslash + wchar_t m_PinFolder2[_MAX_PATH]; // ending with backslash wchar_t m_FileName[_MAX_PATH]; LPITEMIDLIST m_FilePidl; bool m_bInPinFolder1, m_bInPinFolder2; From f5fa8f0ea31ace15d7c027bebabab6900e8a8a51 Mon Sep 17 00:00:00 2001 From: ge0rdi Date: Sat, 16 May 2026 08:19:20 +0200 Subject: [PATCH 08/11] Add github build workflow --- .github/workflows/build.yml | 94 +++++++++++++++++++++++++++++++++++++ Src/Setup/BuildArchives.bat | 2 + 2 files changed, 96 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..77c4edfd5 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,94 @@ +name: Build + +permissions: + contents: read # Default to secure + +on: + pull_request: + branches: + - master + paths: + - 'Src/**' + - 'Localization/**' + - '.github/workflows/build.yml' + + workflow_dispatch: # allows manual trigger for main/master + +jobs: + build: + runs-on: windows-2022 + outputs: + new_version: ${{ steps.versioning.outputs.NEW_VERSION }} + steps: + - name: Checkout code + uses: actions/checkout@v6 + with: + fetch-depth: 0 # Essential to see all tags + + - name: Prepare version + id: versioning + shell: pwsh + run: | + # Fetch latest tag + $latestTag = git describe --tags --abbrev=0 2>$null + + if ($latestTag -notmatch '^v\d+\.\d+\.\d+$') { + Write-Error "Error: Could not find a valid vX.Y.Z tag in history. Found: '$latestTag'" + exit 1 + } + + # Parse and Increment + $version = [version]$latestTag.Substring(1) + $baseVersion = "$($version.Major).$($version.Minor).$($version.Build + 1)" + + # Handle PR Suffix + if ("${{ github.event_name }}" -eq "pull_request") { + $shortSha = "${{ github.event.pull_request.head.sha }}".Substring(0, 7) + $finalVersion = "$baseVersion-pr-$shortSha" + } else { + $finalVersion = $baseVersion + } + + # Export + "NEW_VERSION=$finalVersion" | Out-File -FilePath $env:GITHUB_OUTPUT -Append + Write-Host "Building version: $finalVersion" + + - name: Build + shell: cmd + env: + APPVEYOR_BUILD_VERSION: ${{ steps.versioning.outputs.NEW_VERSION }} + run: Src\Setup\__MakeFinal.bat + + - name: Upload artifacts + uses: actions/upload-artifact@v7 + with: + name: OpenShell + path: | + Src/Setup/Final/ + !Src/Setup/Final/OpenShellLoc.zip + + release: + if: github.event_name == 'workflow_dispatch' # Only manual master builds + needs: build + runs-on: ubuntu-latest # Cheaper/faster than windows for just uploading + permissions: + contents: write # Elevate permissions ONLY for this job + steps: + - name: Download artifacts + uses: actions/download-artifact@v8 + with: + name: OpenShell + + - name: Create GitHub Release + uses: softprops/action-gh-release@v3 + with: + tag_name: v${{ needs.build.outputs.new_version }} + name: ${{ needs.build.outputs.new_version }} + generate_release_notes: true + prerelease: true + files: | + OpenShellSetup*.exe + OpenShellSymbols_*.7z + Utility.exe + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Src/Setup/BuildArchives.bat b/Src/Setup/BuildArchives.bat index 1e6339f95..b3000d7fd 100644 --- a/Src/Setup/BuildArchives.bat +++ b/Src/Setup/BuildArchives.bat @@ -20,6 +20,8 @@ cd .. cd Setup +copy /B ..\..\build\bin\Release\Utility.exe .\Final > nul + if defined APPVEYOR ( appveyor PushArtifact ..\..\build\bin\Release\Utility.exe ) From 7baba47baf0f2e550f888df4c856b5240269e12a Mon Sep 17 00:00:00 2001 From: ge0rdi Date: Sat, 16 May 2026 08:27:14 +0200 Subject: [PATCH 09/11] Add github build badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6597b57a2..f05fed121 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A collection of utilities bringing back classic features to Windows. *Originally* **[Classic Shell](http://www.classicshell.net)** *by [Ivo Beltchev](https://sourceforge.net/u/ibeltchev/profile/)* -[![GitHub Release](https://img.shields.io/github/release/Open-Shell/Open-Shell-Menu.svg?style=flat-square)](https://github.com/Open-Shell/Open-Shell-Menu/releases/latest)  [![GitHub Pre-Release](https://img.shields.io/github/release/Open-Shell/Open-Shell-Menu/all.svg?style=flat-square)](https://github.com/Open-Shell/Open-Shell-Menu/releases)  [![Build status](https://img.shields.io/appveyor/build/passionate-coder/Open-Shell-Menu?logo=appveyor&style=flat-square)](https://ci.appveyor.com/project/passionate-coder/open-shell-menu/branch/master)  [![GitQ](https://img.shields.io/badge/gitq-discussions-1577fa?style=flat-square)](https://gitq.com/passionate-coder/Classic-Start)  [![Gitter chat](https://img.shields.io/gitter/room/badges/shields.svg?color=lightseagreen&logo=gitter&style=flat-square)](https://gitter.im/open-shell/Lobby)  [![Discord](https://img.shields.io/discord/757701054782636082?color=mediumslateblue&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/7H6arr5) +[![GitHub Release](https://img.shields.io/github/release/Open-Shell/Open-Shell-Menu.svg?style=flat-square)](https://github.com/Open-Shell/Open-Shell-Menu/releases/latest)  [![GitHub Pre-Release](https://img.shields.io/github/release/Open-Shell/Open-Shell-Menu/all.svg?style=flat-square)](https://github.com/Open-Shell/Open-Shell-Menu/releases)  [![Build](https://github.com/Open-Shell/Open-Shell-Menu/actions/workflows/build.yml/badge.svg)](https://github.com/Open-Shell/Open-Shell-Menu/actions/workflows/build.yml)  [![Build status](https://img.shields.io/appveyor/build/passionate-coder/Open-Shell-Menu?logo=appveyor&style=flat-square)](https://ci.appveyor.com/project/passionate-coder/open-shell-menu/branch/master)  [![GitQ](https://img.shields.io/badge/gitq-discussions-1577fa?style=flat-square)](https://gitq.com/passionate-coder/Classic-Start)  [![Gitter chat](https://img.shields.io/gitter/room/badges/shields.svg?color=lightseagreen&logo=gitter&style=flat-square)](https://gitter.im/open-shell/Lobby)  [![Discord](https://img.shields.io/discord/757701054782636082?color=mediumslateblue&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/7H6arr5) [Open-Shell Homepage](https://open-shell.github.io/Open-Shell-Menu) From f15a0fbd759764f19d58beb547795d557c7b86d0 Mon Sep 17 00:00:00 2001 From: ge0rdi Date: Fri, 29 May 2026 20:09:03 +0200 Subject: [PATCH 10/11] Adjust wording of IDS_STARTSCREEN_ITEM Fixes #2472 --- Src/StartMenu/StartMenuDLL/StartMenuDLL.rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/StartMenu/StartMenuDLL/StartMenuDLL.rc b/Src/StartMenu/StartMenuDLL/StartMenuDLL.rc index b7007ee1e..fbaf3e9a2 100644 --- a/Src/StartMenu/StartMenuDLL/StartMenuDLL.rc +++ b/Src/StartMenu/StartMenuDLL/StartMenuDLL.rc @@ -1081,9 +1081,9 @@ BEGIN IDS_RIGHT_SHIFT_TIP "When this is checked, right-click on the start button will open the standard Windows context menu instead of the Open-Shell menu. Otherwise Shift+right-click will open it" IDS_RIGHT_SHIFTX "Right click opens Win+X menu" IDS_RIGHT_SHIFTX_TIP "When this is checked, right-click on the start button will open the Win+X power menu instead of the Open-Shell menu. Otherwise Shift+right-click will open it" - IDS_STARTSCREEN_ITEM "Show Start screen shortcut" + IDS_STARTSCREEN_ITEM "Show Start Menu/Screen shortcut" IDS_STARTSCREEN_ITEM_TIP - "When this is checked, the main menu will contain a shortcut to open the Start screen" + "When this is checked, the main menu will contain a shortcut to open original Start menu/screen" IDS_MIN_HEIGHT "Minimum menu height" IDS_MIN_HEIGHT_TIP "The main menu will be at least as tall as this many search results" IDS_GLASS_OVERRIDE "Override glass color" From 9518c3b6503c2ae64d2aecab7a04ef79b6d904e9 Mon Sep 17 00:00:00 2001 From: ge0rdi Date: Sat, 30 May 2026 22:00:09 +0200 Subject: [PATCH 11/11] Make sure to run `release` step only on manual builds from master --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 77c4edfd5..f6b1819bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,7 +68,7 @@ jobs: !Src/Setup/Final/OpenShellLoc.zip release: - if: github.event_name == 'workflow_dispatch' # Only manual master builds + if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master' # Only manual master builds needs: build runs-on: ubuntu-latest # Cheaper/faster than windows for just uploading permissions: