Is it possible to compile a command line app written in Swift on macOS to run on Linux? - swift

I'm new to Swift and am writing some simple command line apps. I'm using a Mac.
I know how to compile to a binary that will run on macOS but is it possible to take the same source code and compile the binary to run on Linux from a Mac? If so, any chance it could be compiled to Windows too?

Related

How to run swift in vscode?

I am new at swift programming language and i am going to start . before starting i setup the visual studio and wrote just print("Hello, World!") . but after i pressed run without debugging it tells the following window can not start debugging because no configuration has been provide
I’m doing same thing - simple one line print…
I installed Debian - bullseye. Installed Swift, installed vscode.
In vscode I use the Swift extension curated by apple. That extension needs the extension CodeLLDB.
When you click Run, I select LLDB not node or anything else.
Works well except when I try to run and debug I’m getting an ELF issue seems something is 32bit and something is 64. Debian is 64, Swift —version works!?
How do I figure out what is 32?

How to write upgrade command in the program

Want to upgrade youtube-dl program in my program.
Going to pack youtube-dl and Java and use ProcessBuilder to launch youtube-dl.
Considered using pip but as long as read it's not proper way.
How should I upgrade youtube-dl python scripts in my program?
Here is my prototype. This is assume you can use youtube-dl command from your linux terminal.
Wanna port to Windows and MacOS.
I found very nice example code for downloading the latest version on Github.
https://github.com/joejoe2/wav-pcm/blob/master/updatecheck.java
When researching about wav waveform plotting I found this.
https://www.youtube.com/watch?v=FOZnBINrnXI

how to re-run java (UI automator/python) script recorded using culebra tester

I have python 2.7, android view client, adb environment setup in my PC. Also I have connected my android device with culebra tester installed in it and performed some Test case steps to record script (Java/python). Now I have the recorded script ready. Can any one tell me the right procedure to re-run the recorded script in the same android device automatically, because culebra tester doesn't have any option to re-run the test case. Any inputs would be appreciated.
Once you have generated your test script (if you selected python as the code generation language), you download it, rename it (it is downloaded as .py.txt to avoid browser warnings) and then you can run it as any other AndroidViewClient/culebra script.
You need python and androidviewclient installed via pip or easy_install.
If you generated java code, then you copy or paste the code to your Android Studio project, create the APK, install and run.

Compile standalone Windows .exe using MATLAB on a mac

I am currently using this code to compile a standalone .app file of a MATLAB GUI on my mac:
mcc -m eotvos.m -a ./*
This works perfectly and I have a fully-functional mac executable. Is there a way to create a windows executable on my mac? I know that code works within MATLAB on windows. Is there a way to create a .exe file on my mac?
As far as I am aware this is not possible. It is possible to cross compile between 32bit/64bit on the same OS but not between OS's. Though I cant find it explicitly in the docs at the moment. Will update if I do.

Is possible build an iPhone project from mac os x terminal and without an xcode project?

is possible build an iPhone project from Mac os x terminal and without an xcode project?
I'd like to make an iPhone static library without create and using xcode project and only with the terminal.
Thanks
For subsequent builds, after the first one, you can look at the command lines that Xcode executes in its Build window (there's a little command disclosure tab) and copy all those command lines into a script or suitable makefile template.