mirror of
https://gitlab.com/GameFeverOnline/mmm-nsf-changer.git
synced 2025-12-17 01:17:43 -04:00
Added version checker
This commit is contained in:
parent
acd796ac49
commit
d12b64ca73
1 changed files with 12 additions and 2 deletions
|
|
@ -7,6 +7,7 @@ import filecmp
|
||||||
import webbrowser
|
import webbrowser
|
||||||
import requests
|
import requests
|
||||||
import base64
|
import base64
|
||||||
|
from packaging import version
|
||||||
|
|
||||||
##Here goes the actual code
|
##Here goes the actual code
|
||||||
|
|
||||||
|
|
@ -21,6 +22,15 @@ def safelist():
|
||||||
|
|
||||||
#maybe add autoupdater through gitlab
|
#maybe add autoupdater through gitlab
|
||||||
|
|
||||||
|
app_version = "v1.1.2"
|
||||||
|
def check_if_new_version():
|
||||||
|
response = requests.get("https://gitlab.com/api/v4/projects/51771052/repository/tags")
|
||||||
|
newest_version = response.json()[0]["name"]
|
||||||
|
if version.parse(newest_version) == version.parse(app_version):
|
||||||
|
return False
|
||||||
|
elif version.parse(newest_version) > version.parse(app_version):
|
||||||
|
return True
|
||||||
|
|
||||||
#add
|
#add
|
||||||
mmm_version = "1.8.5.2"
|
mmm_version = "1.8.5.2"
|
||||||
def check_version(version=False):
|
def check_version(version=False):
|
||||||
|
|
@ -177,10 +187,10 @@ layout = [
|
||||||
|
|
||||||
how_to_use = "I made this tool to be able to change the music for any Mega Man Maker level while playing the game. It works by replacing every nsf file with a custom one, but while preserving the original folders and file names.\n\nTo use it, just choose a nsf file and then tell the program where you store the *game* folder. That is where the .exe is, not the user folder.\n\nIf you find this useful, you can check out my YouTube Channel or my blog since I will keep making tools like this. Also, if you find any bugs or errors remember to notify me at GitLab by making an Issue."
|
how_to_use = "I made this tool to be able to change the music for any Mega Man Maker level while playing the game. It works by replacing every nsf file with a custom one, but while preserving the original folders and file names.\n\nTo use it, just choose a nsf file and then tell the program where you store the *game* folder. That is where the .exe is, not the user folder.\n\nIf you find this useful, you can check out my YouTube Channel or my blog since I will keep making tools like this. Also, if you find any bugs or errors remember to notify me at GitLab by making an Issue."
|
||||||
|
|
||||||
app_version = "v1.1"
|
|
||||||
|
|
||||||
window = sg.Window(f"MMM NSF Music Changer {app_version}", layout)
|
window = sg.Window(f"MMM NSF Music Changer {app_version}", layout)
|
||||||
disclaimer = sg.popup_yes_no('NSF Changer, by Timothy GFO', 'This program is not complete, there WILL be bugs. Use at your own risk.', 'Do you want to continue?')
|
disclaimer = sg.popup_yes_no('NSF Changer, by Timothy GFO', 'This program is not complete, there WILL be bugs. Use at your own risk.', 'Do you want to continue?')
|
||||||
|
if check_if_new_version():
|
||||||
|
sg.popup(f"There is a new update for MMM NSF Changer. Get it at the GitLab repo.")
|
||||||
while disclaimer == "Yes":
|
while disclaimer == "Yes":
|
||||||
event,values = window.read(timeout=50)
|
event,values = window.read(timeout=50)
|
||||||
window.set_icon(icon)
|
window.set_icon(icon)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue