NaitLee / Cat-Printer

Application supporting Bluetooth thermal “Cat Printers”, for everyone!
GNU General Public License v3.0
334 stars 33 forks source link

fix arch build #14

Closed frankenstein91 closed 2 years ago

frankenstein91 commented 2 years ago

This should fix the problem of missing files for the current state. I know you wanted to wait with pull requests, but I think a bug fix is OK.

NaitLee commented 2 years ago

In my mind the build should start from a "bare" edition bundle zip file. The bundle process is automated with Python, and is guaranteed to be clean enough, and it's always up to date. The build scripts are in folder build-common. Easy enough to invoke, and produces a good version once your workspace is setup correctly. (for "bare" it means working out-of-the-box, will also copy i18n.js if there is one in folder www)

# advised to clean up *.pyc files first
for i in $(find | grep -E '.*\.pyc'); do rm $i; done
# -b for bare, -w for windows, omit for pure
# can see the requirements of later two in development.md
python3 bundle.py -b <version>

You can also look at how Android "formal" build script unpack the "bare" bundle. Brute but just works...

Another thing to care is browser compatibility. It's not needed, when everyone is using newest browser -- but it's just not the case. You can test for the packaging env to see if there's node, npm, npx and npx tsc (i.e. typescript), if yes, also run 0-transpile.sh for transpiling JavaScript files. Maybe need to echo a note otherwise.

Ok for the i18n.js dependency fix... There are no conflicts in misc files at the moment...

frankenstein91 commented 2 years ago

In the aur way of doing things... The -git is done from a git itself. The none -git would be from the zip file. My current pkgbuild is for a *-git version.

Hope you get what I try to explain.

NaitLee commented 2 years ago

Seems it should be fixed again. Sorry if it troubles. The main thing to care is, no need to clone roddeh/i18n anymore, because we have our own (inspired by it, more suitable for our case) Also I think you can really use bundle.py now, as it now really works out of the box. Clone the git, bundle a bare edition, then build Arch package with the result. Simple enough, and actually still the git way. For anything else just ask :)

frankenstein91 commented 2 years ago

I hope I have understood your suggestion correctly.

NaitLee commented 2 years ago

It's great! Current job for me is to write manual and make frontend better, reach a "production" state. (I don't like the word either, but it describes best) I very appreciate this, while you (or me?) still need to change this with pace 😢 (if people are interested in your pre-changes, they can/will go to your fork and test them out! Merging is a sooner-or-later matter) Thank you!

I'm considering maintaining the PKGBUILD too, but later until I feel it's the time.