diff --git a/dist/@Resources/main/init.lua b/dist/@Resources/main/init.lua index 10b826b..1a7e647 100644 --- a/dist/@Resources/main/init.lua +++ b/dist/@Resources/main/init.lua @@ -657,6 +657,7 @@ Sort = function(sortingType) end local success, err = pcall(function() COMPONENTS.SETTINGS:setSorting(sortingType) + COMPONENTS.SETTINGS:save() COMPONENTS.LIBRARY:sort(sortingType, STATE.GAMES) STATE.SCROLL_INDEX = 1 return updateSlots() diff --git a/dist/@Resources/main/platforms/steam/init.lua b/dist/@Resources/main/platforms/steam/init.lua index c258467..0272fb1 100644 --- a/dist/@Resources/main/platforms/steam/init.lua +++ b/dist/@Resources/main/platforms/steam/init.lua @@ -185,10 +185,19 @@ do if type(vdf.libraryfolders) == 'table' then for key, value in pairs(vdf.libraryfolders) do if tonumber(key) ~= nil then - if value:endsWith('\\') then - value = value .. '\\' + if type(value) == 'table' then + if value.path then + if value.path:endsWith('\\') then + value.path = value.path .. '\\' + end + table.insert(libraries, io.joinPaths((value.path:gsub('\\\\', '\\')), 'steamapps\\')) + end + else + if value:endsWith('\\') then + value = value .. '\\' + end + table.insert(libraries, io.joinPaths((value:gsub('\\\\', '\\')), 'steamapps\\')) end - table.insert(libraries, io.joinPaths((value:gsub('\\\\', '\\')), 'steamapps\\')) end end else @@ -575,7 +584,7 @@ do self.name = "Steam" self.platform = 'steam' self.platformID = ENUMS.PLATFORM_IDS.STEAM - self.platformProcess = 'Steam.exe' + self.platformProcess = 'steam.exe' self.cachePath = 'cache\\steam\\' self.enabled = settings:getSteamEnabled() self.steamPath = settings:getSteamPath() diff --git a/partial_compile.py b/partial_compile.py index 040a455..ed9a5df 100644 --- a/partial_compile.py +++ b/partial_compile.py @@ -31,7 +31,7 @@ def main(source, target, cwd = os.getcwd()): return try: - current_working_directory = None + current_working_directory = os.getcwd() if len(sys.argv) > 1: current_working_directory = sys.argv[1] source = os.path.join(current_working_directory, "src") diff --git a/src/main/init.moon b/src/main/init.moon index f26a8a7..1298ec6 100644 --- a/src/main/init.moon +++ b/src/main/init.moon @@ -491,6 +491,7 @@ export Sort = (sortingType) -> success, err = pcall( () -> COMPONENTS.SETTINGS\setSorting(sortingType) + COMPONENTS.SETTINGS\save() COMPONENTS.LIBRARY\sort(sortingType, STATE.GAMES) STATE.SCROLL_INDEX = 1 updateSlots() diff --git a/src/main/platforms/steam/init.moon b/src/main/platforms/steam/init.moon index 93216e9..a141644 100644 --- a/src/main/platforms/steam/init.moon +++ b/src/main/platforms/steam/init.moon @@ -30,7 +30,7 @@ class Steam extends Platform @name = "Steam" @platform = 'steam' @platformID = ENUMS.PLATFORM_IDS.STEAM - @platformProcess = 'Steam.exe' + @platformProcess = 'steam.exe' @cachePath = 'cache\\steam\\' @enabled = settings\getSteamEnabled() @steamPath = settings\getSteamPath() @@ -155,8 +155,13 @@ class Steam extends Platform if type(vdf.libraryfolders) == 'table' for key, value in pairs(vdf.libraryfolders) if tonumber(key) ~= nil - value ..= '\\' if value\endsWith('\\') - table.insert(libraries, io.joinPaths((value\gsub('\\\\', '\\')), 'steamapps\\')) + if type(value) == 'table' + if value.path + value.path ..= '\\' if value.path\endsWith('\\') + table.insert(libraries, io.joinPaths((value.path\gsub('\\\\', '\\')), 'steamapps\\')) + else + value ..= '\\' if value\endsWith('\\') + table.insert(libraries, io.joinPaths((value\gsub('\\\\', '\\')), 'steamapps\\')) else log('\\Steam\\steamapps\\libraryfolders.vdf does not contain a table called "libraryfolders".') else @@ -434,7 +439,7 @@ if RUN_TESTS assert(steam\generateAppID('Whatevs', '"Y:\\Program Files (32)\\SomeGame\\game.exe"') == '17882896429207257088', assertionMessage) assert(steam\generateAppID('Spelunky Classic', '"D:\\Games\\GOG\\Spelunky Classic\\Spelunky.exe"') == '15292025676400427008', assertionMessage) - + profile = 'Some kind of header or other junk that we are not interested in... 40400