Giter Site home page Giter Site logo

Comments (11)

ticky avatar ticky commented on June 13, 2024 1

Alright, this seems to be due to the double-layering of processes going on with the current application bundle; it's not possible to confer external disk access permissions to the GDMENUCardManager executable because the app bundle's executable is actually the GDMENU script.

Removing the GDMENUCardManager.app/Contents/MacOS/GDMENU wrapper script, moving the contents of the GDMENUCardManager.app/Contents/MacOS/GDMENUCardManager directory into the parent GDMENUCardManager.app/Contents/MacOS directory, and changing the CFBundleExecutable from GDMENU to GDMENUCardManager causes it to correctly prompt the user for external disk access:

image

And upon allowing, it will read as expected:

image

So, the revised GDMENUCardManager.app/Contents/Info.plist is like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>English</string>
	<key>CFBundleDisplayName</key>
	<string>GDMENU Card Manager</string>
	<key>CFBundleDocumentTypes</key>
	<array>
		<dict>
			<key>CFBundleTypeOSTypes</key>
			<array>
				<string>****</string>
				<string>fold</string>
				<string>disk</string>
			</array>
			<key>CFBundleTypeRole</key>
			<string>Viewer</string>
		</dict>
	</array>
	<key>CFBundleExecutable</key>
	<string>GDMENUCardManager</string>
	<key>CFBundleIconFile</key>
	<string>icon</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>GDMENU Card Manager</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.3.3</string>
	<key>CFBundleIdentifier</key>
	<string>com.github.sonik-br.gdmenucardmanager</string>
	<key>CFBundleVersion</key>
	<string>1.3.3</string>
	<key>LSApplicationCategoryType</key>
	<string>public.app-category.utility</string>
	<key>NSSupportsAutomaticGraphicsSwitching</key>
	<true/>
	<key>NSHighResolutionCapable</key>
	<true/>
</dict>
</plist>

(Notable changes are the CFBundleExecutable being changed, and the addition of NSHighResolutionCapable, which is required for Retina display mode with this change)

And the contents of the GDMENUCardManager.app/Contents/MacOS folder is now what used to be the contents of the GDMENUCardManager.app/Contents/MacOS/GDMENUCardManager folder. The full directory listing of the app bundle now looks like this (ending with a * means executable):

Contents/

GDMENUCardManager.app/Contents:
Info.plist
MacOS/
Resources/

GDMENUCardManager.app/Contents/MacOS:
Avalonia.Animation.dll
Avalonia.Base.dll
Avalonia.Controls.DataGrid.dll
Avalonia.Controls.dll
Avalonia.DesignerSupport.dll
Avalonia.Desktop.dll
Avalonia.DesktopRuntime.dll
Avalonia.Dialogs.dll
Avalonia.FreeDesktop.dll
Avalonia.Input.dll
Avalonia.Interactivity.dll
Avalonia.Layout.dll
Avalonia.Markup.Xaml.dll
Avalonia.Markup.dll
Avalonia.MicroCom.dll
Avalonia.Native.dll
Avalonia.OpenGL.dll
Avalonia.Remote.Protocol.dll
Avalonia.Skia.dll
Avalonia.Styling.dll
Avalonia.Themes.Default.dll
Avalonia.Themes.Fluent.dll
Avalonia.Visuals.dll
Avalonia.Win32.dll
Avalonia.X11.dll
Avalonia.dll
ByteSize.dll
GDMENUCardManager*
GDMENUCardManager.Core.dll
GDMENUCardManager.deps.json
GDMENUCardManager.dll
GDMENUCardManager.runtimeconfig.json
HarfBuzzSharp.dll
JetBrains.Annotations.dll
MessageBox.Avalonia.dll
Microsoft.Win32.Primitives.dll
Microsoft.Win32.SystemEvents.dll
SOS_README.md
SharpCompress.dll
SkiaSharp.dll
System.Collections.Concurrent.dll
System.Collections.Immutable.dll
System.Collections.NonGeneric.dll
System.Collections.Specialized.dll
System.Collections.dll
System.ComponentModel.Annotations.dll
System.ComponentModel.Primitives.dll
System.ComponentModel.TypeConverter.dll
System.ComponentModel.dll
System.Console.dll
System.Diagnostics.DiagnosticSource.dll
System.Diagnostics.Process.dll
System.Diagnostics.StackTrace.dll
System.Diagnostics.Tools.dll
System.Diagnostics.TraceSource.dll
System.Drawing.Common.dll
System.Drawing.Primitives.dll
System.Globalization.Native.dylib
System.IO.Compression.Brotli.dll
System.IO.Compression.Native.a
System.IO.Compression.Native.dylib
System.IO.Compression.dll
System.IO.FileSystem.DriveInfo.dll
System.IO.FileSystem.dll
System.IO.MemoryMappedFiles.dll
System.Linq.Expressions.dll
System.Linq.Queryable.dll
System.Linq.dll
System.Memory.dll
System.Native.a
System.Native.dylib
System.Net.Http.Native.a
System.Net.Http.Native.dylib
System.Net.Http.dll
System.Net.NameResolution.dll
System.Net.Primitives.dll
System.Net.Requests.dll
System.Net.Security.Native.a
System.Net.Security.Native.dylib
System.Net.Security.dll
System.Net.ServicePoint.dll
System.Net.Sockets.dll
System.Net.WebHeaderCollection.dll
System.Numerics.Vectors.dll
System.ObjectModel.dll
System.Private.CoreLib.dll
System.Private.DataContractSerialization.dll
System.Private.Uri.dll
System.Private.Xml.Linq.dll
System.Private.Xml.dll
System.Reactive.dll
System.Reactive.xml
System.Reflection.Metadata.dll
System.Runtime.CompilerServices.Unsafe.dll
System.Runtime.Extensions.dll
System.Runtime.InteropServices.RuntimeInformation.dll
System.Runtime.InteropServices.WindowsRuntime.dll
System.Runtime.InteropServices.dll
System.Runtime.Numerics.dll
System.Runtime.Serialization.Formatters.dll
System.Runtime.Serialization.Primitives.dll
System.Runtime.dll
System.Security.Claims.dll
System.Security.Cryptography.Algorithms.dll
System.Security.Cryptography.Encoding.dll
System.Security.Cryptography.Native.Apple.a
System.Security.Cryptography.Native.Apple.dylib
System.Security.Cryptography.Native.OpenSsl.a
System.Security.Cryptography.Native.OpenSsl.dylib
System.Security.Cryptography.Primitives.dll
System.Security.Cryptography.X509Certificates.dll
System.Security.Principal.Windows.dll
System.Security.Principal.dll
System.Text.Encoding.CodePages.dll
System.Text.Json.dll
System.Text.RegularExpressions.dll
Tmds.DBus.dll
gdishrink_blacklist.txt
libAvaloniaNative.dylib
libHarfBuzzSharp.dylib
libSkiaSharp.dylib
libclrjit.dylib
libcoreclr.dylib
libdbgshim.dylib
libhostfxr.dylib
libhostpolicy.dylib
libmscordaccore.dylib
libmscordbi.dylib
tools/

