Can I create a console application using Xamarin.Mac? - macos

I just purchased Xamarin.Mac in an effort to create a cross platform console utility. I figured this would be trivial but I am missing something.
How can I create and what do I need to do to deploy a simple Console.WriteLine("Hello World"); app using Xamarin.Mac?
here is the result I am looking for from the console in any folder on my mac.
$ my_xammac_app
Hello World
$

Use File - C# - Console Project to create console c# application

Create a new Mac project and simply use the assemblies you need.
You can delete the UI files that a new project contains (such as the .xibs and the files that go along with that). You don't have to use them.

The options are described here:
http://www.mono-project.com/Guide:Running_Mono_Applications

Related

Writing my first ROS program using Visual Studio

I am trying to write my very first ROS Porgram (Hello world) using Visual Studio 2022.
I am using my Windows 10 computer. I managed to install ROS (noetic) on my computer and create a terminal window for it on windows terminal.
I saw this tutorial and try to give it a shot, however I have doubts if I am on the right track.
https://github.com/Brabalawuka/RosOnWindows
I managed to create my catkin ws and direct it to src like so:
c:\catkin_ws\hello_world\src>
However I was not able to run devel\setup.bat .
This is what it look like in my documents:
Can you please help me. I don't think I am far away.
Kind regards
Assuming hello_world is a package I think it must be kept inside of the src folder. See this Catkin_Workspace for more details on the recommended layout for workspace.
Try building the workspace again and I hope it helps.

How do I build Flutter application locally?

I have developed (on a Mac) a small Flutter app to learn the technology. Now, I would like to build it and use it on Mac, Linux and Android. The few packages I have used claim compatibility with all systems.
So the first thing I did was to run flutter build macos. I indeed obtain an application under build/macos/Build/Products/Release/nameofmyapp.app. It seems this runs correctly, but it fails, for instance, loading data from a DB, which is the first thing it should do.
I have a few questions:
are there any other steps that I should take? I see a long guide about the release process, but to be frank I don't need or want any of that: I only want to use the app myself. Is there something else to do other than flutter build macos?
am I looking for the built app in the right place?
if I did everything correctly, could it be that I need to authorize the app to access to the file in some way? Should I manage this workflow myself, or is there a standard way to perform this action in Flutter?
Sorry for asking more than one question, but I am not sure whether what I am doing wrong is
the build process
where to look for the built app, or
(not) handling the app permissions.
EDIT
Following a suggestion by Madhavam, I tried flutter run --release. The result is identical to running the built application: nothing is loaded from the database, and no errors appear in the console.
To be clear, these are the libraries that are not working:
sqflite should load data from a database (in my Documents folder) but does not show anything
file picker cross should allow me to load data from a JSON file, but when I try this interaction, I an not shown any dialog to load a file
shared preferences should read some settings, but they all appear as null
In short, anything that has to do with interacting with external files or storage does not seem to work
Yup, you have to manage it yourself. Take a look at this package
:https://pub.dev/packages/permission_handler
If you're using Firebase then you probably need to add the release keys.
One thing too, if you face an error only in the release build then I recommend running the app with flutter run --release so that you can see the errors that are being thrown.
So it seems that this is related to the default being an app that runs in sandbox. Since I do not want to distribute the app, it was fine for me to disable this setting. Details are in this answer

Is it possible to create a standalone Quick Look extension/plug-in?

According to Apple we should new build Thumbnail or Preview Extensions instead of the old Quick Look generators which will be deprecated (probably in Big Sur).
There is also no Option to create a Quick Look plug-in project in Xcode anymore. Instead you need to create an application that contains a quicklook extension target.
My question is: Can I not create a standalone Quick Look extension (or plug-in) anymore to preview files without a useless wrapper app that fulfils no purpose? Has anyone tried or found out if this is still an option?
Thank you.

How to change MFC application UI

I have implemented an windows application using Visual studio 2008 and for front end I used MFC Controls.
I need to change look and feel of application. Here is Ui sample image of old and new look.
Can anybody suggest me how it can be done in visual studio or should I use some other tool.
Any help would be appreciated.
Thanks
I can think of 3 ways:
Implement it yourself
Use an external library like Codejock
Adding a manifest file to your project
Using a manifest file will give you the look and feel of the OS your app is running on.
You can overwrite some needed methods of default CMFCVisualManger by creating your own class.
Then it's up to you how you want to design it.

Adding a Library to your build and link path in XCode

I am tryingo to build a GUI application using the JUCE framework on MAC OSX.
I have dowloaded all the API's and got a small hello World program running fine.
However, when I add files to my Xcode project I get compilation errors that say that the Juce library files don`t exist. I would like to know how to get the library API in the build and link path in XCode so that it finds the neccesary files for compilation.
What I would do on Visual Studio going to properties and adding aditional library dependencies, is what I need to do in XCode but I don't know how.
Any help greatly appreciated.
thanks.
Old question but maybe a useful answer in the future....
If you have the "Hello World" up and runnning, it should already be linked to the library. Are you using the introjucer? This should help get everything up and running for you. If you are, you need to add classes etc to the introjucer, as this sets up Xcode / VStudio for you. If not, (Presuming XCode 3 as you are using leopard) goto Xcode > Preferences. Scroll along to source trees, and add the path to the juce folder in there.

Resources