Many updates to format strings, largely as a result of changing
various "long" variables to uint32_t.
Fixed the diskimg debug macros for gcc, which requires an extra
"##" to remove the "," when there are no arguments. (Apparently
Visual Studio just strips this away for you.)
Stripped out a couple of dead variables spotted by gcc. Return
the actual error in a couple of HFS file functions.
In the past, CiderPress managed its own file associations. This is
the feature that launches CiderPress when you double-click on a ".shk"
file. The installer ran "CiderPress -install" and "-uninstall" during
installation and removal to give CP a chance to establish and clean
up the necessary registry entries.
The code built with VS6 works fine. The code built with VS2013 fails
with an access denied error. It appears there have been some access
policy changes, and the older code is getting "grandfathered in". This
is really something that the installer ought to be handling, though,
so rather than figure out how to fix CiderPress, I'm removing the
file type association code from CiderPress and letting DeployMaster
handle it.
This may be slightly less convenient for anyone who had reason to
change type associations frequently. Modern versions of Windows have
relatively easy to use control panel UIs for adjusting types, and
the "advanced installation" feature of DeployMaster allows you to
un-check the types that you don't want to have associated with
CiderPress.
(...with one minor hitch: DeployMaster 4.2.2 only shows the first 9
associations, and CiderPress has 18.)
This change renders most of the registry-handling code obsolete, as
well as the "-install" / "-uninstall" handling. I'm 99% sure I want
to go this way, but I'm keeping things #ifdefed rather than deleted
for the moment.
Some of the code was mis-handling wide character filenames.
A direct copy & paste should be using the 8-bit form of the filename,
but that's a deeper fix.
Also, changed some types to use explicit integer width specifiers.
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.
The original version of CiderPress used a WinHelp help file, built
with an application called HelpMatic Pro. This app used a proprietary
format, and had no facility for exporting to "raw" HPJ + RTF files, so
I decompiled the HLP and imported it into HelpScribble.
Using HelpScribble, I cleaned up the help file formatting a little,
fixed up the table of contents, and exported as "raw" HtmlHelp (HHP,
HHK, HHC, and a whole bunch of HTML). I also split the pop-up help
text, which isn't supported by HelpScribble, into a separate text file
that Microsoft's HTML Help Workshop understands.
I'm checking in the files that HTML Help Workshop needs to generate a
CHM, so anyone can update the help text. I'm also checking in the CHM
file, rather than adding the help workshop to the build, so that it's
not necessary to download and configure the help workshop to build
CiderPress.
This change adds all of the updated help, but only updates the Help and
question mark button actions for one specific dialog. A subsequent
change will update the rest of the dialogs.
This change is essentially upgrading us from a totally obsolete help
system to a nearly-obsolete help system, but the systems are similar
enough to make this a useful half-step on the way to something else.
The code will centralize help activation in a pair of functions in the
main app class, so any future improvements should be more limited in
scope.
This also adds a build step to copy the CHM to the execution directory.
The NufxLib and diskimg libraries want narrow strings for certain
things, notably for the "storage name", i.e. how the name will appear
on the disk image or in the file archive. We need to convert from
Windows UTF-16 to an Apple II filesystem-specific 8-bit character
representation.
We used to just pass narrow strings all the way through, so we didn't
need any intermediate storage to hold the conversion. Now we do. In
some cases there's nowhere good to put it. The initial UTF-16
conversion changes just dropped in some place-holder strings.
This corrects the behavior, though in a couple of cases we're adding
kluges on top of code that was already badly bent from its original
intent (as initially conceived, CiderPress wasn't going to handle disk
images, just ShrinkIt archives). It's not pretty, but it should work
for now.
This adds a replacement for the SelectFilesDialog class. It has
been updated to use Explorer-style dialogs, which are a bit nicer
than the old-style dialogs. Hopefully this will eliminate some of the
brain damage, like the disappearing Accept button.
This change only updates MDC. A second change will update the main
app and remove the old code.
Also, updated the MDC version to 3.0.0, and changed the web site
linked in the Help menu from faddensoft.com to a2ciderpress.com.
Focusing on the diskimg library this time, which deals with a lot of
filesystem structures that have specific widths.
This is still a bit lax in places, e.g. using "long" for lengths.
Should either specify a bit width or use di_off_t.
Also, added "override" keyword where appropriate.
Also, bumped library version to 5.0.0.
The OpenImage method had an overload that took void*. This turns out
to be a bad idea, because void* matches any pointer type that didn't
match something else. So the WCHAR* filenames were going to the "open
from buffer" method rather than the "open from file" variant.
A less important issue is whether open-from-buffer should take a const
or non-const pointer. If the "readOnly" boolean flag is not set, then
the contents can be altered and const is inappropriate. The best course
seems to be to drop the boolean flag as an argument, and just have two
different methods.
This moves method comments from the .cpp file to the .h file,
where users of the methods can find them. This also makes it
possible for the IDE to show the comments when you mouse-hover over
the method name, though Visual Studio is a bit weak in this regard.
Also, added "override" keywords on overridden methods. Reasonably
current versions of popular compilers seem to support this.
Also, don't have the return type on a separate line in the .cpp file.
The motivation for the practice -- quickly finding a method definition
with "^name" -- is less useful in C++ than C, and modern IDEs provide
more convenient ways to do the same thing.
Also, do some more conversion from unsigned types to uintXX_t.
This commit is primarily for the "app" directory.
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.
Visual Studio figured out variadic macros around 2005, so we can
finally replace the explicit-arg-count debug log macros.
Also, fixed some include guards.
Also, bumped version to 4.0.0d1.
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.