Login  •  Register


The time is now: Mon Nov 18, 2019 7:11 pm

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 1 [ 3 posts ]
Print view Previous topic  |  Next topic
Author Message
PostPosted: Fri Apr 13, 2018 6:14 am 
Offline
Tinkerer
User avatar

Joined: Fri Oct 13, 2017 4:34 pm
Posts: 82
Location: Mexico
Following to this conversation:
MacPlussed wrote:
Soon I will do something like this, I am trying to do the QEMU Code Generator program now! :)

SistemaRayoXP wrote:
(?)

Oh man, I'm so excited about this! I'd love to see your program in action :)

MacPlussed wrote:
Yes, thank you :) , but I do not think it would be so easy to do them. :oops:

adespoton wrote:
With QEMU, the command line IS the config file :) Unfortunately, command line on Windows is different than everywhere else (that uses bash). You can get around this on Windows 10 and use bash anyway, but then you'll have to custom compile QEMU for the Win10 Linux environment....


What does exactly QEMU in Bash and what does mean that the command line is the config file? And why is it different in Windows?

_________________
Hill radio station first attempt: Failure. Retrying...


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Apr 13, 2018 6:54 am 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2719
Location: Emaculation.com
Here's how I run one of my QEMU instances:

Code:
#!/bin/sh
osver='Mac OS 9.2.2'
mypath=`dirname "$0"`
rootpath=`dirname "$mypath"`
respath="$rootpath/Resources"
cd "$respath"
#
DEVNUM=`hdiutil attach -nomount "$osver.sparsebundle" | perl -ne'if ($_ =~ /^\/dev\/disk([0-9]+)\s+Apple_partition_scheme/) { print($1); exit(0) }'`
#
"./$osver" \
  -bios "openbios-ppc-screamer" \
  -boot c \
  -drive file="/dev/disk$DEVNUM",format=raw,media=disk    \
  -M mac99 \
  -m 256 \
  -cpu G3 \
  -netdev user,id=vlan0 \
  -device sungem,netdev=vlan0 \
  -prom-env 'auto-boot?=true' \
  -g 1280x720x32 \
  -name "- $osver" & EMUPID=$!\
  -prom-env "vga-ndrv?=true"
#  -usb -device usb-audio \

 osascript \
 -e "on run(argv)" \
 -e 'tell application "System Events" to set frontmost of process (argv as string) to true' \
 -e "end" \
 -- "$osver"

wait $EMUPID
hdiutil detach "disk$DEVNUM"


It is a script file that runs in the bash shell. Since Windows by default uses the windows command line and .bat files instead of .sh files, the syntax and capabilities will be slightly different. You could probably wrap it all up in powershell too, for that matter.

A lot of what was in the script above would make no sense on Windows. However, you could probably make a script file that would run on Linux, OS X and Windows by being very careful in how you crafted it.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Apr 13, 2018 3:33 pm 
Offline
Inquisitive Elf
User avatar

Joined: Wed Apr 11, 2018 2:42 pm
Posts: 25
The QEMU Code Generator is ready for now, but the Setup file needs to be created. QEMU Code Generator has been tested and 100% working. :idea:

QEMU does not have a Config file and is not required :wink: . My program's QEMU codes can be saved with Batch file. :smile:


Top
 Profile  
Reply with quote Post a reply  
Display posts from previous:  Sort by  
Post new topic  Reply to topic Page 1 of 1 [ 3 posts ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
 

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group