The previous version was written to work on Win98+, and used the
rather gnarly ShellTree class. Since we no longer support Win98,
we can now use CShellManager::BrowseForFolder(), which does exactly
what we want without all the ugly code (and it looks nicer, and it
integrates better with the rest of the system).
We can also get rid of NewFolderDialog, which only existed to allow
the user to create a folder when trudging through ShellTree.
This required "upgrading" the main app object from CWinApp to
CWinAppEx, but that appears to be benign. Tested on WinXP and it
all seems fine.
This updates GenericEntry's filename handling to be more careful
about Mac OS Roman vs. Unicode. Most of the work is still done with
a CP-1252 conversion instead of MOR, but we now do a proper
conversion on the "display name", so we see the right thing in the
content list and file viewer.
Copy & paste, disk-to-file-archive, and file-archive-to-disk
conversions should work (correctly) as before. Extracted files will
still have "_" or "%AA" instead of a Unicode TRADE MARK SIGN, but
that's fine for now -- we can extract and re-add the files losslessly.
The filenames are now stored in CStrings rather than WCHAR*.
Also, fixed a bad initializer in the file-archive-to-disk conversion
dialog.
Officially the \u value is signed 16-bit decimal, but we were treating
it as unsigned. The Windows parsers handled it anyway, but it's best
to do what the spec says.
This tweaks the output for AWGS and Teach Text to convert from Mac
OS Roman to Unicode, rather than Windows code page 1252.
It would be slightly more efficient (and possibly a bit more legible
in the RTF file) if we left the "good" conversions alone, e.g.
continue to use the CP1252 character for "E with acute", instead of
converting to U+00C9. That might leave us at the mercy of the code
page converter in some random RTF reader, though, so it's probably
best to just use the official Unicode values.
This changes the Platform Toolset configuration from "Visual Studio
2013 (v120)" to "Visual Studio 2013 - Windows XP (v120_xp)". Without
this change, executables built by VS2013 will not run on WinXP.
To actually run on WinXP, we also need to install the redistributable
msvcr120.dll and mfc120u.dll, both of which are fairly large. The
installation package has more than doubled in size.
At some point we may want to drop WinXP support -- Microsoft declared
end-of-life on April 8 2014 -- but if the only penalty is a 2MB increase
in installer size, we might as well keep supporting WinXP users.
Much of what the "reformat" code does involves processing data that is
8, 16, or 32 bits. We want to use size-specific types from stdint.h
(e.g. uint16_t) rather than "unsigned short".
This was a quick pass to replace the various "unsigned" declarations.
More can be done here and elsewhere.
- Drop strcasecmp / strncasecmp defines; just use the VC++ version.
- Fix LOG_WARNING vs. LOG_WARN.
- Fix crash when NiftyList data file not available.
There's probably some value in using the "secure" versions of the
various string functions, but I don't want to deal with it right
now. We won't use them for the stuff that builds under Linux
anyway (diskimg, nufxlib).
This largely eliminates warnings from VC++.
Mostly a bulk conversion of debug messages, primarily with sed:
sed -e 's/\(WMSG[0-9]\)\(.*\)\(\\n"\)/LOGI\2"/'
This removes the '\n' from the end of the log messages, and sets
them all to "info" severity.
We want to prefix each line with file/line and/or a timestamp,
so it doesn't make sense to have a partial line, and there's no
value in embedding the '\n' in every string.
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.
This updates all source files to use spaces instead of tabs for
indentation. It also normalizes the end-of-line markers to be
Windows-style CRLF, and ensures that all files end with EOL.
No substantive changes were made; "diff -w" is empty.
This updates the project files for Visual Studio 2013, and removes
the old Visual Studio 6 (1998) project files. The update tool had
a number of complaints (see UpgradeLog.htm) that may need to be
addressed.
Also, replaced .cvsignore with .gitignore.
Visual Studio reports 1886 build errors, nearly all of them due to
the switch from MBCS to Unicode. The former is no longer
supported "out of the box", and its use is discouraged, so we're
going to bite the bullet and use wide characters in the UI.