Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: How to create the tup files for the OTA update #127

Closed
PhilippDenn opened this issue Jan 23, 2023 · 9 comments · Fixed by #135
Closed

Documentation: How to create the tup files for the OTA update #127

PhilippDenn opened this issue Jan 23, 2023 · 9 comments · Fixed by #135
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@PhilippDenn
Copy link
Collaborator

A step by step manual for non "IT guys" on how to create the OTA update files would be nice ;)

@PhilippDenn PhilippDenn added the documentation Improvements or additions to documentation label Jan 23, 2023
@TheRealKasumi
Copy link
Owner

Have you read this? Maybe it already helps. But I agree it could be extended a bit. Maybe you want to do it😋?

So basically you need to build the tool first which is relatively easy. We can provide the binary with the releases in the future as well. Then you you create a folder and call it how ever you want. You build the ui and the firmware and copy both to the folder. The ui goes into a „ui“ folder inside your newly created folder just like you would do on the SD card. Then in the „.pio“ folder you should be able to finde the „firmware.bin“ when the build of the controller fw is finished. This is copied next the ui folder. Then you run „tupt.exe update.tup <your_folder>“. That’s it😋.

@PhilippDenn
Copy link
Collaborator Author

PhilippDenn commented Jan 24, 2023

I'll try to make a guide in the next days 👍🏻☺️

@PhilippDenn
Copy link
Collaborator Author

PhilippDenn commented Jan 24, 2023

After installing g++, choosing the right directory in the command line (update-package-tool folder) and using:
g++ -g src\*.cpp -o build\tupt.exe

the following errors occured. Are my files corrupted or is this a "bigger problem"?

