I've been trying to communicate with my DOSBox window using xdotool on OS X, but all my efforts have led to nothing. However, this project shows that it is possible to use xdotool on DOSBox with X11 under Lubuntu, so I guess the problem lies in the fact that DOSBox for OS X does not support X11. What I've tried so far is launching DOSBox (installed from brew) in a XQuartz terminal, and trying to get the window ID with xdotool, which only works for X11 application windows (like xterm and xclock) so far. I've also tried to run the code from the project I linked, which uses C++ and the X11 C library, but that also wasn't able to find the window.
Can anyone point me in the right direction for building applications (and DOSBox in special) on OS X with X11 support? So far TK and Qt (I believe they are build systems that are able to build cross platform) seem the best next directions I can find, but I'm not sure if I can use them for my purpose.
What I'm trying to accomplish in general is to send keyboard signals and get pixel values from DOSBox (the exact same thing as the project I linked), so I'm also open to suggestions for doing it in an alternative way.
I'm not interested in cliclick tool (a similar tool similar to xdotool that is native to OS X), as I believe I can't use it to send signals non-active windows and because Linux support is important for this project.
I've installed DOSBox (and DOSBox-x) from homebrew and from source, and tried XQuartz versions 2.7.8 - 2.7.10.
Related
Currently using mac osx. I am curious as to why these terminals are pointing to different pythons, i.e. the iTerm -> Homebrew python, whereas Pycharm-embeeded-terminal -> Apple-provided python.
Pycharm's terminal doesn't change the Python version corresponding to Python version at Project Interpreter
seems closest to my question, but but not quite in that the os there is Windows and the solution doesn't help in my case.
I had same issue, but with Android Studio, which is also IntelliJ based IDE. You should edit some files in your IDE's settings manually
My question
Answer
Then you should restart your IDE.
Is it possible to develop cross-platform application on Windows and can also compile for Mac OS X from Windows? I have checked Qt but that requires one to compile from Mac using Xcode.
If this is your priority then one option would be Java as at least a jar file built on one platform can be run on another.
If however you're talking about C or C++...
If you are creating a small command line tool then you might be able to make this work with gcc and a cross compiler, but I think it would be a lot of work.
If however you are wanting to create a GUI application I would urge you to give up now. There are so many issues - you'd have to use Carbon or Cocoa APIs which you can't build for on any other platform, you'd have to link against frameworks which won't exist on your compilation host, you won't be able to easily generate .plist files. Qt won't help as you need to be able to build it, which relies on these same frameworks.
In short, there's no alternative to building on an actual mac.
Furthermore, when it comes to fixing bugs, you will absolutely have to do this on a mac (either physical or virtual).
From what I know , in general you do need a mac to make the executable , even for a simple ansi c program you need gcc for mac.
You can create MacPorts Portfile.(If your application is open source)
A MacPorts port is a set of specifications contained in a Portfile
that defines an application, its characteristics, and any files or
special instructions required to install it. This allows you to use a
single command to tell MacPorts to automatically download, compile,
and install applications and libraries.
Take a look at IMCROSS.
IMCROSS is a simple, scripted method of installing cross-compilers and
cross-compiled libraries on a Linux (or possibly other *nix) system,
so that you can develop programs targeted to run on Microsoft Windows
and Mac OS X at the same time and in the same environment as you
develop Linux versions of those programs.
You can certainly do this using Real Studio. It can create Mac OS X applications on Windows without any trouble.
It cross-compiles for Windows, OS X and Linux. And it does it from any platform. It also can create web apps.
Sounds like you should check it out.
Hi stackoverflow community!
I am about to start developing patches for FreeBSD Ports Collection (pkgng utility) using C programming language.
The problem is that I am using Mac OS X and I am really do not want to switch to another operating system. I have installed Freebsd 9.0 on Parallels Desktop VM. Xcode 4.1 seems to be rather nice development tool for C.
Is it possible to implement development for FreeBSD via Xcode 4.1? How to set up project environment for such form of development and compile source for FreeBSD?
I am also opened for any other suggestions concerning cross-platform development using MacOS X to develop patches for FreeBSD. Which is the best way to organize all necessary stuff?
Since you want to develop patches for pkgng, I would strongly suggest that you compile and test the code on FreeBSD, because it is the only system that uses the ports and packages system that pkgng interfaces with. So unless it can cross-compile for FreeBSD, using any OS X IDE is probably not a good idea.
I'm not familiar with Parallels, but there is probably a file-sharing mechanism that you can set up between OS X and the FreeBSD running in the VM. That way you can edit your files on OS X and use them under FreeBSD.
X Code is really nice, and I would lean toward using it but then doing regular builds on a system actually running FreeBSD. If you have source for everything you're using (except standard libraries whose interfaces match), there is no reason not to work on OS X with Xcode. You can build your own libraries if need be. One thing writing cross platform does (provided you regularly build on the other platform) is make your code more portable. It's easier to avoid using platform specific "extensions".
I am new to UNIX and Mac OS X systems and wondering how debugging on Max OS X works. I am from Windows world and I am familiar with debugging system in Windows like attaching to a process with DebugActiveProcess, reading/writing memory with Read/WriteProcessMemory and so on...
I don't know if Mac OS X's debugging also woriking like Windows but
I want to know how a debugger in Max OS X communicates with a target process. Can anyone give me some hits of a start point or documents where I should read first?
The debugging interface on OS X and most Unixes is called ptrace.
Type man ptrace at a command prompt for information on how ptrace communicates between processes, and also have a look at the header at /usr/include/sys/ptrace.h
The typical debuggers are gbd and (recently) lldb. Many IDEs on OS X also use these. So.. "man gdb" is a good starting point.
As user1118321 mentioned, installing the Xcode toolset would be a good idea, if you've not done so already. It includes compilers, an IDE, debuggers, profilers, and graphical programs for these tools.
You didn't state which language, or tools you're using, so for the purposes of this answer I'll assume you're using Objective-C with either gcc or clang to compile your code and link it into an executable. If you're using some other language, such as java or ruby, the equivalent from windows probably exists for OS X as well.
In general, unix uses GDB for debugging, and OS X is no different. You won't always attach it to a running process, I find that's more common to start a process in the debugger, although there do exist tools (such as Instruments) that will profile a running process.
If you're using XCode, there's a whole suite of debugging tools built in that use gdb under the hood. I suggest you start reading some of the developer documentation here http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/ios_development_workflow/130-Debugging_Applications/debugging_applications.html and then ask around if there's something in particular you want to know about.
If you've installed Xcode, look at all of the applications installed in /Developer/Applications, at a minimum you should find
Xcode - write and debug, design interfaces here
Instruments - profile your application, look for memory leaks
Icon Composer - create slick icons for your applications
Graphics Tools - used to help work with OpenGL and Quartz mainly
I have done a little work on lazarus' free pascal. So when a client asked me to write an application for a mac, after the initial, "it can't be done" stage. (followed by an asp.net maybe stage) i thought about writing it using lazarus.
Question is. I have only a virtual machine running mac OSX, this means that i do not really want to develop on the mac. However, i just cannot seem to get the applications that i have written in lazarus on windows to work on the mac. I have tried the deployment using the Lazarus Wiki and the MACOS folder is empty and so when i put it on the mac it doesn't run the application.
What is the best way of doing this or am i barking up the wrong tree?
It seems you want to do cross-compiling, which is theoretically possible, but may not be practical, for the reasons mentioned by Marco above.
As an alternative, you could install XCode, FreePascal, and Lazarus on a MacOX machine. You could still do your development and some testing on Windows/Linux. When you hit a certain milestone, you can copy your source code to the Mac and compile your application to test and give to the user.
Even if it were possible to easily cross-compile, there some minor differences between platforms, so (especially if it's a GUI app), you would want to test it on an actual MacOS box before giving it to the client.
I've taken the route described by Noah - and I was incredibly surprised that after about three weeks development on Windows, it took about 10 minutes to get the application running on the Mac.
My route was to install Xcode 4.3 on an old Mac Mini running snow leopard, then install Lazarus using the fink version as described here. This took a while but was done in an evening.
Then I just copied my folder across to the Mac, opened the lpi on the Mac, compiled it. It failed so I removed a windows references, recompiled, and it was working. I was truly amazed.
What linker and assembler do you use to generate binaries? To my best knowledge the linker for recent OS X versions is not available in source.
Afaik what you want (crosscompiling to Mac) is not possible for recent versions (and I've done it for PowerPC myself in the past).
The easiest is to use the Unix "file" command on the binary to see what is generated, and make sure it reads something with "MachO" in it. Easiest is if you have a Linux install (where this command is pretty standard), but versions can be found for windows too (cygwin, mingw and 3rd party)