Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer versions #119

Open
therealbill opened this issue Sep 17, 2020 · 15 comments
Open

Installer versions #119

therealbill opened this issue Sep 17, 2020 · 15 comments
Assignees
Labels
feature New feature or request
Milestone

Comments

@therealbill
Copy link

Describe the bug
Application unable to run in MacOS Catalina

To Reproduce
Steps to reproduce the behavior:

  1. Set executable bit
  2. Launch
  3. Watch it complain about lack of developer signature
  4. Follow standard producer to allow
  5. Watch it need permission to open a .dylib and then bomb because you can't follow the accepting procedure for non-executables

Expected behavior
The app should launch

Screenshots

Logs
Not a log, however:
... libhostpolicy.dylib) not valid for use in process using Library Validation: library load disallowed by system policy

Version:

  • OS: Catalina
  • Irony Version 1.5.53

Additional context
Trying to go at this one by one is not a good idea. Easiest solution is to notarize the release. Despite what articles like https://appletoolbox.com/everything-you-need-to-know-about-app-notarization-in-macos-catalina/ claim, running it from the Terminal is not a solution when the binary in question is then opening additional libraries. I would recommend the following resource: https://scriptingosx.com/2019/09/notarize-a-command-line-tool/

Failing notarization, I'd recommend adding a note that Catalina and above are not supported/will not run without extensive manual work by the user.

@therealbill therealbill added the bug Something isn't working label Sep 17, 2020
@bcssov bcssov added help wanted Help wanted on the issue and removed bug Something isn't working labels Sep 18, 2020
@bcssov
Copy link
Owner

bcssov commented Sep 18, 2020

OSX is becoming a major pain I see. I get the gist of it but most of it is alien to me as I've never used a OSX machine in my life. Even the initial instructions on how to run it were written by a contributor. Applying for some developer program and certificates are out of the question for me at the moment. I promised myself to keep this program free of spending any amount of $ on its development (in the spirit of open source).

Anyone willing to find an alternate way to make it work for catalina users is welcome. I do not have access to an OSX machine and time to spend on this issue. In the meantime added this into the FAQ and linked towards this ticket.

@bcssov
Copy link
Owner

bcssov commented Sep 18, 2020

So in theory you'd need to do the following?
Settings -> Security and Privacy -> Allow apps downloaded from...
Then right clicking the app and choosing "Open" and clicking allow anyway on a dozen or so files.

@therealbill
Copy link
Author

So in theory you'd need to do the following?
Settings -> Security and Privacy -> Allow apps downloaded from...
Then right clicking the app and choosing "Open" and clicking allow anyway on a dozen or so files.

That is what I thought, but the process is a bit more involved. Once you've allowed the app itself it will then deny it with the delete/cancel window.. Then you have to go into settings -> Security and Privacy and find where it shows the last thing to be denied. In reports of similar issues with other programs on GitHub that use c# and dynamic libraries in the same way the process can take 15-30 minutes because it is every library it needs to open.

That problem is unique to the methodology as other apps that do not use it only need the app itself, and thus you don't even need to go into Settings but instead use the right-click -> open -> allow option and you're done.

I promised myself to keep this program free of spending any amount of $ on its development (in the spirit of open source).

Side note: OSS isn't about not spending money.

@bcssov
Copy link
Owner

bcssov commented Sep 19, 2020

In that case I'm gonna leave the FAQ link towards this ticket until another solution is found. Despite having a rather low osx userbase of about 1% I will still deploy in the same form osx builds.

As for what OSS is, it's really opinionated and not worth discussing. To me in this case it's a promise of not spending any additional amount of $ than what I already have at my disposal since I'm putting hundreds of hours into this app. And as long as I'm working on this project I'm going to keep it that way. I've ignored several libraries just because of this very promise that I made to myself.

In end the requirements to notarize an app are ludicrous at best. From what I read either Apple really wants to close OSX like IOS or it's a really crappy implementation in the end.

@DanStaal
Copy link

