Browse Source

adjust Icon to start Programm

master
Nicole Weber 2 years ago
parent
commit
4cc7257d5f
9 changed files with 37 additions and 3 deletions
  1. 10
    0
      BCI.desktop
  2. 14
    0
      Readme.txt
  3. 4
    1
      UIController.py
  4. BIN
      UIController.pyc
  5. 2
    2
      UIViewTKinter.py
  6. BIN
      UIViewTKinter.pyc
  7. BIN
      gui
  8. 0
    0
      log.txt
  9. 7
    0
      start.sh

+ 10
- 0
BCI.desktop View File

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[C]=/home/ubuntu/Downloads/icon.ico
Name[C]=BCI
Exec=/home/ubuntu/Desktop/BCIProjekt/start.sh
Name=BCI
Icon=/home/ubuntu/Downloads/icon.ico

+ 14
- 0
Readme.txt View File

Zur Ausfuerung des Programmes muessen die Pfade zu den Befehlen, falls unterschiedlich zu den defaultpfaden, richtig angegeben werden
und mit dem Befehl g++ dll.cpp --shared -fPIC -o dll.so in eine shared librarz umgewandelt werden.

Zudem muss xdotool und evtl python-tkinter installiert werden (siehe script.sh)

Fuer den Ablauf werden dann nur die Datei gui, dll.so und das icon (icon.png) benoetigt. Alle Dateien bitte im selben Ordner.
Default im gleichen Ordner wie der Ordner meta. Das Programm kann nun mit den Kommandozeilenaufruf ./gui gestartet werden

Fuer den Aufruf ueber ein Desktop Icon werden die Dateien BCI.desktop und start.sh benoetigt:
>BCI.desktop muss in den home folder gelegt und installiert werden (sudo desktop-file-install BCI.desktop).
Ggf. muessen die Pfade zur start.sh datei und zum Icon angepasst werden
>start.sh wird mit dem Icon aufgerufen. auch hier muss evtl der Pfad angepasst werden.



+ 4
- 1
UIController.py View File

''' '''
print("saveFile") print("saveFile")
print(self.file) print(self.file)
os.mkdir(self.file)
if not os.path.exists(self.file):
os.mkdir(self.file)
copyfile(self.pathOVFile, (self.file + "/p300-xdawn-train.ov")) copyfile(self.pathOVFile, (self.file + "/p300-xdawn-train.ov"))
copyfile(self.pathClassifierCfg, (self.file + "/p300-classifier.cfg")) copyfile(self.pathClassifierCfg, (self.file + "/p300-classifier.cfg"))
copyfile(self.pathSpatialCfg, (self.file + "/p300-spatial-filter.cfg")) copyfile(self.pathSpatialCfg, (self.file + "/p300-spatial-filter.cfg"))


self.changeScreen("StartPage")

#copyfile(self.pathOVFile, self.file) #copyfile(self.pathOVFile, self.file)


def setDataset(self): def setDataset(self):

BIN
UIController.pyc View File


+ 2
- 2
UIViewTKinter.py View File

self.windowFrame = Frame(self, height=200, width=500, bg=self.layout["background"]) self.windowFrame = Frame(self, height=200, width=500, bg=self.layout["background"])
self.windowFrame.grid(column=0, row=0) self.windowFrame.grid(column=0, row=0)


self.buttonFrame = Frame(self, height=200, width=500, bg=self.layout["background"])
self.buttonFrame = Frame(self, height=50, width=500, bg=self.layout["background"])
self.buttonFrame.grid(column=0, row=1) self.buttonFrame.grid(column=0, row=1)
self.buttonFrame.columnconfigure(0, weight=1) # Set weight to row and self.buttonFrame.columnconfigure(0, weight=1) # Set weight to row and
self.buttonFrame.rowconfigure(0, weight=1) # column where the widget is self.buttonFrame.rowconfigure(0, weight=1) # column where the widget is
stopBtn.grid() stopBtn.grid()


def adjustSize(self, height, width): def adjustSize(self, height, width):
self.windowFrame.configure(height=(height*4)/5, width= width)
self.windowFrame.configure(height=(height*9)/10, width= width)
self.buttonFrame.configure(height=(height)/10, width= width) self.buttonFrame.configure(height=(height)/10, width= width)

BIN
UIViewTKinter.pyc View File


BIN
gui View File


+ 0
- 0
log.txt View File


+ 7
- 0
start.sh View File

#!/bin/bash


cd Desktop/BCIProjekt/
> log,txt
./gui >> log.txt


Loading…
Cancel
Save