10 Commits

Author SHA1 Message Date
YourKalamity
2a7bfd934e Fix failing unlaunch link 2021-02-09 12:11:56 +00:00
YourKalamity
f09059791d Merge branch 'master' of https://github.com/YourKalamity/lazy-dsi-file-downloader 2021-01-07 21:00:21 +00:00
YourKalamity
9b42582d79 Fix small bug thanks NinjaCheetah 2021-01-07 20:59:42 +00:00
Kalam :p
604ba5afa0 Update issue templates 2020-12-21 12:19:17 +00:00
YourKalamity
3466ef5b35 Change default DSi version 2020-12-20 12:28:23 +00:00
Kalam :p
6df97b1e32 Update executables.yml 2020-12-19 23:42:10 +00:00
YourKalamity
68181e58c0 Fix tkmacosx 2020-12-19 22:04:00 +00:00
YourKalamity
50d06876ad Add colour.py 2020-12-19 21:30:06 +00:00
YourKalamity
5937d32b87 More fixes for macOS builds 2020-12-19 11:44:18 +00:00
YourKalamity
6367e8f8cc Attempt to fix mac executables v2 2020-12-19 11:33:56 +00:00
4 changed files with 1193 additions and 26 deletions

32
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG] - "
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Python version [if using Python]
**Additional context**
Add any other context about the problem here.

View File

