Closed MysticTempest closed 6 years ago
First off, thank you for the issue.
The line endings is because I wrote the shell scripts on Windows at the time, I should have used vim under WSL but didn't think about it. I will fix this issue, thanks.
I did set them to executable before packaging but it obviously didn't seem to work. I'll try again. Thanks.
This should not be an issue but I may have made a mistake. I changed how the code walks through directories just before releasing to avoid a problem with the root directory in the output kept the "packed" or "unpacked" and decided to use walker
instead. I'll look into this again to make sure I didn't forget anything.
You're right, it doesn't support YAML files. I could support YAML but I don't like it which is why I don't support it. I will consider how to handle this problem. Since a majority of the files are data files, anyone who has changes would need to redo everything. So, supporting YAML in some way should be done. I'll add a pre-step to any packing process that converts YAML to JSON and include some sort of a message that their files will be converted.
Thank you again for creating this issue.
Hi, I was just made aware of this tool; figured I'd give it a shot. It's definitely a nice alternative to using the Wine workaround.
But, I came across a few small issues while testing the v1.0.0 release for Linux.
Error 1. Line Feed/EOL error in the scripts: Example:
Error 2. Scripts, and xnbcli binary are not executable.
Error 3. xnbcli can not create directories when packing files, causing a failure to repack the files if they were in sub-directories in the unpacked folder. However, it has no issue creating new directories when files are being unpacked.
Example packing with 2 Crops.json files. One under 'unpacked', the other in a sub-directory:
Error 4. xnbcli will not read .yaml files.
Suggested Fixes/Current Workarounds:
Assuming you're running Windows. You can probably use something like Notepad++ to convert the DOS EOL to a UNIX EOL. I know you can do so in Geany.
Same with setting, and preserving the executable bit for the files in the zip. Might need a Linux VM, or Cygwin/Windows Subystem for Linux to do those tasks; as I'm not quite sure if Windows has support for that.
What I personally did under Linux to fix my issues:
Opened,
Geany -> "Document" tab -> Set Line Endings -> Convert and Set to LF (Unix); then resaved.
//Fix line endings.Ran in the terminal,
chmod +x *.sh xnbcli
//Set files to be executable.Ran in the terminal,
cd ./unpacked && find . -type d -exec mkdir -p ../packed/{} \; && cd ..
//If there's a directory structure in 'unpacked' recreate it in the 'packed' folder before repacking files.Inform users it'll only read .json data files when packing. I spent a bit trying to troubleshoot why it wouldn't pack my .yaml files. Eventually, I stopped trying to pack files, and instead tried to unpack some XNB files; that's when I noticed that it output .json files.
So, any WIP mods in the .yaml format, or unpacked backup files will need to be repacked with XNBnode first; or converted to the same .json format before this tool can use them.
Not too big of a deal for new modders using this as their first XNB packer/unpacker. But, definitely a good heads up for those who have used XNBnode in the past, and may have .yamls lying around.
Other then those few things; it seems to work great! Much appreciated!