-
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
Support getfilePath api and handle same function identifier #51
Comments
Hi. Thank you for showing interest in bin2cpp. Apologize for the late response. Regarding your first issue, I think it is a really good idea. I really like it.
When using I have looked more deeply about your second issue.
I disagree with your proposed solution. In my opinion, based on its name, the function The problem you mention at your third issue is easily resolved with the the fix explained above. I am really happy that you found out about these problem.
I have looked at the changes in your forked repository. More specifically, at commit 02fbf0908e2fb9bc381608072a942bb9b53bdb08. |
* 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.
I did not received feedback from you. I have looked at you commit in your fork repository. Like I said: "I think there are more changes than what is actually required". I have now fixed new issues since your last commit and I do not think your original changes still applies. However, since this is your idea, I would like to give you the opportunity to contribute to this repository. Here is what I would propose for the new changes:
I would be available to start working on these changes tomorrow. Please advise if you agree to make the changes. I you would prefer to not contribute, I am also fine with that. |
* feature-issue51: Updated documentation for --reportedfilepath option. #51 * Fixed issue #51: Support getfilePath api and handle same function identifier. Fixed invalid characters in generate_test_files.sh.in. Reordered unit test generated directories list in bin2cpp\test\bin2cpp_unittest\CMakeLists.txt. Implemented unit tests for issue #51. Deprecated method `getFilename()` in favor to `getFileName()`. This is to be more inline with getFilePath(). Fixed compilation of generated code for method `getFileName()` Removed directories from generated files in project bin2cpp_unittest. - Implemented support for `--reportedfilepath` command line. - Implemented automatic reported path when using `--dir` mode. - Modified IGenerator interface to add `setReportedFilePath()` and `getReportedFilePath()`. - Modified all generators to update the implementation of `getFilename()` and `getFilePath()` of the public api.
Feature and documentation is completed. |
We used bin2cpp to process our SPA single page application resources in a folder (html\css\js).
We have two issues.
getFilePath
inFile
class.E.g:
GetFilenameWithoutExtension
double times inprocessInputDirectory
, which causes the following files to be overwritten (botha.h
):We remove one
GetFilenameWithoutExtension
call ingetFunctionIdentifierFromPath
.class A123
), leading to compilation errors (redeclaration)We use a map to save identifier times, which is solved by appending increase index, such as
class A123_1
andclass A123_2
, although it is not very elegant.The text was updated successfully, but these errors were encountered: