I have an exe setup file. I want to make it compatible with Mac OS - macos

I have an exe setup file. I want to make it compatible with Mac OS. Is there is any way through which we can convert an EXE to DMG, APP or a Jar?

No, you cant, you need to recompile the application for the target platform.

Nope*.
Moreover, if the contained software is compiled for Windows, it won't work on Mac.
If may work only if it is script-based (like in ruby, python, etc.). But usually, you'll have a proper Mac installation package when it is compatible.
**Exception*: some EXE are extractible archives, but it won't change the incompatibility if it is compiled for Windows.

The simple answer is to install software on a Macintosh OS you must recompile it down to a .dmg file. I jumped on Google and this article Creating a Mac OS X App from a Jar File was the second choice. The default Mac OS Java version was 1.5 for Leopard. Target 1.4+ and you should cover systems from at least Leopard and upwards.
As an aside, this tutorial was recently updated for Snow Leopard and covers the same stuff. Best of luck in getting it ported.

There are different distribution for Mac with have java6 and below version, for java 7 and 8 you need to make another app to run and compatible with
I did it on my way:
Create exe/ setup for your jar.
follow the link ---> winebottler.kronenberg.org
download winebottler(GUI based tool) for your mac type and simply follow this link below
https://www.youtube.com/watch?v=imPGlqEuYBk
No extra burden for you to how.
Note: This will pack your setup in app but app size will increase.

Related

How to create an MSI installer using OS X?

I already cross-compiled my program for Windows, I now have an EXE and a directory which must reside alongside that EXE in the same directory.
So I need to create an MSI, that places them in the appropriate place (whatever that is) and handles the uninstall too, in a way that is organic with the operative system.
There are Windows tools that do just that, but I haven't been able to find any for OS X. Is there any?
tl;dr:
I am on OS X
I cross-compiled my program for Windows
using OS X, I need to create an installer for Windows, such as an MSI
I DO NOT need to create an installer for OS X, such as a DMG or whatever. I need to create an installer -->FOR<-- Windows, such as an MSI.
I just "happen" to be trying to use OS X to do it.
Using Wine only counts if that program is known to run fine with Wine.
Using a Virtual Machine doesn't count since it is using Windows, which is what I ruled out in this question.
It seems that msi-packager is your solution.
"Build MSI (Windows Installer) packages on Mac and Linux."
https://www.npmjs.com/package/msi-packager
Would it be acceptable to create an EXE-based installer instead of an MSI?
I use InstallBuilder to build installers on OS/X. InstallBuilder is a cross-platform program. There is a version that runs on OS/X and builds both EXE installers for Windows (though I have not tried that combination), as well as DMG/APPs for OS/X.
The InstallBuilder documentation mentions that it cannot build MSIs, because InstallBuilder provides functionality for which there is no equivalent in MSI.
I suggest installing InstallBuilder on your Mac, selecting "Windows" as your output format, and see what happens.
InstallBuilder is one of the better installer builders that I've worked with. It's powerful and comprehensive. Not cheap though. At $995, it's till cheaper than spinning your wheels with WiX. There is a free trial version.
Although WiX is not available for OSX, there's a port of it using the wine library. You can find it in msitools as wixl which can easily installed through brew.
brew install msitools
It sounds like you're looking for the DMG Installer specification for Mac. It's a similar function as MSI in that it is a single file containing the install components needed for an app.
Keep in mind that Mac OSX apps are very different. They are more similar to Windows directories than EXE's. They contain a sub-folder structure which includes the components of the app. If you right click on a Mac app and select "Show Package Contents" you will see a "Contents" top tier folder with everything underneath the app. Just mentioning that as it greatly impacts the lack of need for an uninstall as you simply highlight an app and click delete to remove it and all of its components. There are exceptions of course, but Mac users appreciate when dev's stick to this format.
For DMG this link may help: Demystifying the DMG

Does Java 7 run on only x64 bit MAC OS X?

