BleepingComputer.com: Need help writing a shell script

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Need help writing a shell script or Need a free program to write a shell script

#1 User is offline   12x48y 

  • Forum Regular
  • PipPipPip
  • Find Topics
  • Group: Members
  • Posts: 274
  • Joined: 18-January 07

Posted 30 January 2012 - 07:32 AM

Hello, I wonder if someone can help me create a shell script, or recommend a program that will safely create a shell script on OSX Tiger.

I made a first person shooter with Blender, and would like to share it with some friends using BlenderPlayer. The instructions below say that I need the make a shell Script. A Google search shows that I can use Terminal, but I know, since I don't know what I'm doing, I can do serious damage using Terminal.

Any help at all will be appreciated.


Instructions below, if anyone needs them;

Quote

Open blender with the game that you have created and open the file menu. Click on Save Game as Runtime and then save to the new folder that you have created and rename the file yourgamename...

and then you can run the game!

The methods shown above only create an executable for your operating system. Well, BlenderPlayer can fix that.

1. Make a new folder to store all your game data.
2. Then save your .blend file into the directory.
3. You can skip this step and the next step if you do not want a Windows version. For the Windows users, copy blenderplayer.exe to the new folder from a Windows copy of Blender. Then copy all your DLL files for Blender as mentioned for Windows to the folder.
4. Next you have to make an MS-DOS batch file (for UNIX users, this is the shell script equivalent). In a simple text editor, in CR-LF mode if available (Notepad is always in this mode, and NOT a word processor!), copy and paste this text:
blenderplayer.exe yourgamename.blend
Save it as YourGameName-Windows.bat in your game folder.
5. You can skip this step if you do not want a UNIX (basically Mac OS X and GNU/Linux) port. For GNU/Linux (at least), make a shell script. (A shell script is the UNIX term for a batch file.) In a simple text editor, in LF mode (unfortunately Notepad can't be used), copy and paste this text:
#!/bin/bash
blenderplayer yourgamename.blend
Save the file as YourGameName-UNIX.sh in your game folder. Note that due to the nature of these systems, BlenderPlayer will need to be pre-installed.
6. Write a readme for your program. This is again best done with a simple text editor like Notepad or gedit, but it does not matter which mode it is in. You should include the name of the game, a description, perhaps a walkthrough or hints, and if you made a *NIX port, mention that it requires BlenderPlayer, available with Blender.


#2 User is offline   Buddyme2 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 409
  • Joined: 23-August 06

Posted 31 January 2012 - 01:03 AM

AppleScript? BBEdit? Or read this.

#3 User is offline   12x48y 

  • Forum Regular
  • PipPipPip
  • Find Topics
  • Group: Members
  • Posts: 274
  • Joined: 18-January 07

Posted 31 January 2012 - 07:42 AM

Thanks, I'll try Apple script first. Wasn't sure if Apple Script would save the file as .sh. Textedit, and Neo Office wouldn't. Figured I would err on the side of caution and ask here. :)

BBedit also looks promising. :)

Thank you very much. :)

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users