Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/macx
diff options
context:
space:
mode:
authorMikkel Krautz <mikkel@krautz.dk>2010-02-15 21:56:38 +0300
committerMikkel Krautz <mikkel@krautz.dk>2010-02-16 00:24:05 +0300
commite26862738f9e6175f30bc38076572c475af83791 (patch)
tree45e9f441c2c104b72765e1cc99cc54462cc9fa59 /macx
parent6fa64111fde9e0a132f24c2a3269abdc7fe3eddb (diff)
Rename 'installer_macx' to 'macx'. We don't have an installer anymore. Use it for more general OSX stuff.
Diffstat (limited to 'macx')
-rw-r--r--macx/DS_Storebin0 -> 8196 bytes
-rwxr-xr-xmacx/gendmg.pl98
2 files changed, 98 insertions, 0 deletions
diff --git a/macx/DS_Store b/macx/DS_Store
new file mode 100644
index 000000000..9baa5d1e6
--- /dev/null
+++ b/macx/DS_Store
Binary files differ
diff --git a/macx/gendmg.pl b/macx/gendmg.pl
new file mode 100755
index 000000000..475295d56
--- /dev/null
+++ b/macx/gendmg.pl
@@ -0,0 +1,98 @@
+#!/usr/bin/perl
+#
+# Generate a Mac OS X Finder .DS_Store file for use on the Mumble disk image.
+#
+# Copyright (c) 2009 Mikkel Krautz <mikkel@krautz.dk>
+#
+# Released under the same terms as Mumble itself.
+#
+
+#
+# Notes:
+#
+# The use of binary plists inside the DS_Store seems to be new for the Finder in Mac OS X 10.6 (Snow Leopard),
+# but we'll go with this for now. It falls back somewhat gracefully for older versions OS X, since the icons
+# will still be placed in their correct positions.
+#
+
+use Data::Plist::BinaryWriter;
+use Mac::Finder::DSStore::BuddyAllocator;
+use Mac::Finder::DSStore;
+use IO::File;
+use strict;
+
+my $plist = Data::Plist::BinaryWriter->new(serialize => 0);
+
+my $bwsp = $plist->write([dict => {
+ "ShowPathbar" => [ false => 0 ],
+ "ShowSidebar" => [ false => 0 ],
+ "ShowStatusBar" => [ false => 0 ],
+ "ShowToolbar" => [ false => 0 ],
+ "SidebarWidth" => [ integer => 192 ],
+ "WindowBounds" => [ string => "{{388, 166}, {530, 525}}" ],
+}]);
+
+my $icvp = $plist->write([ dict => {
+ "arrangeBy" => [ string => "grid" ],
+
+ # these are floats [0, 1]
+ "backgroundColorBlue" => [ integer => 1 ],
+ "backgroundColorGreen" => [ integer => 1 ],
+ "backgroundColorRed" => [ integer => 1 ],
+
+ # a mac os alias record or the background image.
+ # fixme(mkrautz): add our pretty background. :)
+ "backgroundImageAlias" => [ data => "" ],
+
+ # background type. 1=color, 2=image
+ "backgroundType" => [ integer => 1 ],
+
+ "gridOffsetX" => [ integer => 0 ],
+ "gridOffsetY" => [ integer => 0 ],
+ "gridSpacing" => [ integer => 100 ],
+
+ "iconSize" => [ integer => 80 ],
+ "labelOnBottom" => [ true => 1 ],
+ "showIconPreview" => [ true => 1 ],
+ "showItemInfo" => [ false => 0 ],
+ "textSize" => [ integer => 12 ],
+ "viewOptionsVersion" => [ integer => 0 ],
+}]);
+
+my @entries = ();
+
+# styling
+my %styles = (
+ 'bwsp' => $bwsp,
+ 'icvp' => $icvp,
+);
+
+for my $key (keys %styles) {
+ my $e = Mac::Finder::DSStore::Entry->new(".", $key);
+ $e->value($styles{$key});
+ push(@entries, $e);
+}
+
+# file info
+my %iconpos = (
+ "Mumble.app" => [ 54, 40 ],
+ "Mumble11x.app" => [ 157, 40 ],
+ "Applications" => [ 466, 40 ],
+ "ReadMe.txt" => [ 54, 416 ],
+ "Changes.txt" => [ 157, 416 ],
+ "Murmur Extras" => [ 363, 416 ],
+ "Licenses" => [ 466, 416 ],
+);
+
+for my $key (keys %iconpos) {
+ my $e = Mac::Finder::DSStore::Entry->new($key, 'Iloc');
+ $e->value(pack('NNnnnn', $iconpos{$key}[0], $iconpos{$key}[1], 65536, 65536, 65536, 65536, 0));
+ push(@entries, $e);
+}
+
+@entries = sort { $a->cmp($b) } @entries;
+
+my $store = Mac::Finder::DSStore::BuddyAllocator->new(new IO::File "DS_Store", '>');
+&Mac::Finder::DSStore::putDSDBEntries($store, \@entries);
+$store->writeMetaData;
+$store->close;