Davidobot / love.js

LÖVE ported to the web using Emscripten, updated to the latest Emscripten and LÖVE (v11.5)
MIT License
624 stars 28 forks source link

game.js using absolute paths instead of relative paths #14

Closed CogentInvalid closed 3 years ago

CogentInvalid commented 4 years ago

When I run love.js, the resulting game.js file shows absolute paths for the game's files instead of relative paths (e.g. C:\\Users\\CogentInvalid\\Documents\\love\\game\\main.lua instead of /main.lua). This makes the game error out as soon as it loads. Fixing the paths causes the game to run correctly.

EDIT: Looking into this further, it looks like the results differ based on how love-js is called. If I provide it the full paths:

love-js C:/Users/CogentInvalid/Documents/love/game C:/Users/CogentInvalid/Documents/love/build

It gives the result described above. But if I run love-js from within the game folder and use relative paths:

love-js . ../build

The resulting game.js file has empty strings for all the filenames and '/' for all the file paths, and the game still crashes.

Davidobot commented 4 years ago

Huh, what about if you use .love files instead of the game folder?