Skip to content

Commit

Permalink
Updated Braid installer for 32/64-bit installs.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Dec 18, 2010
1 parent 33fef76 commit 4febe68
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/braid/make.sh
Expand Up @@ -13,8 +13,8 @@ if [ "$1" = "--debug" ]; then
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)."
Expand Down
59 changes: 56 additions & 3 deletions examples/braid/scripts/config.lua
@@ -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",
Expand All @@ -22,20 +31,64 @@ Setup.Package
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
Expand Down

0 comments on commit 4febe68

Please sign in to comment.