@@ -9,12 +9,9 @@ local Filesystem = Utilities.Filesystem
99local Logging = Utilities .Logging
1010local System = Utilities .System
1111local Steam = require ("./Steam" )
12+ local Launcher = require ("./Launcher" )
1213
1314function Application .start ()
14- --[[
15- Chapter 0 : Preparing the environment
16- We need to create the config folder if it doesn't exist.
17- ]]
1815 -- Prepare folders if necessary
1916 for _ , folder in ipairs ({
2017 metadata .folders .config ,
@@ -31,11 +28,7 @@ function Application.start()
3128 fs .writeFile (metadata .folders .cache .. "/arguments.txt" , table.concat (process .args , "\n " ))
3229 end
3330
34- --[[
35- Chapter 1 : Game management
36- Is this being started through Steam or alone ?
37- What's the Steam config then ?
38- ]]
31+ -- Check if we're launched through Steam, start the game with its settings if so
3932 local launchedAppID = Steam .Utilities .isSteamLaunch ()
4033 if launchedAppID then
4134 Logging .write ("info" , "Launched through Steam (AppID " .. launchedAppID .. ")." )
@@ -57,10 +50,17 @@ function Application.start()
5750 process .exit (1 )
5851 end
5952
53+ -- Tell the user we found the game
6054 Logging .write ("success" , 'Detected "' .. gameData .name .. '" (' .. gameData .appID .. ") !" )
6155 System .sendNotification (metadata .name , "Detected " .. gameData .name .. "." , "normal" , true )
56+
57+ -- Go into the Game Launcher module.
58+ local command : {string } = Launcher .prepareLaunchCommand (gameData )
59+ print (command )
6260 else
6361 Logging .write ("info" , "Launched without Steam." )
62+
63+ -- :( - Lune FFI is not implemented yet, so no interface.
6464 System .sendNotification (metadata .name , "No graphical interface implemented yet." , "critical" , true )
6565 error ("No graphical interface implemented yet." )
6666 end
0 commit comments