Author: ajorg
Date: 2007-11-01 17:21:15 -0500 (Thu, 01 Nov 2007)
New Revision: 88694

Added:
   trunk/moon/plugin/install.js.in
Removed:
   trunk/moon/plugin/install.js
Modified:
   trunk/moon/ChangeLog
   trunk/moon/configure.ac
   trunk/moon/plugin/
   trunk/moon/plugin/ChangeLog
Log:
2007-11-01  Andrew Jorgensen  <[EMAIL PROTECTED]>

        * configure.ac: Generate install.js from install.js.in
        * install.js.in: Get the version and the target CPU from configure and
        do some error checking, including checking that the platform matches


Modified: trunk/moon/ChangeLog
===================================================================
--- trunk/moon/ChangeLog        2007-11-01 22:19:50 UTC (rev 88693)
+++ trunk/moon/ChangeLog        2007-11-01 22:21:15 UTC (rev 88694)
@@ -1,3 +1,7 @@
+2007-11-01  Andrew Jorgensen  <[EMAIL PROTECTED]>
+
+       * configure.ac: Generate install.js from install.js.in
+
 2007-10-29  Andrew Jorgensen  <[EMAIL PROTECTED]>
 
        * configure.ac: Changes to include ffmpeg libs in the XPI package

Modified: trunk/moon/configure.ac
===================================================================
--- trunk/moon/configure.ac     2007-11-01 22:19:50 UTC (rev 88693)
+++ trunk/moon/configure.ac     2007-11-01 22:21:15 UTC (rev 88694)
@@ -255,6 +255,7 @@
 tools/svg2xaml/Makefile
 tools/xamlg/Makefile
 plugin/Makefile
+plugin/install.js
 plugin/test/Makefile
 plugin/samples/Makefile
 ])


Property changes on: trunk/moon/plugin
___________________________________________________________________
Name: svn:ignore
   - Makefile.in
*.exe
*.exe.mdb
Makefile
.libs
.deps
.project
.cproject
*.xpi

   + Makefile.in
install.js
*.exe
*.exe.mdb
Makefile
.libs
.deps
.project
.cproject
*.xpi


Modified: trunk/moon/plugin/ChangeLog
===================================================================
--- trunk/moon/plugin/ChangeLog 2007-11-01 22:19:50 UTC (rev 88693)
+++ trunk/moon/plugin/ChangeLog 2007-11-01 22:21:15 UTC (rev 88694)
@@ -1,5 +1,10 @@
 2007-11-01  Andrew Jorgensen  <[EMAIL PROTECTED]>
 
+       * install.js.in: Get the version and the target CPU from configure and
+       do some error checking, including checking that the platform matches
+
+2007-11-01  Andrew Jorgensen  <[EMAIL PROTECTED]>
+
        * Makefile.am: Apparently $(builddir) is a newer autotools feature not
        available on SuSE 10.1 so we'll just not use it.
 

Deleted: trunk/moon/plugin/install.js
===================================================================
--- trunk/moon/plugin/install.js        2007-11-01 22:19:50 UTC (rev 88693)
+++ trunk/moon/plugin/install.js        2007-11-01 22:21:15 UTC (rev 88694)
@@ -1,25 +0,0 @@
-var NAME = "Novell Moonlight";
-var VERSION = "0.1";
-var PLID = "@novell.com/" + NAME + ",version=" + VERSION;
-var LOADER = "libmoonloader.so";
-var PLUGIN = "libmoonplugin.so";
-var LIB = "libmoon.so";
-var AVUTIL = "libavutil.so";
-var SWSCALE = "libswscale.so";
-var AVCODEC = "libavcodec.so";
-var AVFORMAT = "libavformat.so";
-
-initInstall (NAME, PLID, VERSION);
-
-/* For some reason Mozilla can only tell us the global plugin directory,
- * so we have to guess it from the user's profile. */
-var plugins = getFolder("Profile", "../../plugins");
-addFile (PLID, VERSION, LOADER, plugins, null);
-addFile (PLID, VERSION, PLUGIN, plugins, "/moonlight/" + PLUGIN);
-addFile (PLID, VERSION, LIB, plugins, "/moonlight/" + LIB);
-addFile (PLID, VERSION, AVUTIL, plugins, "/moonlight/" + AVUTIL);
-addFile (PLID, VERSION, SWSCALE, plugins, "/moonlight/" + SWSCALE);
-addFile (PLID, VERSION, AVCODEC, plugins, "/moonlight/" + AVCODEC);
-addFile (PLID, VERSION, AVFORMAT, plugins, "/moonlight/" + AVFORMAT);
-performInstall ();
-alert("Succesfully installed " + NAME + " " + VERSION);

Copied: trunk/moon/plugin/install.js.in (from rev 88681, 
trunk/moon/plugin/install.js)
===================================================================
--- trunk/moon/plugin/install.js        2007-11-01 20:12:23 UTC (rev 88681)
+++ trunk/moon/plugin/install.js.in     2007-11-01 22:21:15 UTC (rev 88694)
@@ -0,0 +1,43 @@
+var NAME = "Novell Moonlight";
+var VERSION = "@VERSION@";
+var PLID = "@novell.com/" + NAME + ",version=" + VERSION;
+var CPU = "@target_cpu@";
+
+var LOADER = "libmoonloader.so";
+var PLUGIN = "libmoonplugin.so";
+var LIB = "libmoon.so";
+var AVUTIL = "libavutil.so";
+var SWSCALE = "libswscale.so";
+var AVCODEC = "libavcodec.so";
+var AVFORMAT = "libavformat.so";
+
+var err = 0;
+
+err += initInstall(NAME, PLID, VERSION);
+
+var re = new RegExp("Linux .*" + CPU);
+if (!re.exec(platform)) {
+       alert("This package supports Linux " + CPU + " but your browser reports 
that it is " + platform + ".\nPlease use a package that matches your browser's 
platform.");
+       cancelInstall();
+}
+
+/* For some reason Mozilla can only tell us the global plugin directory,
+ * so we have to guess it from the user's profile. */
+var plugins = getFolder("Profile", "../../plugins");
+err += addFile (PLID, VERSION, LOADER, plugins, null);
+err += addFile (PLID, VERSION, PLUGIN, plugins, "/moonlight/" + PLUGIN);
+err += addFile (PLID, VERSION, LIB, plugins, "/moonlight/" + LIB);
+err += addFile (PLID, VERSION, AVUTIL, plugins, "/moonlight/" + AVUTIL);
+err += addFile (PLID, VERSION, SWSCALE, plugins, "/moonlight/" + SWSCALE);
+err += addFile (PLID, VERSION, AVCODEC, plugins, "/moonlight/" + AVCODEC);
+err += addFile (PLID, VERSION, AVFORMAT, plugins, "/moonlight/" + AVFORMAT);
+
+if (err != 0) {
+       cancelInstall(err);
+} else {
+       err += performInstall ();
+}
+
+if (err == 0) {
+       alert("Succesfully installed " + NAME + " " + VERSION);
+}

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to