Updated Braid installer for 32/64-bit installs.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 18 Dec 2010 03:22:55 -0500
changeset 804 1f3629906694
parent 803 45de4213b858
child 805 4730a8dacfdd
Updated Braid installer for 32/64-bit installs.
examples/braid/make.sh
examples/braid/scripts/config.lua
--- a/examples/braid/make.sh	Sat Dec 18 03:20:53 2010 -0500
+++ b/examples/braid/make.sh	Sat Dec 18 03:22:55 2010 -0500
@@ -13,8 +13,8 @@
     DEBUG=1
 fi
 
-if [ ! -f data/data/package0.zip ]; then
-    echo "We don't see data/data/package0.zip ..."
+if [ ! -f data/gamedata/data/package0.zip ]; then
+    echo "We don't see data/gamedata/data/package0.zip ..."
     echo " Either you're in the wrong directory, or you didn't copy the"
     echo " install data into here (it's unreasonably big to store it in"
     echo " revision control for no good reason)."
--- a/examples/braid/scripts/config.lua	Sat Dec 18 03:20:53 2010 -0500
+++ b/examples/braid/scripts/config.lua	Sat Dec 18 03:22:55 2010 -0500
@@ -1,7 +1,16 @@
-local GAME_INSTALL_SIZE = 158514678;
+local GAME_INSTALL_SIZE = 144119222
+local X86_INSTALL_SIZE = 14440962
+local AMD64_INSTALL_SIZE = 20224358
 
 local _ = MojoSetup.translate
 
+-- grumble.
+local is32bit =
+        MojoSetup.info.machine == "x86" or
+        MojoSetup.info.machine == "i386" or
+        MojoSetup.info.machine == "i586" or
+        MojoSetup.info.machine == "i686"
+
 Setup.Package
 {
     vendor = "number-none.com",
@@ -22,20 +31,64 @@
     Setup.Readme
     {
         description = _("Braid README"),
-        source = _("README-linux.txt")
+        source = _("gamedata/README-linux.txt")
     },
 
     Setup.Option
     {
+        -- !!! FIXME: All this filter nonsense is because
+        -- !!! FIXME:   source = "base:///some_dir_in_basepath/"
+        -- !!! FIXME: doesn't work, since it wants a file when drilling
+        -- !!! FIXME: for the final archive, not a directory. Fixing this
+        -- !!! FIXME: properly is a little awkward, though.
+
         value = true,
         required = true,
         disabled = false,
         bytes = GAME_INSTALL_SIZE,
         description = "Braid",
 
+        Setup.OptionGroup
+        {
+            description = _("CPU Architecture"),
+            Setup.Option
+            {
+                value = is32bit,
+                required = is32bit,
+                disabled = false,
+                bytes = X86_INSTALL_SIZE,
+                description = "x86",
+                Setup.File
+                {
+                    wildcards = "x86/*";
+                    filter = function(fn)
+                        return string.gsub(fn, "^x86/", "", 1), nil
+                    end
+                },
+            },
+            Setup.Option
+            {
+                value = not is32bit,
+                required = false,
+                disabled = is32bit,
+                bytes = AMD64_INSTALL_SIZE,
+                description = "amd64",
+                Setup.File
+                {
+                    wildcards = "amd64/*";
+                    filter = function(fn)
+                        return string.gsub(fn, "^amd64/", "", 1), nil
+                    end
+                },
+            },
+        },
+
         Setup.File
         {
-            -- Just install everything we see...
+            wildcards = "gamedata/*";
+            filter = function(fn)
+                return string.gsub(fn, "^gamedata/", "", 1), nil
+            end
         },
 
         Setup.DesktopMenuItem