Dylancyclone / VMF2OBJ

Convert source-engine VMF files into OBJ files with materials (including brushes, displacements, entities, and models)
MIT License
109 stars 6 forks source link

Linux support #28

Closed abb128 closed 2 years ago

abb128 commented 2 years ago

Attempting to run this on Linux produces some errors and a never-ending progress bar.

If I include external paths it fails to convert VTF files and dies:

Starting VMF2OBJ conversion v1.1.3
[1/5] Reading VPK file(s)...
[2/5] Reading geometry...
[3/5] Writing brushes...
Writing Brushes...   0% [>                         ]    1/1151 (0:00:00 / 0:00:00) ?/sFailed to extract material: sunabouzu/th_wall02
java.io.IOException: Cannot run program "/tmp/vmf2objtemp/VTFCmd.exe": error=13, Permission denied
Failed to extract bump material: sunabouzu/th_walln
java.io.IOException: Cannot run program "/tmp/vmf2objtemp/VTFCmd.exe": error=13, Permission denied
Missing Material: metal/metalwall061f
Missing Material: tools/toolsnodraw
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 0
    at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
    at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
    at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
    at java.base/java.util.Objects.checkIndex(Objects.java:359)
    at java.base/java.util.ArrayList.get(ArrayList.java:427)
    at com.lathrum.VMF2OBJ.App.main(App.java:750)
Writing Brushes...   0% [>                         ]    2/1151 (0:00:56 / 8:56:34) 0/s^C

If I don't include external paths and just include the Garry's Mod VPK file, it gets through the brushes stage and dies on the entities stage

[...]
Missing Material: tools/toolsnodraw
Missing Material: tools/toolsnodraw
Missing Material: sunabouzu/bathroom_sign01
Missing Material: sunabouzu/sound_dampen
Missing Material: tools/toolsnodraw
Writing Brushes... 100% [======================] 1151/1151 (0:00:10 / 0:00:00) 115.1/s
[4/5] Processing entities...
Processing entities...   0% [>                     ]    1/1075 (0:00:00 / 0:00:00) ?/sException in thread "main" java.io.IOException: Cannot run program "/tmp/vmf2objtemp/CrowbarCommandLineDecomp.exe": error=13, Permission denied
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
    at java.base/java.lang.Runtime.exec(Runtime.java:594)
    at java.base/java.lang.Runtime.exec(Runtime.java:453)
    at com.lathrum.VMF2OBJ.App.main(App.java:978)
Caused by: java.io.IOException: error=13, Permission denied
    at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
    at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
    ... 4 more
Processing entities...   0% [>                     ]    1/1075 (0:00:31 / 9:15:13) 0/s^C
Dylancyclone commented 2 years ago

Hi! Unfortunately, as much as I would like, the dependencies the program uses aren't compatible with Linux. I also don't know enough about developing with Wine to try bring compatibility that way.

If you (or anyone else) knows a way, I'd love to learn