Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick fixes #166

Open
wants to merge 5 commits into
base: development-v3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dist/@Resources/main/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
17 changes: 13 additions & 4 deletions dist/@Resources/main/platforms/steam/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion partial_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
1 change: 1 addition & 0 deletions src/main/init.moon
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
13 changes: 9 additions & 4 deletions src/main/platforms/steam/init.moon
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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...
<game>
<appID>40400</appID>
Expand Down