All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] QEMU Menu for Windows
@ 2004-08-01 15:43 Garth Dahlstrom
  0 siblings, 0 replies; only message in thread
From: Garth Dahlstrom @ 2004-08-01 15:43 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 496 bytes --]

Attached is a batchfile that creates a simple numbered menu for
running QEMU images under Windows:

Here is an example of the output:
=== QEMU Menu 1.0 ===
  QEMU (C) 2004 Fabrice Bellard
  QEMU Windows Port by kazu?
  QEMU Menu (C) 2004 Garth Dahlstrom (ironstorm@users.sf.net)

Type the image number and hit enter to start QEMU:

[1] linux
[2] reactos-0.2.3
[3] freedos
[4] netbsd_1.6.2

[Q] to Quit

Enter your choice now


-- 
Northern.CA ===--
http://www.northern.ca/
Canada's Search Engine

[-- Attachment #2: menu.cmd.txt --]
[-- Type: text/plain, Size: 1233 bytes --]

@echo off 
REM QEMU menu (C)2004 by Garth Dahlstrom (ironstorm@users.sf.net) 
REM Licensed under GNU GPL (like it would work without the source anyway... :) )

cls
setlocal enabledelayedexpansion

:PrintMenu
set QEMU_IMG_Count=0

echo === QEMU Menu 1.0 ===
echo    QEMU (C) 2004 Fabrice Bellard
echo    QEMU Windows Port by kazu? 
echo    QEMU Menu (C) 2004 Garth Dahlstrom (ironstorm@users.sf.net) 
echo.
echo Type the image number and hit enter to start QEMU:
echo.
for /R %%x in (*.img *.dsk) do set /A QEMU_IMG_Count+=1 && echo [!QEMU_IMG_Count!] %%~nx && set QEMU_IMG!QEMU_IMG_Count!=%%x
echo.
echo [Q] to Quit
echo.
echo Enter your choice now

set /P QEMU_IMG_Choice=

SET QEMU_IMG_Choice=%QEMU_IMG_Choice:q=Q%
if "%QEMU_IMG_Choice%"=="Q" echo. && echo Quiting && GOTO CleanUP

echo.
echo.
echo Starting !QEMU_IMG%QEMU_IMG_Choice%! ...
echo.
echo.

if EXIST !QEMU_IMG%QEMU_IMG_Choice%! (
  START qemu.exe -L . -m 128 -hda "!QEMU_IMG%QEMU_IMG_Choice%!" -enable-audio -localtime
) ELSE echo Invalid Choice... && echo. && goto PrintMenu  


:CleanUp
REM Clean up environment
FOR /F "usebackq delims==" %%i IN (`set QEMU_IMG`) DO set %%i=
set QEMU_IMG_Choice=
set QEMU_IMG_Count=

Pause

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-08-01 15:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-01 15:43 [Qemu-devel] QEMU Menu for Windows Garth Dahlstrom

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.