-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a923a3
commit 93e1d40
Showing
7 changed files
with
133 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/build | ||
/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.7 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
) |