Skip to content

Commit

Permalink
Primary Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Str0nkyK0ng committed Oct 10, 2023
1 parent 7a923a3 commit 93e1d40
Show file tree
Hide file tree
Showing 7 changed files with 133 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build
/dist
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.7
Binary file added docs/app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/app2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added logo.ico
Binary file not shown.
91 changes: 91 additions & 0 deletions shortcut.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import glob
import os
import sys
import sys
import PyQt5
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *




def makeShortcuts (inputPath,outputPath):
try:
currentPath = inputPath+"/**/*.exe"
for f in glob.glob(currentPath, recursive=True):
if("UnityCrashHandler" not in f):
# Make a link on the desktop
print(f)
os.symlink(f, os.path.expanduser(outputPath+"/"+os.path.basename(f)))
except:
print("Unexpected error occurred")

class window(QWidget):
def __init__(self, parent = None):
super(window, self).__init__(parent)
self.resize(800,100)
self.setWindowTitle("Game Lab Shortcut Creator")


self.label = QLabel(self)
self.label.setText("Input Path:")
self.label.move(100,5)

self.labelThree = QLabel(self)
self.labelThree.move(100,65)

self.labelTwo = QLabel(self)
self.labelTwo.setText("Output Path:")
self.labelTwo.move(100,35)

# Select input
self.inputButton = QPushButton(self)
self.inputButton.setText("Select")
self.inputButton.clicked.connect(self.selectInput)

# Select output
self.inputButton = QPushButton(self)
self.inputButton.setText("Select")
self.inputButton.move(0,30)
self.inputButton.clicked.connect(self.selectOutput)

# Run button
self.inputButton = QPushButton(self)
self.inputButton.setText("Run")
self.inputButton.move(0,60)
self.inputButton.clicked.connect(self.runCommand)


def selectInput(self):
file = QFileDialog.getExistingDirectory(self, "Select Directory")
self.inputFilePath = file
print(file)
self.label.setText("Input Path:"+file)
self.label.adjustSize()
self.label.update()

def selectOutput(self):
file = QFileDialog.getExistingDirectory(self, "Select Directory")
self.outputPath = file
print(file)
self.labelTwo.setText("Output Path:"+file)
self.labelTwo.adjustSize()
self.labelTwo.update()

def runCommand(self):
makeShortcuts(self.inputFilePath, self.outputPath)
self.labelThree.setText("Done!")
self.labelThree.adjustSize()
self.labelThree.update()
def main():
app = QApplication(sys.argv)
ex = window()
ex.show()
sys.exit(app.exec_())
if __name__ == '__main__':
main()




39 changes: 39 additions & 0 deletions shortcut.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# -*- mode: python ; coding: utf-8 -*-


a = Analysis(
['shortcut.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='shortcut',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=['logo.ico'],
hide_console='minimize-early',
)

0 comments on commit 93e1d40

Please sign in to comment.