App or plugin for easy deployment

Phil7

Active Member
Joined
Jun 26, 2017
I am trying to create an App that makes it more convenient to create the finished package of your game.
One click deployment is my goal.
For now I am targeting html, Windows desktop (and later Android)


You need the following on your system to test:
- Python 3 with PyQt5
-Cerberus X installation with release builds html and glfw of your app
-Innosetup for Unicode (preprocessor enabled during installation)

1. !Only test in a copy of your project folder!
3. Start the app with "python .\CX-Deploy.py"
4. Select the main .cxs file of your CerberusX project.
 

Attachments

Last edited:

Phil7

Active Member
Joined
Jun 26, 2017
As I plan to edit the first post to provide the latest news and downloads, this post is the start of the discussion.
For now I am hacking a tool (Named CXDeploy) together that does the job somehow in Purebasic, because this is the easiest way for me to provide an app with Gui.
Later I can switch to Qt with python to make the source useful for everyone. I think it could be helpful to have a working tool, to get a feeling of how it could look and feel, and how things could work together with the new Ide.

Maybe I have a download to test at the end of the week.
For now it does the following:
1. You put the exe in your CX project folder.
2. It creates one Folder called !CXDeploy with necessary files and a folder for the resulting products

Html Target:
1. It copies the build into the products folder (default dir)
2. Adds a html file with a maximized game canvas and no debugger textfield
2. Changes the favicon to a selected one.
3. Changes the title tag of the html file.

Windows Glfw Target through minGW:
1. Changes the Icon of the exe through the process of : windres(icon.ico +icon.rc)= icon.res / change makefile / rebuild
2. Runs a InnoSetup script (needs a unicode + preprocessor install of innoSetup) to make a install package exe . You can change a lot of variables for that in the GUI (as seen in the screenshot).

Problems:
To rebuild the desktop target I need the path of trans somehow and don't want the user to insert it.
Same with windres. How do I make sure that I can access windres64.exe through the windres command.
Maybe there should be an easy way for the tool to get access to config.winnt.txt of the cerberus installation?!


1550088054810.png
 

MikeHart

Administrator
Staff member
Joined
Jun 19, 2017
Location
Germany
YES, finally a user dev log! THANK YOU!!!

Looking good so far. Regarding the path to CX, well that is one the user has to select right now. One wish... let it be able to start wih the path to cx as a parameter. ;) Any I think it is no problem that the user would have to select the installation of CX. Do it once at the very first start and store it. Regarding copying the tool in every project folder.... why don't you just store it where you want to? Then let the user select the project and store a config file in it which holds all the info needed to work on the distribution.
 

Phil7

Active Member
Joined
Jun 26, 2017
Regarding copying the tool in every project folder.... why don't you just store it where you want to?
My mindset creating this tool is all about less user decisions, better tool and more likely people will test it. In the long run it should be either a part of the Ide as a plugin or a standalone tool that is installed the conventional way (to programs ...)

let it be able to start wih the path to cx as a parameter
I guess you are thinking about a way to start it from the Ide. Same Idea here. In this case it seems there are three parameters needed to avoid further mandatory user inputs:
1. dir of CX installation (For running trans and finding windres by the settings in config.winnt.txt )
2. dir of the project
3. Build folder (at least I don't know, how I get the .build folder name from within the CX installation)

let the user select the project and store a config file in it which holds all the info needed to work on the distribution.
Either that or one config file with all the settings for each project (needs more checking for consistency, I guess).
I am not keen on polluting the project folder with files and folders like JungleIDE used to do.
 

Phil7

Active Member
Joined
Jun 26, 2017
BTW Just another stupid idea that I came across making that tool.
It could be useful to have trans output a config-summary file that can be used by the deploy tool or for debugging settings. At the moment all the config settings are spread across all the default target config.cxs files -> overwritten by all the project config.cxs files -> overwritten by the in-source settings -> overwritten by the command line option settings for trans, right? :rolleyes:
 

MikeHart

Administrator
Staff member
Joined
Jun 19, 2017
Location
Germany
Almost correct, the last one is settings to build a project, where the modules are located, etc.

You tool is about packaging, right? Not building!? Then you won't need to worry about the config files at all.
 

Phil7

Active Member
Joined
Jun 26, 2017
Almost correct ;)
I don't know if all config.cxs settings can also be set in trans command line, but the docs say:
Arguments starting with + can be used to specify app config settings. Such arguments must be of the form +key=value. Note that boolean settings made this way should be specified using 1 or 0, not True or False, eg: '+GLFW_AUTO_SUSPEND_ENABLED=1'.

