Skip to content

Commit

Permalink
Speed up windows build.
Browse files Browse the repository at this point in the history
  • Loading branch information
lins05 authored and killing committed Feb 9, 2017
1 parent 99cf670 commit b58af82
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions scripts/build/build-msi.py
Expand Up @@ -25,6 +25,7 @@
print 'Python 2.6 or above is required. Quit now.'
sys.exit(1)

import multiprocessing
import os
import glob
import shutil
Expand Down Expand Up @@ -260,14 +261,17 @@ def build(self):
def get_make_path():
return find_in_path('make.exe')

def concurrent_make():
return '%s -j%s' % (get_make_path(), multiprocessing.cpu_count())

class Libsearpc(Project):
name = 'libsearpc'

def __init__(self):
Project.__init__(self)
self.build_commands = [
'sh ./configure --prefix=%s --disable-compile-demo' % to_mingw_path(self.prefix),
get_make_path(),
concurrent_make(),
'%s install' % get_make_path(),
]

Expand All @@ -281,7 +285,7 @@ def __init__(self):
Project.__init__(self)
self.build_commands = [
'sh ./configure --prefix=%s --disable-compile-demo' % to_mingw_path(self.prefix),
get_make_path(),
concurrent_make(),
'%s install' % get_make_path(),
]

Expand All @@ -305,7 +309,7 @@ def __init__(self):
enable_breakpad = ''
self.build_commands = [
'sh ./configure %s --prefix=%s' % (enable_breakpad, to_mingw_path(self.prefix)),
get_make_path(),
concurrent_make(),
'%s install' % get_make_path(),
]

Expand Down Expand Up @@ -334,7 +338,7 @@ def __init__(self):
'CMAKE_EXE_LINKER_FLAGS_RELEASE': '-L%s' % (os.path.join(seafile_prefix, 'lib') if ninja else to_mingw_path(os.path.join(seafile_prefix, 'lib'))),
}
flags = ' '.join(['-D%s=%s' % (k, v) for k, v in flags.iteritems()])
make = ninja or get_make_path()
make = ninja or concurrent_make()
self.build_commands = [
'cmake -G "%s" %s -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%s .' % (generator, flags, to_mingw_path(self.prefix)),
make,
Expand Down

0 comments on commit b58af82

Please sign in to comment.