TimerX icon indicating copy to clipboard operation
TimerX copied to clipboard

Just a command runner

Open im-coder-lg opened this issue 2 years ago • 36 comments

My new feature. @not-nef if you want, I'll make it even for Txt2.

Just is a command runner, like GNU Make, but easier and even with Windows support(make sure you have Git Bash too, it needs sh), so we can now just run simple commands than a long command.

If you want, I can add more scripts(or recipes) too.

Just: https://just.systems

im-coder-lg avatar Oct 07 '22 08:10 im-coder-lg

Deploy Preview for timerx-app ready!

Name Link
Latest commit 749c9478cfa66d2aa1e4b3eff255844e6061962f
Latest deploy log https://app.netlify.com/sites/timerx-app/deploys/633fe9a75df3da00094b4b2b
Deploy Preview https://deploy-preview-113--timerx-app.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Oct 07 '22 08:10 netlify[bot]

And gradients for the site are not inbuilt, we need custom CSS.

im-coder-lg avatar Oct 07 '22 08:10 im-coder-lg

This needs more work with PowerShell and Bash.

im-coder-lg avatar Oct 07 '22 09:10 im-coder-lg

NICE!

sumeshir26 avatar Oct 07 '22 10:10 sumeshir26

What commands is it supposed to run?

not-nef avatar Oct 07 '22 12:10 not-nef

Check the Justfile on my branch!

im-coder-lg avatar Oct 07 '22 13:10 im-coder-lg

@not-nef you need to install Just, which is a reallay powerfull command runner. I find it reallay usefull since I made a just script to build a exe

sumeshir26 avatar Oct 08 '22 02:10 sumeshir26

And it works even on Windows, so it's universal. Make sure you have Git Bash, Just needs a sh shell to work.

im-coder-lg avatar Oct 08 '22 03:10 im-coder-lg

Cool! I dont really see any use for it in txt2. I can have my batchfile execute the one thing i need which is compile an exe

not-nef avatar Oct 08 '22 08:10 not-nef

Yeah, but you can't keep it for long, right? If Txt2 reaches prod, you have to make sure the repo is clean, right? One file to manage all builds would be better than multiple compilation files that should be in the ci folder.

im-coder-lg avatar Oct 08 '22 10:10 im-coder-lg

Also, guys I think PyInstaller works properly now. The only issue is that even if Tkinter is installed on macOS or Linux, it doesn't recognize the module. It is rather, a system-level issue or an upstream issue, and since cx_Freeze seems to cause us a bit of inconvenience, I think it's time to jump boats.

I will, of course find a roundabout to use PyInstaller builds successfully on Macs and Linux PCs. Till then, it's best we use PyInstaller for Windows.

im-coder-lg avatar Oct 08 '22 10:10 im-coder-lg

Yeah but i cant make mac builds on windows so i will only need one command and it doesn't really matter if i hav a justfile or one batchfile

not-nef avatar Oct 08 '22 10:10 not-nef

Who said you need a Mac to make Mac builds? Try AppImages, they can be an all-in-one package with an install script. Trust me, it works.

im-coder-lg avatar Oct 08 '22 10:10 im-coder-lg

I found this on Reddit. It is two years old, but I bet it works.

https://www.reddit.com/r/Python/comments/gia4b1/making_python_appimages_using_a_single_command/

im-coder-lg avatar Oct 08 '22 10:10 im-coder-lg

PS: AppImages work on macOS too.

im-coder-lg avatar Oct 08 '22 10:10 im-coder-lg

@im-coder-lg We can use linuxdeploy for the AppData folder

sumeshir26 avatar Oct 08 '22 12:10 sumeshir26

I mean AppDir folder

sumeshir26 avatar Oct 08 '22 12:10 sumeshir26

There is nothing on Linux called AppDir. If you are talking libraries, the correct path is /usr/lib.

im-coder-lg avatar Oct 08 '22 16:10 im-coder-lg

And anyone know about how to successfully run PyInstaller on Linux without missing dependency issues?

im-coder-lg avatar Oct 08 '22 16:10 im-coder-lg

No, to build a AppImage you need a AppDir directory in the project root. Check the python-appimage docs What missibg deps error are you getting?

sumeshir26 avatar Oct 08 '22 16:10 sumeshir26

Yeah, Tkinter gone. Even though I installed it from the Pop!_ OS APT repos, which means the file can't find the module. I have an idea, I'll try tomorrow. Get some sleep guys.

im-coder-lg avatar Oct 08 '22 16:10 im-coder-lg

Try installing from sudo apt-get install python3-tk

sumeshir26 avatar Oct 08 '22 16:10 sumeshir26

I just did this: sudo nala install python3-tk python-tk tk-dev -y to get all Tkinter files, and I think I know a fix. I'll do it tomorrow, and it's literally 10:21 PM IST, get some sleep.

im-coder-lg avatar Oct 08 '22 16:10 im-coder-lg

I think I got it. Try this command after installing all requirements:

user@host~$ pyinstaller ./main.py --onefile --windowed --collect-data sv_ttk --collect-all tkinter --collect-all playsound --collect-all darkdetect --icon "./assets/logo.ico"

Then move the executable to the directory where the assets are present, then run the executable.

im-coder-lg avatar Oct 09 '22 05:10 im-coder-lg

@not-nef try the same on your Mac Mini too.

im-coder-lg avatar Oct 09 '22 05:10 im-coder-lg

And we can use the inno setup CI to build a installer using github avtions

sumeshir26 avatar Oct 09 '22 05:10 sumeshir26

Oh goody

btw what is this:

https://github.com/Futura-Py/TimerX/blob/b33bced3de0ba13ffe0e14a943f6c4db11a0f374/main.py#L39

no title?

im-coder-lg avatar Oct 09 '22 05:10 im-coder-lg

I need to change some paths of the main.py file for Linux, since we need to add it to the OS, we have to make a .desktop file, and make sure assets are accessible through a share folder. I have an idea, and I know it will work.

im-coder-lg avatar Oct 09 '22 06:10 im-coder-lg

Then, I have to make a script that runs with sudo to move it to the /usr directories and copy the .desktop file to the app list and desktop.

im-coder-lg avatar Oct 09 '22 06:10 im-coder-lg

Oh goody

btw what is this:

https://github.com/Futura-Py/TimerX/blob/b33bced3de0ba13ffe0e14a943f6c4db11a0f374/main.py#L39

no title?

yep no window name

HuyHung1408 avatar Oct 09 '22 16:10 HuyHung1408