Jump to content

Capital letters and linux


AggrorJorn
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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"

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

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.

SpEcIeS

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

  1. Create a project "TestCasing"
  2. Create lua script "TestCasing.lua" in "CasingTest/Scripts/MyTestFolder"
  3. Create material file TestMaterial in "CasingTest/Material/MyTestFolder"
  4. Attach material and script to a pivot in your scene. In the material property you can see capital casing being used. 
  5. The console log display the material in lowercase.
  6. 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.

59b6d7665ac85_casingtest.thumb.PNG.cabcd1aaf3ecc8b0049a64615148de3f.PNG

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...