GDMENUCardManager.app/Contents/MacOS/tools:
IP.BIN
menu_data/
menu_gdi/

GDMENUCardManager.app/Contents/MacOS/tools/menu_data:
1ST_READ.BIN
readme.txt

GDMENUCardManager.app/Contents/MacOS/tools/menu_gdi:
disc.gdi
track01.iso
track02.raw
track03.iso
track04.raw

GDMENUCardManager.app/Contents/Resources:
icon.icns

from gdmenucardmanager.

Pistacchione avatar Pistacchione commented on June 13, 2024 1

Yep, it works now, thanks to @sonik-br and @ticky !

from gdmenucardmanager.

sonik-br avatar sonik-br commented on June 13, 2024

Hi.
This might be related to #8
I still can't figure out what causes the problem.

Can you do the same test with version 1.3.0 or 1.3.1 ?

from gdmenucardmanager.

Pistacchione avatar Pistacchione commented on June 13, 2024

Hi,

I think you can workaround this issue as described here #11

from gdmenucardmanager.

ticky avatar ticky commented on June 13, 2024

This isn't anything to do with #11, this is likely to do with modern macOS requiring user consent for programs to access external drives

from gdmenucardmanager.

Pistacchione avatar Pistacchione commented on June 13, 2024

This isn't anything to do with #11, this is likely to do with modern macOS requiring user consent for programs to access external drives

The strange thing is that if you launch it via command ./GDMENUCardManager.app/Contents/MacOS/GDMENU line it works

Maybe @sonik-br should do some changing in the source code to handle user consent on macOS?

from gdmenucardmanager.

ticky avatar ticky commented on June 13, 2024

That'll be because it's inheriting permissions from your terminal emulator

from gdmenucardmanager.

sonik-br avatar sonik-br commented on June 13, 2024

That's great!
I've updated the AppBundle.tar.gz file.
Can you test it again just to make sure I've packed it the right way?

from gdmenucardmanager.

ticky avatar ticky commented on June 13, 2024

Yep, that seems to work! 👍🏼

from gdmenucardmanager.

sonik-br avatar sonik-br commented on June 13, 2024

Great!
Thanks @ticky and @Pistacchione for helping with this issue!

I will wait for @YunaVirtua to test it too but it should work.

from gdmenucardmanager.

YunaVirtua avatar YunaVirtua commented on June 13, 2024

I can confirm it works as it should now

from gdmenucardmanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.