Add --fused command line argument, to override fused game detection

(Designed to make launchers work for 'fake-fused' games, for example
ones you'd easily distribute on linux.)
This commit is contained in:
Bart van Strien
2012-05-18 15:15:03 +02:00
parent 26780681ea
commit 0f0a64819e
2 changed files with 11 additions and 1 deletions
+4
View File
@@ -112,6 +112,7 @@ end
love.arg.options = {
console = { a = 0 },
fused = {a = 0 },
game = { a = 1 }
}
@@ -206,6 +207,9 @@ function love.boot()
-- Is this one of those fancy "fused" games?
local can_has_game = pcall(love.filesystem.setSource, arg0)
is_fused_game = can_has_game
if love.arg.options.fused.set then
is_fused_game = true
end
if not can_has_game and o.game.set and o.game.arg[1] then
local full_source = love.path.getfull(o.game.arg[1])
+7 -1
View File
@@ -207,6 +207,7 @@ const unsigned char boot_lua[] =
0x20, 0x7b, 0x0a,
0x09, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x7b, 0x20, 0x61, 0x20, 0x3d, 0x20, 0x30,
0x20, 0x7d, 0x2c, 0x0a,
0x09, 0x66, 0x75, 0x73, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x7b, 0x61, 0x20, 0x3d, 0x20, 0x30, 0x20, 0x7d, 0x2c, 0x0a,
0x09, 0x67, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x7b, 0x20, 0x61, 0x20, 0x3d, 0x20, 0x31, 0x20, 0x7d, 0x0a,
0x7d, 0x0a,0x0a,
0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x72, 0x67, 0x2e,
@@ -345,7 +346,12 @@ const unsigned char boot_lua[] =
0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x73, 0x65, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c,
0x20, 0x61, 0x72, 0x67, 0x30, 0x29, 0x0a,
0x09, 0x69, 0x73, 0x5f, 0x66, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x67, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x63,
0x61, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x5f, 0x67, 0x61, 0x6d, 0x65, 0x0a,0x0a,
0x61, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x5f, 0x67, 0x61, 0x6d, 0x65, 0x0a,
0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x72, 0x67, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2e, 0x66, 0x75, 0x73, 0x65, 0x64, 0x2e, 0x73, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x69, 0x73, 0x5f, 0x66, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x67, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20,
0x74, 0x72, 0x75, 0x65, 0x0a,
0x09, 0x65, 0x6e, 0x64, 0x0a,0x0a,
0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x61, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x5f, 0x67, 0x61,
0x6d, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x20,
0x61, 0x6e, 0x64, 0x20, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x61, 0x72, 0x67, 0x5b, 0x31, 0x5d, 0x20,