Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Need help writing a shell script


  • Please log in to reply
2 replies to this topic

#1 12x48y

12x48y

  • Members
  • 299 posts
  • OFFLINE
  •  
  • Local time:02:42 AM

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;

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.



BC AdBot (Login to Remove)

 


#2 Buddyme2

Buddyme2

  • Members
  • 703 posts
  • OFFLINE
  •  
  • Local time:10:42 PM

Posted 31 January 2012 - 01:03 AM

AppleScript? BBEdit? Or read this.

#3 12x48y

12x48y
  • Topic Starter

  • Members
  • 299 posts
  • OFFLINE
  •  
  • Local time:02:42 AM

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. :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users