tool is about packaging, right?
same thing here ;)
I try to fill the gap that is present in CX between the things you can accomplish with config settings etc. like #GLFW_WINDOW_TITLE to the point where it feels like a finished product with an icon and a installer package.

you won't need to worry about the config files
For changing the icon you need to be aware, if your build is 32 or 64 bit to choose the correct windres options and to rebuild afterwards.
And for convenience reasons it could be handy to set default titles etc. for the package or other targets if the user already specified one for glfw.

It was just an idea, I got around that by letting the user choose the glfwBuildfolder and therefor decide if 32 or 64 bit was correct.
Maybe it could be worth some thoughts, if trans + builder should take care of some additional work to avoid rebuilding from outside.
 

Phil7

Active Member
Joined
Jun 26, 2017
Short info about the progress. I implemented the idea of parameter support when starting from command line with cerberus installation dir and project dir.
Two things to do till I can upload something to test:
- saving and loading of preferences in a file using xml. It is the most convenient way to do in PB at the moment.
- getting windres.exe from the mingGW installation folder. For now you would have to set the bin dir as a PATH variable.
 

MikeHart

Administrator
Staff member
Joined
Jun 19, 2017
Location
Germany
- getting windres.exe from the mingGW installation folder. For now you would have to set the bin dir as a PATH variable.
Please keep in mind that a user can also use MSVC and so not need to have mingw installed.
 

Phil7

Active Member
Joined
Jun 26, 2017
@MikeHart You're right. I haven't inserted icons in MSVC before, so I don't know how. Any resources?
I guess it is a different process than in MinGW.
I also guess that there are some changes if dawlanes overhaul is getting into the official release.
For now I am all about having a usable solution for the stuff I am using and getting some experience doing that.
... Maybe just getting myself started and away from waiting for a perfect solution or for someone else doing it.
 

magic

Active Member
3rd Party Tool Dev
Joined
Mar 5, 2018
Suggession: to rebuilding from outside by using Resource Hacker . You can also drive it via the command line.
The drawback: User need to download RH in separate install
 

Phil7

Active Member
Joined
Jun 26, 2017
@magic Thanks, I will consider this.

Version 2019-02-17 is out :) See first post.
I now fetch the minGW dir and therefor the location of windres.exe from config.winnt.txt, so no need for PATH settings.
@MikeHart For now minGW is mandatory, but it is a start. ...And the Tool in every project folder for testing
For commandline option you can just write the project dir. and -cxdir=... for the cerberus installation dir.
Example: CXDeploy.exe -cxdir=C:\cerberus C:\programs\myGame
 
Last edited:

Phil7

Active Member
Joined
Jun 26, 2017
Version 2019-03-05
- Updated the Innosetup script to enable writing to the cerberusstate file.
- some minor changes to the GUI and bug fixes
 

Phil7

Active Member
Joined
Jun 26, 2017
I rewrote the whole thing using python and Qt. While learning python and Qt from scratch...
So this is my first app in python ever. :oops:

commandline option changed to bare minimum, but you can get help by using -h option thanks to argparse library.

Ftp upload is implemented, but only gives feedback in the python console.

Current functionality:
- html target: setting of favicon, title, maximized window, filename, folder name)
- glfw Windows target: Creating an InnoSetup Installer package with the possibility of setting some values like app name, publisher etc.
- autofill functionality for easy to go default values
- save and load your settings in a json file inside your project folder

661
 
Last edited:
Top Bottom