Commit Graph

88 Commits

Author SHA1 Message Date
Andy McFadden
8e326f2f62 Fix for issue #20
Reject NuDateTime structs with invalid fields.  Passing bogus values
to the ATL CTime constructor does bad things.
2017-09-21 12:20:16 -07:00
Andy McFadden
98f098d421 Half-step toward VS2015 CE
When initially opened in Visual Studio 2015 Community Edition, the
project was updated to use the v140_xp toolset.  When the program
was run under WinXP it complained about a missing runtime DLL.  When
the DLL was provided, it complained about another one (with a
slightly strange name).  So I reverted the tools to v120_xp, i.e.
Visual Studio 2013.  (I don't know if this works because the tools
are included with VS2015, or because I have VS2013 installed and it
managed to find them.)

Whatever the case, it now builds for me with either IDE, and seems
to work fine on Windows XP, but I'd like to figure out why the XP
build isn't working with the v140_xp tools.
2016-01-11 11:33:41 -08:00
Andy McFadden
9e2fded3b9 Bump version to v4.0.2-a2 2016-01-11 11:16:01 -08:00
Andy McFadden
ebef6a27c2 Fix display of invalid resource forks
We were dumping various fields, but if the resource fork was too
short we were actually dumping uninitialized data.

Also, bumped version to 4.0.2-a1.
2015-12-26 17:07:46 -08:00
Andy McFadden
f8dbc6530b Bump version to 4.0.1 2015-08-24 09:00:20 -07:00
Andy McFadden
92942437d9 Add LZ4FH support
Also, bump version to 4.0.1-a3.
2015-08-02 13:34:51 -07:00
Andy McFadden
adb65c5e9d Fix Merlin file formatting
The code was mis-handling semicolons embedded in macros, treating
them as the start of a comment.  It now checks to see if they're
at the start of a line or preceded by a space.
2015-07-01 09:05:07 -07:00
Andy McFadden
8c1707e28b Update for 4.0.1-a1 release 2015-02-17 10:49:16 -08:00
Andy McFadden
e22eb99212 Fix "find" feature in file viewer
The 1.0 edit control only searched down, so the fact that CP was
misconfiguring the search request didn't matter.  This change fixes
the search parameters and enables bi-directional searches.
2015-02-17 10:41:22 -08:00
Andy McFadden
4d85f31f0f Fix handling of dCpy with resource fork
DiskCopy disk images on HFS volumes, such as the ByteWorks Opus ][
CD-ROM, have resource forks.  The double-click handler was screening
out forked files, so double-clicking on one of these disk images
was popping open the file viewer instead of creating a new instance
of CiderPress.
2015-01-23 10:18:47 -08:00
Andy McFadden
beb4f605d9 Prep for v4.0.0 release 2015-01-23 09:14:58 -08:00
Andy McFadden
9679cb57a8 Change web URL
This changes the "visit web site" help menu item from faddensoft.com
to a2ciderpress.com.
2015-01-23 09:14:00 -08:00
Andy McFadden
a250f6d89a Disable logging in non-debug builds
Ideally there would be a preference that allowed you to enable
logging and specify the file's location.  That could make remote
debugging of certain problems easier.
2015-01-22 10:06:55 -08:00
Andy McFadden
a2c15eee55 Another file open tweak
We can report a better error message for cases where the NuFX
archive master header is intact but something else is damaged.
2015-01-19 17:38:03 -08:00
Andy McFadden
b727e8ca81 Set version to 4.0.0 RC1 2015-01-19 16:58:14 -08:00
Andy McFadden
357aba39ec Fix file viewer position for tall SHR images
The images in Paintworks PNT files are 2x the height of the SHR
screen.  The rich edit control was ending up scrolled to the bottom
of the image, which is bad because many of the image files don't
really have anything interesting in the bottom half.  This shifts
the position back to the top.

Also, some minor source code touch-ups.
2015-01-16 15:15:40 -08:00
Andy McFadden
61c4069031 Fine-tune file viewer size
The height was supposed to be just tall enough to fit a Super
Hi-Res graphic without needing to scroll, but it had become too
short by about 6 pixels.

The width was supposed to be wide enough to exactly fit 80-column
text, but the optional scroll bar ate two columns when it appeared.
We now over-size the viewer so it looks right when the scroll bar
appears.
2015-01-15 16:24:40 -08:00
Andy McFadden
06eeabc8a4 Switch to system font
Switch the remaining dialogs to the system font.  This required
minor adjustments in a couple of places.

Also, remove the remnants of the ChooseDir dialog.
2015-01-15 16:10:08 -08:00
Andy McFadden
829e275b23 Tweak "open file" behavior
For a file with ".shk" extension, prioritize disk image over NuFX
file archive.  The disk image code won't accept it if it has more
than one entry, and it's pretty rare for somebody to want to open
a single-disk archive in file mode.

Ideally all single-disk archives are named ".sdk", but there's
probably a lot that are just named ".shk", so this will probably
be more convenient.
2015-01-15 15:45:31 -08:00
Andy McFadden
b5169033a1 Update progress dialogs
Do the Mac OS Roman conversion in a couple of places.  Fix the
NuFX extraction progress, which got all blinky after the wide char
update.
2015-01-15 15:35:34 -08:00
Andy McFadden
0861b7ead4 Simplify 2015-01-15 14:21:01 -08:00
Andy McFadden
8c34eb1213 Volume name and font fixes
More volume name MOR conversions.  I think I got them all.

This also switches the "archive info", "add files", and "extract
files" dialogs to use the System Font.  We were using "MS Sans
Serif" before, which looks a bit ratty on Windows 7 because it
doesn't take advantage of ClearType.  (Apparently the ClearType
version is "Microsoft Sans Serif", though when you set the "use
system font" boolean to true it changes the font name to "MS Shell
Dlg".)  The old font also seems to be missing certain glyphs, e.g.
my HFS volume name had 'TM' in it, but that just showed up as a box
(which is why, in case you were wondering, these changes ended up
together).

The new font seems to work equally well on WinXP, so I may enable
it for all dialogs in a follow-up change.  As far as I can tell it
has the same font metrics -- I haven't seen anything weird looking
in the dialogs I've updated so far.

Also, bumped the version to 4.0.0-b3.
2015-01-15 11:35:48 -08:00
Andy McFadden
87a7411dda Unicode conversion for volume name in volume copier
We needed to convert the volume name correctly for the volume list
and the progress dialogs when copying to or from a file.  This
shouldn't affect how anything works, but it looks nicer with HFS
volumes that have non-ASCII characters.
2015-01-15 10:48:35 -08:00
Andy McFadden
bb24f51ccb Fix subvol charset handling
We weren't doing a MOR-to-UNI conversion on the sub-volume name, so
HFS volumes with non-ASCII characters didn't look right.

This also relocates the character-conversion code to a new source
file.  It's currently part of the reformat lib, though it arguably
belongs in util (but that would introduce a new dependency
between reformat and util).
2015-01-15 10:34:45 -08:00
Andy McFadden
cc93d4ab92 File open tweaks
- Remove *.* from AppleSingle filter spec, since "all files" now
  works just fine.
- Make "all files" the default if nothing is configured.
2015-01-13 22:14:07 -08:00
Andy McFadden
b40054bf26 Minor help file updates
Added AppleSingle note to "archive info" help page.
Added a missing pop-up help entry.
Added a README with instructions for regenerating help.
2015-01-13 17:47:57 -08:00
Andy McFadden
e7e2459e5e Add Gutenberg to ImageFormatDialog pop-up
Used for "confirm disk image format".
2015-01-13 17:11:22 -08:00
Andy McFadden
a2962e976f Handle cancellation
Don't show an error if the user has "confirm disk image format"
selected and cancels out of the dialog.
2015-01-13 16:48:08 -08:00
Andy McFadden
814872966e Rewrote "open archive" logic
The previous code was a stickler for only opening files whose type
matched what was selected in the filter pop-up.  The original goal
was to allow you to choose whether a BXY or SDK file was interpreted
as Binary II, ShrinkIt, or disk image, since they could go either
way.  Unfortunately, its refusal to consider types other than what
was selected made it kind of annoying.

The new code will start by trying to open the file with the selected
filter, so that it's still possible to choose how SDK and BXY files
are opened.  However, it now continues on, trying all other types
before finally giving up.

If the generic ("*.*") filter is selected, CiderPress will start by
trying to open the file as a disk image.

This seems to produce good results with a variety of known and
unknown files.
2015-01-13 15:54:10 -08:00
Andy McFadden
432b1c4cc6 Fix overwrite dialog
Was setting the original pathname improperly, so when attempting
to add a file to a NuFX archive the "do you want to overwrite
existing entry?" dialog contained gibberish.
2015-01-13 15:47:18 -08:00
Andy McFadden
b3780261c4 Minor tweaks 2015-01-13 13:43:48 -08:00
Andy McFadden
ed2d16a016 Nudge 2015-01-13 13:28:02 -08:00
Andy McFadden
fd37bfd261 Reimplement ChooseDirDialog
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.
2015-01-13 13:25:34 -08:00
Andy McFadden
7cd92a7fdd Version bump to 4.0.0b1 2015-01-12 18:18:28 -08:00
Andy McFadden
b409d613fa Placate EOL hobgoblins 2015-01-12 18:06:38 -08:00
Andy McFadden
5946481b4e Add AppleSingle support
This handles version 1 and 2, and copes with the broken files
created by the Mac OS X "applesingle" command-line tool (which is
unable to decode the broken files it creates).

I get the sense that many AppleSingle files don't end with ".AS", so
the filespec includes "*.*" as well.

Some AppleSingle files don't include a filename.  In that case, we
use the file's name as the entry name, minus any ".as" extension.
The current implementation doesn't convert from Unicode to Mac OS
Roman, so non-ASCII characters are mishandled unless the file was
generated by GS/ShrinkIt.  (We assume version 1 AppleSingle files
use MOR name strings.)

Also, version bump to 4.0.0d3.
2015-01-12 17:49:59 -08:00
Andy McFadden
84ba460957 Minor cleanup 2015-01-11 16:11:44 -08:00
Andy McFadden
0d5bfa593f Don't enable fields when archive is read-only
"Edit attributes" on a read-only archive was enabling the file and
aux type fields inappropriately as part of the ProDOS vs. HFS file
type handling.
2015-01-11 15:50:55 -08:00
Andy McFadden
125d128b36 Show Gutenberg files as "Gutenb" in the content list 2015-01-09 18:36:05 -08:00
Andy McFadden
00e6b3ab5e Improve filename handling when reading from archives
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.
2015-01-08 17:57:20 -08:00
Andy McFadden
b79498da50 Improve filename handling when adding files
Most of this change is a conversion of the old FileDetails struct
into a new LocalFileDetails class.  The new class keeps the
members private, and keeps the Unicode and MOR representations of
the string separate.

The NuFX and DiskImg libraries don't support UTF-16 filenames,
so we stil can't add files with non-CP-1252 filenames, but we're
a step closer.

Also, update NufxLib with a couple of fixes from the main project.

Also, fix handling of "%00" when adding files.

Also, mark most of the A2FileDOS fields private.  Not sure why
they weren't.
2015-01-08 14:16:20 -08:00
Andy McFadden
d94b707489 Use more integers with explicit widths
Updated some structs and a few DiskImg APIs, primarily file type,
aux type, and access flags.
2015-01-04 18:20:59 -08:00
Andy McFadden
84706d7ea4 Update NufxLib snapshot to v3.0.0d2
This integrates the latest NufxLib sources, and updates CiderPress
to work with the API changes.
2015-01-04 11:29:51 -08:00
Andy McFadden
4dd0c9339d Quick stab at Unicode for AWGS/Teach
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.
2014-12-18 17:33:09 -08:00
Andy McFadden
13c38be4aa Tweak error reporting 2014-12-17 15:45:28 -08:00
Andy McFadden
7b70767a1f Better error message when extracting files
The file extraction dialog allows you to select file parts, so you
can choose to exclude resource forks or just extract disk images.  If
you don't choose any parts, nothing will extract, and you get a
confusingly generic message about nothing matching the criteria.

This adds a specific error message for the case where no parts are
selected.
2014-12-17 13:31:50 -08:00
Andy McFadden
ac721baf2b Merge branch 'master' of https://github.com/salfter/ciderpress into salfter-master 2014-12-17 11:33:37 -08:00
Scott Alfter
0960e23f47 found where nlist.data.txt was hiding; updated postbuild.bat accordingly 2014-12-17 11:17:23 -08:00
Scott Alfter
022c88dfad fix post-build, add missing file 2014-12-17 09:27:37 -08:00
Andy McFadden
a902beb6ba Specify a custom class name for main frame
DeployMaster can detect whether or not CiderPress is currently
running by checking for the presence of a window with a specific class
name.  The default class name is generated differently each time, so
we need to set a custom class name.

Also, bumped version to 4.0.0d2.
2014-12-17 08:55:20 -08:00