How to run external program in SilverLight on Mac OS? - silverlight

I have a silverlight application, I want to use it to run a jar file. In windows, I use WScript to do it. How do I achieve this in Mac OS?

Related

What to install and how to run an executable file on Mac?

So I'm in terminal, and have a directory called CAPTURE on my desktop, I'm trying to run a program called 'testme'. I read that you need to have build-essential installed but I think that's only on Linux systems and I'm on a Mac so it wasn't necessary because it's already built in (I think). So, I navigated from ~ with:
cd Desktop/CAPTURE
Then, I tried running a bunch of different commands that I found while looking on the internet:
./testme
which returned zsh: exec format error: ./testme
xcode-select --install
which installed properly and I thought I could run the ./testme command but I got the same error as before. Then I tried navigating to the directory again and used
chmod +x ./testme
./testme
which also did not work. I've never run executables before so I really have no familiarity with these commands so they might be super wrong. If anyone can help me run the file properly, that would be much appreciated.
Since your question is tagged as C and Clang, and you are talking about build-essential, I will assume that you are attempting to build an application from source code.
Instead of build-essential, in macOS, you need Xcode. The Xcode CLI tools will work if the application is text-only or Curses, but you will need the entire Xcode IDE for any graphical application.
If running ./testme is telling you Executable format error is probably because it's a prebuilt executable, very likely a Linux ELF executable that will not run in macOS.
My suggestion is to try to build the software. Most C applications will build if you run make inside the directory. make is installed by default by Xcode. Other applications may need a third-party build system, such as CMake, but I do not know if that's the case.

Build C executable for Raspberry Pi on Windows or Linux

I have to design a C executable (no GUI) that is supposed to run on Raspberry PI. I'm familiar with design using IDE like Visual Studio or Eclipse (with CDT plugin). If i use Raspberry PI as a design machine, I think I have no chance to use a standard IDE. I should use makefiles and gcc compiler only.
Is there any chance to develop Raspberry PI executable using Visual Studio (for Windows) or Eclipse (for both Windows and Linux).
You can specify to eclipse projects with Makefiles. You can also specify a compilation toolchain.
So yes, you can develop and compile for Raspberry Pi or for other plateforms using Eclipse.
For getting toolchain and other tools for Rasp Pi you can find things here.
In Eclipse, you create a new or import a project choosing Makefile Project with Existing Code then add your toolchain.
If you have a newer Pi like the 4, you should be able to run eclipse directly from the Pi desktop. You can download via:
sudo apt-get install eclipse
This will be a stripped-down version and will likely run quite slow, so I agree compiling on a more powerful remote machine is better...
Is there any chance to develop Raspberry PI executable using Visual Studio (for Windows) or Eclipse (for both Windows and Linux).
Yes, this is called cross-compiling. You can set up a cross-compile toolchain for the raspberry pi on windows or linux and configure your Eclipse CDT project to build with the toolchain. You can even set up remote debugging.
This website has good information and a step-by-step guide for windows using cygwin.
This looks like a good guide for linux.
Edit:
Just realized you asked for Visual Studio on Windows. I don't think there is Visual Studio support for this. The example I pointed to sets up cygwin so you have an emulated linux environment. You could also set up a VM using free VM software and install a linux environment that way, and run eclipse CDT from there. This is what I did when setting up a cross compiling environment for the Raspi.

Switch C project configuration in Eclipse between Windows and Linux

I installed Eclipse with CDT plugin. I created a simple TCP client software that runs on Windows. I can open the project on Ubuntu also. I'd like to change build configuration in order to create Linux executable. Is it possible to create executable for the operating system that the project is compiled. I mean if I compile the project on Ubuntu, there should be Linux executable and if I compile the project on Windows, there should be Windows executable. Is it possible?
It is possible. When you are creating a Project in Eclipse, you are provided with two build options. One debug and one release. The release build will create the executable for the OS in which it is run.
Good Luck!

Build opencv exe in one machine and run in another which has no opencv installed?

I am developing an OpenCV application in linux machine with Netbeans IDE. I need to run the same application in another machine where opencv is not installed in it. Is it possible to do it? Or the machine where I run the application needs opencv to be installed?
Yes, it is possible using static linking, but usually OpenCV doesn't distribute the compiled static libraries. You will have to compile your own .a and link against those to create a standalone executable.
EDIT: Take a look at this question

Google-NDK / Compiling command-line C applications without any JNI interaction

Android-NDK is mostly used to write/port native libs which can be called from Java through the JNI mechanism.
I have an ARM based evalboard embedding Android. This evalboard has a serial port so that I can log with a remote terminal on it and then launch commands or other apps ("command line apps" - non Java apps).
I wonder if that is possible with Android NDK to compile "pure" C applications which I will later use as a command on the remote shell? The main idea is to benefit from the toolchain provided by Google-NDK to build code which never interacts with the Dalvik machine.
Best Regards,
Apple92
Hello World C program using Android Toolchain is an article to explain how to compile using android toolchain. I think it useful to you.
Yes, you can compile command line programs using the NDK. If you take a look at any functioning Android system, you'll find many examples of command line programs which have been compiled using that same compiler.
Yes, there is BUILD_EXECUTABLE command, which acts like BUILD_SHARED_LIBRARY but produces an executable.
The trick is the libraries your executable depends upon - they will either need to be on device already (/system/bin) or you will have to upload them with your executable.
I came up with the following script to upload and execute tests:
#!/bin/sh
adb shell rm -r /data/temp
adb shell mkdir /data/temp
for i in dst/*
do
adb push ${i} /data/temp
done
cat <<EOF | adb shell
LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/data/temp
/data/temp/test
exit
EOF

Resources