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.

The problem it has is in the headers of the files (*.bas, *.b4j) - otherwise it works...

Erel's post:


The problem:

Example Header created by BundleReverser until @EndOfDesignText@:

at b4j project:
B4X:
AppType=Starter
Title=xxxx
AppType=JavaFX
Library=jcore
Library=jfx
Library=B4XPages
Module=B4XMainPage
@EndOfDesignText@

Original Header need to created:
B4X:
AppType=JavaFX
Build1=Default,b4j.example
File1=MainPage.bjl
FileGroup1=New Group
Group=Default Group
Library1=jcore
Library2=jfx
Library3=b4xpages
Module1=|relative|..\B4XMainPage
NumberOfFiles=1
NumberOfLibraries=3
NumberOfModules=1
Version=10.3
@EndOfDesignText@

at modules/classes creating:
B4X:
Type=Class
@EndOfDesignText@

original:
B4X:
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=9.85
@EndOfDesignText@

But... just replacing only the headers... all working - the layout working too

Just have fun!

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

Attachments

  • BundleReverser.zip
    14.7 KB · Views: 10
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
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.
 

Magma

Expert
Licensed User
Longtime User

aeric

Expert
Licensed User
Longtime User
There is a bug in Erel's CodeBundle causing first character of code in a class getting stripped.
Main module at line #227
B4X:
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

  • bundleReverser.bas
    6.8 KB · Views: 6
Cookies are required to use this site. You must accept them to continue using the site. Learn more…