-
Notifications
You must be signed in to change notification settings - Fork 680
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
68 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import sys,os | ||
import write_version_file | ||
import shutil | ||
|
||
distribtution_dir = 'dist' | ||
pupil_capture_dir = os.path.join(distribtution_dir, 'pupil_capture') | ||
pupil_capture_exc = os.path.join(pupil_capture_dir,'pupil_capture') | ||
v4l2_exc = os.path.join(pupil_capture_dir,'v4l2-ctl') | ||
|
||
|
||
os.chmod(pupil_capture_exc,0775) | ||
os.chmod(v4l2_exc,0775) | ||
print "gave pupil_capture and v4l2 excecutables proper rights" | ||
|
||
shutil.copy('make_shortcut.sh',os.path.join(distribtution_dir,'make_shortcut.sh')) | ||
print "copied a small script that creates a shortcut for the user into distribtution_dir" | ||
os.chmod(os.path.join(distribtution_dir,'make_shortcut.sh'),0775) | ||
print "gave that file excetion rights" | ||
|
||
print "starting version stript:" | ||
write_version_file.main(pupil_capture_dir) | ||
print "created version file in dist folder" | ||
|
||
|
||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
echo $BASEDIR | ||
|
||
TEXT=" | ||
[Desktop Entry]\n | ||
Version=1.0\n | ||
Name=Pupil Capture\n | ||
Comment=Pupil Capture Software\n | ||
Exec= ${BASEDIR}/pupil_capture/pupil_capture\n | ||
Icon= ${BASEDIR}/pupil_capture/icon.ico\n | ||
Terminal=true\n | ||
Type=Application\n | ||
Categories=Application;" | ||
|
||
|
||
echo $TEXT > pupil_capture.desktop | ||
chmod 775 pupil_capture.desktop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,29 @@ | ||
import os,sys | ||
|
||
modules_path = os.path.join(os.path.abspath(__file__).rsplit(os.path.sep,2)[0],'pupil_src','shared_modules') | ||
sys.path.append(modules_path) | ||
print modules_path | ||
from git_version import get_tag_commit | ||
def main(target_dir): | ||
modules_path = os.path.join(os.path.abspath(__file__).rsplit(os.path.sep,2)[0],'pupil_src','shared_modules') | ||
sys.path.append(modules_path) | ||
from git_version import get_tag_commit | ||
|
||
version = get_tag_commit() | ||
print "Current version of Pupil: ",version | ||
version = get_tag_commit() | ||
print "Current version of Pupil: ",version | ||
|
||
with open("dist/pupil_capture/_version_string_",'w') as f: | ||
f.write(version) | ||
print 'Wrote version into: "dist/pupil_capture/_version_string_" ' | ||
|
||
try: | ||
with open("dist/pupil_capture.app/_version_string_",'w') as f: | ||
with open(os.path.join(target_dir,'_version_string_'),'w') as f: | ||
f.write(version) | ||
print 'Wrote version into: "dist/pupil_capture.app/_version_string_" ' | ||
except: | ||
print"I guess you are not bundling a macos app." | ||
print 'Wrote version into: %s' %os.path.join(target_dir,'_version_string_') | ||
|
||
try: | ||
with open(os.path.join(target_dir+'.app','_version_string_'),'w') as f: | ||
f.write(version) | ||
print 'Wrote version into: %s '%os.path.join(target_dir+'.app','_version_string_') | ||
except: | ||
print"You are not bundling a macos app,did not write into the .app bundle" | ||
|
||
def get_version(): | ||
modules_path = os.path.join(os.path.abspath(__file__).rsplit(os.path.sep,2)[0],'pupil_src','shared_modules') | ||
sys.path.append(modules_path) | ||
from git_version import get_tag_commit | ||
return get_tag_commit() | ||
|
||
print "done" | ||
if __name__ == '__main__': | ||
main("dist/pupil_capture") |