Im developing a Torizon container application using the Qt QML and C++ template and havent had problems so far, now I would like to use git with my project so other developers can checkout the code and develop on their own board.
The problem: I cant figure out what to commit to git and what not so other developers can reproduce my results. The default
.gitignore that was created with a new project just ignores the
appconfig_*/work folder, which is why I figured the VSC extensions only needs the
file to setup the development enviroment.
After using the command to remove id and keys from a project and commiting it, I cant reproduce a build on another machine, the extension loads the project but doesnt build the SDK container automatically or show the command to rebuild it.
So which folders/files need to be shared and which dont? Is there an official guide for opening up an existing project?
We have an article on importing existing C/C++ projects here: https://developer.toradex.com/knowledge-base/torizon-cc-application-importing-example
In short there should be a command available via the extension
Import an existing C/C++ application. This should take an existing set of files and import them into a “new” project. If configuration files for the project don’t exist it will generate some, otherwise it should use what’s available.
But yes just to clarify other than the project source code the only thing that needs to be retained is the
config.yaml. This contains all the state information about a Torizon project.
importing the application again using the
Import an existing C/C++ application, also causes the extension to create a new configuration.
As a user, i expected to push my source code and
appconfig_0/config.yaml to my repo. Then I should be able to open the pulled repo using vscode and the extension would build the sdk container and create the
Is this possible/planned?
After further internal discussion it seems the right way to import this would be to do the following:
- On the original machine check in everything in the project to your git repo. The
.gitignore is fine you don’t need anything in
appconfig_*/work for this.
- On the other machine check out the repo and open Visual Studio Code.
- In Visual Studio Code go to
File -> Open Folder and open the folder containing the repo of the project.
- This will open the folder but not in the SDK container. You’ll need to rebuild it since the SDK container doesn’t exist yet on this new dev machine.
- In the command palette run
Torizon: Rebuild SDK and reload in container. This should rebuild the SDK container based off of the existing
- Then finally re-open the folder in the SDK container.
We’ll try to automate this process with a single command in the future but for now this seems to work on my side. Can you give this a try and see how it goes?