Auburn / FastNoiseLite

Fast Portable Noise Library - C# C++ C Java HLSL GLSL JavaScript Rust Go

Home Page:http://auburn.github.io/FastNoiseLite/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix Previewer GitHub Release download for macOS

Zorgatone opened this issue · comments

It was not possible to find any compatible framework version
The framework 'Microsoft.WindowsDesktop.App', version '3.1.0' was not found.
  - No frameworks were found.

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.WindowsDesktop.App&framework_version=3.1.0&arch=x64&rid=osx.10.15-x64

WinForms is only available on windows (note that .NET 6 will have a cross-platform GUI)

The preview tool doesn't use win forms, it uses .Net Core you can download the framework for MacOS here: https://dotnet.microsoft.com/download

@Auburn I have everything installed, I tried running it with dotnet FastNoiseLite.exe and dotnet FastNoiseLite.dll and both gave me that error.

That required library (Microsoft.WindowsDesktop.App) isn't available on macOS and Linux.

Maybe I did something wrong? The Previewer was tested to be working on OSX/*nix, right?

Could you check the latest release, https://github.com/Auburn/FastNoise/releases/tag/v1.0.3

I fixed up some missing framework dependencies. I've tested Windows and Linux

I tried to download the Mac file and run it. It's just a binary file without a filetype ending- I tried renaming it to .app or .zip, but neither worked. The OS didn't even recognize that it was an app that I could open. Should I mark it as executable and run it from the command line?

I don't know what the standard practice is on MacOS, on Linux I just mark the file as executable and run it

That is the file that .net produces when publishing for MacOS

@Auburn is the new binary without an extension?

I tried this two ways and didn't work:

 ~/Downloads  dotnet ./FastNoiseLiteGUI-OSX64                                                                                                         ✔  6611  13:02:52
Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET program, but dotnet-./FastNoiseLiteGUI-OSX64 does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
 ~/Downloads  ./FastNoiseLiteGUI-OSX64                                                                                                              1 ↵  6612  13:03:01
zsh: permission denied: ./FastNoiseLiteGUI-OSX64
 ~/Downloads  chmod +x FastNoiseLiteGUI-OSX64                                                                                                     126 ↵  6613  13:03:06
 ~/Downloads  ./FastNoiseLiteGUI-OSX64                                                                                                                ✔  6614  13:03:10
[1]    4972 killed     ./FastNoiseLiteGUI-OSX64
 ~/Downloads  ./FastNoiseLiteGUI-OSX64                                                                                                     SIGKILL(9) ↵  6615  13:03:31
Unhandled exception. System.InvalidOperationException: Could not detect platform. Are you missing a platform assembly?
 ---> System.InvalidOperationException: Platform type 'Eto.Mac.Platform, Eto.Mac64' was loaded but is not valid in the current context.  E.g. Mac platforms require to be in an .app bundle to run
   --- End of inner exception stack trace ---
   at Eto.Platform.get_Detect()
   at Eto.Forms.Application..ctor()
   at Program.Main(String[] args)
[1]    5889 abort      ./FastNoiseLiteGUI-OSX64

I'll just try to open the previewer solution on mac and build it myself and see if it works

The application output type of the solution seems to be configured as "Windows application"

According to https://github.com/picoe/Eto it will run on https://github.com/mono/monomac which uses MONO instead of .NET Core.

(Also monomac is an archived repo, looks like it's deprecated isn't it?)

Hm, so you can't build it even if you change the configuration type?

monomac is depreciated but it also supports Xamarin.Mac

It's hard for me to look into this without a Mac :/

Here's the tutorial I'll follow it. https://github.com/picoe/Eto/wiki/Running-your-application
Even after installing mono framework on my mac, the file in the release link didn't work (missing libraries and needs to be bundled in an .app) https://github.com/Auburn/FastNoise/releases/tag/v1.0.3

You can try running this command to publish, it should bundle it as a .app

dotnet publish .\FastNoiseLiteGUI.csproj -c Release -r osx-x64 --self-contained

I was able to build, but with a slightly different command from the one in publish.bat, which is:

dotnet publish -o .\publish -c Release -r osx-x64 --self-contained=true /p:MacBundleDotNet=true /p:PublishSingleFile=true /p:AssemblyName=FastNoiseLiteGUI-OSX64.

Ignore the file ./.publish/FastNoiseLiteGUI-OSX64 (it's not an app bundle)

Copy the bin/Release/netcoreapp3.1/osx-x64/FastNoiseLiteGUI.app which is the file that should be used (you can then make a .dmg image containing the .app file to make it downloadable on GitHub)

I don't know if I can create .dmg images on Windows

I zipped it, does this work?

FastNoiseLiteGUI.app.zip

Hello, I would like to try the GUI app on a mac. As Zorgatone said, the release is just a binary file which doesn't open by itself. After installing .net core 3.1 lts and chmodding the file to 777, I get this error:
Unhandled exception. System.InvalidOperationException: Could not detect platform. Are you missing a platform assembly?

 ---> System.InvalidOperationException: Platform type 'Eto.Mac.Platform, Eto.Mac64' was loaded but is not valid in the current context.  E.g. Mac platforms require to be in an .app bundle to run
   --- End of inner exception stack trace ---
   at Eto.Platform.get_Detect()
   at Eto.Forms.Application..ctor()
   at Program.Main(String[] args)
zsh: abort      /Users/o/_APPS/FastNoiseLiteGUI-OSX64
Saving session...completed.

I tried the zipped version you posted (FastNoiseLiteGUI.app.zip). Judging by the content of the zipped folder, this appears to be a valid MacOS App bundle. But after renaming the file to remove the .zip extension and then double-clicking it, I get an error message stating something like "this program is not supported on this mac".
Trying on the command line with open -a /Applications/FastNoiseLiteGUI.app gives the error
The application /Applications/FastNoiseLiteGUI.app cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10661 "(null)" UserInfo={_LSLine=3762, _LSFunction=_LSOpenStuffCallLocal}
I should mention that I am on an M1 Mac, it's possible that the executable needs to be compiled for that new processor. So I'm not sure if the problem is with the executable, dotnet 3.1 or the M1 processor.

dotnet publish .\FastNoiseLiteGUI.csproj -c Release -r osx-x64 --self-contained

Thanks for the command, the zipped file from releases didn't work for me neither.
After executing this command I was able to start the app from generated folder at bin/Release/netcoreapp3.1/osx-x64/ path

I'm guessing you are building on MacOS?

I'm guessing you are building on MacOS?

yes. on 11.4 mac os (x64). build from sources works well, but not the package from the release page.

The solution for this is probably to setup github actions to build the preview app binaries so they can be built on their respective native platforms.

I zipped it, does this work?

FastNoiseLiteGUI.app.zip

downloaded it and deleted the .zip part of the name, I get this error:

joex$ open -a ~/Downloads/FastNoiseLiteGUI.app 
The application /Users/joex/Downloads/FastNoiseLiteGUI.app cannot be opened because it has an incorrect executable format.

On a Macbook Pro mid-2012 with High Sierra

I just bought a mac mini, so I can have a look a fixing this properly when I get it setup

I can confirm this runs on my Mac, could some other people also test it please:
FastNoiseLiteGUI-OSX64.zip

I can confirm this runs on my Mac, could some other people also test it please: FastNoiseLiteGUI-OSX64.zip

Doesn't work for me, If I try to open unzipped package. I see this
image
(in security config there is no any requests, to allow start this app)
image
If I go inside the content folder and try to start I get this error
image

Works for me! But I had to disable Big Surs strict permission handling for unsigned (or whatever) apps.

  1. move the FastNoiseLiteGUI.app file into target folder, here: from Downloads to /Users/o/_APPS/
  2. sudo spctl --master-disable (WARNING: This seems to enable execution of all downloaded apps (after the user gives permission as in 4.) and is a potential security risk. I think it's ok as long as you know what you're doing, meaning you trust the app in question to not contain any malware etc.)
  3. sudo chmod -R 755 /Users/o/_APPS/FastNoiseLiteGUI.app
  4. Double-click in Finder and give permission to open the app.

Great, much easier now to try different settings, thank you @Auburn!

Edit: Specs: Macbook Air M1, Big Sur 11.6

Thanks @rev111!

I've updated the binaries in the latest release and linked your comment as a solution to MacOS permission issues

The app I've downloaded just now didn't have execute in its binary file permissions (chmod +x Contents/MacOS/FastNoiseLiteGUI), after I've fixed that I could grant it permissions to run from Security preferences panel as usual (without doing the whole --master-disable).

Also there's another FastNoiseLiteGUI.app inside your FastNoiseLiteGUI.app/Contents/MacOS, which only contains the icon, not sure what happened there but it doesn't matter.