Skip to content

Commit

Permalink
Reorganizes project and adds build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
tainagdcoleman committed Aug 12, 2018
1 parent 73e712c commit ac1fe93
Show file tree
Hide file tree
Showing 58 changed files with 74 additions and 0 deletions.
Binary file added Output/setup.exe
Binary file not shown.
32 changes: 32 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import subprocess
import os
import sys

if __name__ == '__main__':
path = os.path.dirname(os.path.realpath(__file__))
os.chdir(path)

icon_path = os.path.join('flanker', 'icon.ico')
main_path = os.path.join('flanker', 'main.py')
command = f'{sys.executable} -m PyInstaller --icon {icon_path} --noconsole --name neuropsy {main_path}'
process = subprocess.Popen(command.split())
process.wait()

with open('neuropsy.spec') as fp:
lines = fp.readlines()
lines.insert(1, 'from kivy.deps import sdl2, glew \n')

with open('neuropsy.spec', 'w+') as fp:
for i in range(len(lines)):
print(lines[i])
if 'COLLECT' in lines[i]:
lines[i] = lines[i].strip(' \t\n\r') + " Tree('flanker'), \n"
if 'a.datas' in lines[i]:
space = ''.join([' ' for i in range(len(lines[i]) - len(lines[i].lstrip()))])
lines[i] += f'{space}*[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)], \n'

fp.writelines(lines)

command = f'{sys.executable} -m PyInstaller neuropsy.spec'
process = subprocess.Popen(command.split())
process.wait()
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
42 changes: 42 additions & 0 deletions install.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Neuropsy"
#define MyAppVersion "1.5"
#define MyAppPublisher "The Toasts"
#define MyAppExeName "neuropsy.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{33F62D9C-C0DD-4B11-8580-431BE3E59C4B}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "dist\neuropsy\neuropsy.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "dist\neuropsy\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

0 comments on commit ac1fe93

Please sign in to comment.