New topic: 

Open a unix executable

<http://forums.realsoftware.com/viewtopic.php?t=32156>

       Page 1 of 1
   [ 9 posts ]                 Previous topic | Next topic         Author  
Message       macdesignedsoftware           Post subject: Open a unix 
executablePosted: Sat Jan 23, 2010 7:44 pm                               
Joined: Sun Nov 08, 2009 9:35 pm
Posts: 91
Location: Loveland, OH              I have a macos x universal binary unix 
executable file that I want to launch from my application

When the application is being debugged I would like to launch it from the file 
that is right next to the application 

When the application is compiled I would like to launch it from within the 
application package, the resources folder

I have seen how to do this before, but what do I look for?

Brian   
                            Top                lenpartico           Post 
subject: Re: Open a unix executablePosted: Sat Jan 23, 2010 8:20 pm             
           
Joined: Fri Sep 30, 2005 10:49 pm
Posts: 191              Does that file have a name like "keyboardViewer"?      

    Last edited by lenpartico on Sat Jan 23, 2010 9:35 pm, edited 1 time in 
total.   
                            Top               macdesignedsoftware           
Post subject: Re: Open a unix executablePosted: Sat Jan 23, 2010 8:50 pm        
                       
Joined: Sun Nov 08, 2009 9:35 pm
Posts: 91
Location: Loveland, OH              Yeah, but I basically found the unix 
executable
and made a copy and put it in the folder my project is in
and want to put it in my app's Resources's folder 

and I want to know how to open it from the application's package

and if there is  a debug build thing open it from the same folder the app is in
(in that case file next to the debug application)

Brian     
_________________
Brian Heibert
MacDesigned Software
http://www.macdesignedsoftware.com
[email protected]

Check out my new project
StoryTeller for MacOS X
http://www.macstoryteller.com  
                            Top                lenpartico           Post 
subject: Re: Open a unix executablePosted: Sat Jan 23, 2010 9:29 pm             
           
Joined: Fri Sep 30, 2005 10:49 pm
Posts: 191              OK, I made a project that can do it for you in a 
different way. It is easier for me to send the project than to explain it.
On opening the app, the keyboard opens automatically. You can see the code and 
modify it to your needs.
If you want to check it out I can send it to you, or whoever else wants it.
Lennox.   
                            Top               macdesignedsoftware           
Post subject: Re: Open a unix executablePosted: Sat Jan 23, 2010 9:36 pm        
                       
Joined: Sun Nov 08, 2009 9:35 pm
Posts: 91
Location: Loveland, OH              Okay, I found this...

Code:
dim appexe as folderitem
#if debugBuild then
  
#else
  appexe = 
app.executableFile.parent.parent.child("Resources").child("keyboardViewer")
#endif



But what do I put in the #if debugBuild then 
(what here)
#else

In the debug mode the file keyboardviewer is in my source code folder 
VocalAssist on the desktop   
                            Top                macdesignedsoftware           
Post subject: Re: Open a unix executablePosted: Sat Jan 23, 2010 9:40 pm        
                       
Joined: Sun Nov 08, 2009 9:35 pm
Posts: 91
Location: Loveland, OH              I just tested it (compiled app)
and it opens the terminal app
I don't want to do that

  dim appexe as folderitem
  #if debugBuild then
  
  #else
  appexe = 
app.executableFile.parent.parent.child("Resources").child("keyboardViewer")
  appexe.launch
  #endif
  
Is there another way?     
_________________
Brian Heibert
MacDesigned Software
http://www.macdesignedsoftware.com
[email protected]

Check out my new project
StoryTeller for MacOS X
http://www.macstoryteller.com  
                            Top                lenpartico           Post 
subject: Re: Open a unix executablePosted: Sat Jan 23, 2010 9:41 pm             
           
Joined: Fri Sep 30, 2005 10:49 pm
Posts: 191              That "macos x universal binary unix executable file" 
file that you are referring to will have to open Terminal before the keyboard 
becomes visible, the project that I made does not show the Terminal window.

It can be downloaded from:
http://www.mediafire.com/download.php?emyyzgl4d4y

Lennox.   
                            Top               macdesignedsoftware           
Post subject: Re: Open a unix executablePosted: Sat Jan 23, 2010 10:10 pm       
                        
Joined: Sun Nov 08, 2009 9:35 pm
Posts: 91
Location: Loveland, OH              okay,

Got one question...

Code:
dim h As Shell
dim s as String

h=new Shell
h.Execute "/Users/" + App.gUsername + "/Desktop/keyboardViewer"
s=h.Result



Instead of App.gUserName + "/Desktop/"  What if I want to put keyboardviewer in 
the app package? (Resources folder)   
                            Top                lenpartico           Post 
subject: Re: Open a unix executablePosted: Sat Jan 23, 2010 10:29 pm            
            
Joined: Fri Sep 30, 2005 10:49 pm
Posts: 191              You can put it there too, you can put it anywhere for 
that matter, once you have the correct path.


  dim h As Shell
  dim s as String
  dim myFile as FolderItem = 
App.ExecutableFile.Parent.Parent.Child("Resources").Child("keyboardViewer")
  If not myFile.exists then
  msgbox """keyboardViewer"" not found"
  else
  h=new Shell
  h.Execute myFile.shellpath
  s=h.Result
  end if   
                            Top           Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 9 posts ]     
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to