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

[Bug 🐛 ]: Github Actions #5

Closed
im-coder-lg opened this issue Dec 3, 2021 · 16 comments · Fixed by #9
Closed

[Bug 🐛 ]: Github Actions #5

im-coder-lg opened this issue Dec 3, 2021 · 16 comments · Fixed by #9

Comments

@im-coder-lg
Copy link
Member

So, let's get straight to the point.
We both have a Windows computer, so even if I switch to Linux(not yet, I need to give my PC, maybe by Saturday, I hope so), you can test Windows. We know that Mac and Linux use the bash shell. Well, Mac uses Zsh, but the set of commands are awfully similar.
So, this is my idea. If the shell works, it could mean that the OS build also would work.
About the .App Mac executable, we'll see about that later, we can NOT access the runtime that GitHub Actions uses to upload the build.
So, we need a build converter of sorts. I can run only server VMs, so we could run a VM or we could try finding any Mac runtimes on the cloud.
Here's about the build issue(I need to stop diverting the topic):
Windows works
Linux must be working, I'll check Raspbian(PS: It's Debian, not Ubuntu)
Mac, we must inspect.
For the Mac App file, we must inspect that.
Linux AppImage file needs to be created.
An installer file must be made, where the modules are installed automatically. We could use the .BAT file for Windows(DOS coding 😎) or .SH coding for Mac and Linux.
So, the installer is done, it will build the program from source so users don't miss anything.
About the runtime, remove Windows and Mac. Let Linux be there, once we find a Mac fix, we can add a separate build file for Mac. You can manage Windows, it's a matter of five minutes to build.
If I am confusing enough, I'm sorry. Got a whole lot of things around me, this one dominating them.

@im-coder-lg
Copy link
Member Author

And, the Mica blur(the app blur that resembles Windows 11's blur) is good. Actually, too good. If I were to use the light mode on a light website, it seems too bright, so we need to control that. Maybe we could do this the same way we manage dark mode.

@sumeshir26
Copy link
Member

@im-coder-lg The app doesn’t have mica, but it has acrylic(And it doesn’t even work!), so I don’t really get what mica you are talking about

@sumeshir26
Copy link
Member

@im-coder-lg About the windows installer, I was planning to build it next week, which automatically creates a shortcut for the Start Menu. I still think that I wil create a action for windows.

@im-coder-lg
Copy link
Member Author

The app doesn’t have mica, but it has acrylic(And it doesn’t even work!), so I don’t really get what mica you are talking about

I recently read an article and it also had a part of Windows 11 theming. Right now, you have a kinda blossoming thing(idk what it is) as your desktop image. In dark mode(Windows 11 dark mode), if you try opening the Start menu, it'll have a kinda great acrylic blur that Microsoft calls "Mica". That's what I meant.

About the windows installer, I was planning to build it next week, which automatically creates a shortcut for the Start Menu. I still think that I will create an action for windows.

Feel free to(regarding actions). But what software are you using for the installer?

@sumeshir26
Copy link
Member

@im-coder-lg I will probably use a bat file. Can you provide examples for when the acrylic is not good?

@im-coder-lg
Copy link
Member Author

Well, let's take the It's FOSS website in bright light mode. On using that with the light mode, the app seems like a mobile photo with overexposure. If there's a toggle for blur, it'd be cool. Also, it's best to have Always On Top and Dark mode toggles in a unified settings window so that the app seems more clean.

@sumeshir26
Copy link
Member

@im-coder-lg The acrilic does not display for me? Can you share a screenshot?

Also, it's best to have Always On Top and Dark mode toggles in a unified settings window so that the app seems more clean.
Yeah, dark mode and transperency should go in settings, will add that soon(I already have the icon in the assets folder). For the always on top, it think it should stay because my inspiration for the design was this:
image

@im-coder-lg
Copy link
Member Author

im-coder-lg commented Dec 3, 2021

Can you share a screenshot?

image
That's pure overexposure. If there was a toggle for the Mica blur(it's actually that since the blur represents Windows 11, it screams Windows 11 all over), that'd be great.
Still, the sound doesn't work for Windows 7:

$ python main.py
Running on <function system at 0x0000000002828A60>

    Error 261 for command:
        open ./assets/sounds/sound1.wav
    The driver cannot recognize the specified command.

    Error 261 for command:
        close ./assets/sounds/sound1.wav
    The driver cannot recognize the specified command.
Failed to close the file: ./assets/sounds/sound1.wav
Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Users\USER\anaconda3\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "C:\Users\USER\anaconda3\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "main.py", line 133, in runTimer
    playBuzzer()
  File "main.py", line 57, in playBuzzer
    playsound('./assets/sounds/sound1.wav')
  File "C:\Users\USER\anaconda3\lib\site-packages\playsound.py", line 72, in _playsoundWin
    winCommand(u'open {}'.format(sound))
  File "C:\Users\USER\anaconda3\lib\site-packages\playsound.py", line 64, in winCommand
    raise PlaysoundException(exceptionMessage)
playsound.PlaysoundException:
    Error 261 for command:
        open ./assets/sounds/sound1.wav
    The driver cannot recognize the specified command.

Git bash btw

@im-coder-lg
Copy link
Member Author

im-coder-lg commented Dec 3, 2021

I will probably use a bat file.

Regarding this, we might need some requirements. Maybe I will produce the batch file and upload the code here.
About the shell file(for Mac and Linux), I will try that on Gitpod.

@im-coder-lg
Copy link
Member Author

im-coder-lg commented Dec 3, 2021

A work I thought would take till Sunday is done.
The (crude) installer:

@ECHO OFF
TITLE TimerX Installer
echo Welcome to TimerX Installer!
echo The requirements needed to install TimerX are as follows:
echo Python 3.x, best use the one that's on Anaconda3
echo https://anaconda.org/downloads
echo Git for getting the latest code
echo https://git-scm.org/
echo And, finally, Administrator rights so that TimerX may appear on your Start menu.
echo Restart the program but with Administrator rights+On the `C:` drive(right click and hit the shield for admin launch)
echo After starting up with Admin rights, hit Enter.
PAUSE
echo Now, we'll be showing the commands to you, so you don't need to feel insecure.
@ECHO on
@ECHO We are cloning this at the root of your directory, so make sure it's Desktop, it'd be more convienient.
@REM Try C: if not redirecting, this is a remark.
git clone https://github.com/sumeshir26/TimerX ./TimerX
@echo Now, we'll be installing the requirements.
cd TimerX
pip install -r requirements.txt
@echo Now, we'll be creating the app.
pyinstaller main.spec
@echo Now, we'll be creating the shortcut.
@echo First, open Explorer, go to your TimerX directory
@echo Now, open the `dist` folder and right click on `TimerX.exe`
@echo Now, right click on `TimerX.exe` and hit "Send to > Desktop(Shortcut)"
@echo Now, go to `%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs` and paste the shortcut there.
@echo Now, you have a Start Menu shortcut. you might need to reload, but finally, you have TimerX.
@echo After following the above steps, you can hit the Enter key to exit the installer.
@echo Remember, you must keep the source code in the Desktop folder. If you move them, you must repeat the steps above.
@PAUSE
REM End of TimerX Installer.bat
@echo Exiting TimerX Installer...
EXIT

We might've done it.
Windows Installer halfway!
We need to check the Windows 11 context menu(right-click menu on Explorer when you right-click a file and another one of the desktop) so that I'd add that detail also, and maybe also create an ASCII banner containing the word "TimerX". We could add that in the beginning of the installer, and a lot other things.

@im-coder-lg
Copy link
Member Author

About this:
https://github.com/sumeshir26/TimerX/blob/c6b8da402bb8578fafcc3f0b03077ea8cd6b5776/main.py#L126
I recommend Time's up! or Timer over, it has to be kind of perfect.

@sumeshir26
Copy link
Member

@im-coder-lg I’m going to be out of town till Monday, so i can’t review anything till then

@im-coder-lg
Copy link
Member Author

I'll be done with the installer by then.

@sumeshir26
Copy link
Member

About this:

https://github.com/sumeshir26/TimerX/blob/c6b8da402bb8578fafcc3f0b03077ea8cd6b5776/main.py#L126

I recommend Time's up! or Timer over, it has to be kind of perfect.

Will add that…

@sumeshir26
Copy link
Member

@im-coder-lg
Copy link
Member Author

im-coder-lg commented Dec 4, 2021

I have an idea. Let's use two of them. One without the Create a release steps and one with it(but without timings/push+merge triggers). I have an idea, so I will work on it, make sure it works on my fork and open up a PR here.

@sumeshir26 sumeshir26 changed the title Fix for GitHub Actions(I think so) [Bug 🐛 ]: Github Actions Dec 7, 2021
@sumeshir26 sumeshir26 linked a pull request Dec 11, 2021 that will close this issue
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 a pull request may close this issue.

2 participants