AggrorJorn Posted September 10, 2017 Share Posted September 10, 2017 I have several maps that make use of materials and prefabs. In Windows these maps load fine but not on Linux. Some maps are not loading correctly because files can't be found. The console log shows that the filepath it is trying to load, is only partially cased correctly. Take the following line for instance in a windows project: Quote Loading material "E:/Leadwerks/Projects/SplineTools/scripts/splinetools/materials/handler.mat" Notice how the 'scripts' folder and all sub folders and the material file are completely lower cased. What's strange is that I never write folders in lowercase letters so I don't know why my project is saving the paths like this. Now on Windows, this isn't a problem, since windows doesn't care about case sensitivity, but with Linux I am running in to this map loading issue. The actual path should look like this: Quote Loading material "E:/Leadwerks/Projects/SplineTools/Scripts/SplineTools/Materials/Handler.mat" I can't place where this casing is coming from. Any ideas? For now the only solution I can think of is lowercasing all folderstructures and files, but it is a rather ugly solution. Quote Link to comment Share on other sites More sharing options...
reepblue Posted September 10, 2017 Share Posted September 10, 2017 What does the actual path look like when you list the contents of the directory? It's best to have your own method of organizing files. For instance, I make all my directories have capitalization, and files are all lowercase. For Example: "./MyDrive/My Files/file.txt" Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
SpEcIeS Posted September 10, 2017 Share Posted September 10, 2017 Using "find . -type f -exec grep nodes.mat {} \;" and "find . -type f -exec grep handler.mat {} \;", it appears that the issue is within the prefabs as well: Binary file ./Prefabs/PathNode.pfb matches Binary file ./Prefabs/RoadNode.pfb matches Binary file ./ExampleMaps/Roads/Roads - Road options.map matches Binary file ./ExampleMaps/Paths/Paths - Rotation based on nodes.map matches Binary file ./ExampleMaps/Paths/Paths - Camera freelook.map matches Binary file ./ExampleMaps/Paths/Paths - Moving platforms.map matches Binary file ./ExampleMaps/Paths/Paths - Rotation based on spline.map matches Binary file ./ExampleMaps/Paths/Paths - Camera lookat.map matches From what I am seeing, the problem is Leadwerks, on the Microsoft platform, is not case sensitive, when it comes to building prefabs and maps. However, using a hexeditor, looking at the map and prefab files, while using the Leadwerks on GNU/Linux, case sensitivity is being used. Likely this is nothing of a solution, but an assisted investigation. Quote SpEcIeS Link to comment Share on other sites More sharing options...
AggrorJorn Posted September 11, 2017 Author Share Posted September 11, 2017 14 hours ago, reepblue said: What does the actual path look like when you list the contents of the directory? I always capitalize my folders. So something like this: Projects/SplineTools/Scripts/SplineTools/. For some reason, prefabs are being saved with a lowercase path. This only happens as of the project in the path name. Will have a more clear example this evening. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted September 11, 2017 Author Share Posted September 11, 2017 I hardly believe that this is the first time someone has run in to this problem. A quick test with a new project and map. Not even using prefabs atm. Just a pivot with a new lua script and material file. Create a project "TestCasing" Create lua script "TestCasing.lua" in "CasingTest/Scripts/MyTestFolder" Create material file TestMaterial in "CasingTest/Material/MyTestFolder" Attach material and script to a pivot in your scene. In the material property you can see capital casing being used. The console log display the material in lowercase. If you save the map, and reopen it and go back to the material tab, everything is suddenly lowercased. If I export this project to a linux installation and load the map I already get the errors that it can't find the material and the lua script. Quote Link to comment Share on other sites More sharing options...
Josh Posted September 12, 2017 Share Posted September 12, 2017 The editor should be able to automatically detect and correct file cases. The engine itself does not correct cases when loading files. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.