-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with certain filenames. #56
Comments
My suggestion is just to use underscores instead of dots in file names. |
the files is generated by another piece of software, even if it could be possible there is still case of two files having same extension which is not good |
Interesting. Is there a way to mass-rename the dots to something else? And then just use the extension-less files as if they were .css files (or whatever they were in the first place). This could result in FYI I'm not a bin2cpp developer. I'm just trying to help. |
https://github.com/MKlimenko/embed |
Hi thank you for showing interest in bin2cpp and providing feedback. Much appreciated.
which will result with unique identifiers for both files. Let me clarify my point. What I suggest is to still use the I do plan on updating bin2cpp this week and implement multiple fixes, including this one. Edit: removed unfinished sentence. Fixed duplicate headerfile option. |
The More specifically: Fix existing bugs:
Increase robustnessA global dictionary should be created to remember previous identifiers. If two files generates the same identifier, a counter value (or something similar) should be automatically appended to new identifiers. |
I have fixed the first issue (identifier conflicts for This fix now provides unique identifiers which is pretty convenient. For example, you can now encode directories with the following structure:
If 6 files are named index.html, it creates function identifier such as This is my first question. I think these are not the prettiest identifiers. Which of the following strategies should I choose ?
Which strategy is more appropriate in your opinion ? Another problem is the generated output file names. All 6 generated files are named
(note those are *.h files) I would really like to get your option. I think it would help make sure I take the right decision. Changing the implementation of identifiers and the output file names is a breaking changes. I need to make sure that which ever strategy I choose, it will be the one that fits most use case. |
* feature_issue56: Added double quotes in generate_test_files.sh.in to prevent 'Permission Denied' error. Fixed invalid script commands in `generate_test_files.sh.in`. Modified cmakelists.txt to create target `build_test_files` which makes sure that all required unit tests files are created before building bin2cpp_unittest target. * Fixed issue #56: Problem with certain filenames Implemented getUniqueFilePath() and unit tests. Implemented `pathSplit()` and `pathJoin()` with unit tests. Implemented --keepdirs which allows to keep the same directory structure of the input directory in the output directory. This feature is required in preparation for fixing #51 and #56. Updated product to version 3.0.0 since the api is now broken. Moved `filter()` and `getFunctionIdentifierFromPath()` from `main.cpp` to `common.h` so that it can be reused and property tested. Updated `getFunctionIdentifierFromPath()` and `getUniqueFunctionIdentifierFromPath()` to properly generated identifiers from a file path. Created unit tests as well.
Hi. I created a new build which should fix this issue. Would you like to try it out? I think this fix actually solves the problem you mentioned. I would prefer to get your feedback before closing this issue. You can find the latest binaries with this fix at the following: Windows, Linux and macOS. EDIT: Also note the new command line argument --keepdirs which "enables the output files to have the same directory structure as the input files. Valid only when --dir is used." |
I think it's time for a new minor release/patch. My large file issue (#55) and this one got fixed, plus the new (2.5.0 or 2.4.1) |
Respectfully, I disagree. Also note the software is at version 3.0.0 since I created a breaking change with the new way of creating identifiers. Since that would be a major update, I see no reason why to rush things out. Please understand that I have very few hours of free time in a week and creating a release is hours I do not put on fixing issues. I would prefer not to go trough the release process multiple times in the next week or two. I do plan to include other fixes in the next release. Before releasing a new version, I need to make sure the new features are stable (that I did not forget about something). That is the reason I asked for feedback. I also have to update documentation files and create new examples to show how to use these new features. To be clear, I created a milestone to identify which issues I do plan to fix before the next release. |
@HackerDaGreat57 @Morritz Please note that I released version 3.0.0. Thank you to both of you for your help and feedback. |
thanks, it will for sure be really convienent to use with such filenames i wrote, for embedding html/js stuff to binaries, |
2 example filenames:
For both of this files there will be produced conflicting function definition "getIndexFile()", so it will not be able to compile. I am afraid that it also applies to the extensions.
The text was updated successfully, but these errors were encountered: