Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 8/3/07 22:43

EdT
Moderator
From: Los Angeles, CA
Registered: 13/1/07
Website

noswitch

Even though the text string "noswitch" is in Mac Oni (including the Omnigroup port), I wonder why we can't play in a window instead of full screen.

Offline

#2 9/3/07 20:06

geyser
Member
From: beyond the veil
Registered: 14/1/07
Website

Re: noswitch

"I wonder why we can't play in a window" doesn't start explaining what the problem is. Do tell...
Do you mean entering the -noswitch tag has absolutely no effect on how Oni runs?


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#3 9/3/07 22:43

EdT
Moderator
From: Los Angeles, CA
Registered: 13/1/07
Website

Re: noswitch

Ah! "-noswitch" I was not entering the "-" Now the MacBeta4 plays in a windowed mode and doesn't take over the whole screen.

noswitch.jpg

Now if only the MacOSX version (which has the "noswitch" in the code) could do the same.

Offline

#4 10/3/07 9:06

geyser
Member
From: beyond the veil
Registered: 14/1/07
Website

Re: noswitch

Sigh... Never mind the slight déjà vu... smile
"Now if only the MacOSX version (which has the "noswitch" in the code) could do the same" doesn't start explaining what the problem is. Do tell...
Do you mean entering the -noswitch tag has absolutely no effect on how the Mac OS X port runs? Or is there no dialog where you can enter it?

Last edited by geyser (10/3/07 9:06)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#5 10/3/07 12:16

EdT
Moderator
From: Los Angeles, CA
Registered: 13/1/07
Website

Re: noswitch

lol, sorry about that geyser...

In the OSX port there is no dialog box to enter "-noswitch"

The dialog box does not come up when holding down the shift key during startup of Oni.

Offline

#6 10/3/07 13:11

geyser
Member
From: beyond the veil
Registered: 14/1/07
Website

Re: noswitch

The dialog is messed up on PC too, probably in the same way: it's in there, but the Shift-watching timing is wrong.
SFeLi fixed it on PC. Before it's fixed in the OS X port as well, you can open a terminal in Oni's folder and enter:

Oni -noswitch

Command-line parameters should work as such, dialog or no dialog. Same as on PC retail.
You can also set up a script that will always run Oni with that parameter. Test and report.

Last edited by geyser (10/3/07 13:22)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#7 10/3/07 16:07

EdT
Moderator
From: Los Angeles, CA
Registered: 13/1/07
Website

Re: noswitch

Here's the result for the terminal:

/Applications\ \(Mac\ OS\ 9\)/Oni\ \306\222/OniDevM -noswitch

tcsh: /Applications (Mac OS 9)/Oni \306\222/OniDevM: Permission denied.

Can you help with the script?

Offline

#8 10/3/07 22:38

geyser
Member
From: beyond the veil
Registered: 14/1/07
Website

Re: noswitch

OK, today's lesson is called "How to Set File Permissions Using `chmod'"
1) To know more about the permissions set on OniDevM go to the Oni folder and type:

ls -lg OniDevM

2) To enable "x=execute" permissions on OniDevM, type:

chmod +x OniDevM

Hope this helps.

As for the scripts, you should definitely be more knowledgeable than I about how it goes on Macs.
I know how Windows shortcuts work, or DOS batch files (see example on the wiki, Customizing).
On the Mac that'd be AppleScripts or Automator Actions or Widgets or iWhatever... good luck smile

Last edited by geyser (13/3/07 20:40)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#9 12/3/07 20:53

EdT
Moderator
From: Los Angeles, CA
Registered: 13/1/07
Website

Re: noswitch

geyser: The command line argument doesn't work.  I set the permissions as you stated:

/Applications (Mac OS 9)/OniFolder] et% ls -lg OniDM.app
total 0
drwxrwxrwx   7 admin  238 Jan 29  2003 Contents
Applications (Mac OS 9)/OniFolder et% chmod +x OniDM.app
Applications (Mac OS 9)/OniFolder et% open OniDM.app -noswitch
2007-03-12 18:42:06.930 open[3483] No such file: /Applications (Mac OS 9)/OniFolder/-noswitch
Applications (Mac OS 9)/OniFolder et% OniDM.app -noswitch
tcsh: OniDM.appT:/: Command not found.

Also within Applescript there doesn't seem to be a way to add the command -noswitch

Its not a big deal, I just thought it would be be nice to run the OSX version in a window mode and not always full screen mode.

Last edited by EdT (12/3/07 20:56)

Offline

#10 13/3/07 20:39

geyser
Member
From: beyond the veil
Registered: 14/1/07
Website

Re: noswitch

Why are you dealing with "OniDM.app"? Is it the actual binary file?
You mentioned "OniDevM" earlier, why the sudden change? Also, is there a reason why the folder name changed as well?
Is 238 the size (in bytes) or... the group name hmm? Why is there "Contents" instead of the filename? hmm
Other than that, your terminal logs look pretty funky (weird/missing characters etc)

Also within Applescript there doesn't seem to be a way to add the command -noswitch

Erm, if you have nothing that matches Windows shortcuts or DOS batch files, should that mean that OS X sucks? Come on...
The way I see it, you should be able to set up "OniDM.app" (whatever) so that it includes command line parameters for the actual binary.

Last edited by geyser (13/3/07 20:45)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#11 14/3/07 0:52

EdT
Moderator
From: Los Angeles, CA
Registered: 13/1/07
Website

Re: noswitch

I have several versions of Oni, so I named them differently. OniDevM was the original Oni modified for Dev Mode.
OniDM is the OSX version.  The OSX version needs the .app for use in the terminal.

Is 238 the size (in bytes) or... the group name? Why is there "Contents" instead of the filename?

I don't know UNIX, so I have no idea what those items mean. Sorry.

Offline

#12 14/3/07 11:50

geyser
Member
From: beyond the veil
Registered: 14/1/07
Website

Re: noswitch

Augh.

The OSX version needs the .app for use in the terminal.

Are you able to run Oni by entering OniDM.app (without the "open" and the "-noswitch") at the command line?
If not, then you're out of luck... unless OniDM.app is not the actual, "raw" executable (no application wrapper/whatever).
Basically, you should be able to fire Oni the usual way (full-screen) from the terminal, preferably without "open" (whatever it is).
Once you're able to do that, adding the "-noswitch" tag at the end of the command line will be a minor detail. Try again?
Be careful about the way you copy your terminal view as text (as I said, it's pretty funky because of all the escaped chars).
Maybe screenshots would be best... I might be able to run Oni on a Mac on my side, but that's not one of my priorities hmm
And I just can't believe -noswitch &Co can't be input on an actual command line, so you'll just have to keep trying smile

EDIT: Out of boredom and masochism, browsed a few Mac sites out there...
Now I know what open is, but OMG, does "open" really interpret everything after the app name as "files" to be opened?
Could you please post the readout for "man open" here, in case it's not as cheerfully incomplete as the comments on the web?
That kind of help is killing me...

Anyhoo, here's what should work. OMNI's Oni is a Cocoa application. See HERE and HERE.
As was my intuition, OniDM.app is not the actual executable. The actual executable is part of a subtree of OniDM.app
Therefore, OniDM.app is also not a valid shell command that would accept command-line arguments.
The actual executable, which you should be able to run from the shell, should be OniDM.app/Contents/MacOS/Oni.
First off, try entering OniDM.app/Contents/MacOS/Oni from the folder of the OS X port. Does it launch Oni (full screen)?
If yes, try entering OniDM.app/Contents/MacOS/Oni -noswitch from the same folder. Oni should run in a "window".
If at any point it complains about insufficient privileges/permissions/access rights, you might need the sudo thing from the latter link above.

Last edited by geyser (14/3/07 12:47)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#13 14/3/07 14:52

EdT
Moderator
From: Los Angeles, CA
Registered: 13/1/07
Website

Re: noswitch

Are you able to run Oni by entering OniDM.app (without the "open" and the "-noswitch") at the command line?

Nope I get this message: tcsh: OniDM.app: Command not found.

First off, try entering OniDM.app/Contents/MacOS/Oni from the folder of the OS X port. Does it launch Oni (full screen)?

Nope it open the Oni file in my text editor.

Adding .app or even .exe produces the error message No such file

Here is the info for open:

open [-f]

DESCRIPTION
     The open command opens a file (or a directory or URL), just as if you had
     double-clicked the file's icon. If no application name is specified, the
     default application as determined via LaunchServices is used to open the
     specified files.

     If the file is in the form of a URL, the file will be opened as a URL.

     You can specify one or more file names (or pathnames), which are inter-
     preted relative to the shell or Terminal window's current working direc-
     tory. For example, the following command would open all Word files in the
     current working directory:

     open *.doc

     The options are as follows:

     -a application
         specifies the application to use for opening the file

     -b bundle_indentifier
         specifies the bundle identifier for the application to use when open-
         ing the file

     -e  causes the file to be opened with /Applications/TextEdit

     -t  causes the file to be opened with the default text editor, as deter-
         mined via LaunchServices

     -f  Reads input from standard input and opens the results in the default
         text editor.  End input by sending EOF character (type Control-D).
         Also useful for piping output to open and having it open in the
         default text editor.

EXAMPLES
     "open '/Volumes/Macintosh HD/foo.txt'" opens the document in the default
     application for its type (as determined by LaunchServices).

     "open '/Volumes/Macintosh HD/Applications/'" opens that directory in the
     Finder.

     "open -a /Applications/TextEdit.app '/Volumes/Macintosh HD/foo.txt'"
     opens the document in the application specified (in this case, TextEdit).

     "open -b com.apple.TextEdit '/Volumes/Macintosh HD/foo.txt'" opens the
     document in the application specified (in this case, TextEdit).

     "open -e '/Volumes/Macintosh HD/foo.txt'" opens the document in TextEdit.

     "ls | open -f" writes the output of the 'ls' command to a file in /tmp
     and opens the file in the default text editor (as determined by Launch-
     Services).

     "open http://www.apple.com/" opens the URL in the default browser.

     "open 'file://localhost/Volumes/Macintosh HD/foo.txt'" opens the document
     in the default application for its type (as determined by LaunchSer-
     vices).

     "open 'file://localhost/Volumes/Macintosh HD/Applications/'" opens that
     directory in the Finder.

HISTORY
     First appeared in NextStep.

Mac OS                         February 10, 2004                        Mac OS
(END)

I'll keep trying other things, thanks for taking the time to solve this issue :-)

Offline

#14 14/3/07 15:28

Mitchell
Member
Registered: 17/1/07

Re: noswitch

I got it to work. Right click on the oni.app then go contents/macos. Next open up terminal. Drag the Oni that is in MacOS onto the terminal window. Type -noswitch and hit return.

Last edited by Mitchell (14/3/07 15:29)

Offline

#15 14/3/07 17:16

geyser
Member
From: beyond the veil
Registered: 14/1/07
Website

Re: noswitch

@ Mitchell: what does the command line look like before you press Return? just curious.


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#16 14/3/07 17:47

Mitchell
Member
Registered: 17/1/07

Re: noswitch

/Applications/Games2/PPC\ Games/Oni/Oni.app/Contents/MacOS/Oni -noswitch

Pretty cool. I've figured out how to get rid of the OS X menu bar and now I can play in widescreen with just losing a few pixels at the bottom.

Offline

#17 14/3/07 18:28

EdT
Moderator
From: Los Angeles, CA
Registered: 13/1/07
Website

Re: noswitch

Drag the Oni that is in MacOS onto the terminal window. Type -noswitch and hit return.

Mitchell: That worked for me!  Many thanks!

Offline

#18 15/3/07 4:27

geyser
Member
From: beyond the veil
Registered: 14/1/07
Website

Re: noswitch

@ EdT: I'm glad it worked out; welcome to the -noswitch club! But, isn't Mitchell's solution exactly my last suggestion? smile
There's no reason why entering .../Oni.app/Contents/MacOS/Oni in the terminal should open the binary in a text editor...
Could it be that you used open .../Oni.app/Contents/MacOS/Oni instead of just .../Oni.app/Contents/MacOS/Oni?
(".../" stands for full path to the OS X Oni folder; local path (relative to current directory) should also work)

Last edited by geyser (15/3/07 5:41)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#19 15/3/07 10:07

EdT
Moderator
From: Los Angeles, CA
Registered: 13/1/07
Website

Re: noswitch

geyser: I used open.

I rarely use the terminal, so I don't know the correct syntax for it.

Offline

#20 15/3/07 18:14

Mitchell
Member
Registered: 17/1/07

Re: noswitch

geyser: I just used what you said, but I dragged the file to get the correct path.

Offline

#21 12/4/10 14:27

zilcon
Member
Registered: 5/4/10

Re: noswitch

wow that was really hard to understand you guys are like talking in a different language or something


Static Fist!!! tongue

Offline

#22 12/4/10 14:50

Gumby
Member
From: Seattle, WA, USA
Registered: 30/8/07

Re: noswitch

zilcon, please stop reopening old topics. Thanks.


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#23 12/4/10 14:53

TOCS
Member
From: Denmark
Registered: 4/4/07

Re: noswitch

Why would you bump this old stuff? It makes no sense. It was solved. I just can't see the point.

EDIT: It took me 3 minutes for a post, damn I'm slow.

Last edited by TOCS (12/4/10 14:54)

Offline

Board footer

Powered by FluxBB