mirror of
https://github.com/debauchee/barrier.git
synced 2026-11-28 06:42:28 +08:00
moving 1.4 to trunk
This commit is contained in:
1
tools/build/README.txt
Normal file
1
tools/build/README.txt
Normal file
@@ -0,0 +1 @@
|
||||
Source code for the build system belongs in this directory.
|
||||
16
tools/build/__init__.py
Normal file
16
tools/build/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# synergy -- mouse and keyboard sharing utility
|
||||
# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea
|
||||
#
|
||||
# This package is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# found in the file COPYING that should have accompanied this file.
|
||||
#
|
||||
# This package is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from build import generators
|
||||
42
tools/build/ftputil.py
Normal file
42
tools/build/ftputil.py
Normal file
@@ -0,0 +1,42 @@
|
||||
# synergy -- mouse and keyboard sharing utility
|
||||
# Copyright (C) 2010 Chris Schoeneman, Nick Bolton, Sorin Sbarnea
|
||||
#
|
||||
# This package is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# found in the file COPYING that should have accompanied this file.
|
||||
#
|
||||
# This package is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from ftplib import FTP
|
||||
|
||||
class FtpUploader:
|
||||
def __init__(self, host, user, password, dir):
|
||||
self.host = host
|
||||
self.user = user
|
||||
self.password = password
|
||||
self.dir = dir
|
||||
|
||||
def run(self, src, dest, replace=False):
|
||||
|
||||
ftp = FTP(self.host, self.user, self.password)
|
||||
ftp.cwd(self.dir)
|
||||
|
||||
# check to see if we should stop here
|
||||
if not replace:
|
||||
files = ftp.nlst()
|
||||
if dest in files:
|
||||
print 'Already exists, skipping.'
|
||||
ftp.close()
|
||||
return
|
||||
|
||||
f = open(src, 'rb')
|
||||
ftp.storbinary('STOR ' + dest, f)
|
||||
f.close()
|
||||
|
||||
ftp.close()
|
||||
50
tools/build/generators.py
Normal file
50
tools/build/generators.py
Normal file
@@ -0,0 +1,50 @@
|
||||
class Generator(object):
|
||||
def __init__(self, cmakeName, buildDir='build', sourceDir='..', binDir='bin'):
|
||||
self.cmakeName = cmakeName
|
||||
self.buildDir = buildDir
|
||||
self.sourceDir = sourceDir
|
||||
self.binDir = binDir
|
||||
|
||||
def getBuildDir(self, target):
|
||||
return self.buildDir
|
||||
|
||||
def getBinDir(self, target=''):
|
||||
return self.binDir
|
||||
|
||||
def getSourceDir(self):
|
||||
return self.sourceDir
|
||||
|
||||
class MakefilesGenerator(Generator):
|
||||
def __init__(self):
|
||||
super(MakefilesGenerator, self).__init__('Unix Makefiles', 'build', '..', 'bin')
|
||||
|
||||
def getBuildDir(self, target):
|
||||
return super(MakefilesGenerator, self).getBuildDir(target) + '/' + target
|
||||
|
||||
def getBinDir(self, target=''):
|
||||
workingDir = super(MakefilesGenerator, self).getBinDir(target)
|
||||
|
||||
# only put debug files in separate bin dir
|
||||
if target == 'debug':
|
||||
workingDir += '/debug'
|
||||
|
||||
return workingDir
|
||||
|
||||
def getSourceDir(self):
|
||||
return super(MakefilesGenerator, self).getSourceDir() + '/..'
|
||||
|
||||
class EclipseGenerator(Generator):
|
||||
def __init__(self):
|
||||
super(EclipseGenerator, self).__init__('Eclipse CDT4 - Unix Makefiles', '', '')
|
||||
|
||||
def getBuildDir(self, target):
|
||||
# eclipse only works with in-source build.
|
||||
return ''
|
||||
|
||||
def getBinDir(self, target=''):
|
||||
# eclipse only works with in-source build.
|
||||
return 'bin'
|
||||
|
||||
def getSourceDir(self):
|
||||
return ''
|
||||
|
||||
1255
tools/build/toolchain.py
Normal file
1255
tools/build/toolchain.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user