Commit Graph

16 Commits

Author SHA1 Message Date
Ryan Schmidt 14f5ad3728 MiniVMac.cc: Preserve attributes when copying
When copying files from the system disk image to the new disk image,
preserve all attributes (creation date, modification date, bundle bit,
locked bit, etc.), except clear the inited bit so that the Finder
chooses new icon positions, otherwise (under System 6 at least) the
icons pile up on top of each other. Preserving the bundle bit in
particular tells the Finder to look in the file for icon information
when building the desktop database, without which the files all show
generic icons in the Finder.
2022-10-06 17:11:32 -05:00
Wolfgang Thaller 1f533b761c
Merge pull request #183 from ryandesign/minivmac-find-folder
MiniVMac.cc: Use localized Extensions and Startup Items folder names
2022-10-01 11:12:47 +02:00
Wolfgang Thaller c5c9e281f4
Merge pull request #182 from ryandesign/minivmac-finder-macsbug
MiniVMac.cc: Get Finder/MacsBug name from boot blocks
2022-10-01 11:12:06 +02:00
Ryan Schmidt 72322d65d7 MiniVMac.cc: New method FindFolder
Remove hardcoded Extensions and Startup Items folder names and get the
correct localized names from the System file's 'fld#' resource.
2022-09-22 06:35:53 -05:00
Ryan Schmidt 425bb8b054 MiniVMac.cc: New method ReadSystemResources
Move the System file resource-reading code out of GetSystemVersion and
into a new ReadSystemResources method which stores the resources in a
new member variable so that it can be used by multiple methods.
2022-09-22 05:27:51 -05:00
Ryan Schmidt 171577c140 MiniVMac.cc: Get Finder/MacsBug name from boot blocks
Closes: #172
2022-09-22 03:33:04 -05:00
Ryan Schmidt 087989661c MiniVMac.cc: Fix alias creation code
* Convert all field values from host order to big-endian so they aren't
  byte-swapped when created on little-endian systems.
* Pack the struct so the compiler doesn't insert padding on 64-bit
  systems.
* Fix the volume and file creation timestamps by converting them from
  UNIX to Macintosh time base, using a function copied from hfsutils.
* Pad volume and file names with null bytes instead of random memory.
* Add the "end of variable-length data" marker so the OS doesn't crash
  when trying to resolve the alias.
* Set the alias flag so the OS treats the file as an alias.
2022-09-22 00:38:06 -05:00
Ryan Schmidt 17cbe507a2 MiniVMac.cc: Copy some extensions if present
See: https://github.com/autc04/Retro68/issues/171
2022-09-20 04:54:15 -05:00
Ryan Schmidt 4a7b698ab4 LaunchAPPL: Fix two macOS Mini vMac launching bugs
On all macOS versions, Mini vMac would launch behind other applications
because it was being launched by running the executable within the
application bundle directly. The solution is to let the OS launch the
app normally by using the open utility. This eliminates the 30 lines of
code that laboriously determined the executable name.

On macOS 10.12 and later, Mini vMac could not find the ROM or disk
files. These files were being placed in the same directory as the Mini
vMac application, but a new macOS security measure called Gatekeeper
Path Randomization or App Translocation prevents that from working
anymore. See https://www.gryphel.com/c/minivmac/osx_note.html. The
solution is to place the ROM and disk files within the mnvm_dat
directory in the Contents directory in the application bundle.

The code that copies Mini vMac into the temporary directory had to be
moved earlier so that when the ROM file is symlinked and the disk image
is created the mnvm_dat directory into which they go will be there.

Since more than one method needed to know whether Mini vMac was an app
bundle, a Boolean instance var was added on macOS to indicate that.
2022-08-03 14:07:41 -05:00
Wolfgang Thaller 8d277dfbfa make LaunchAPPL work when only the needed autoquit/autquit7 image is specified 2019-02-11 21:20:21 +01:00
Szymon Łopaciuk 89d4565f0d Autodetect System version for correct AutoQuit
Reads the System resource to find out the System Software
version for running correct AutoQuit.

Includes other minor changes.

Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
2019-02-10 01:56:37 +00:00
Szymon Łopaciuk a3919a0bb4 Add support for using AutQuit7
This allows the user to choose whether to use AutoQuit or AutQuit7
(which supports System 7). When the path to AutQuit7 is specified,
it will be configured according to the instructions at
https://www.gryphel.com/c/minivmac/extras/autquit7/ by putting an
alias to AutQuit7 in the "Startup Items" folder. That will cause
the application named "app" in the folder of AutQuit7 (top level,
no change) to start on boot, and will shut down the OS when quit.

Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
2019-02-07 23:00:25 +00:00
Szymon Łopaciuk fe00dde02b Fix error on ROM symlink creation if name non-standard
This fixes a bug that appeares when using LaunchAPPL
with Mini vMac and a ROM which name is not "vMac.ROM".

Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
2019-02-06 00:04:57 +00:00
Wolfgang Thaller 999897be07 Disk copy 4.2 image support for LaunchAPPL -e minivmac (fixes #76) 2019-01-19 11:47:10 +01:00
Wolfgang Thaller 380fef0114 cleanup CMAKE_CXX_FLAGS and fix various warnings 2019-01-04 03:35:32 +01:00
Wolfgang Thaller bdf4685d82 start a LaunchAPPL server 2018-04-27 09:05:26 +02:00