@@ -3,6 +3,7 @@ name: Compile into Executables
on: on:
release: release:
types: [published] types: [published]
workflow_dispatch:
###################################################################################### ######################################################################################
# Based off of : # Based off of :
@@ -31,12 +32,12 @@ jobs:
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Make binary - name: Make binary
run: | run: |
pyinstaller --onefile --add-data "certifi;certifi" --add-data "requests;requests" --add-data "urllib3;urllib3" --add-data "lazy.ico;." --add-data "chardet;chardet" --icon "lazy.ico" --console --name "lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}" main.py pyinstaller --onefile --add-data "certifi;certifi" --add-data "requests;requests" --add-data "urllib3;urllib3" --add-data "lazy.ico;." --add-data "chardet;chardet" --icon "lazy.ico" --console --name "lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-Windows" main.py
cd dist cd dist
- name: Publish builds - name: Publish builds
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
path: dist/lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}.exe path: dist/lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-Windows.exe
name: windows name: windows
python: python:
@@ -52,7 +53,7 @@ jobs:
run: | run: |
mkdir temporary mkdir temporary
cp -r certifi chardet Darwin idna Linux requests urllib3 tkmacosx temporary/ cp -r certifi chardet Darwin idna Linux requests urllib3 tkmacosx temporary/
cp LICENSE main.py README.md temporary/ cp LICENSE main.py colour.py README.md temporary/
cd temporary cd temporary
chmod +x main.py chmod +x main.py
zip -r ../lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-Python3.zip * zip -r ../lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-Python3.zip *
@@ -79,10 +80,10 @@ jobs:
pip3 install pyinstaller pip3 install pyinstaller
- name: Get tag - name: Get tag
id: vars id: vars
run: echo::set-output name=tag::${GITHUB_REF#refs/*/} run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Create executable - name: Create executable
run: | run: |
pyinstaller --onefile --add-data "tkmacosx;tkmacosx" --add-data "Darwin;Darwin" --add-data "certifi;certifi" --add-data "requests;requests" --add-data "urllib3;urllib3" --add-data "lazy.ico;." --add-data "chardet;chardet" --icon "lazy.ico" --console --name "lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-macOS" main.py pyinstaller --onefile --add-data "colour.py:." --add-data "tkmacosx:tkmacosx" --add-data "Darwin:Darwin" --add-binary "Darwin/7za:Darwin" --add-data "certifi:certifi" --add-data "requests:requests" --add-data "urllib3:urllib3" --add-data "lazy.ico:." --add-data "chardet:chardet" --icon "lazy.ico" --console --name "lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-macOS" main.py
cd dist cd dist
chmod +x lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-macOS chmod +x lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-macOS
zip ../lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-macOS.zip lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-macOS zip ../lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-macOS.zip lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-macOS

1124
colour.py Normal file

File diff suppressed because it is too large Load Diff

52
main.py
View File

@@ -43,7 +43,8 @@ def downloadFile(link, destination):
downloadLocation = destination + fileName downloadLocation = destination + fileName
open(downloadLocation, 'wb').write(r.content) open(downloadLocation, 'wb').write(r.content)
return downloadLocation return downloadLocation
except ConnectionError: except ConnectionError as e:
print(e)
print("File not available, skipping...") print("File not available, skipping...")
return None return None
@@ -243,14 +244,13 @@ def start():
if unlaunchNeeded == 1 : if unlaunchNeeded == 1 :
#Download Unlaunch #Download Unlaunch
url = "https://problemkaputt.de/unlaunch.zip" url = "https://web.archive.org/web/20210207235625if_/https://problemkaputt.de/unlaunch.zip"
outputbox("Downloading Unlaunch\n") outputbox("Downloading Unlaunch\n")
unlaunchLocation = downloadFile(url, cwdtemp) unlaunchLocation = downloadFile(url, cwdtemp)
if unlaunchLocation != None: if unlaunchLocation != None:
print("Unlaunch Downloaded") print("Unlaunch Downloaded")
outputbox("Unlaunch Downloaded\n") outputbox("Unlaunch Downloaded\n")
lineCounter = lineCounter + 1 lineCounter = lineCounter + 1
#Extract Unlaunch #Extract Unlaunch
unzipper(unlaunchLocation,directory) unzipper(unlaunchLocation,directory)
@@ -439,8 +439,8 @@ def summonWindow0():
discordButton = Button(bottomFrame, text="DS⁽ⁱ⁾ Mode Hacking Discord server", fg=foregroundColour,bg=buttonColour, font=(buttonFont),command=lambda:webbrowser.open("https://discord.gg/yD3spjv",new=1)) discordButton = Button(bottomFrame, text="DS⁽ⁱ⁾ Mode Hacking Discord server", fg=foregroundColour,bg=buttonColour, font=(buttonFont),command=lambda:webbrowser.open("https://discord.gg/yD3spjv",new=1))
discordButton.pack(side=tkinter.LEFT, padx="5", pady="5") discordButton.pack(side=tkinter.LEFT, padx="5", pady="5")
nextButton = Button(bottomFrame, text="Next",width="8", fg=foregroundColour,bg=nextButtonColour, font=(buttonFont),command=lambda:[topFrame.destroy(),bottomFrame.destroy(),summonWindow1()]) nextButton = Button(bottomFrame, text="Next",width=button_width, fg=foregroundColour,bg=nextButtonColour, font=(buttonFont),command=lambda:[topFrame.destroy(),bottomFrame.destroy(),summonWindow1()])
nextButton.pack(side=tkinter.RIGHT, padx="5", pady="5") nextButton.pack(side=tkinter.RIGHT, padx=5, pady=5)
window.protocol("WM_DELETE_WINDOW",lambda:closeButtonPress(window)) window.protocol("WM_DELETE_WINDOW",lambda:closeButtonPress(window))
@@ -467,10 +467,14 @@ def summonWindow1():
selector["menu"].config(bg=buttonColour,fg=foregroundColour,font=(buttonFont)) selector["menu"].config(bg=buttonColour,fg=foregroundColour,font=(buttonFont))
selector.grid(column=0,row=5,sticky="w") selector.grid(column=0,row=5,sticky="w")
backButton = Button(bottomFrame,text="Back", font=(buttonFont),fg=foregroundColour,bg=backButtonColour,command=lambda: [topFrame.destroy(),bottomFrame.destroy(),summonWindow0()], width="8") if platform.system() == "Darwin":
macOS_hiddentext = tkinter.Label(topFrame, text = "(Click the area above this text\n if you can't see the drop down menu) ",fg=foregroundColour,font=(bodyFont))
macOS_hiddentext.grid(column=0,row=6, sticky="w")
backButton = Button(bottomFrame,text="Back", font=(buttonFont),fg=foregroundColour,bg=backButtonColour,command=lambda: [topFrame.destroy(),bottomFrame.destroy(),summonWindow0()], width=button_width)
backButton.pack(side=tkinter.LEFT) backButton.pack(side=tkinter.LEFT)
nextButton = Button(bottomFrame, text="Next",width="8", fg=foregroundColour,bg=nextButtonColour, font=(buttonFont),command=lambda:[topFrame.destroy(),bottomFrame.destroy(),summonWindow2()]) nextButton = Button(bottomFrame, text="Next",width=button_width, fg=foregroundColour,bg=nextButtonColour, font=(buttonFont),command=lambda:[topFrame.destroy(),bottomFrame.destroy(),summonWindow2()])
nextButton.pack(side=tkinter.RIGHT, padx="5", pady="5") nextButton.pack(side=tkinter.RIGHT, padx=5, pady=5)
window.protocol("WM_DELETE_WINDOW",lambda:closeButtonPress(window)) window.protocol("WM_DELETE_WINDOW",lambda:closeButtonPress(window))
@@ -500,10 +504,10 @@ def summonWindow2():
updateHiyaCheck.grid(column=0,row=7,sticky="w") updateHiyaCheck.grid(column=0,row=7,sticky="w")
buttonExtraHomebrew = tkinter.Button(topFrame, text = "Additional homebrew...", command =lambda:[extraHomebrew(window)], fg=foregroundColour,font=(buttonFont),bg=buttonColour) buttonExtraHomebrew = tkinter.Button(topFrame, text = "Additional homebrew...", command =lambda:[extraHomebrew(window)], fg=foregroundColour,font=(buttonFont),bg=buttonColour)
buttonExtraHomebrew.grid(column=0,row=8,sticky="w",pady=5) buttonExtraHomebrew.grid(column=0,row=8,sticky="w",pady=5)
backButton = Button(bottomFrame,text="Back", font=(buttonFont),fg=foregroundColour,bg=backButtonColour,command=lambda: [topFrame.destroy(),bottomFrame.destroy(),summonWindow1()], width="8") backButton = Button(bottomFrame,text="Back", font=(buttonFont),fg=foregroundColour,bg=backButtonColour,command=lambda: [topFrame.destroy(),bottomFrame.destroy(),summonWindow1()], width=button_width)
backButton.pack(side=tkinter.LEFT) backButton.pack(side=tkinter.LEFT)
nextButton = Button(bottomFrame, text="Next",width="8", fg=foregroundColour,bg=nextButtonColour, font=(buttonFont),command=lambda:[topFrame.destroy(),bottomFrame.destroy(),summonWindow3()]) nextButton = Button(bottomFrame, text="Next",width=button_width, fg=foregroundColour,bg=nextButtonColour, font=(buttonFont),command=lambda:[topFrame.destroy(),bottomFrame.destroy(),summonWindow3()])
nextButton.pack(side=tkinter.RIGHT, padx="5", pady="5") nextButton.pack(side=tkinter.RIGHT, padx=5, pady=5)
window.protocol("WM_DELETE_WINDOW",lambda:closeButtonPress(window)) window.protocol("WM_DELETE_WINDOW",lambda:closeButtonPress(window))
def summonWindow3(): def summonWindow3():
@@ -521,12 +525,12 @@ def summonWindow3():
noticeLabel.grid(column=0,row=2,sticky="w") noticeLabel.grid(column=0,row=2,sticky="w")
SDentry = tkinter.Entry(topFrame, fg=foregroundColour,bg=buttonColour,font=(buttonFont),width=25) SDentry = tkinter.Entry(topFrame, fg=foregroundColour,bg=buttonColour,font=(buttonFont),width=25)
SDentry.grid(column=0, row=3,sticky="w") SDentry.grid(column=0, row=3,sticky="w")
chooseDirButton = Button(topFrame, text = "Click to select folder", command =lambda:chooseDir(topFrame,SDentry),fg=foregroundColour,bg=buttonColour,font=(buttonFont),width=25) chooseDirButton = Button(topFrame, text = "Click to select folder", command =lambda:chooseDir(topFrame,SDentry),fg=foregroundColour,bg=buttonColour,font=(buttonFont),width=folder_width)
chooseDirButton.grid(column=0, row=4,sticky="w",pady=5) chooseDirButton.grid(column=0, row=4,sticky="w",pady=5)
backButton = Button(bottomFrame,text="Back", font=(buttonFont),fg=foregroundColour,bg=backButtonColour,command=lambda: [topFrame.destroy(),bottomFrame.destroy(),summonWindow2()], width="8") backButton = Button(bottomFrame,text="Back", font=(buttonFont),fg=foregroundColour,bg=backButtonColour,command=lambda: [topFrame.destroy(),bottomFrame.destroy(),summonWindow2()], width=button_width)
backButton.pack(side=tkinter.LEFT) backButton.pack(side=tkinter.LEFT)
nextButton = Button(bottomFrame, text="Start",width="8", fg=foregroundColour,bg=nextButtonColour, font=(buttonFont),command=lambda:[globalify(SDentry.get()),topFrame.destroy(),bottomFrame.destroy(),summonWindow4()]) nextButton = Button(bottomFrame, text="Start",width=button_width, fg=foregroundColour,bg=nextButtonColour, font=(buttonFont),command=lambda:[globalify(SDentry.get()),topFrame.destroy(),bottomFrame.destroy(),summonWindow4()])
nextButton.pack(side=tkinter.RIGHT, padx="5", pady="5") nextButton.pack(side=tkinter.RIGHT, padx=5, pady=5)
window.protocol("WM_DELETE_WINDOW",lambda:closeButtonPress(window)) window.protocol("WM_DELETE_WINDOW",lambda:closeButtonPress(window))
def globalify(value): def globalify(value):
@@ -550,11 +554,11 @@ def summonWindow4():
outputBox.grid(column=0,row=2,sticky="w") outputBox.grid(column=0,row=2,sticky="w")
startThread.start() startThread.start()
global finalbackButton global finalbackButton
finalbackButton = Button(bottomFrame,state="disabled", text="Back", font=(buttonFont),fg=foregroundColour,bg=backButtonColour,command=lambda: [topFrame.destroy(),bottomFrame.destroy(),summonWindow3()], width="8") finalbackButton = Button(bottomFrame,state="disabled", text="Back", font=(buttonFont),fg=foregroundColour,bg=backButtonColour,command=lambda: [topFrame.destroy(),bottomFrame.destroy(),summonWindow3()], width=button_width)
finalbackButton.pack(side=tkinter.LEFT) finalbackButton.pack(side=tkinter.LEFT)
global finalnextButton global finalnextButton
finalnextButton = Button(bottomFrame, state="disabled", text="Finish",width="8", fg=foregroundColour,bg=nextButtonColour, font=(buttonFont),command=lambda:[topFrame.destroy(),bottomFrame.destroy(),summonWindow5()]) finalnextButton = Button(bottomFrame, state="disabled", text="Finish",width=button_width, fg=foregroundColour,bg=nextButtonColour, font=(buttonFont),command=lambda:[topFrame.destroy(),bottomFrame.destroy(),summonWindow5()])
finalnextButton.pack(side=tkinter.RIGHT, padx="5", pady="5") finalnextButton.pack(side=tkinter.RIGHT, padx=5, pady=5)
window.protocol("WM_DELETE_WINDOW",lambda:donothing) window.protocol("WM_DELETE_WINDOW",lambda:donothing)
def summonWindow5(): def summonWindow5():
@@ -582,8 +586,8 @@ def summonWindow5():
w = w + 1 w = w + 1
label= tkinter.Label(topFrame,text="Press the Close button to Exit",font=(bodyFont),fg=foregroundColour) label= tkinter.Label(topFrame,text="Press the Close button to Exit",font=(bodyFont),fg=foregroundColour)
label.grid(column=0,row=w+1,sticky="w") label.grid(column=0,row=w+1,sticky="w")
finish = Button(bottomFrame, text="Close",width="8", fg=foregroundColour,bg=nextButtonColour, font=(buttonFont),command=lambda:[topFrame.destroy(),bottomFrame.destroy(),closeButtonPress(window)]) finish = Button(bottomFrame, text="Close",width=button_width, fg=foregroundColour,bg=nextButtonColour, font=(buttonFont),command=lambda:[topFrame.destroy(),bottomFrame.destroy(),closeButtonPress(window)])
finish.pack(side=tkinter.RIGHT, padx="5", pady="5") finish.pack(side=tkinter.RIGHT, padx=5, pady=5)
window.protocol("WM_DELETE_WINDOW",lambda:closeButtonPress(window)) window.protocol("WM_DELETE_WINDOW",lambda:closeButtonPress(window))
@@ -593,6 +597,8 @@ if __name__ == "__main__":
print("This program will ONLY work on Python 3 and above") print("This program will ONLY work on Python 3 and above")
sys.exit() sys.exit()
os.chdir(os.path.dirname(os.path.abspath(sys.argv[0])))
root = tkinter.Tk() root = tkinter.Tk()
window = tkinter.Toplevel(root) window = tkinter.Toplevel(root)
root.withdraw() root.withdraw()
@@ -607,7 +613,7 @@ if __name__ == "__main__":
#TKinter Vars #TKinter Vars
downloadmemorypit = tkinter.IntVar(value=1) downloadmemorypit = tkinter.IntVar(value=1)
firmwareVersion = tkinter.StringVar() firmwareVersion = tkinter.StringVar()
firmwareVersion.set(dsiVersions[0]) firmwareVersion.set(dsiVersions[1])
downloadtwlmenu = tkinter.IntVar(value=1) downloadtwlmenu = tkinter.IntVar(value=1)
downloaddumptool = tkinter.IntVar(value=1) downloaddumptool = tkinter.IntVar(value=1)
unlaunch = tkinter.IntVar(value=0) unlaunch = tkinter.IntVar(value=0)
@@ -656,6 +662,8 @@ if __name__ == "__main__":
buttonColour = "#f0f0f0" buttonColour = "#f0f0f0"
backButtonColour = "#f0f0f0" backButtonColour = "#f0f0f0"
nextButtonColour = "#f0f0f0" nextButtonColour = "#f0f0f0"
button_width = 80
folder_width = 250
else: #Non Jeve Stobs worshippers else: #Non Jeve Stobs worshippers
@@ -665,6 +673,8 @@ if __name__ == "__main__":
buttonColour = "#7289DA" buttonColour = "#7289DA"
backButtonColour = "#567487" backButtonColour = "#567487"
nextButtonColour = "#027b76" nextButtonColour = "#027b76"
button_width = 8
folder_width = 25
summonWindow0() summonWindow0()
root.mainloop() root.mainloop()