[tools] winemono: Add script for Wine Mono download.

Vincent Povirk madewokherd at gmail.com
Thu May 17 08:53:58 CDT 2012


-------------- next part --------------
From e65999c25cb1dd91ad32587cc41f61178febdadd Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Thu, 17 May 2012 08:41:36 -0500
Subject: [PATCH] winemono: Add script for Wine Mono download.

---
 winemono.php |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 winemono.php

diff --git a/winemono.php b/winemono.php
new file mode 100644
index 0000000..86cd977
--- /dev/null
+++ b/winemono.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Redirects to a URL for the Wine Mono installer
+ */
+
+// Default version if none given
+$sVersion = '0.0.4';
+
+// Suffix appended to base name of file
+$sFileSuffix = '';
+
+// Folder which contains files
+$sFolder = 'Wine%20Mono';
+
+// Check if a specific version was passed
+if(isset($_GET['v'])) {
+	$sVersion = $_GET['v'];
+}
+
+if(!$sFileSuffix)
+	$sFileSuffix = $sVersion;
+
+$sExt = 'msi';
+
+// Name of the file
+$sFileName = sprintf('%s/%s/wine-mono-%s.%s', $sFolder, $sVersion, $sFileSuffix, $sExt);
+
+// Size array
+$aFileSizes = array(
+	'0.0.4'=>44408320
+);
+
+// Exact size of the file:
+$iFileSize = $aFileSizes[$sFileSuffix];
+if(!$iFileSize) {
+	header("HTTP/1.0 404 Not Found");
+	exit;
+}
+
+// List of additional locations (commonly used locations are already in download.inc.php)
+$aList = array();
+
+// Common code for Wine downloader scripts
+require("download.inc.php");
+?>
-- 
1.7.9.5


More information about the wine-patches mailing list