`In file included from src\main.cpp:17:
src\TUPFile.h:48:37: error: 'filesystem' in namespace 'std' does not name a type
48 | bool generateFromFolder(const std::filesystem::path rootPath);
| ^~~~~~~~~~
src\TUPFile.h:48:54: error: expected unqualified-id before 'rootPath'
48 | bool generateFromFolder(const std::filesystem::path rootPath);
| ^~~~~~~~
src\TUPFile.h:48:53: error: expected ')' before 'rootPath'
48 | bool generateFromFolder(const std::filesystem::path rootPath);
| ~ ^~~~~~~~~
| )
src\TUPFile.h:48:49: error: expected ';' at end of member declaration
48 | bool generateFromFolder(const std::filesystem::path rootPath);
| ^~~~
| ;
src\TUPFile.h:48:54: error: 'rootPath' does not name a type
48 | bool generateFromFolder(const std::filesystem::path rootPath);
| ^~~~~~~~
src\TUPFile.h:49:29: error: 'filesystem' in namespace 'std' does not name a type
49 | bool saveToFile(const std::filesystem::path fileName);
| ^~~~~~~~~~
src\TUPFile.h:49:46: error: expected unqualified-id before 'fileName'
49 | bool saveToFile(const std::filesystem::path fileName);
| ^~~~~~~~
src\TUPFile.h:49:45: error: expected ')' before 'fileName'
49 | bool saveToFile(const std::filesystem::path fileName);
| ~ ^~~~~~~~~
| )
src\TUPFile.h:49:41: error: expected ';' at end of member declaration
49 | bool saveToFile(const std::filesystem::path fileName);
| ^~~~
| ;
src\TUPFile.h:49:46: error: 'fileName' does not name a type
49 | bool saveToFile(const std::filesystem::path fileName);
| ^~~~~~~~
src\TUPFile.h:55:28: error: 'filesystem' in namespace 'std' does not name a type
55 | void addFolder(const std::filesystem::path path);
| ^~~~~~~~~~
src\TUPFile.h:55:45: error: expected unqualified-id before 'path'
55 | void addFolder(const std::filesystem::path path);
| ^~~~
src\TUPFile.h:55:44: error: expected ')' before 'path'
55 | void addFolder(const std::filesystem::path path);
| ~ ^~~~~
| )
src\TUPFile.h:55:40: error: expected ';' at end of member declaration
55 | void addFolder(const std::filesystem::path path);
| ^~~~
| ;
src\TUPFile.h:55:45: error: 'path' does not name a type
55 | void addFolder(const std::filesystem::path path);
| ^~~~
src\TUPFile.h:56:26: error: 'filesystem' in namespace 'std' does not name a type
56 | bool addFile(const std::filesystem::path fileName, const std::filesystem::path name);
| ^~~~~~~~~~
src\TUPFile.h:56:43: error: expected unqualified-id before 'fileName'
56 | bool addFile(const std::filesystem::path fileName, const std::filesystem::path name);
| ^~~~~~~~
src\TUPFile.h:56:42: error: expected ')' before 'fileName'
56 | bool addFile(const std::filesystem::path fileName, const std::filesystem::path name);
| ~ ^~~~~~~~~
| )
src\TUPFile.h:56:38: error: expected ';' at end of member declaration
56 | bool addFile(const std::filesystem::path fileName, const std::filesystem::path name);
| ^~~~
| ;
src\TUPFile.h:56:43: error: 'fileName' does not name a type
56 | bool addFile(const std::filesystem::path fileName, const std::filesystem::path name);
| ^~~~~~~~
src\main.cpp: In function 'int main(int, char**)':
src\main.cpp:32:28: error: '_O_U16TEXT' was not declared in this scope; did you mean 'O_TEXT'?
32 | _setmode(_fileno(stdout), _O_U16TEXT);
| ^~~~~~~~~~
| O_TEXT
src\main.cpp:45:13: error: 'filesystem' in namespace 'std' does not name a type
45 | const std::filesystem::path outputFile = argv[1];
| ^~~~~~~~~~
src\main.cpp:46:13: error: 'filesystem' in namespace 'std' does not name a type
46 | const std::filesystem::path updateFolder = argv[2];
| ^~~~~~~~~~
src\main.cpp:47:12: error: 'std::filesystem' has not been declared
47 | if (!std::filesystem::exists(updateFolder) || !std::filesystem::is_directory(updateFolder))
| ^~~~~~~~~~
src\main.cpp:47:31: error: 'updateFolder' was not declared in this scope
47 | if (!std::filesystem::exists(updateFolder) || !std::filesystem::is_directory(updateFolder))
| ^~~~~~~~~~~~
src\main.cpp:47:54: error: 'std::filesystem' has not been declared
47 | if (!std::filesystem::exists(updateFolder) || !std::filesystem::is_directory(updateFolder))
| ^~~~~~~~~~
src\main.cpp:56:69: error: 'updateFolder' was not declared in this scope
56 | std::wcout << L"Generate TesLight Update Package from folder: " << updateFolder << std::endl;
| ^~~~~~~~~~~~
src\main.cpp:65:57: error: 'outputFile' was not declared in this scope; did you mean 'tupFile'?
65 | std::wcout << L"Write TesLight Update Package to: " << outputFile << std::endl;
| ^~~~~~~~~~
| tupFile
In file included from src\TUPFile.cpp:9:
src\TUPFile.h:48:37: error: 'filesystem' in namespace 'std' does not name a type
48 | bool generateFromFolder(const std::filesystem::path rootPath);
| ^~~~~~~~~~
src\TUPFile.h:48:54: error: expected unqualified-id before 'rootPath'
48 | bool generateFromFolder(const std::filesystem::path rootPath);
| ^~~~~~~~
src\TUPFile.h:48:53: error: expected ')' before 'rootPath'
48 | bool generateFromFolder(const std::filesystem::path rootPath);
| ~ ^~~~~~~~~
| )
src\TUPFile.h:48:49: error: expected ';' at end of member declaration
48 | bool generateFromFolder(const std::filesystem::path rootPath);
| ^~~~
| ;
src\TUPFile.h:48:54: error: 'rootPath' does not name a type
48 | bool generateFromFolder(const std::filesystem::path rootPath);
| ^~~~~~~~
src\TUPFile.h:49:29: error: 'filesystem' in namespace 'std' does not name a type
49 | bool saveToFile(const std::filesystem::path fileName);
| ^~~~~~~~~~
src\TUPFile.h:49:46: error: expected unqualified-id before 'fileName'
49 | bool saveToFile(const std::filesystem::path fileName);
| ^~~~~~~~
src\TUPFile.h:49:45: error: expected ')' before 'fileName'
49 | bool saveToFile(const std::filesystem::path fileName);
| ~ ^~~~~~~~~
| )
src\TUPFile.h:49:41: error: expected ';' at end of member declaration
49 | bool saveToFile(const std::filesystem::path fileName);
| ^~~~
| ;
src\TUPFile.h:49:46: error: 'fileName' does not name a type
49 | bool saveToFile(const std::filesystem::path fileName);
| ^~~~~~~~
src\TUPFile.h:55:28: error: 'filesystem' in namespace 'std' does not name a type
55 | void addFolder(const std::filesystem::path path);
| ^~~~~~~~~~
src\TUPFile.h:55:45: error: expected unqualified-id before 'path'
55 | void addFolder(const std::filesystem::path path);
| ^~~~
src\TUPFile.h:55:44: error: expected ')' before 'path'
55 | void addFolder(const std::filesystem::path path);
| ~ ^~~~~
| )
src\TUPFile.h:55:40: error: expected ';' at end of member declaration
55 | void addFolder(const std::filesystem::path path);
| ^~~~
| ;
src\TUPFile.h:55:45: error: 'path' does not name a type
55 | void addFolder(const std::filesystem::path path);
| ^~~~
src\TUPFile.h:56:26: error: 'filesystem' in namespace 'std' does not name a type
56 | bool addFile(const std::filesystem::path fileName, const std::filesystem::path name);
| ^~~~~~~~~~
src\TUPFile.h:56:43: error: expected unqualified-id before 'fileName'
56 | bool addFile(const std::filesystem::path fileName, const std::filesystem::path name);
| ^~~~~~~~
src\TUPFile.h:56:42: error: expected ')' before 'fileName'
56 | bool addFile(const std::filesystem::path fileName, const std::filesystem::path name);
| ~ ^~~~~~~~~
| )
src\TUPFile.h:56:38: error: expected ';' at end of member declaration
56 | bool addFile(const std::filesystem::path fileName, const std::filesystem::path name);
| ^~~~
| ;
src\TUPFile.h:56:43: error: 'fileName' does not name a type
56 | bool addFile(const std::filesystem::path fileName, const std::filesystem::path name);
| ^~~~~~~~
src\TUPFile.cpp:49:45: error: 'filesystem' in namespace 'std' does not name a type
49 | bool TUPFile::generateFromFolder(const std::filesystem::path rootPath)
| ^~~~~~~~~~
src\TUPFile.cpp:49:62: error: expected unqualified-id before 'rootPath'
49 | bool TUPFile::generateFromFolder(const std::filesystem::path rootPath)
| ^~~~~~~~
src\TUPFile.cpp:49:61: error: expected ')' before 'rootPath'
49 | bool TUPFile::generateFromFolder(const std::filesystem::path rootPath)
| ~ ^~~~~~~~~
| )
src\TUPFile.cpp:49:62: error: expected initializer before 'rootPath'
49 | bool TUPFile::generateFromFolder(const std::filesystem::path rootPath)
| ^~~~~~~~
src\TUPFile.cpp:88:37: error: 'filesystem' in namespace 'std' does not name a type
88 | bool TUPFile::saveToFile(const std::filesystem::path fileName)
| ^~~~~~~~~~
src\TUPFile.cpp:88:54: error: expected unqualified-id before 'fileName'
88 | bool TUPFile::saveToFile(const std::filesystem::path fileName)
| ^~~~~~~~
src\TUPFile.cpp:88:53: error: expected ')' before 'fileName'
88 | bool TUPFile::saveToFile(const std::filesystem::path fileName)
| ~ ^~~~~~~~~
| )
src\TUPFile.cpp:88:54: error: expected initializer before 'fileName'
88 | bool TUPFile::saveToFile(const std::filesystem::path fileName)
| ^~~~~~~~
src\TUPFile.cpp:128:36: error: 'filesystem' in namespace 'std' does not name a type
128 | void TUPFile::addFolder(const std::filesystem::path path)
| ^~~~~~~~~~
src\TUPFile.cpp:128:53: error: expected unqualified-id before 'path'
128 | void TUPFile::addFolder(const std::filesystem::path path)
| ^~~~
src\TUPFile.cpp:128:52: error: expected ')' before 'path'
128 | void TUPFile::addFolder(const std::filesystem::path path)
| ~ ^~~~~
| )
src\TUPFile.cpp:128:53: error: expected initializer before 'path'
128 | void TUPFile::addFolder(const std::filesystem::path path)
| ^~~~
src\TUPFile.cpp:147:34: error: 'filesystem' in namespace 'std' does not name a type
147 | bool TUPFile::addFile(const std::filesystem::path fileName, const std::filesystem::path name)
| ^~~~~~~~~~
src\TUPFile.cpp:147:51: error: expected unqualified-id before 'fileName'
147 | bool TUPFile::addFile(const std::filesystem::path fileName, const std::filesystem::path name)
| ^~~~~~~~
src\TUPFile.cpp:147:50: error: expected ')' before 'fileName'
147 | bool TUPFile::addFile(const std::filesystem::path fileName, const std::filesystem::path name)
| ~ ^~~~~~~~~
| )
src\TUPFile.cpp:147:51: error: expected initializer before 'fileName'
147 | bool TUPFile::addFile(const std::filesystem::path fileName, const std::filesystem::path name)
| ^~~~~~~~

@TheRealKasumi
Copy link
Owner

Should be a relatively easy thing. Your compiler needs support for C++17. This should be the case starting from GCC 8.x.

@PhilippDenn
Copy link
Collaborator Author

Thanks, I will try it 👍🏻

@JakobLichterfeld
Copy link
Collaborator

correlate with #56 where we plan to build these update packages automatically

@PhilippDenn
Copy link
Collaborator Author

Thanks! Now that makes even more sense to me! Sorry that I didn`t saw this earlier :)

@JakobLichterfeld
Copy link
Collaborator

We now build the Update Tool directly in our workflow

First artifact see here @PhilippDenn: https://github.com/TheRealKasumi/TesLight/suites/10578590933/artifacts/526760769

@JakobLichterfeld JakobLichterfeld self-assigned this Jan 25, 2023
@TheRealKasumi
Copy link
Owner

To avoid confusion, please note this.

@TheRealKasumi TheRealKasumi self-assigned this Jan 25, 2023
@JakobLichterfeld JakobLichterfeld mentioned this issue Feb 6, 2023
4 tasks
TheRealKasumi pushed a commit that referenced this issue Mar 31, 2023
DevOps recharged:
- DevOps: Auto build for Update Packages, closes #56
- DevOps: Platform IO Build: replace deprecated commands, closes #136
- DevOps: evaluate use of GitHub Actions, closes #138
- Documentation: How to create the tup files for the OTA update, closes #127
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants