Skip to content

Commit

Permalink
Merge pull request #2 from mikepkes/IEInstall
Browse files Browse the repository at this point in the history
Ie install
  • Loading branch information
andrewkaufman committed Oct 20, 2014
2 parents 09dc369 + 0f9aa69 commit 36ef5e6
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.pyc
*.sw?
*.qrc
*.sconsign.dblite
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ xcorder
=======

X Window Recording Tool

ffmpeg configuration
--------------------
The ffmpeg configuration requires the following for xcorder to work properly:
> --extra-libs=-lasound
> --enable-x11grab
48 changes: 48 additions & 0 deletions SConstruct
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import glob
import os

import IEEnv

import VersionControl
VersionControl.setVersion('IEBuild', '6.15.1')
import IEBuild

majorVersion = '0'
minorVersion = '0'
patchVersion = '1'

versionParts = {'major':majorVersion, 'minor':minorVersion, 'patch':patchVersion}
version = '{major}.{minor}.{patch}'.format(**versionParts)

application = 'xcorder'

if "INSTALLPREFIX" not in ARGUMENTS:
if ARGUMENTS.get("RELEASE", "0") == "1" :
ARGUMENTS["INSTALLPREFIX"] = "{root}/apps/{application}/{version}/".format(
root=IEEnv.Environment.rootPath(),
application=application,
version=version,
)
else:
ARGUMENTS["INSTALLPREFIX"] = "{home}/apps/{application}/{version}/".format(
home=os.path.expanduser("~"),
application=application,
version=version,
)
else:
ARGUMENTS["INSTALLPREFIX"] = "{prefix}/apps/{application}/{version}/".format(
prefix=ARGUMENTS["INSTALLPREFIX"],
application=application,
version=version,
)

program = IEBuild.Buildable(
ARGUMENTS,
)
env = program.finalize()

source = []
for pattern in ['*.py', '*.svg', '*.qss', 'README.*', '*LICENSE*', 'xcorder']:
env.Install(ARGUMENTS['INSTALLPREFIX'], glob.glob(pattern))

env.Alias('install', ARGUMENTS['INSTALLPREFIX'])
8 changes: 5 additions & 3 deletions gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
from exporter import Exporter
from recorder import Recorder

scriptDir = os.path.dirname(os.path.realpath(__file__))

# =============================================================================
# CLASSES
# =============================================================================
Expand Down Expand Up @@ -58,7 +60,7 @@ def resetToDefault(self):
self.populateVideoComboBox()
self.populateAudioComboBox()

self.recordPushButton.setIcon(QtGui.QIcon('rec_btn_off.svg'))
self.recordPushButton.setIcon(QtGui.QIcon(os.path.join(scriptDir, 'rec_btn_off.svg')))
self.recordPushButton.setChecked(False)
self.recordPushButton.setEnabled(False)

Expand Down Expand Up @@ -106,13 +108,13 @@ def recordClicked(self):
if self.recordPushButton.isChecked():
self.videoComboBox.setEnabled(False)
self.audioComboBox.setEnabled(False)
self.recordPushButton.setIcon(QtGui.QIcon('rec_btn_on.svg'))
self.recordPushButton.setIcon(QtGui.QIcon(os.path.join(scriptDir, 'rec_btn_on.svg')))

self.startRecorder()
else:
self.videoComboBox.setEnabled(True)
self.audioComboBox.setEnabled(True)
self.recordPushButton.setIcon(QtGui.QIcon('rec_btn_off.svg'))
self.recordPushButton.setIcon(QtGui.QIcon(os.path.join(scriptDir, 'rec_btn_off.svg')))

self.stopRecorder()

Expand Down
4 changes: 3 additions & 1 deletion xcorder
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# =============================================================================
# IMPORTS
# =============================================================================
import os
import sys
from PyQt4 import QtGui
from gui import Gui
Expand All @@ -22,7 +23,8 @@ def main():
app = QtGui.QApplication(sys.argv)
app.setApplicationName('xcorder')

with open('stylesheet.qss', 'r') as file_:
scriptDir = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(scriptDir ,'stylesheet.qss'), 'r') as file_:
app.setStyleSheet(file_.read())

gui = Gui()
Expand Down

0 comments on commit 36ef5e6

Please sign in to comment.