Fail* directories reorganized, Code-cleanup (-> coding-style), Typos+comments fixed.
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1321 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
30
simulators/bochs/build/macosx/Info.plist.in
Normal file
30
simulators/bochs/build/macosx/Info.plist.in
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>bochs</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>@VERSION@ Carbon</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>bochs-icn</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>net.sourceforge.bochs.bochs</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Bochs Carbon @VERSION@</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>Bochs Carbon (@VERSION@)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>BOCHS</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@VERSION@</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
0
simulators/bochs/build/macosx/README.macosx-binary
Normal file
0
simulators/bochs/build/macosx/README.macosx-binary
Normal file
BIN
simulators/bochs/build/macosx/bochs-icn.icns
Normal file
BIN
simulators/bochs/build/macosx/bochs-icn.icns
Normal file
Binary file not shown.
70
simulators/bochs/build/macosx/bochs.applescript
Normal file
70
simulators/bochs/build/macosx/bochs.applescript
Normal file
@ -0,0 +1,70 @@
|
||||
property bochs_path : "Contents/MacOS/bochs"
|
||||
property bochs_app : ""
|
||||
|
||||
on run
|
||||
tell application "Finder" to get container of (path to me) as string
|
||||
set script_path to POSIX path of result
|
||||
|
||||
-- Locate bochs
|
||||
set bochs_alias to findBochs()
|
||||
|
||||
-- Tell Terminal to run bochs from the command line
|
||||
--Use the script's directory as the current directory
|
||||
tell application "Terminal"
|
||||
activate
|
||||
do script "cd '" & script_path & "';exec '" & (POSIX path of bochs_app) & bochs_path&"'"
|
||||
-- Wait for Terminal to change the name first, then change it to ours
|
||||
delay 1
|
||||
set AppleScript's text item delimiters to "/"
|
||||
set the text_item_list to every text item of the script_path
|
||||
set AppleScript's text item delimiters to ""
|
||||
|
||||
|
||||
set next_to_last to ((count of text_item_list) - 1)
|
||||
set the folder_name to item next_to_last of text_item_list
|
||||
set name of front window to "Running bochs in ../" & folder_name & "/"
|
||||
end tell
|
||||
end run
|
||||
|
||||
-- Taken from examples at http://www.applescriptsourcebook.com/tips/findlibrary.html
|
||||
to Hunt for itemName at folderList
|
||||
--Returns path to itemName as string, or empty string if not found
|
||||
repeat with aFolder in folderList
|
||||
try
|
||||
if class of aFolder is constant then
|
||||
return alias ((path to aFolder as string) & itemName) as string
|
||||
else if folder of (info for alias aFolder) then
|
||||
return alias (aFolder & itemName) as string
|
||||
end if
|
||||
on error number -43 --item not there, go to next folder
|
||||
end try
|
||||
end repeat
|
||||
return "" --return empty string if item not found
|
||||
end Hunt
|
||||
|
||||
on findBochs()
|
||||
try
|
||||
if bochs_app is "" then error number -43
|
||||
return alias bochs_app
|
||||
on error number -43
|
||||
-- bochs_app no good, go hunting
|
||||
try
|
||||
tell application "Finder" to get container of (path to me) as string
|
||||
set this_dir_alias to alias result
|
||||
tell application "Finder" to get container of (this_dir_alias) as string
|
||||
set one_up_dir_alias to alias result
|
||||
set TheUsualPlaces to {this_dir_alias as string, one_up_dir_alias as string}
|
||||
Hunt for "bochs.app" at TheUsualPlaces
|
||||
set result_alias to result
|
||||
if result_alias is "" then error number -43
|
||||
set bochs_app to result_alias as string
|
||||
return result_alias
|
||||
on error number -43
|
||||
--Give up seeking, Ask the user
|
||||
choose application with prompt "Please locate Bochs:" as alias
|
||||
set result_alias to result
|
||||
set bochs_app to result_alias as string
|
||||
return result_alias
|
||||
end try
|
||||
end try
|
||||
end findBochs
|
||||
1365
simulators/bochs/build/macosx/bochs.r
Executable file
1365
simulators/bochs/build/macosx/bochs.r
Executable file
File diff suppressed because it is too large
Load Diff
117
simulators/bochs/build/macosx/diskimage.pl
Executable file
117
simulators/bochs/build/macosx/diskimage.pl
Executable file
@ -0,0 +1,117 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1991-2002 and beyond by Bungie Studios, Inc.
|
||||
# and the "Aleph One" developers.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# This license is contained in the file "COPYING",
|
||||
# which is included with this source code; it is available online at
|
||||
# http://www.gnu.org/licenses/gpl.html
|
||||
#
|
||||
#
|
||||
|
||||
my $fullfolderPath = shift(@ARGV);
|
||||
die "err: No folder specified" unless defined($fullfolderPath) && length($fullfolderPath);
|
||||
|
||||
$fullfolderPath =~ s{/$}{};
|
||||
$fullfolderPath =~ m{([^/]+)$};
|
||||
|
||||
local $folderName = $1;
|
||||
local $folderSize = undef;
|
||||
local $imageName = "'$fullfolderPath.dmg'";
|
||||
local $imageSectors = undef;
|
||||
local $imageTemp = "'$fullfolderPath-tmp.dmg'";
|
||||
|
||||
local $mount_point = "bochs-image-mount";
|
||||
|
||||
die "err: $folderName is not a directory\n" if(!-d $fullfolderPath);
|
||||
|
||||
# Know a better way to get the first value from du?
|
||||
($folderSize) = split(m/ /, `du -s "$fullfolderPath"`);
|
||||
die "err: du failed with $?\n" if($?);
|
||||
|
||||
# Inflate $folderSize for disk image overhead. Minimum 5 MB disk
|
||||
local $fiveMBImage=20*(2048);
|
||||
# BBD: I had to raise this to 20meg or the ditto command would run
|
||||
# out of disk space. Apparently the technique of measuring the
|
||||
# amount of space required is not working right.
|
||||
|
||||
$imageSectors = $folderSize + int($folderSize * 0.15);
|
||||
if($imageSectors < $fiveMBImage)
|
||||
{
|
||||
$imageSectors = $fiveMBImage;
|
||||
}
|
||||
print "Minimum sectors = $fiveMBImage\n";
|
||||
print "Folder sectors = $folderSize\n";
|
||||
print "Image sectors = $imageSectors\n";
|
||||
|
||||
# Create image, overwriting prior version
|
||||
`hdiutil create -ov -sectors $imageSectors $imageTemp`;
|
||||
die "err: hdiutil create failed with $?\n" if($?);
|
||||
|
||||
# Initialize the image
|
||||
local $hdid_info=`hdid -nomount $imageTemp`;
|
||||
die "err: hdid -nomount failed with $?\n" if($?);
|
||||
|
||||
$hdid_info =~ s/( |\t|\n)+/~!/g;
|
||||
local (@hdid_info) = split(m/~!/, $hdid_info);
|
||||
|
||||
local ($disk_dev, $hfs_dev);
|
||||
|
||||
$disk_dev = $hdid_info[0];
|
||||
$hfs_dev = $hdid_info[4];
|
||||
$mount_dev = $hdid_info[4];
|
||||
|
||||
$disk_dev =~ s{/dev/}{};
|
||||
$hfs_dev =~ s/disk/rdisk/;
|
||||
|
||||
`newfs_hfs -v "$folderName" $hfs_dev`;
|
||||
if($?)
|
||||
{
|
||||
local $err = $?;
|
||||
`hdiutil eject $disk_dev`;
|
||||
die "err: newfs_hfs failed with $err\n";
|
||||
}
|
||||
|
||||
# Fill the image
|
||||
|
||||
`mkdir $mount_point`;
|
||||
`/sbin/mount -t hfs $mount_dev $mount_point`;
|
||||
if($?)
|
||||
{
|
||||
local $err = $?;
|
||||
`hdiutil eject $disk_dev`;
|
||||
die "err: mount failed with $err\n";
|
||||
}
|
||||
|
||||
`ditto -rsrcFork "$fullfolderPath" $mount_point`;
|
||||
if($?)
|
||||
{
|
||||
local $err = $?;
|
||||
`umount $mount_dev`;
|
||||
`hdiutil eject $disk_dev`;
|
||||
`rmdir $mount_point`;
|
||||
die "err: ditto failed with $err\n";
|
||||
}
|
||||
`umount $mount_dev`;
|
||||
`hdiutil eject $disk_dev`;
|
||||
`rmdir $mount_point`;
|
||||
|
||||
# Create the compressed image
|
||||
`hdiutil convert $imageTemp -format UDCO -o $imageName`;
|
||||
die "err: hdiutil convert failed with $?\n" if($?);
|
||||
|
||||
`rm $imageTemp`;
|
||||
|
||||
print "$imageName is your new diskimage\n";
|
||||
99
simulators/bochs/build/macosx/make-dmg.sh
Executable file
99
simulators/bochs/build/macosx/make-dmg.sh
Executable file
@ -0,0 +1,99 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Make a DMG of Bochs. This script must be run from the main source
|
||||
# directory, e.g. "./build/macosx/make-dmg.sh". If you haven't run
|
||||
# configure yet, it runs .conf.macosx for you. Then it creates a
|
||||
# temporary directory _dmg_top and does a make install into that
|
||||
# directory, and builds a disk image. At the end it cleans up the
|
||||
# temporary directory.
|
||||
#
|
||||
|
||||
VERSION=@VERSION@ # substituted in with configure script
|
||||
VERSION=2.0.pre4
|
||||
BUILDROOT=./_dmg_top
|
||||
INSTALL_PREFIX=$BUILDROOT/Bochs-${VERSION}
|
||||
DMG=./Bochs-${VERSION}.dmg
|
||||
|
||||
# test if we're in the right directory. if not, bomb.
|
||||
echo '-- Is the script run from the right directory?'
|
||||
if test -f main.cc -a -f bochs.h; then
|
||||
echo yes
|
||||
else
|
||||
echo no
|
||||
echo ERROR: Run it from the top of the Bochs source tree, where bochs.h is found.
|
||||
exit 10
|
||||
fi
|
||||
|
||||
# test if configure has been run already. if not, run .conf.macosx.
|
||||
configured=0
|
||||
echo '-- Has configure been run already?'
|
||||
if test -f config.h -a -f Makefile; then
|
||||
echo yes
|
||||
else
|
||||
echo no. I will run .conf.macosx now.
|
||||
/bin/sh -x .conf.macosx
|
||||
conf_retcode=$?
|
||||
configured=1
|
||||
if test "$conf_retcode" != 0; then
|
||||
echo ERROR: configure failed. Correct errors in .conf.macosx and try again.
|
||||
exit 20
|
||||
fi
|
||||
fi
|
||||
|
||||
# remove any leftovers from previous image creation.
|
||||
echo "-- Removing leftovers from previous runs"
|
||||
rm -rf ${BUILDROOT} ${BUILDROOT}.dmg ${DMG}
|
||||
|
||||
# make new buildroot directory
|
||||
echo "-- Making ${BUILDROOT} directory"
|
||||
mkdir ${BUILDROOT} && mkdir ${INSTALL_PREFIX}
|
||||
if test $? != 0; then
|
||||
echo ERROR: mkdir ${BUILDROOT} or mkdir ${INSTALL_PREFIX} failed
|
||||
exit 30
|
||||
fi
|
||||
|
||||
# run make and then make install into it
|
||||
echo "-- Running make"
|
||||
make
|
||||
if test $? != 0; then
|
||||
echo ERROR: make failed
|
||||
exit 40
|
||||
fi
|
||||
|
||||
echo "-- Running make install with prefix=${INSTALL_PREFIX}"
|
||||
make install prefix=${INSTALL_PREFIX}
|
||||
if test $? != 0; then
|
||||
echo ERROR: make install with prefix=${INSTALL_PREFIX} failed
|
||||
exit 50
|
||||
fi
|
||||
|
||||
# create new disk image
|
||||
echo "-- Making a disk image with root at ${BUILDROOT}, using diskimage.pl"
|
||||
./build/macosx/diskimage.pl ${BUILDROOT}
|
||||
if test $? != 0; then
|
||||
echo ERROR: diskimage.pl script failed
|
||||
exit 60
|
||||
fi
|
||||
|
||||
if test ! -f ${BUILDROOT}.dmg; then
|
||||
echo ERROR: diskimage.pl succeeded but I cannot find the image ${BUILDROOT}.dmg.
|
||||
exit 70
|
||||
fi
|
||||
|
||||
# rename to the right thing
|
||||
echo "-- Renaming the output disk image to ${DMG}"
|
||||
mv ${BUILDROOT}.dmg ${DMG}
|
||||
if test $? != 0; then
|
||||
echo ERROR: rename failed
|
||||
exit 80
|
||||
fi
|
||||
|
||||
echo "-- Done! The final disk image is "
|
||||
ls -l ${DMG}
|
||||
|
||||
echo "-- Cleaning up the temporary files in ${BUILDROOT}"
|
||||
rm -rf ${BUILDROOT}
|
||||
|
||||
exit 0
|
||||
8
simulators/bochs/build/macosx/pbdevelopment.plist
Normal file
8
simulators/bochs/build/macosx/pbdevelopment.plist
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>PBXProjectSourcePath</key>
|
||||
<string>/Users/bryce/bochs/bochs/bochs.pbproj</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
simulators/bochs/build/macosx/script.data
Executable file
BIN
simulators/bochs/build/macosx/script.data
Executable file
Binary file not shown.
2712
simulators/bochs/build/macosx/script.r
Normal file
2712
simulators/bochs/build/macosx/script.r
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user