2007-03-27 17:47:10 +00:00
|
|
|
/*
|
|
|
|
* CiderPress
|
|
|
|
* Copyright (C) 2007 by faddenSoft, LLC. All Rights Reserved.
|
|
|
|
* See the file LICENSE for distribution terms.
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
* A class representing the system registry.
|
|
|
|
*/
|
Large set of changes to restore CiderPress build.
CiderPress and MDC now compile, and execute far enough to open
their respective "about" boxes, but I doubt they'll do much
more than that.
* Switch from MBCS to UNICODE APIs
Microsoft switched to UTF-16 (by way of UCS-2) a long time ago,
and the support for MBCS seems to be getting phased out. So it's
time to switch to wide strings.
This is a bit awkward for CiderPress because it works with disk
and file archives with 8-bit filenames, and I want NufxLib and
DiskImgLib to continue to work on Linux (which has largely taken
the UTF-8 approach to Unicode). The libraries will continue to
work with 8-bit filenames, with CiderPress/MDC doing the
conversion at the appropriate point.
There were a couple of places where strings from a structure
handed back by one of the libraries were used directly in the UI,
or vice-versa, which is a problem because we have nowhere to
store the result of the conversion. These currently have fixed
place-holder "xyzzy" strings.
All UI strings are now wide.
Various format strings now use "%ls" and "%hs" to explicitly
specify wide and narrow. This doesn't play well with gcc, so
only the Windows-specific parts use those.
* Various updates to vcxproj files
The project-file conversion had some cruft that is now largely
gone. The build now has a common output directory for the EXEs
and libraries, avoiding the old post-build copy steps.
* Added zlib 1.2.8 and nufxlib 2.2.2 source snapshots
The old "prebuilts" directory is now gone. The libraries are now
built as part of building the apps.
I added a minimal set of files for zlib, and a full set for nufxlib.
The Linux-specific nufxlib goodies are included for the benefit of
the Linux utilities, which are currently broken (don't build).
* Replace symbols used for include guards
Symbols with a leading "__" are reserved.
2014-11-10 23:32:55 +00:00
|
|
|
#ifndef APP_REGISTRY_H
|
|
|
|
#define APP_REGISTRY_H
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-12-11 21:53:02 +00:00
|
|
|
#ifdef CAN_UPDATE_FILE_ASSOC
|
2007-03-27 17:47:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* All access to the registry (except for GetProfileInt/GetProfileString)
|
|
|
|
* should go through this.
|
|
|
|
*/
|
|
|
|
class MyRegistry {
|
|
|
|
public:
|
2014-11-04 00:26:53 +00:00
|
|
|
MyRegistry(void) {}
|
|
|
|
~MyRegistry(void) {}
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-12-16 05:57:09 +00:00
|
|
|
/*
|
2014-11-04 00:26:53 +00:00
|
|
|
typedef enum RegStatus {
|
|
|
|
kRegUnknown = 0,
|
|
|
|
kRegNotSet, // unregistered
|
|
|
|
kRegExpired, // unregistered, expired
|
|
|
|
kRegValid, // registration present and valid
|
|
|
|
kRegInvalid, // registration present, but invalid (!)
|
|
|
|
kRegFailed, // error occurred during registration
|
|
|
|
} RegStatus;
|
2014-12-16 05:57:09 +00:00
|
|
|
*/
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
/*
|
|
|
|
* This is called immediately after installation finishes.
|
|
|
|
*
|
|
|
|
* We want to snatch up any unused file type associations. We define them
|
|
|
|
* as "unused" if the entry does not exist in the registry at all. A more
|
2014-12-16 05:57:09 +00:00
|
|
|
* thorough installer would also verify that the ProgID actually existed
|
2014-11-21 21:18:20 +00:00
|
|
|
* and "steal" any apparent orphans, but we can let the user do that manually.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
void OneTimeInstall(void) const;
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Remove things that the standard uninstall script won't.
|
|
|
|
*
|
|
|
|
* We want to un-set any of our file associations. We don't really need to
|
2014-12-16 05:57:09 +00:00
|
|
|
* clean up the ".xxx" entries, because removing their ProgID entries is enough
|
2014-11-21 21:18:20 +00:00
|
|
|
* to fry their little brains, but it's probably the right thing to do.
|
|
|
|
*
|
2014-12-16 05:57:09 +00:00
|
|
|
* We definitely want to strip out our ProgIDs.
|
2014-11-21 21:18:20 +00:00
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
void OneTimeUninstall(void) const;
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
/*
|
|
|
|
int GetRegistration(CString* pUser, CString* pCompany,
|
|
|
|
CString* pReg, CString* pVersions, CString* pExpire);
|
|
|
|
int SetRegistration(const CString& user, const CString& company,
|
|
|
|
const CString& reg, const CString& versions, const CString& expire);
|
|
|
|
RegStatus CheckRegistration(CString* pResult);
|
|
|
|
bool IsValidRegistrationKey(const CString& user,
|
|
|
|
const CString& company, const CString& reg);
|
|
|
|
*/
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
/*
|
|
|
|
* Return the application's registry key. This is used as the argument to
|
|
|
|
* CWinApp::SetRegistryKey(). The GetProfile{Int,String} calls combine this
|
2014-12-16 05:57:09 +00:00
|
|
|
* (in m_pszRegistryKey) with the app name (in m_pszProfileName) and
|
|
|
|
* prepends "HKEY_CURRENT_USER\Software\".
|
2014-11-21 21:18:20 +00:00
|
|
|
*/
|
Large set of changes to restore CiderPress build.
CiderPress and MDC now compile, and execute far enough to open
their respective "about" boxes, but I doubt they'll do much
more than that.
* Switch from MBCS to UNICODE APIs
Microsoft switched to UTF-16 (by way of UCS-2) a long time ago,
and the support for MBCS seems to be getting phased out. So it's
time to switch to wide strings.
This is a bit awkward for CiderPress because it works with disk
and file archives with 8-bit filenames, and I want NufxLib and
DiskImgLib to continue to work on Linux (which has largely taken
the UTF-8 approach to Unicode). The libraries will continue to
work with 8-bit filenames, with CiderPress/MDC doing the
conversion at the appropriate point.
There were a couple of places where strings from a structure
handed back by one of the libraries were used directly in the UI,
or vice-versa, which is a problem because we have nowhere to
store the result of the conversion. These currently have fixed
place-holder "xyzzy" strings.
All UI strings are now wide.
Various format strings now use "%ls" and "%hs" to explicitly
specify wide and narrow. This doesn't play well with gcc, so
only the Windows-specific parts use those.
* Various updates to vcxproj files
The project-file conversion had some cruft that is now largely
gone. The build now has a common output directory for the EXEs
and libraries, avoiding the old post-build copy steps.
* Added zlib 1.2.8 and nufxlib 2.2.2 source snapshots
The old "prebuilts" directory is now gone. The libraries are now
built as part of building the apps.
I added a minimal set of files for zlib, and a full set for nufxlib.
The Linux-specific nufxlib goodies are included for the benefit of
the Linux utilities, which are currently broken (don't build).
* Replace symbols used for include guards
Symbols with a leading "__" are reserved.
2014-11-10 23:32:55 +00:00
|
|
|
const WCHAR* GetAppRegistryKey(void) const;
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-12-16 05:57:09 +00:00
|
|
|
// Fix basic settings, e.g. HKCU ProgID classes.
|
2014-11-04 00:26:53 +00:00
|
|
|
void FixBasicSettings(void) const;
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
/*
|
|
|
|
* Return the number of file type associations.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
int GetNumFileAssocs(void) const;
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Return information on a file association.
|
2014-12-16 05:57:09 +00:00
|
|
|
*
|
|
|
|
* For the given index, return the extension, the ProgID key, and an
|
|
|
|
* indication of whether or not we believe this is ours. If nothing
|
|
|
|
* is associated with this extension, *pHandler receives an empty string.
|
2014-11-21 21:18:20 +00:00
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
void GetFileAssoc(int idx, CString* pExt, CString* pHandler,
|
|
|
|
bool* pOurs) const;
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Sets the state of a file association.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
int SetFileAssoc(int idx, bool wantIt) const;
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
//static uint16_t ComputeStringCRC(const char* str);
|
2007-03-27 17:47:10 +00:00
|
|
|
|
|
|
|
private:
|
2014-11-04 00:26:53 +00:00
|
|
|
typedef struct FileTypeAssoc {
|
Large set of changes to restore CiderPress build.
CiderPress and MDC now compile, and execute far enough to open
their respective "about" boxes, but I doubt they'll do much
more than that.
* Switch from MBCS to UNICODE APIs
Microsoft switched to UTF-16 (by way of UCS-2) a long time ago,
and the support for MBCS seems to be getting phased out. So it's
time to switch to wide strings.
This is a bit awkward for CiderPress because it works with disk
and file archives with 8-bit filenames, and I want NufxLib and
DiskImgLib to continue to work on Linux (which has largely taken
the UTF-8 approach to Unicode). The libraries will continue to
work with 8-bit filenames, with CiderPress/MDC doing the
conversion at the appropriate point.
There were a couple of places where strings from a structure
handed back by one of the libraries were used directly in the UI,
or vice-versa, which is a problem because we have nowhere to
store the result of the conversion. These currently have fixed
place-holder "xyzzy" strings.
All UI strings are now wide.
Various format strings now use "%ls" and "%hs" to explicitly
specify wide and narrow. This doesn't play well with gcc, so
only the Windows-specific parts use those.
* Various updates to vcxproj files
The project-file conversion had some cruft that is now largely
gone. The build now has a common output directory for the EXEs
and libraries, avoiding the old post-build copy steps.
* Added zlib 1.2.8 and nufxlib 2.2.2 source snapshots
The old "prebuilts" directory is now gone. The libraries are now
built as part of building the apps.
I added a minimal set of files for zlib, and a full set for nufxlib.
The Linux-specific nufxlib goodies are included for the benefit of
the Linux utilities, which are currently broken (don't build).
* Replace symbols used for include guards
Symbols with a leading "__" are reserved.
2014-11-10 23:32:55 +00:00
|
|
|
const WCHAR* ext; // e.g. ".SHK"
|
2014-12-16 05:57:09 +00:00
|
|
|
const WCHAR* progId; // e.g. "CiderPress.NuFX.4"
|
2014-11-04 00:26:53 +00:00
|
|
|
} FileTypeAssoc;
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
static const FileTypeAssoc kFileTypeAssoc[];
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
/*
|
2014-12-16 05:57:09 +00:00
|
|
|
* See if a ProgID key is one we recognize.
|
2014-11-21 21:18:20 +00:00
|
|
|
*/
|
2014-12-16 05:57:09 +00:00
|
|
|
bool IsOurProgId(const WCHAR* progIdKeyName) const;
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
2014-12-16 05:57:09 +00:00
|
|
|
* Set up the registry goodies for one ProgID.
|
2014-11-21 21:18:20 +00:00
|
|
|
*/
|
2014-12-16 05:57:09 +00:00
|
|
|
void ConfigureProgId(const WCHAR* progIdKeyName, const WCHAR* descr,
|
Large set of changes to restore CiderPress build.
CiderPress and MDC now compile, and execute far enough to open
their respective "about" boxes, but I doubt they'll do much
more than that.
* Switch from MBCS to UNICODE APIs
Microsoft switched to UTF-16 (by way of UCS-2) a long time ago,
and the support for MBCS seems to be getting phased out. So it's
time to switch to wide strings.
This is a bit awkward for CiderPress because it works with disk
and file archives with 8-bit filenames, and I want NufxLib and
DiskImgLib to continue to work on Linux (which has largely taken
the UTF-8 approach to Unicode). The libraries will continue to
work with 8-bit filenames, with CiderPress/MDC doing the
conversion at the appropriate point.
There were a couple of places where strings from a structure
handed back by one of the libraries were used directly in the UI,
or vice-versa, which is a problem because we have nowhere to
store the result of the conversion. These currently have fixed
place-holder "xyzzy" strings.
All UI strings are now wide.
Various format strings now use "%ls" and "%hs" to explicitly
specify wide and narrow. This doesn't play well with gcc, so
only the Windows-specific parts use those.
* Various updates to vcxproj files
The project-file conversion had some cruft that is now largely
gone. The build now has a common output directory for the EXEs
and libraries, avoiding the old post-build copy steps.
* Added zlib 1.2.8 and nufxlib 2.2.2 source snapshots
The old "prebuilts" directory is now gone. The libraries are now
built as part of building the apps.
I added a minimal set of files for zlib, and a full set for nufxlib.
The Linux-specific nufxlib goodies are included for the benefit of
the Linux utilities, which are currently broken (don't build).
* Replace symbols used for include guards
Symbols with a leading "__" are reserved.
2014-11-10 23:32:55 +00:00
|
|
|
const WCHAR* exeName, int iconIdx) const;
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
2014-12-16 05:57:09 +00:00
|
|
|
* Puts the "Open" command in "...\shell\open\command".
|
2014-11-21 21:18:20 +00:00
|
|
|
*/
|
2014-12-16 05:57:09 +00:00
|
|
|
void ConfigureProgIdCommand(HKEY hAppKey, const WCHAR* descr,
|
Large set of changes to restore CiderPress build.
CiderPress and MDC now compile, and execute far enough to open
their respective "about" boxes, but I doubt they'll do much
more than that.
* Switch from MBCS to UNICODE APIs
Microsoft switched to UTF-16 (by way of UCS-2) a long time ago,
and the support for MBCS seems to be getting phased out. So it's
time to switch to wide strings.
This is a bit awkward for CiderPress because it works with disk
and file archives with 8-bit filenames, and I want NufxLib and
DiskImgLib to continue to work on Linux (which has largely taken
the UTF-8 approach to Unicode). The libraries will continue to
work with 8-bit filenames, with CiderPress/MDC doing the
conversion at the appropriate point.
There were a couple of places where strings from a structure
handed back by one of the libraries were used directly in the UI,
or vice-versa, which is a problem because we have nowhere to
store the result of the conversion. These currently have fixed
place-holder "xyzzy" strings.
All UI strings are now wide.
Various format strings now use "%ls" and "%hs" to explicitly
specify wide and narrow. This doesn't play well with gcc, so
only the Windows-specific parts use those.
* Various updates to vcxproj files
The project-file conversion had some cruft that is now largely
gone. The build now has a common output directory for the EXEs
and libraries, avoiding the old post-build copy steps.
* Added zlib 1.2.8 and nufxlib 2.2.2 source snapshots
The old "prebuilts" directory is now gone. The libraries are now
built as part of building the apps.
I added a minimal set of files for zlib, and a full set for nufxlib.
The Linux-specific nufxlib goodies are included for the benefit of
the Linux utilities, which are currently broken (don't build).
* Replace symbols used for include guards
Symbols with a leading "__" are reserved.
2014-11-10 23:32:55 +00:00
|
|
|
const WCHAR* exeName) const;
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
2014-12-16 05:57:09 +00:00
|
|
|
* Given a ProgID, determine the application's name. The executable
|
|
|
|
* path will be stripped.
|
2014-11-21 21:18:20 +00:00
|
|
|
*
|
2014-12-16 05:57:09 +00:00
|
|
|
* This requires burrowing down into
|
|
|
|
* HKEY_CURRENT_USER\<ProgIdKey>\shell\open\command\.
|
|
|
|
*
|
|
|
|
* This does not currently take into account the Windows shell stuff, i.e.
|
|
|
|
* HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\<.ext>
|
|
|
|
* (and I'm not really sure we should).
|
|
|
|
*
|
|
|
|
* TODO: if we don't find an association in HKCU, do a lookup in HKCR.
|
|
|
|
* That could get confusing if there's an older CiderPress association
|
|
|
|
* lurking in HKLM, but it's at least as confusing to see "no
|
|
|
|
* association" when there's clearly an association.
|
2014-11-21 21:18:20 +00:00
|
|
|
*/
|
2014-12-16 05:57:09 +00:00
|
|
|
int GetAssocAppName(const CString& progIdKeyName, CString* pCmd) const;
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Reduce a compound string to just its first token.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
void ReduceToToken(CString* pStr) const;
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Determine whether or not the filetype described by "ext" is one that we
|
|
|
|
* currently manage.
|
|
|
|
*
|
|
|
|
* Returns "true" if so, "false" if not. Returns "false" on any errors
|
|
|
|
* encountered.
|
|
|
|
*/
|
Large set of changes to restore CiderPress build.
CiderPress and MDC now compile, and execute far enough to open
their respective "about" boxes, but I doubt they'll do much
more than that.
* Switch from MBCS to UNICODE APIs
Microsoft switched to UTF-16 (by way of UCS-2) a long time ago,
and the support for MBCS seems to be getting phased out. So it's
time to switch to wide strings.
This is a bit awkward for CiderPress because it works with disk
and file archives with 8-bit filenames, and I want NufxLib and
DiskImgLib to continue to work on Linux (which has largely taken
the UTF-8 approach to Unicode). The libraries will continue to
work with 8-bit filenames, with CiderPress/MDC doing the
conversion at the appropriate point.
There were a couple of places where strings from a structure
handed back by one of the libraries were used directly in the UI,
or vice-versa, which is a problem because we have nowhere to
store the result of the conversion. These currently have fixed
place-holder "xyzzy" strings.
All UI strings are now wide.
Various format strings now use "%ls" and "%hs" to explicitly
specify wide and narrow. This doesn't play well with gcc, so
only the Windows-specific parts use those.
* Various updates to vcxproj files
The project-file conversion had some cruft that is now largely
gone. The build now has a common output directory for the EXEs
and libraries, avoiding the old post-build copy steps.
* Added zlib 1.2.8 and nufxlib 2.2.2 source snapshots
The old "prebuilts" directory is now gone. The libraries are now
built as part of building the apps.
I added a minimal set of files for zlib, and a full set for nufxlib.
The Linux-specific nufxlib goodies are included for the benefit of
the Linux utilities, which are currently broken (don't build).
* Replace symbols used for include guards
Symbols with a leading "__" are reserved.
2014-11-10 23:32:55 +00:00
|
|
|
bool GetAssocState(const WCHAR* ext) const;
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Drop ownership of a file extension. We assume we own it.
|
|
|
|
*
|
|
|
|
* Returns 0 on success, -1 on error.
|
|
|
|
*/
|
Large set of changes to restore CiderPress build.
CiderPress and MDC now compile, and execute far enough to open
their respective "about" boxes, but I doubt they'll do much
more than that.
* Switch from MBCS to UNICODE APIs
Microsoft switched to UTF-16 (by way of UCS-2) a long time ago,
and the support for MBCS seems to be getting phased out. So it's
time to switch to wide strings.
This is a bit awkward for CiderPress because it works with disk
and file archives with 8-bit filenames, and I want NufxLib and
DiskImgLib to continue to work on Linux (which has largely taken
the UTF-8 approach to Unicode). The libraries will continue to
work with 8-bit filenames, with CiderPress/MDC doing the
conversion at the appropriate point.
There were a couple of places where strings from a structure
handed back by one of the libraries were used directly in the UI,
or vice-versa, which is a problem because we have nowhere to
store the result of the conversion. These currently have fixed
place-holder "xyzzy" strings.
All UI strings are now wide.
Various format strings now use "%ls" and "%hs" to explicitly
specify wide and narrow. This doesn't play well with gcc, so
only the Windows-specific parts use those.
* Various updates to vcxproj files
The project-file conversion had some cruft that is now largely
gone. The build now has a common output directory for the EXEs
and libraries, avoiding the old post-build copy steps.
* Added zlib 1.2.8 and nufxlib 2.2.2 source snapshots
The old "prebuilts" directory is now gone. The libraries are now
built as part of building the apps.
I added a minimal set of files for zlib, and a full set for nufxlib.
The Linux-specific nufxlib goodies are included for the benefit of
the Linux utilities, which are currently broken (don't build).
* Replace symbols used for include guards
Symbols with a leading "__" are reserved.
2014-11-10 23:32:55 +00:00
|
|
|
int DisownExtension(const WCHAR* ext) const;
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Take ownership of a file extension.
|
|
|
|
*
|
|
|
|
* Returns 0 on success, -1 on error.
|
|
|
|
*/
|
2014-12-16 05:57:09 +00:00
|
|
|
int OwnExtension(const WCHAR* ext, const WCHAR* progIdKeyName) const;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Open HKEY_CURRENT_USER\Software\Classes for reading.
|
|
|
|
*/
|
|
|
|
DWORD OpenHKCUSoftwareClasses(HKEY* phKey) const;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Recursively delete a key in the HKEY_CURRENT_USER\Software\Classes
|
|
|
|
* hierarchy.
|
|
|
|
*/
|
|
|
|
DWORD RegDeleteKeyHKCU(const WCHAR* partialKeyName) const;
|
2014-11-21 21:18:20 +00:00
|
|
|
|
2014-11-25 22:34:14 +00:00
|
|
|
DWORD RegDeleteKeyNT(HKEY hStartKey, LPCWSTR pKeyName) const;
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
/* key validation */
|
2014-11-21 21:18:20 +00:00
|
|
|
//static uint16_t CalcCRC16(uint16_t seed,
|
|
|
|
// const uint8_t* ptr, int count);
|
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
static char* StripStrings(const char* str1, const char* str2);
|
|
|
|
void ComputeKey(const char* chBuf, int salt, long* pKeyLo, long* pKeyHi);
|
|
|
|
int VerifyKey(const char* user, const char* company, const char* key);
|
2007-03-27 17:47:10 +00:00
|
|
|
};
|
|
|
|
|
2014-12-11 21:53:02 +00:00
|
|
|
#endif
|
|
|
|
|
Large set of changes to restore CiderPress build.
CiderPress and MDC now compile, and execute far enough to open
their respective "about" boxes, but I doubt they'll do much
more than that.
* Switch from MBCS to UNICODE APIs
Microsoft switched to UTF-16 (by way of UCS-2) a long time ago,
and the support for MBCS seems to be getting phased out. So it's
time to switch to wide strings.
This is a bit awkward for CiderPress because it works with disk
and file archives with 8-bit filenames, and I want NufxLib and
DiskImgLib to continue to work on Linux (which has largely taken
the UTF-8 approach to Unicode). The libraries will continue to
work with 8-bit filenames, with CiderPress/MDC doing the
conversion at the appropriate point.
There were a couple of places where strings from a structure
handed back by one of the libraries were used directly in the UI,
or vice-versa, which is a problem because we have nowhere to
store the result of the conversion. These currently have fixed
place-holder "xyzzy" strings.
All UI strings are now wide.
Various format strings now use "%ls" and "%hs" to explicitly
specify wide and narrow. This doesn't play well with gcc, so
only the Windows-specific parts use those.
* Various updates to vcxproj files
The project-file conversion had some cruft that is now largely
gone. The build now has a common output directory for the EXEs
and libraries, avoiding the old post-build copy steps.
* Added zlib 1.2.8 and nufxlib 2.2.2 source snapshots
The old "prebuilts" directory is now gone. The libraries are now
built as part of building the apps.
I added a minimal set of files for zlib, and a full set for nufxlib.
The Linux-specific nufxlib goodies are included for the benefit of
the Linux utilities, which are currently broken (don't build).
* Replace symbols used for include guards
Symbols with a leading "__" are reserved.
2014-11-10 23:32:55 +00:00
|
|
|
#endif /*APP_REGISTRY_H*/
|