View unanswered posts | View active topics It is currently 31 Oct 2014 01:37



Post new topic Reply to topic  [ 5 posts ] 
Porting Windows Batch (BAT) to Mac OS X shell scripts (SH) ? 
Author Message

Joined: 25 Sep 2011 07:45
Posts: 12
Post Porting Windows Batch (BAT) to Mac OS X shell scripts (SH) ?
Help needed!

I used to rely on bat scripts wrapped into exe launcher heavily and use them to avoid messing with visual studio and coding when i need to make some simple programs.
So in this case i only notepad++, exe wrapper and maybe few extra command line tools if such function not supported by cmd by default.

But this time i need to port my bat script to Mac OS X (and preferably to wrap them into some launcher), and i dont know a thing about how to do this and what behavior i should expect and how things works on macs these days.

I found this document http://www.macs.hw.ac.uk/~hwloidl/docs/ ... batch.html
about conversion of some common commands,
and this
https://developer.apple.com/library/mac ... ction.html

Well i can figure something out with this, but im thinking about another problem - i use modified rar sfx executables for installers and few more purposes, and i cant find any equivalent of this for mac, also as part of interface i use buil-in Tridend (mshtml) frame which acts like IE within UI (especially useful for making non system default looking scrollbars).
So im thinking how i could combine sh, bat and exe with some Wine-powered exe wrapper for Mac?
Which one of them properly supports emulation of cmd.exe calls bat scripts?
Should i waste time porting bat to sh or i could use some wine-powered wrappers for everything?
Anyone tried something like this?

I had limited expirience with cinder-like wrappers long ago on mac, wrapped several windows games to make them run on his mac, but there was niether bat files, nor chain of exe>bat>exe>bat calls, also i dont even remember this process quite well. And yet another problem - this time i dont have any access to Mac and need to make everything within windows, blindly or emulated.

Any tips, suggestions, links, automated conversion tools and everything appreciated! Thanks!


21 Jul 2012 03:25
Profile

Joined: 10 Feb 2012 02:20
Posts: 4324
Post Re: Porting Windows Batch (BAT) to Mac OS X shell scripts (S
I'd suggest that you learn the native scripting language.


21 Jul 2012 03:35
Profile

Joined: 23 Dec 2011 13:59
Posts: 1951
Post Re: Porting Windows Batch (BAT) to Mac OS X shell scripts (S
You could probably doing some things with bash on OS X but like Foxi said you would probably be better off learning Apple Script.


Last edited by Squashman on 22 Jul 2012 13:40, edited 1 time in total.



21 Jul 2012 08:41
Profile

Joined: 25 Sep 2011 07:45
Posts: 12
Post Re: Porting Windows Batch (BAT) to Mac OS X shell scripts (S
Im not sure that apple sctipt is what i need.
Apple script is more like Auto Hot key for windows, and less like dos command prompt, while shell scripts are much closer to that and much more powerful.


22 Jul 2012 04:16
Profile

Joined: 23 Dec 2011 13:59
Posts: 1951
Post Re: Porting Windows Batch (BAT) to Mac OS X shell scripts (S
Voodooman wrote:
Im not sure that apple sctipt is what i need.
Apple script is more like Auto Hot key for windows, and less like dos command prompt, while shell scripts are much closer to that and much more powerful.

Either way. This is not the correct web forum to discuss BASH or Apple Script. I don't know Apple Script but my friends that do say they can do a lot things with it and consider it to be very powerful. I do know BASH as I was a Linux Admin for a few years and I do like it.


22 Jul 2012 13:42
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], Yahoo [Bot] and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Forum style by Vjacheslav Trushkin for Free Forums/DivisionCore.