mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-02-06 09:30:20 +00:00
WOZ: Register .woz extension and improved logging for all extensions. Also updated DELREG.INF and help. (Fixes #671)
This commit is contained in:
parent
f87ccb7d2f
commit
7987883847
@ -8,11 +8,11 @@ DelReg=RegChange
|
|||||||
DelReg=RegChange
|
DelReg=RegChange
|
||||||
|
|
||||||
[RegChange]
|
[RegChange]
|
||||||
HKCR,.bin
|
|
||||||
HKCR,.do
|
HKCR,.do
|
||||||
HKCR,.dsk
|
HKCR,.dsk
|
||||||
HKCR,.nib
|
HKCR,.nib
|
||||||
HKCR,.po
|
HKCR,.po
|
||||||
|
HKCR,.woz
|
||||||
HKCR,DiskImage
|
HKCR,DiskImage
|
||||||
HKCU,Software\AppleWin
|
HKCU,Software\AppleWin
|
||||||
HKLM,Software\AppleWin
|
HKLM,Software\AppleWin
|
||||||
|
@ -15,16 +15,16 @@
|
|||||||
Disk Images</h2>
|
Disk Images</h2>
|
||||||
|
|
||||||
<hr size="4">
|
<hr size="4">
|
||||||
<p>AppleWin registers the
|
<p>AppleWin registers<sub style="FONT-WEIGHT: bold">1</sub> the
|
||||||
following file types as "Disk
|
following file types as "Disk
|
||||||
Images": *.do, *.dsk, *.nib, and *.po. Double-clicking
|
Images": *.do, *.dsk, *.nib, *.po and *.woz. Double-clicking
|
||||||
a disk image in the Windows Explorer will automatically load and boot
|
a disk image in Windows Explorer will automatically load and boot
|
||||||
the disk.
|
the disk.
|
||||||
While older versions of
|
While older versions of
|
||||||
AppleWin started a new
|
AppleWin started a new
|
||||||
instance of the emulator for every disk started in this manner, current
|
instance of the emulator for every disk started in this manner, current
|
||||||
versions
|
versions
|
||||||
of the emulator will simply replace the current disk if there is an
|
of the emulator will simply replace the current disk (and reboot) if there is an
|
||||||
instance of
|
instance of
|
||||||
the emulator already running.</p>
|
the emulator already running.</p>
|
||||||
|
|
||||||
@ -49,5 +49,9 @@ long to read in the Toolbar,
|
|||||||
simply pause the mouse cursor over a drive button to get a
|
simply pause the mouse cursor over a drive button to get a
|
||||||
tool-tip with the full name.</p>
|
tool-tip with the full name.</p>
|
||||||
|
|
||||||
|
<p><sub style="FONT-WEIGHT: bold">1</sub> To register the file types in Windows Vista, Windows 7 and Windows 10,
|
||||||
|
you will need to run AppleWin with elevated privileges. This only needs to be done once.
|
||||||
|
Right click the AppleWin.exe icon and select 'Run as Administrator'.</p>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -773,11 +773,6 @@ bool SetCurrentImageDir(const char* pszImageDir)
|
|||||||
|
|
||||||
// TODO: Added dialog option of which file extensions to registry
|
// TODO: Added dialog option of which file extensions to registry
|
||||||
static bool g_bRegisterFileTypes = true;
|
static bool g_bRegisterFileTypes = true;
|
||||||
//static bool g_bRegistryFileBin = false;
|
|
||||||
static bool g_bRegistryFileDo = true;
|
|
||||||
static bool g_bRegistryFileDsk = true;
|
|
||||||
static bool g_bRegistryFileNib = true;
|
|
||||||
static bool g_bRegistryFilePo = true;
|
|
||||||
|
|
||||||
|
|
||||||
void RegisterExtensions(void)
|
void RegisterExtensions(void)
|
||||||
@ -785,14 +780,6 @@ void RegisterExtensions(void)
|
|||||||
TCHAR szCommandTmp[MAX_PATH];
|
TCHAR szCommandTmp[MAX_PATH];
|
||||||
GetModuleFileName((HMODULE)0,szCommandTmp,MAX_PATH);
|
GetModuleFileName((HMODULE)0,szCommandTmp,MAX_PATH);
|
||||||
|
|
||||||
#ifdef TEST_REG_BUG
|
|
||||||
TCHAR command[MAX_PATH];
|
|
||||||
wsprintf(command, "%s", szCommandTmp); // Wrap path & filename in quotes & null terminate
|
|
||||||
|
|
||||||
TCHAR icon[MAX_PATH];
|
|
||||||
wsprintf(icon,TEXT("\"%s,1\""),(LPCTSTR)command);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
TCHAR command[MAX_PATH];
|
TCHAR command[MAX_PATH];
|
||||||
wsprintf(command, "\"%s\"", szCommandTmp); // Wrap path & filename in quotes & null terminate
|
wsprintf(command, "\"%s\"", szCommandTmp); // Wrap path & filename in quotes & null terminate
|
||||||
|
|
||||||
@ -803,46 +790,80 @@ void RegisterExtensions(void)
|
|||||||
// _tcscat(command,TEXT("-d1 %1\"")); // Append "%1"
|
// _tcscat(command,TEXT("-d1 %1\"")); // Append "%1"
|
||||||
// sprintf(command, "\"%s\" \"-d1 %%1\"", szCommandTmp); // Wrap path & filename in quotes & null terminate
|
// sprintf(command, "\"%s\" \"-d1 %%1\"", szCommandTmp); // Wrap path & filename in quotes & null terminate
|
||||||
|
|
||||||
|
// NB. Registry access to HKLM typically results in ErrorCode 5(ACCESS DENIED), as UAC requires elevated permissions (Run as administrator).
|
||||||
|
// . HKEY_CLASSES_ROOT\CLSID is a merged view of HKLM\SOFTWARE\Classes and HKCU\SOFTWARE\Classes
|
||||||
|
|
||||||
// NB. Reflect extensions in DELREG.INF
|
// NB. Reflect extensions in DELREG.INF
|
||||||
// RegSetValue(HKEY_CLASSES_ROOT,".bin",REG_SZ,"DiskImage",0); // Removed as .bin is too generic
|
// RegSetValue(HKEY_CLASSES_ROOT,".bin",REG_SZ,"DiskImage",0); // Removed as .bin is too generic
|
||||||
long Res = RegDeleteValue(HKEY_CLASSES_ROOT, ".bin"); // TODO: This isn't working :-/
|
|
||||||
|
|
||||||
RegSetValue(HKEY_CLASSES_ROOT,".do" ,REG_SZ,"DiskImage",0);
|
const char* pValueName = ".bin";
|
||||||
RegSetValue(HKEY_CLASSES_ROOT,".dsk",REG_SZ,"DiskImage",0);
|
LSTATUS res = RegDeleteValue(HKEY_CLASSES_ROOT, pValueName);
|
||||||
RegSetValue(HKEY_CLASSES_ROOT,".nib",REG_SZ,"DiskImage",0);
|
if (res != NOERROR && res != ERROR_FILE_NOT_FOUND) LogFileOutput("RegDeleteValue(%s) failed (0x%08X)\n", pValueName, res);
|
||||||
RegSetValue(HKEY_CLASSES_ROOT,".po" ,REG_SZ,"DiskImage",0);
|
|
||||||
|
pValueName = ".do";
|
||||||
|
res = RegSetValue(HKEY_CLASSES_ROOT, pValueName ,REG_SZ,"DiskImage",0);
|
||||||
|
if (res != NOERROR) LogFileOutput("RegSetValue(%s) failed (0x%08X)\n", pValueName, res);
|
||||||
|
|
||||||
|
pValueName = ".dsk";
|
||||||
|
res = RegSetValue(HKEY_CLASSES_ROOT, pValueName, REG_SZ,"DiskImage",0);
|
||||||
|
if (res != NOERROR) LogFileOutput("RegSetValue(%s) failed (0x%08X)\n", pValueName, res);
|
||||||
|
|
||||||
|
pValueName = ".nib";
|
||||||
|
res = RegSetValue(HKEY_CLASSES_ROOT, pValueName, REG_SZ,"DiskImage",0);
|
||||||
|
if (res != NOERROR) LogFileOutput("RegSetValue(%s) failed (0x%08X)\n", pValueName, res);
|
||||||
|
|
||||||
|
pValueName = ".po";
|
||||||
|
res = RegSetValue(HKEY_CLASSES_ROOT, pValueName, REG_SZ,"DiskImage",0);
|
||||||
|
if (res != NOERROR) LogFileOutput("RegSetValue(%s) failed (0x%08X)\n", pValueName, res);
|
||||||
|
|
||||||
|
pValueName = ".woz";
|
||||||
|
res = RegSetValue(HKEY_CLASSES_ROOT, pValueName, REG_SZ,"DiskImage",0);
|
||||||
|
if (res != NOERROR) LogFileOutput("RegSetValue(%s) failed (0x%08X)\n", pValueName, res);
|
||||||
|
|
||||||
// RegSetValue(HKEY_CLASSES_ROOT,".2mg",REG_SZ,"DiskImage",0); // Don't grab this, as not all .2mg images are supported (so defer to CiderPress)
|
// RegSetValue(HKEY_CLASSES_ROOT,".2mg",REG_SZ,"DiskImage",0); // Don't grab this, as not all .2mg images are supported (so defer to CiderPress)
|
||||||
// RegSetValue(HKEY_CLASSES_ROOT,".2img",REG_SZ,"DiskImage",0); // Don't grab this, as not all .2mg images are supported (so defer to CiderPress)
|
// RegSetValue(HKEY_CLASSES_ROOT,".2img",REG_SZ,"DiskImage",0); // Don't grab this, as not all .2mg images are supported (so defer to CiderPress)
|
||||||
// RegSetValue(HKEY_CLASSES_ROOT,".aws",REG_SZ,"DiskImage",0); // TO DO
|
// RegSetValue(HKEY_CLASSES_ROOT,".aws.yaml",REG_SZ,"DiskImage",0); // NB. Can't grab this extension (even though it returns 0!) with embedded period (and .yaml is too generic) - GH#548
|
||||||
// RegSetValue(HKEY_CLASSES_ROOT,".hdv",REG_SZ,"DiskImage",0); // TO DO
|
// RegSetValue(HKEY_CLASSES_ROOT,".hdv",REG_SZ,"DiskImage",0); // TO DO
|
||||||
|
|
||||||
RegSetValue(HKEY_CLASSES_ROOT,
|
pValueName = "DiskImage";
|
||||||
"DiskImage",
|
res = RegSetValue(HKEY_CLASSES_ROOT,
|
||||||
|
pValueName,
|
||||||
REG_SZ,"Disk Image",0);
|
REG_SZ,"Disk Image",0);
|
||||||
|
if (res != NOERROR) LogFileOutput("RegSetValue(%s) failed (0x%08X)\n", pValueName, res);
|
||||||
|
|
||||||
RegSetValue(HKEY_CLASSES_ROOT,
|
pValueName = "DiskImage\\DefaultIcon";
|
||||||
"DiskImage\\DefaultIcon",
|
res = RegSetValue(HKEY_CLASSES_ROOT,
|
||||||
|
pValueName,
|
||||||
REG_SZ,icon,0);
|
REG_SZ,icon,0);
|
||||||
|
if (res != NOERROR) LogFileOutput("RegSetValue(%s) failed (0x%08X)\n", pValueName, res);
|
||||||
|
|
||||||
// This key can interfere....
|
// This key can interfere....
|
||||||
// HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExt\.dsk
|
// HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExt\.dsk
|
||||||
|
|
||||||
RegSetValue(HKEY_CLASSES_ROOT,
|
pValueName = "DiskImage\\shell\\open\\command";
|
||||||
"DiskImage\\shell\\open\\command",
|
res = RegSetValue(HKEY_CLASSES_ROOT,
|
||||||
|
pValueName,
|
||||||
REG_SZ,command,_tcslen(command)+1);
|
REG_SZ,command,_tcslen(command)+1);
|
||||||
|
if (res != NOERROR) LogFileOutput("RegSetValue(%s) failed (0x%08X)\n", pValueName, res);
|
||||||
|
|
||||||
RegSetValue(HKEY_CLASSES_ROOT,
|
pValueName = "DiskImage\\shell\\open\\ddeexec";
|
||||||
"DiskImage\\shell\\open\\ddeexec",
|
res = RegSetValue(HKEY_CLASSES_ROOT,
|
||||||
|
pValueName,
|
||||||
REG_SZ,"%1",3);
|
REG_SZ,"%1",3);
|
||||||
|
if (res != NOERROR) LogFileOutput("RegSetValue(%s) failed (0x%08X)\n", pValueName, res);
|
||||||
|
|
||||||
RegSetValue(HKEY_CLASSES_ROOT,
|
pValueName = "DiskImage\\shell\\open\\ddeexec\\application";
|
||||||
"DiskImage\\shell\\open\\ddeexec\\application",
|
res = RegSetValue(HKEY_CLASSES_ROOT,
|
||||||
|
pValueName,
|
||||||
REG_SZ,"applewin",_tcslen("applewin")+1);
|
REG_SZ,"applewin",_tcslen("applewin")+1);
|
||||||
// REG_SZ,szCommandTmp,_tcslen(szCommandTmp)+1);
|
// REG_SZ,szCommandTmp,_tcslen(szCommandTmp)+1);
|
||||||
|
if (res != NOERROR) LogFileOutput("RegSetValue(%s) failed (0x%08X)\n", pValueName, res);
|
||||||
|
|
||||||
RegSetValue(HKEY_CLASSES_ROOT,
|
pValueName = "DiskImage\\shell\\open\\ddeexec\\topic";
|
||||||
"DiskImage\\shell\\open\\ddeexec\\topic",
|
res = RegSetValue(HKEY_CLASSES_ROOT,
|
||||||
|
pValueName,
|
||||||
REG_SZ,"system",_tcslen("system")+1);
|
REG_SZ,"system",_tcslen("system")+1);
|
||||||
|
if (res != NOERROR) LogFileOutput("RegSetValue(%s) failed (0x%08X)\n", pValueName, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user