Re: Beginners Advice - Compiling for MAC

BsWeb <[email protected]>
Newsgroups gmane.comp.gnome.winforms
Message-ID <[email protected]>


Stifu wrote:
> 
> 
> 
> BsWeb wrote:
>> 
>> 
>> 
>> Stifu wrote:
>>> 
>>> 
>>> 
>>> BsWeb wrote:
>>>> 
>>>> 
>>>> 
>>>> Stifu wrote:
>>>>> 
>>>>> 
>>>>> BsWeb wrote:
>>>>>> 
>>>>>> 
>>>>>> Andrew Brehm wrote:
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> BsWeb wrote:
>>>>>>>> 
>>>>>>>> Hi,
>>>>>>>> 
>>>>>>>> I have to port a windows project to run on MAC OX. I have got a
>>>>>>>> test .net app open in mono develop and it runs against the mono
>>>>>>>> runtime.
>>>>>>>> When I come to 'create package' it only gives me options for
>>>>>>>> windows and linux, no MAC. What do I need to do?
>>>>>>>> 
>>>>>>>> Many thanks.
>>>>>>>> 
>>>>>>> 
>>>>>>> MAC?
>>>>>>> 
>>>>>>> Generally, compatible .NET programs should run unmodified on Mac OS
>>>>>>> X.
>>>>>>> 
>>>>>>> You can use the command line tool "macpack" to create a Mac OS X
>>>>>>> bundle (whatever.app) based on your .NET application. But first run
>>>>>>> it with mono yourprogram.exe to see if it is compatible.
>>>>>>> 
>>>>>>> Ideally you would want a native GUI, of course, but that would
>>>>>>> (currently) require you to replace all the Windows.Forms code with
>>>>>>> Cocoa calls.
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>>> Thanks for the message. I however have very limit MAC knowledge. 
>>>>>> 
>>>>>> 'command line tool "macpack"'
>>>>>> 
>>>>>> Where do I find this, on a MAC or in Windows?
>>>>>> 
>>>>> 
>>>>> This is a command that comes with Mono, so either Mac or Windows.
>>>>> See:
>>>>> http://www.mono-project.com/Guide:Running_Mono_Applications#macpack_.28Mac_OS_X_only.29
>>>>> 
>>>> 
>>>> Thanks for that. I'm however a VB.net programmer and never use the
>>>> command line. Just spent an hour trying to get a simple windows form in
>>>> c# to complie let alone package it! Could any body give some step by
>>>> step instructions? My app is at c:\monotext\form1.cs. It has a button
>>>> on it and i get the error The name 'InitializeComponent' does not exist
>>>> in this current context
>>>> 
>>> 
>>> First, you can compile it on Windows (with Visual Studio, for example),
>>> you don't have to do it with Mono. If you want to do it with Mono, you
>>> could just do it through MonoDevelop (if that's not what you were
>>> already doing).
>>> If you still can't get your app to compile, it would help if we could
>>> have a look at it.
>>> 
>> 
>> Sorry I didn't explain myself well. It complies in vs and monodevelop
>> fine. I was trying to follow the instructions for the command line and
>> using 'gmcs C:\arcadia\arcadia\form1.cs -pkg:dotnet'
>> I am a little confused how i get from the above to macpack and creating
>> .app and .nib files in the link you sent me earlier. I can't get the 'rm'
>> command to work as it is not recognised.
>> 
> 
> Gmcs is the Mono compiler, you shouldn't need to call it manually since
> your app is already compiled.
> 
> On Windows, follow these steps:
> 
> 1- Launch the Mono command line
> 
> 2a- Type something like:
> macpack -n:c:\monotext\form1.cs -a:form1.exe -o:. -m:winforms
> 
> 2b- Or if it doesn't work (not sure if you need double quotes around the
> path or something), try browsing to the right directory first (ie:
> c:\monotext\), then just do:
> macpack -n:form1.cs -a:form1.exe -o:. -m:winforms
> 
> For more details on macpack:
> http://www.go-mono.org/docs/index.aspx?link=man%3Amacpack%281%29
> http://www.theevilboss.com/2009/06/using-mono-for-net-development-on-mac.html
> 

Starting to get somewhere! I have run macpack and it creates a .app folder
but I get the following message at the command prompt 'WARNING: It was not
possible to set the executable permissions on
the file form1.app/Contents/MacOS/form1, the bundle might not work' and
although the program can be dragged to the finder bar on the MAC it will not
run.
-- 
View this message in context: http://old.nabble.com/Beginners-Advice---Compiling-for-MAC-tp26948770p27011585.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.

_______________________________________________
Mono-winforms-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-winforms-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.