I’ve managed to get a bundle together that allows you to launch this as any other app, but I'm not sure how to submit it into your Github structure - To get it to work, there's a bit of a change in the packaging structure (there's a couple of nested directories that need to be created) and an Info.plist file. I'm not sure if it just works for me because I went through the above process first on an earlier version either. (It also doesn't mean that the app is a signed app, but hopefully at least it's a single allow.)

I'm attaching the Info.plist file - it's pseudo-XML, but actually order-based: Key values follow key names. The CFBundleSignature entry may need to be changed/registered (it should be unique), and of course the CFBundleVersion entry should change with each version update.

Info.plist.zip

The full structure would be:

  • IronyModManager.app
    • Contents
      • Info.plist
      • Resources
        • Empty. (It's an empty directory.)
      • MacOS
        • Current files.

Where the 'MacOS' folder is the current distributed directory.

@bcssov
Copy link
Owner

bcssov commented Nov 24, 2020

Hello thanks. I'll have to adjust my publish procedures a bit to make this work and probably update Updater app to understand this structure.

The deploy/package (not committed) and publish scripts are actually responsible for creating the deployment structure so I'll have to rework this for macos version (you can see the publish script in the publish directory).

@DanStaal
Copy link

No problem, and thanks for actually supporting Mac - so many times mods and mod managers are never even available.

@bcssov
Copy link
Owner

bcssov commented Nov 24, 2020

Note to self.

After some googling around found these helpful links and packages to help in making app bundles and installers:
https://avaloniaui.net/docs/packing/macOS
https://github.com/egramtel/dotnet-bundle
https://github.com/qmfrederik/dotnet-packaging

@jwvanderbeck-Unity
Copy link

Thank you @DanStaal , I just used your information to manually make a bundle for myself and works perfectly!

@bcssov
Copy link
Owner

bcssov commented Nov 26, 2020

Out of curiosity since I've never used a mac before. How do you guys now launch Irony? This is for the documentation.
I'm assuming you still have to set the chmod +X permission or does with this structure mac os immediately add proper chmod permissions?

@DanStaal
Copy link

With the app bundle you still need to set the chmod +x on the executable, but once that's done you can double-click on the 'IronyModManager.app' directory/bundle and it launches like any other macOS app.

@bcssov
Copy link
Owner

bcssov commented Nov 26, 2020

So seems like this will be the future setup then:

  1. OSX Portable version (remains as is)
  2. OSX Installer version (using the setup you posted here)
  3. Linux Portable version (remains as is)
  4. Linux Installer Version (using the packaging setup with the help of dotnet packaging)
  5. Windows Portable version (remains as is)
  6. Windows Installer version (remains the same)
    No ETAs though for this one.

@bcssov bcssov changed the title Fails to Open on macOS Catalina Installer versions Jan 16, 2021
@bcssov bcssov added feature New feature or request and removed help wanted Help wanted on the issue labels Jan 16, 2021
@bcssov bcssov added this to the vNext milestone Jan 16, 2021
@bcssov bcssov self-assigned this Jan 22, 2021
@bickerx2
Copy link

bickerx2 commented Feb 7, 2021

Not sure if this helps but for anyone wanting a workaround for now running the following command will remove the quarantine flag from all the files allowing it to run (you will still need to chmod +x the main file)

sudo xattr -r -d com.apple.quarantine <path_to_portable_install_on_macos>

src: https://derflounder.wordpress.com/2012/11/20/clearing-the-quarantine-extended-attribute-from-downloaded-applications/

@bcssov
Copy link
Owner

bcssov commented Oct 31, 2021

Just quoting info about various linux packaging:

I'd lean towards tar.gz where possible
though wouldn't hurt to have an rpm and deb available for users of redhat derivatives and debian derivatives respectively
redhat users could then use rpm -I <whatever.rpm> to install irony
debian users could dpkg -i <whatever.deb> to install irony
and everyone else gets a tarball which are much easier to deal with than zips on non-windows platforms

@bcssov
Copy link
Owner

bcssov commented Jan 7, 2023

From discord:

For anyone having trouble running Irony on recent Mac OS because the OS complains about files from an unidentified developer... the problem seems to be that if you download the file with safari, it (and all unzipped files) are marked with the quarantine flag.

To remove this flag, open a terminal and go the folder that contains the folder with irony in it (in my case, IronyModManager) and run this command:

xattr -r -d com.apple.quarantine IronyModManager

That should remove the quarantine flags from all files in the folder. Doing this allowed me to launch it without trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants