Share My Creation Experimental CodeBundle Reverser

Hi !!!

The code/project below is nothing more than the code from Erel's CodeBundle but reversed. Essentially, I couldn't resist...

What it does: reads the JSON and creates the project files in a folder. Layouts / Modules / B4J Project.

Of course, it still has its issues. That's why I'm sharing it here so we can find solutions.

No more problems in headers (thanks to @aeric fixes).
Many Thanks to @PaulMeuris for fix / selection of platform.
The problem it has is in the headers of the files (*.bas, *.b4j) - otherwise it works...

Erel's post:

Just have fun!

ps: It is working until today - Exported json from version 0.3 (Erel's CodeBundle)
 

Attachments

Last edited:
Nice, I will say that the structure is likely to be changed in the (near) future. It is not designed to be reversible nor persistent. For example, I will probably filter out some of the layout data that is currently being generated and is less relevant for CodeBundle use case.
 
There is a bug in Erel's CodeBundle causing first character of code in a class getting stripped.
Main module at line #227
B4X: Copy
cm.Code = text.SubString(i + 1) 'cm.Code = text.SubString(i + 2)

I have fixed bundleReverser.bas and tested for B4J project.
File attached.
 

Attachments

The fixes from @aeric make BundleReverser work for a b4a project.
The build configurations package name could also be modified:
B4X: Copy
    ' aeric: Hardcoded a Default Build
    Select platform
        Case "b4j"
            headers = headers & "Build1=Default,b4j." & projectName & CRLF
        Case "b4a"
            headers = headers & "Build1=Default,b4a." & projectName & CRLF
        Case "b4i"
            headers = headers & "Build1=Default,b4i." & projectName & CRLF
    End Select
This way the app gets the original name in stead of "example" provided that the project name is used for the package name.
 
Back
Top