Tools for config and distribution?

Phil7

Administrator
CX Code Contributor
3rd Party Tool Dev
Joined
Jun 26, 2017
Messages
643
I was thinking about how I could improve Cerberus in terms of convenience. My idea is to make some little tools that could be used by any ide, so you can change the configuration or prepare for distribution (icons, signature, title...) of your project in a visual editor by mouse clicks.
As a beginner I had some hard time getting used to the folder structure and wich config file has wich effect on the resulting build. And I often have to look things up after some time...

In order to make the tools as useful (Win, Mac, Linux) as possible, what would you choose for developement?
- I did some things in PureBasic and had good experiences with the ide and the debugger, but it is commercial, so not everybody can contribute.
- I looked into BlitzMax with MaxGui and it seems quite similar to PureBasic, but it is kind of outdated

Is there a way to do it in Cerberus itself, as there is no native GUI as far as I know?

Any thoughts on this are welcome! :)
 

Martin

Active member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
Joined
Jun 19, 2017
Messages
334
Indeed this is on my list as well. Currently it's a bit tricky to get things done but I would love to have a tool where you can setup everything for an Android release for instance or iOS (with all those fancy launch images) and just click "Build" and that's it. :)

This together with a nice IDE would be awesome indeed.
 

dawlane

Well-known member
CX Code Contributor
Joined
Jun 21, 2017
Messages
852
Though such tools sound nice, the problem with creating such tools is maintaining them. All it takes is for Apple to change how projects are deployed in Xcode and the next thing you know is that you are having to maintain three version of your code with work around's. For an example all you have to do is look at the iOS simulator code in transcc, and Marks ugly hacks to get it to work; then he just looks like he abandoned it altogether.

The same could be said for an all-in-one installer for Cerberus. You could automate such things, but without regular updates it will eventually become broken. Though I am toying around with a way to make task a little less painful using a online 'plugin system' in combination with JSON configuration/information files.
 

muruba

New member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
Patreon Silver
Joined
Jul 5, 2017
Messages
230
Heh, I am working on a build tool for my CX projects (in Java). I know if I don't fully automate it - I am screwed :)
I will show what I have in a couple of days... maybe someone finds useful...
 

muruba

New member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
Patreon Silver
Joined
Jul 5, 2017
Messages
230
It will need java as i keep it simple...
 

Phil7

Administrator
CX Code Contributor
3rd Party Tool Dev
Joined
Jun 26, 2017
Messages
643
Here my first attempt for a simple configTool. The main benefit so far is, that it you have all the config files in one place and you can point and click at boolean items.
upload_2017-8-15_11-0-57.png
 

Phil7

Administrator
CX Code Contributor
3rd Party Tool Dev
Joined
Jun 26, 2017
Messages
643
Yes it's written in PureBasic, it can be compiled on Win, MacOs and Linux. It doesn't do crosscompiling, so I have to set up each platform first.

Is there a reason why the "config.cxs" file for glfs_angle is named differently (confix.cxs)?
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
3,165
Cool, then it would really be helpful for the CX users.

Is there a reason why the "config.cxs" file for glfs_angle is named differently (confix.cxs)?

Looks like a typo to me. I am at work so have no access to the sources. I will search later if confix.cxs is actually used.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
3,165
It was a typo @Phil7. I fixed it already inside the GitHub. Will be available with the next release.
 

Phil7

Administrator
CX Code Contributor
3rd Party Tool Dev
Joined
Jun 26, 2017
Messages
643
Ok, thank you.
What do you think about providing a copy of the targets folder under the name targets_defaults with the release. This way you can mess with the targets folder to customize the standard build settings and still have the factory defaults at hand in case you want to reset some settings?
This would be nice for my tool as I wouldn't have to deal with some kind of backup system for the settings.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
3,165
I would rather prefer not to add this to the distribution as it is redundant for the standard. Not sure what @Martin thinks about it.
Creating this backup directory shouldn't be much of a problem for your tool, or?
 

Phil7

Administrator
CX Code Contributor
3rd Party Tool Dev
Joined
Jun 26, 2017
Messages
643
You are right, no problem technically and I get your argument about avoiding redundant data.
My thought was just systematical: If a file is meant to be changed, there should be a simple way to set it back.
Maybe this idea could be a win win solution:
You could make a copy of each target (from targets_default to targets) the first time a target is compiled just as it is done for the build folder of a new project.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
3,165
And what about a user who doesn't use your tool? Redundant functionality. The stuff in the target folder is the BASE for each different project.

Project based configuration is done so far inside the source code directly or in a config.cxs file which is located inside the project folder. Because Trans will use that when it exists instead of the one that is located inside the target folder.

Any other possible changes, imho should be done inside the created build folder.

What do you want to set by your tool? I am totally happy that you do the effort but I don't think changing the base target is the right way. But maybe I am wrong. @Martin ?
 

Phil7

Administrator
CX Code Contributor
3rd Party Tool Dev
Joined
Jun 26, 2017
Messages
643
Ah, I think I didn't make my point clear. It is useful for a user, that does not use my tool, but certainly not necessary as in this case it is just a copy everyone can make by himself.
I am talking about two layers of changes the user can make to the settings. The first layer is the obvious one you mentioned, where you change the settings for each project in your build folder. The second layer gives you the possibility of changing the settings for all new projects (like changing a template file in word) and certainly for each clean build you make.
And this second layer needs a fall back option to the "factory settings".

In my case for example, I changed the defaults in glfw to 32Bit and enlarged the standard window-size, in android I changed the app_package, the screen orientation, the sdk version and the keystore. I really wouldn't like to change it in every project and despite the fact, that I like the possibility to override those settings in the program source it confuses me sometimes when I couldn't remember where I made those changes.

Don't get me wrong. I trust your decisions on cerberus no matter what you do in this case. I just wanted to share my thoughts and understand the why, if I am wrong here. I am really glad you two took the wheel of cerberus.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
3,165
No problem and like I said, I would love to have a one-click solution for CX. But I also would like to hear @Martin on this part, see what he thinks about it. He is pretty busy atm so I hope he will come by soon.

Is your tool only to set up a project or will it take care of creating a finished app too? Changing Icon, etc.
 

Phil7

Administrator
CX Code Contributor
3rd Party Tool Dev
Joined
Jun 26, 2017
Messages
643
For now it is only for setting up the target settings in project and the defaults. It could be enhanced, but maybe it should first do this job properly.
Maybe it is better to have one tool for each task, as it might be easier to maintain or to replace one of them.
It can still be a one click solution if the ide or some admin tool takes care of the smaller tools.
I could think of these tools:
1. ConfigTool: GUI for settings in the existing config-files of Cerberus
2. FinishTool: Replacing files, like .html for fullscreen, icons, res files
3. PublishTool: Preparing packages, like installers for desktop or checking android packages for upload on google play
 
Last edited:
Top Bottom