I want to deliver self-contained application packages on Windows, Linux and Mac so I have build my JavaFX application on all three platforms. I will allow my users to download these native bundles from my application's download web page but I have a confusion regarding MAC users because For Linux and Windows, JDK/JRE 7 comes in two download options
for x86
for x64.
but for MAC we have only option for x64.
Java Download Page shows Java/Jre is not available for 32 bit MAC OSX to run JavaFX application. Does it mean JavaFX will run on only x64 bit MAC OSX?
If it is so, then my issue has been solved, as I have already bundled my Javafx application as a "Self-Contained Application Packages" after run custom build.xml script on x64 MAC OSX but if it is not so, the user can also run JavaFX application on x86 MAC OSX but in that case my "Self-Contained Application Packages" for mac would not run on x86 MAC OSX.
So I am planning to give an additional zip file that either contains app (without copy of jre) or a plain self executable jar. But I'm bit worried regrading - what exactly I need to bundle into that zip file with self executable JAR so requirements must be met to be able to run my JavaFX application in following conditions?
conditions are : -
If user has x86 MAC OSX.
If java is already installed on user's system. And he would not like to download the "Self-Contained Application Packages" from our download page.
Big download size.
So what among the following two options suits if user have x86 MAC OSX or if he has already installed java on his system or he would not like to download "Self-Contained Application Packages" from download page due to big download size?
Option are -
APP ( without inbuilt copy of JRE)
Or only a self executable jar.
I am not sure that Mac OS X 10.7.3 (Lion) or later version can run on x86 system.So in case of #1 option the user may have trouble if he is using x86 system. Then he may need to change info plist file and replace the JavaAplicationStub.
In case of #2 option I think is better as the user need to download the JRE only and the JAR should run using "java -jar" command.
Please suggest which option is better in case if JavaFX application can run on x86 bit MAC OS X?
Does Java 7 run on only x64 bit MAC OS X?
Oracle Java 7 for OS X is only available for 64 bit architectures, there is no 32 bit version of the software.

Mac compiler on windows

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.

Java 7 installer for Mac/Windows

I am programming software in Java 7. The users of the software are not all up to date (especially the Mac users). Therefore I need an installer (Windows/OSX) that can be easily integrated with the software installation. There is a normal installer for Windows 7 so I am especially focused on finding one for the Mac. Bonus points if it can check for XCode and other requirements too).
I am thinking another option would be to just use some of the libraries from Java 7 (for example the file-system library). However, I think this might not be possible due to the version number in the compiled classes? I couldn't use a Java 6 compiler to compile these libraries either (because they are Java 7 code).
I don't think I am the only one with this problem. There must be a solution somewhere, but I haven't found it.
Any help would be appreciated.
For the best user experience I would recommend using PackageMaker to create a .pkg file which you can then give to your Mac users. That allows them to do a single click-to-install of your app.
Within the package you would bundle your app archive (JAR file), any necessary resources and two scripts, one to check for the existence of Java 7 on the target system, and the other to install it if not found. I would recommend bundling the latest version of OpenJDK7 with your pkg, at least until an official Java 7 SDK is released for the Mac.
JAva 7 is not yet officially supported on Mac OS X, if you are looking for a JAva 7 installer for mac Os X take a look at openjdk-osx-build project on Google Code.
Update: You shouldn't need Java 7 for what your doing.
A better solution is to use Java 6 + Third party JNI libraries (i.e: JNotify,JavaXT...)
Directory listener in Java using JNotify
as for Last Accessed Date you might need to write tiny bit of Objective-C and pass it back via JNI
JNI Development on Mac OS X
Mac OS X already comes with Java runtime on Snow Leopard (JRE6)
On Lion it will automatically download JRE6 if application needs it's
You can of course download preview release of JDK7 from Oracle, but remember this is preview software there are some parts still not working yet (for example: Java Web Start)
Oracle JDK7u4 Mac OS X Port Developer Preview Release
Edit: Oracle JDK 1.7 Preview Release only supports Mac OS X Lion

Writing code for a Mac using Lazarus

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)

Resources