Skip to content

Commit

Permalink
Merge pull request #2 from yukiarrr/feature/add-icons
Browse files Browse the repository at this point in the history
Add icon
  • Loading branch information
yukiarrr authored Sep 22, 2019
2 parents e7a93de + 68b8553 commit 542b431
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
9 changes: 9 additions & 0 deletions Il2cppSpy/application.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import sys
sys.path.append('../')
sys.path.append('./ui/')
import os
from PySide2.QtCore import Qt
from PySide2.QtGui import QIcon
from PySide2.QtWidgets import QApplication, QMainWindow, QFileDialog, QProgressDialog
import qdarkstyle

Expand Down Expand Up @@ -48,9 +50,16 @@ def action_compare_files(self):
self.action_presenter.compare_files(before_file_path, after_file_path, lambda value: progress_dialog.setValue(value * 100))


def resource_path(relative):
if hasattr(sys, '_MEIPASS'):
return os.path.join(sys._MEIPASS, relative)
return os.path.join(relative)


if __name__ == "__main__":
app = QApplication(sys.argv)
app.setStyleSheet(qdarkstyle.load_stylesheet_pyside())
app.setWindowIcon(QIcon(resource_path('icon.ico')))
window = MainWindow()
window.show()

Expand Down
8 changes: 5 additions & 3 deletions scripts/Il2cppSpy.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ block_cipher = None


import os
import platform
import capstone


site_package_path = '/'.join(capstone.__file__.split(os.sep)[:-2])
icon_path = './icons/icon.icns' if platform.system() == 'Darwin' else './icons/icon.ico'

a = Analysis(['../Il2cppSpy/application.py'],
pathex=['../Il2cppSpy/scripts'],
binaries=[],
datas=[('../Il2cppSpy/bin/Release/DumpWrapper.dll', '.'), ('../Il2cppSpy/bin/Release/Il2cppDumper.exe', '.'), ('../Il2cppSpy/bin/Release/Mono.Cecil.dll', '.'), (capstone._cs._name, './capstone/lib'), (f'{site_package_path}/Python.Runtime.dll', '.')],
datas=[('./icons/icon.ico', '.'), ('../Il2cppSpy/bin/Release/DumpWrapper.dll', '.'), ('../Il2cppSpy/bin/Release/Il2cppDumper.exe', '.'), ('../Il2cppSpy/bin/Release/Mono.Cecil.dll', '.'), (capstone._cs._name, './capstone/lib'), (f'{site_package_path}/Python.Runtime.dll', '.')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
Expand All @@ -48,10 +50,10 @@ exe = EXE(pyz,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False )
console=False , icon=icon_path)
app = BUNDLE(exe,
name='Il2cppSpy.app',
icon=None,
icon=icon_path,
bundle_identifier=None,
info_plist={
'NSHighResolutionCapable': 'True'
Expand Down
Binary file added scripts/icons/icon.icns
Binary file not shown.
Binary file added scripts/icons/icon.ico
Binary file not shown.

0 comments on commit 542b431

Please sign in to comment.