Associate with SWC extension

This commit is contained in:
Liushui
2026-01-16 16:43:49 +08:00
parent 57d4072b6a
commit ab4e7fe2d7
2 changed files with 17 additions and 1 deletions

View File

@@ -508,6 +508,10 @@ Section "$(STRING_ADD_CONTEXT_MENU)" SecContextMenu
Call AddToExtContextMenu
Push "gfx"
Call AddToExtContextMenu
Push "swt"
Call AddToExtContextMenu
Push "swc"
Call AddToExtContextMenu
SetRegView 32
Push "swf"
@@ -516,6 +520,10 @@ Section "$(STRING_ADD_CONTEXT_MENU)" SecContextMenu
Call AddToExtContextMenu
Push "gfx"
Call AddToExtContextMenu
Push "swt"
Call AddToExtContextMenu
Push "swc"
Call AddToExtContextMenu
${NotifyShell_AssocChanged}
SectionEnd
@@ -584,6 +592,10 @@ Section "Uninstall"
Call un.RemoveExtContextMenu
Push "gfx"
Call un.RemoveExtContextMenu
Push "swt"
Call un.RemoveExtContextMenu
Push "swc"
Call un.RemoveExtContextMenu
SetRegView 32
Push "swf"
@@ -592,6 +604,10 @@ Section "Uninstall"
Call un.RemoveExtContextMenu
Push "gfx"
Call un.RemoveExtContextMenu
Push "swt"
Call un.RemoveExtContextMenu
Push "swc"
Call un.RemoveExtContextMenu
${NotifyShell_AssocChanged}

View File

@@ -81,7 +81,7 @@ public class ContextMenuTools {
}
private static boolean addToContextMenu(boolean add, boolean fromCommandLine, String exeName) {
final String[] extensions = new String[]{"swf", "spl", "gfx", "swt"};
final String[] extensions = new String[]{"swf", "spl", "gfx", "swt", "swc"};
final WinReg.HKEY REG_CLASSES_HKEY = WinReg.HKEY_LOCAL_MACHINE;
final String REG_CLASSES_PATH = "Software\\Classes\\";