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

Automatic creation of the bare bundle #16

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

frankenstein91
Copy link
Contributor

@frankenstein91 frankenstein91 commented Apr 17, 2022

I had an idea how to automatically start the build process when creating a tag.
The zip created is hosted with a checksum right on Github on the tag.

I hope it helps you.

  • Tested with act on my system
  • Tested with a tag on my fork

@NaitLee
Copy link
Owner

NaitLee commented Apr 18, 2022

GitHub workflow is interesting.
In our case bundling "bare" edition is even very easy to do manually.
It may work best to (also) make "pure" and "windows" edition all together, while these only requires some additional files (bleak, bleak-winrt lib and "stripped" embedded windows python runtime).
... is it possible?

@frankenstein91
Copy link
Contributor Author

I think it should be possible. I have tried to use the build all script but got an error. It looks like I can only build the windows bundle in Windows. But that's possible to an free for public repository. I think I'm able to also build the android version in that way. But I would put every bundle in it's own workflow. That's better for doing it in parallel... I think.

@NaitLee
Copy link
Owner

NaitLee commented Apr 18, 2022

Oh, right...
This lets me think to modify the bundling script, as it's somewhat confusing...
Actually, "pure" is "bare" plus bleak, and "windows" is just "pure" plus bleak-winrt and py runtime.
These could be done at once in a chain. Also it should remind the developer if something is missing, and tell him/her what to do -- or automatically do it (needs internet connection).

btw actually no need windows... the windows-must is pip install bleak-winrt, but you can get the binary from an already-published release here.

As you can see in docs I said I would write a guide to do android later. But in fact we can really do automation -- after the hacks.
Android needs several hundreds MiBs of SDK, all the hacks, and finally a release apk should be signed (I have cert, needs to manually enter password)

@frankenstein91
Copy link
Contributor Author

the pure bundle is working...

Windows makes problems with

Traceback (most recent call last):
  File "D:\a\Cat-Printer\Cat-Printer\build-common\bundle.py", line 106, in <module>
    os.chdir('python-win32-amd64-embed')
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'python-win32-amd64-embed'

@NaitLee
Copy link
Owner

NaitLee commented Apr 18, 2022

I see you're working on 🙃
To avoid further confusion, I put all the things needed to build below, extract to build-common, and be sure there are bleak and python-win32-amd64-embed folder there (not in some subdir).

build-common.zip
(don't push these to this repo!)

No need to change the system. Bundling takes nothing from it.
You can always see what's up by seeing the code. It's just around 120 lines in bundle.py

Also remove __pycache__:

for i in $(find | grep -E '.*\.pyc'); do rm $i; done
for i in $(find | grep -E '__pycache__'); do rm -d $i; done

@frankenstein91
Copy link
Contributor Author

Also remove __pycache__:

I think it is not needed as every build is a fresh OS and a fresh copy of this repo

@frankenstein91
Copy link
Contributor Author

To avoid further confusion, I put all the things needed to build below, extract to build-common, and be sure there are bleak and python-win32-amd64-embed folder there (not in some subdir).

build-common.zip (don't push these to this repo!)

somehow we have to get it inside of the docker cointainer

@frankenstein91
Copy link
Contributor Author

@NaitLee you can ping me via matrix chat @bollerwagenpicard:tchncs.de

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants