Create account / Log in

Load a module from the command line

Topics related to the main Vassal engine.

Moderators: uckelman, Tim M

Load a module from the command line

Postby Awfki » June 17th, 2008, 2:36 pm

Is it possible to load a module from the command line? I'd like to make shortcuts for the modules I'm playing and skip the intermediate step.

Thanks
User avatar
Awfki
 
Posts: 22
Joined: May 31st, 2008, 12:29 am
Location: Atlanta, GA

Load a module from the command line

Postby rk » June 17th, 2008, 7:40 pm

You can. Just give the module file name as a command-line argument. This works through version 3.;0, but the command-line arguments will change in 3.1.

rk

Post generated using Mail2Forum (http://www.mail2forum.com)
rk
Site Admin
 
Posts: 536
Joined: October 21st, 2007, 3:31 am

Postby Awfki » June 17th, 2008, 7:55 pm

Cool. Now I just have to figure what the command line is on the Mac.

Thanks!
User avatar
Awfki
 
Posts: 22
Joined: May 31st, 2008, 12:29 am
Location: Atlanta, GA

Postby Awfki » June 17th, 2008, 9:37 pm

Awfki wrote:Now I just have to figure what the command line is on the Mac.


And that is not going well. As far as I can tell the Mac just doesn't want do this. It's be easy on Windows and I'm pretty sure it would be easy on Linux but the Mac... ugh.

Part of the issue is the spaces in the application name ("VASSAL 3.0.app/MacOS/VASSAL 3.0"). I can get VASSAL to start but I can't get it load the module without stopping on the intro screen.

PS. I'm using 3.0.17 just in case there's something about that version that makes this not work.
User avatar
Awfki
 
Posts: 22
Joined: May 31st, 2008, 12:29 am
Location: Atlanta, GA

Load a module from the command line

Postby timpelican » June 17th, 2008, 9:50 pm

Awfki wrote:

And that is not going well. As far as I can tell the Mac just doesn't
want do this. It's be easy on Windows and I'm pretty sure it would be
easy on Linux but the Mac... ugh.

Part of the issue is the spaces in the application name ("VASSAL
3.0.app/MacOS/VASSAL 3.0"). I can get VASSAL to start but I can't get
it load the module without stopping on the intro screen.

Works for me:

tim@feathers:~$
/Applications/Games/VASSAL.app/Contents/MacOS/JavaApplicationStub
~/Documents/Games/Vassal/Modules/Memoir44v6.mod

tim@feathers:~$ uname -a
Darwin feathers.pelican.org 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct
10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh
powerpc

If you've got spaces, you should just be able to quote them, or escape
them with backslashes:

tim@feathers:~$
/Applications/Games/VASSAL.app/Contents/MacOS/JavaApplicationStub
/Users/tim/Documents/Games/Vassal/Modules/Twilight\ Struggle\ 2_3.mod


Regards,
Tim.


_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
timpelican
 
Posts: 171
Joined: January 2nd, 2008, 3:50 pm

Postby Awfki » June 17th, 2008, 10:10 pm

When I try I get error messages about "JVMArchs not found in Java dictionary" and "Could not load file/url".

I tried copying the app and removing all the spaces. I tried setting the modules default app to VASSAL.app, I tried escaping the spaces, I tried in the terminal and tried with applescript's "do shell".

The best I've managed has been to start VASSSAL without the module.

Thus far I've been underwhelmed by the Mac. It's good at whatever Steve thinks you ought to be doing but it doesn't seem to like it if you get off the beaten path.

Thanks for trying.
User avatar
Awfki
 
Posts: 22
Joined: May 31st, 2008, 12:29 am
Location: Atlanta, GA

Load a module from the command line

Postby timpelican » June 17th, 2008, 10:18 pm

Awfki wrote:
When I try I get error messages about "JVMArchs not found in Java
dictionary" and "Could not load file/url".

Doing the *exact* same thing? What version of OS X? Can you cut and
paste the command you're entering and all of the output from the terminal?

Regards,
Tim.


_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
timpelican
 
Posts: 171
Joined: January 2nd, 2008, 3:50 pm

Postby Awfki » June 18th, 2008, 2:44 am

Not the *exact* same, I'm installed in a different directory but the same general idea. I tried to post the output earlier but something in the java error made the forum software unhappy. There were angle brackets and I didn't have time to sort it out. I'll have another try tomorrow.
User avatar
Awfki
 
Posts: 22
Joined: May 31st, 2008, 12:29 am
Location: Atlanta, GA

Postby Awfki » June 18th, 2008, 2:52 am

Here's my command:

Code: Select all
/Applications/VASSAL.app/Contents/MacOS/VASSAL ~/Boardgames/VASSAL/Hammer-Scots-v5


Here's the output with parens instead of angle & square brackets.
Code: Select all
(JavaAppLauncher) A 64-bit JVM is available for 1.5.0
(JavaAppLauncher) JVMArchs not found in Java dictionary
#### Java Web Start Error:
#### The following required field is missing from the launch file: (jnlp)


I haven't tried CDing to the VASSAL directory and running it from there... Same thing.

uname:
Code: Select all
Darwin eris 9.2.2 Darwin Kernel Version 9.2.2: Tue Mar  4 21:17:34 PST 2008; root:xnu-1228.4.31~1\RELEASE_I386 i386


It was the dash a that was making the forum unhappy.
User avatar
Awfki
 
Posts: 22
Joined: May 31st, 2008, 12:29 am
Location: Atlanta, GA

Load a module from the command line

Postby uckelman » June 18th, 2008, 3:21 am

Thus spake "Rodney Kinney":
You can. Just give the module file name as a command-line argument. This
works through version 3.;0, but the command-line arguments will change in
3.1.

rk

For 3.1, loading a module from the command line is substantially the same:
It's just the name of the VASSAL executable followed by the path to the
module.

E.g., on Linux, it would be

VASSAL.sh path/to/module.vmod

--
J.

_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
uckelman
Site Admin
 
Posts: 8612
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Load a module from the command line

Postby timpelican » June 18th, 2008, 8:46 am

On Wed, June 18, 2008 3:52 am, Awfki wrote:

Hmm... I'm Mac-less at work at the moment, but I wonder why you have:

.../VASSAL.app/Contents/MacOS/VASSAL

and not

.../VASSAL.app/Contents/MacOS/JavaApplicationStub

Do you have the 'JavaApplicationStub' file as well?

Can you post the output of the following commands:

file /Applications/VASSAL.app/Contents/MacOS/VASSAL
file /Applications/VASSAL.app/Contents/MacOS/JavaApplicationStub
java -version

Regards,
Tim.





_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
timpelican
 
Posts: 171
Joined: January 2nd, 2008, 3:50 pm

Load a module from the command line

Postby tar » June 18th, 2008, 7:21 pm

On Jun 17, 2008, at 7:52 PM, Awfki wrote:

Here's my command:


Code:
/Applications/VASSAL.app/Contents/MacOS/VASSAL ~/Boardgames/VASSAL/
Hammer-Scots-v5

Which version of Vassal are you using?

Here's the output with parens instead of angle & square brackets.

Code:
(JavaAppLauncher) A 64-bit JVM is available for 1.5.0
(JavaAppLauncher) JVMArchs not found in Java dictionary

These two items are just informative and can be ignored.

#### Java Web Start Error:
#### The following required field is missing from the launch file:
(jnlp)

This looks like the application is trying to use the Web Start version.

How did you install Vassal?

I was able to get this working using the JavaApplicationStub
suggestion from Tim Franklin.


I haven't tried CDing to the VASSAL directory and running it from
there... Same thing.

uname:

Code:
Darwin eris 9.2.2 Darwin Kernel Version 9.2.2: Tue Mar 4 21:17:34
PST 2008; root:xnu-1228.4.31~1\RELEASE_I386 i386

_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
tar
 
Posts: 776
Joined: January 2nd, 2008, 6:53 pm
Location: Los Angeles area

Re: Load a module from the command line

Postby Awfki » June 18th, 2008, 9:56 pm

tar wrote:Which version of Vassal are you using?


3.0.17

This looks like the application is trying to use the Web Start version.

How did you install Vassal?


Initially I did a manual download and it gave me 3.0.15. I didn't realize it wasn't the latest till a module asked for 3.0.17. I went back and found the "manual installer" that downloads installVASSAL.jar and got 3.0.17 with that. I don't think I uninstalled 3.0.15 first though it's gone now.

If it's working for everyone else maybe I'll just go uninstall the whole thing and try again with the installer.

I was able to get this working using the JavaApplicationStub
suggestion from Tim Franklin.


Can you point me at the instructions? I searched for that and found three threads including this one. I saw the term mentioned but if there were instructions I missed them.
User avatar
Awfki
 
Posts: 22
Joined: May 31st, 2008, 12:29 am
Location: Atlanta, GA

Postby Awfki » June 18th, 2008, 10:09 pm

Un-installed and re-installed using the "manual installer" (installVASSAL.jar). It doesn't initially create a .app in the Applications directory. I clicked on "vassal-3.0.jnlp" in the install directory and it created a "VASSAL 3.0.app".

Code: Select all
eris:MacOS Dave$ /Applications/VASSAL\ 3.0.app/Contents/MacOS/VASSAL\ 3.0 ~/Boardgames/VASSAL/OGRE
[JavaAppLauncher] A 64-bit JVM is available for 1.5.0
[JavaAppLauncher] JVMArchs not found in Java dictionary
#### Java Web Start Error:
#### Could not load file/URL specified: /Users/Dave/Boardgames/VASSAL/OGRE


I'm ready to throw in the towel unless someone has another idea. I very much appreciate everyone's help.
User avatar
Awfki
 
Posts: 22
Joined: May 31st, 2008, 12:29 am
Location: Atlanta, GA

Load a module from the command line

Postby uckelman » June 18th, 2008, 10:16 pm

Thus spake "Awfki":
Un-installed and re-installed using the "manual installer" (installVASSAL.jar
). It doesn't initially create a .app in the Applications directory. I clicke
d on "vassal-3.0.jnlp" in the install directory and it created a "VASSAL 3.0.
app".


Code:
eris:MacOS Dave$ /Applications/VASSAL\ 3.0.app/Contents/MacOS/VASSAL\ 3.0 ~/B
oardgames/VASSAL/OGRE
[JavaAppLauncher] A 64-bit JVM is available for 1.5.0
[JavaAppLauncher] JVMArchs not found in Java dictionary
#### Java Web Start Error:
#### Could not load file/URL specified: /Users/Dave/Boardgames/VASSAL/OGRE




I'm ready to throw in the towel unless someone has another idea. I very much
appreciate everyone's help.



If you can't get this to work, try 3.1.0-beta3 when we release it (I'm
shooting for Sunday now). We put a lot of effort into making the Mac
experience better in 3.1, so I suspect that this problem will go away
for you.

--
J.

_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
uckelman
Site Admin
 
Posts: 8612
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests