Using Mac Terminal To Run .EXE - macos

One of my friends sent me a link on how to use terminal to get OSU! to run on mac. It worked perfectly, but now I am wondering if it is only for certain things, or if I can use terminal commands to make a .exe program run?
Anyone know if this is possible, and if so how would I go about doing it?
Thanks.

Macs aren’t compatible with Windows apps.
But you can try an app called wine.
Wine tries to provide an environment to run Windows exes.
Download the binary packages at here
Get the stable installer.
Make sure that you’ve got xquartz installed using homebrew: brew install xquartz.

The easiest and free way to run .exe files is to run it on "PlayOnMac". It might show some bugs(never faced a major bug). but it solves the problem. You can easily copy paste files on it like if you want to crack the software.

Related

How to create application to launch wine and Windows application

I'm trying to use "wine" on MAC osX Sierra version 10.12, wine is version 1.9.19
In the terminal I can launch Windows applications, however its a pain to have to keep typing in:
/Applications/Wine\ Staging.app/Contents/MacOS/wine ~/.wine/drive_c/Program\ Files/HeidiSQL/heidisql.exe
I've searched around for a post on how to create shortcuts/applications to add to the launchpad, but so far none of the information has led me to a working end result. Either the locations of wine is different or it just doesn't work.
I've tried creating an application script:
do shell script "/Applications/Wine Staging.app/Contents/MacOS/wine ~/.wine/drive_c/Program Files/HeidiSQL/heidisql.exe"
But this won't run either.
For anyone having the same problem, in the end I created scripts which reside in my home folder:
Launch vi, create a file called HeidiSQL, insert:
wine ~/.wine/drive_c/Program\ Files/HeidiSQL/heidisql.exe
Save and exit file, grant file execute permissions:
chmod +x HeidiSQL
Launch wine terminal and type in ./HeidiSQL to launch, I then did the same for PSPad.exe:
wine ~/.wine/drive_c/Program\ Files\ \(x86\)/PSPad\ editor/PSPad.exe
I know this thread is a little old but I was just looking for something like this to launch HeidiSQL and I came up with these three solutions which I have tried and all of them work. I am putting my findings down here for it may help someone:
Wineskin (http://wineskin.urgesoftware.com), Playonmac (https://www.playonmac.com/en) and Winebottler
(http://winebottler.kronenberg.org)
Wineskin is a mac app that download and install (and manages, updates, etc) "wine" for you. It then creates a HeidiSQL.app (any name you want with any icon you want - but you need to configure it) around the windows.exe that includes the wine version selected and is completely self contained (does not need wine installed separately). Personally this is the neatest solution and my preferred even though there its a little more technical than Playonmac and similar to Winebottler. You need to read the instructions (which are very good) and you have choices to make as to the wine version to use and to configure the app. Noteworthy is that you need to change the windows version to XP rather than 7 or some buttons won't work.
Playonmac on the other hand is very user friendly. It has HeidiSQL listed on its website as compatible and its almost a single click install. You just select HeidiSQL from the list of programs and it will download everything you need for you. The only reason I prefer Wineskin is that it does not create a true self contained HeidiSQL.app. You can create a shortcut for it in your Applications folder but this will launch Playonmac and the app needs to be installed inside Playonmac. On the plus side, Playonmac will chose all the right settings for you to run the app correctly, the correct windows and wine version etc which is something you need to fiddle with with with Wineskin.
Winebottler again makes an app like Wineskin. The only real difference I could see is that with Wineskin the configuration app is actually part of the package whereas in Winebottler you have to recreate the package each time you make a change. I stuck with Wineskin. YMMV.

OSX, restore installs made with terminal

During a long period of time I have installed some apps/scripts with the terminal, many were tests to understand some tools, and now I use just a few of them (very few).
What I would like to accomplish is to wipe them all in order to "restore" OSX installs and, later on I will reinstall the one I need.
I'm not sure I'm using the right terminology, I installed things via terminal like:
nodej
meteor
ionic
And other stuff, some with the use of curl ..., others with OSX Installer (NodeJS for example) and others with cordova I guess.
How to remove them all?

Want to open .exe files on a mac

There is a file I would really like to use on my mac, but it is .exe and I cannot open it. It is called MCreator, and the file is mcreator.exe, and is used for making minecraft mods without knowing any java. I have tried numerous applications that supposedly can do this, such as wine, mono, and crossover, but none of them seem to work. When I use mono, I type in this, and it returns an error:
Howards-Mac-mini:Mcreator 1.4.2 [1.6.4] Jared$ mono mcreator.exe
Cannot open assembly 'mcreator.exe': File does not contain a valid CIL image.
When I use wine, it just quits and doesn't do anything, even though it displays the icon for MCreator. I cant figure out how to get open a preexisting file on crossover. Does anyone have any ways to fix my problems and/or run this file?
Your best bet is probably to run a virtual machine. Windows XP is good for this inside VirtualBox, as it can run on as little as 512mb of RAM, and 1 single-core virtual processor. Download VirtualBox by going to www.virtualbox.org and as for Windows XP, you can probably get your hands on that but I unfortunately cannot help with that unless you have a genuine COA.
Thanks
You could also try running it in Wine. It allows you to run Windows apps in OS X without a copy of Windows. I've used it successfully before; your mileage may vary.
1)Install Wine and Winebottler from http://winebottler.kronenberg.org/
2)You may have to change the System Preferences >Security & Privacy>Allow Apps downloaded from>Anywhere
2)Run the xyz.exe using winebottler.

