commit 2b5365f28b8bf5ec29614809d8412947c4e79b3d Author: jwinterm Date: Wed Sep 10 09:07:09 2014 -0500 Initial attempt at wrapping qubit cpuminer with kivy gui diff --git a/QubitCPU32.exe b/QubitCPU32.exe new file mode 100644 index 0000000..95f90c7 Binary files /dev/null and b/QubitCPU32.exe differ diff --git a/kivyminer.kv b/kivyminer.kv new file mode 100644 index 0000000..95376b1 --- /dev/null +++ b/kivyminer.kv @@ -0,0 +1,65 @@ +#:kivy 1.8.0 + +: + id: rootwidget + threadInput: threadInput + urlInput: urlInput + userAddress: userAddress + outputLabel: outputLabel + orientation: 'vertical' + padding: 30,30,30,30 + + + Image: + size_hint: 1,0.5 + source: 'logo_wide.png' + + Label: + size_hint: 1,0.25 + text: "Myriadcoin Qubit CPU Miner" + + BoxLayout: + size_hint: 1,0.1 + orientation: 'horizontal' + Label: + text: "Threads (max=# of cpu cores, min=1)" + TextInput: + id: threadInput + multiline: False + text: "1" + + BoxLayout: + size_hint: 1,0.1 + orientation: 'horizontal' + Label: + text: "Mining pool and port" + TextInput: + id: urlInput + multiline: False + text: "birdspool.no-ip.org:5567" + + BoxLayout: + size_hint: 1,0.1 + orientation: 'horizontal' + Label: + text: "Wallet address" + TextInput: + id: userAddress + multiline: False + text: "MG97oqVi6aAv3gsT4g27DNonoTYhYd5tXk" + + + BoxLayout: + padding: 0,30,0,30 + size_hint: 1,0.35 + orientation: 'horizontal' + Button: + text: "Start mining" + on_press: root.start_miner() + Button: + text: "Stop mining" + on_press: root.stop_miner() + + Label: + id: outputLabel + size_hint: 1,0.2 \ No newline at end of file diff --git a/kivyminer.py b/kivyminer.py new file mode 100644 index 0000000..bc394b4 --- /dev/null +++ b/kivyminer.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python +from subprocess import PIPE, Popen +from threading import Thread +from Queue import Queue, Empty +from os import system +from kivy.app import App +from kivy.properties import ObjectProperty +from kivy.uix.boxlayout import BoxLayout +from kivy.config import Config +from kivy.clock import Clock + + +def enqueue_output(out, queue): + for line in iter(out.readline, b''): + queue.put(line) + out.close() + + +class RootWidget(BoxLayout): + """Root Kivy box layout class""" + threadInput = ObjectProperty() + urlInput = ObjectProperty() + userAddress = ObjectProperty() + outputLabel = ObjectProperty() + p = None + q = Queue() + + def __init__(self, **kwargs): + super(RootWidget, self).__init__(**kwargs) + + + def start_miner(self): + self.p = Popen(["QubitCPU32.exe", "-a", "qubit", + "-t", self.threadInput.text, "-o", self.urlInput.text, + "-u", self.userAddress.text, "-p", "x"], + stdout=PIPE, + stdin=PIPE, + bufsize=1) + + t = Thread(target=enqueue_output, args=(self.p.stdout, self.q)) + t.daemon = True # thread dies with the program + t.start() + Clock.schedule_interval(self.read_queue, 0.1) + + def stop_miner(self): + system("taskkill /im QubitCPU32.exe /f") + # exit(0) + + def read_queue(self, dt): + try: + line = self.q.get_nowait() + print line+line + self.outputLabel.text = line + except Empty: + pass + + +class KivyMiner(App): + def build(self): + return RootWidget() + + +if __name__ == '__main__': + Config.set('kivy', 'exit_on_escape', 0) + KivyMiner().run() + system("taskkill /im QubitCPU32.exe /f") diff --git a/libcurl-4.dll b/libcurl-4.dll new file mode 100644 index 0000000..d08705d Binary files /dev/null and b/libcurl-4.dll differ diff --git a/libgcc_s_dw2-1.dll b/libgcc_s_dw2-1.dll new file mode 100644 index 0000000..99a76cf Binary files /dev/null and b/libgcc_s_dw2-1.dll differ diff --git a/logo_wide.PNG b/logo_wide.PNG new file mode 100644 index 0000000..d8eb4ed Binary files /dev/null and b/logo_wide.PNG differ diff --git a/pthreadGC2.dll b/pthreadGC2.dll new file mode 100644 index 0000000..805a0b0 Binary files /dev/null and b/pthreadGC2.dll differ