Uninstaller for package on Mac OS X

As a service to my users I would like to provide an uninstall script to completely remove all traces of my application on Mac OS X. The application is installed using a package rather than just being dragged into the Applications folder because it is a daemon-type app that also requires to run a script at installation to be launched.
My thinking is to include a file called uninstall.sh and place it into /Library/Application Support/com.<mycompany>.<myapplication>/ and refer to this from the application documentation. The purpose is basically to stop the daemon if running, unload and delete the corresponding plist as well as remove any application files. Does this sound reasonable or are there better methods to accomplish this?
Also I am wondering if it is good practice to also remove traces of the package using pkgutil --forget - if I don't do this, the next time the package is installed it shows up as being upgraded instead of installed. Any recommendations or pointers to best-practice information?
Is there no standard way of doing this on OS X?
There is no standard way of doing this on OS X. Yes, shocking, I know. Apple consistently warns everyone away from package installers (among other things by providing insufficient documentation for them). They then exclusively use package installers for their own standalone apps.... go figure.
Yes, you should include pkgutil --forget.
If your customers are comfortable with this kind of script, then your approach sounds fine. If they want a "double-click-on-it" then you should probably put the uninstaller in /Applications, but avoid that if you can.
If you have a GUI, Status Item, or Preference Panel, then it's nice to put a "Uninstall" button or menu item there rather than requiring them to go mess around with Terminal.
BTW, if you go looking for the Software Delivery Guide, it's been moved for a year or so now, while they "update" it.
the inability to remove packages has bugged me for years, so i've written a tool to uninstall packages:
http://www.corecode.at/uninstallpkg/index.html
its a bit better than the shell scripts to do it floating around because it makes sure never to remove any files that are used by any other installed packages
The way I solved this was to use Automator, create an application document and then add dialog and script actions. Finally save your Automator application document and you end up with a simple GUI application to run the uninstall.
Often the uninstall action requires administrator privileges - I solved this in Automator by running a shell script action that generates another shell script that can then by run in an applescript action as follows:
on run {input, parameters}
do shell script "/tmp/uninstaller.sh" with administrator privileges
return input
end run
I have a similar application and came across the same issue. The approach I took was one that I have seen other applications use. Rather than simply distributing the .pkg installer, wrap it up in a .dmg file. The uninstall script can be included with the .pkg in the .dmg.
The uninstall script is then renamed to "uninstall.tool". The .tool extension allows users to run the script by double clicking, rather than having to run it from the command line.
Slightly unconventional, but aren't these all. I have Homebrew and cask installed. I was able to uninstall a .pkg with the following:
brew cask uninstall --force <pkg_name>
ex. brew cask uninstall --force dockertools

Make .mpkg so it can be installed by script on Mac OSX

I want to make a .mpkg that can be installed by a script on OSX. When starting the .mpkg always the GUI-dialog shows up. I tried to disable the GUI, but there seems to be no effective way to do so.
Does anyone got an hint for me how to do so?
Any answers are helpfull.
There is no way to modify the .mpkg or .pkg created by PackageMaker in such a way, so that they run without a user dialog. But you can run all .pkg/.mpkg in silentmode: http://blog.elitecoderz.net/run-installer-pkg-or-mpkg-without-user-dialog-silentmode-from-console-on-os-x/2010/07/ explains how to do so.

Resources