diff --git a/ext/build/toolchain.py b/ext/build/toolchain.py
index 5f78361a..245e8372 100644
--- a/ext/build/toolchain.py
+++ b/ext/build/toolchain.py
@@ -407,7 +407,7 @@ class InternalCommands:
else:
for target in targets:
if generator.startswith('Visual Studio'):
- self.run_vcbuild(generator, target)
+ self.run_vcbuild(generator, target, self.sln_filepath())
elif generator == 'Xcode':
cmd = self.xcodebuild_cmd + ' -configuration ' + target.capitalize()
self.runBuildCommand(cmd, target)
@@ -560,12 +560,12 @@ class InternalCommands:
# special case for version 10, use new /target:clean
if generator.startswith('Visual Studio 10'):
for target in targets:
- self.run_vcbuild(generator, target, '/target:clean')
+ self.run_vcbuild(generator, target, self.sln_filepath(), '/target:clean')
# any other version of visual studio, use /clean
elif generator.startswith('Visual Studio'):
for target in targets:
- self.run_vcbuild(generator, target, '/clean')
+ self.run_vcbuild(generator, target, self.sln_filepath(), '/clean')
else:
cmd = ''
@@ -685,7 +685,8 @@ class InternalCommands:
elif type == 'win':
if sys.platform == 'win32':
- self.distNsis(vcRedistDir, qtDir)
+ #self.distNsis(vcRedistDir, qtDir)
+ self.distWix()
else:
package_unsupported = True
@@ -771,6 +772,33 @@ class InternalCommands:
err = os.system(cmd)
self.restore_chdir()
+ def distWix(self):
+ generator = self.getGeneratorFromConfig().cmakeName
+
+ arch = 'x86'
+ if generator.endswith('Win64'):
+ arch = 'x64'
+
+ version = self.getVersionFromCmake()
+ args = "/p:DefineConstants=\"Version=%s\"" % version
+
+ self.run_vcbuild(generator, 'release', 'synergy.sln', args, 'src/setup/win32/')
+
+ filename = "%s-%s-Windows-%s.msi" % (
+ self.project,
+ version,
+ arch)
+
+ old = "bin/Release/synergy.msi"
+ new = "bin/Release/%s" % (filename)
+
+ try:
+ os.remove(new)
+ except OSError:
+ pass
+
+ os.rename(old, new)
+
def distNsis(self, vcRedistDir, qtDir):
if vcRedistDir == '':
@@ -872,7 +900,7 @@ class InternalCommands:
elif type == 'win':
# get platform based on last generator used
- ext = 'exe'
+ ext = 'msi'
generator = self.getGeneratorFromConfig().cmakeName
if generator.find('Win64') != -1:
platform = 'Windows-x64'
@@ -1167,7 +1195,7 @@ class InternalCommands:
return path
- def run_vcbuild(self, generator, mode, args=''):
+ def run_vcbuild(self, generator, mode, solution, args='', dir=''):
import platform
# os_bits should be loaded with '32bit' or '64bit'
@@ -1189,6 +1217,7 @@ class InternalCommands:
else: # target = 32bit
vcvars_platform = 'x86' # 32/64bit OS building 32bit app
config_platform = 'Win32'
+
if mode == 'release':
config = 'Release'
else:
@@ -1197,14 +1226,16 @@ class InternalCommands:
if generator.startswith('Visual Studio 10'):
cmd = ('@echo off\n'
'call "%s" %s \n'
+ 'cd "%s"\n'
'msbuild /nologo %s /p:Configuration="%s" /p:Platform="%s" "%s"'
- ) % (self.get_vcvarsall(generator), vcvars_platform, args, config, config_platform, self.sln_filepath())
+ ) % (self.get_vcvarsall(generator), vcvars_platform, dir, args, config, config_platform, solution)
else:
config = config + '|' + config_platform
cmd = ('@echo off\n'
'call "%s" %s \n'
+ 'cd "%s"\n'
'vcbuild /nologo %s "%s" "%s"'
- ) % (self.get_vcvarsall(generator), vcvars_platform, args, self.sln_filepath(), config)
+ ) % (self.get_vcvarsall(generator), vcvars_platform, dir, args, solution, config)
# Generate a batch file, since we can't use environment variables directly.
temp_bat = self.getBuildDir() + r'\vcbuild.bat'
diff --git a/res/banner.bmp b/res/banner.bmp
new file mode 100644
index 00000000..f5838d85
Binary files /dev/null and b/res/banner.bmp differ
diff --git a/res/dialog.bmp b/res/dialog.bmp
new file mode 100644
index 00000000..4899e583
Binary files /dev/null and b/res/dialog.bmp differ
diff --git a/src/setup/win32/Include.wxi b/src/setup/win32/Include.wxi
new file mode 100644
index 00000000..457a19fc
--- /dev/null
+++ b/src/setup/win32/Include.wxi
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/setup/win32/Product.wxs b/src/setup/win32/Product.wxs
new file mode 100644
index 00000000..7b32b6e7
--- /dev/null
+++ b/src/setup/win32/Product.wxs
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NOT LEGACY_UNINSTALL_EXISTS
+
+
+
+
+
+ NOT Installed
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/setup/win32/synergy.sln b/src/setup/win32/synergy.sln
new file mode 100644
index 00000000..d4490568
--- /dev/null
+++ b/src/setup/win32/synergy.sln
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "synergy", "synergy.wixproj", "{D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Debug|x86.ActiveCfg = Debug|x86
+ {D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Debug|x86.Build.0 = Debug|x86
+ {D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Debug|x64.ActiveCfg = Debug|x64
+ {D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Debug|x64.Build.0 = Debug|x64
+ {D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Release|x86.ActiveCfg = Release|x86
+ {D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Release|x86.Build.0 = Release|x86
+ {D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Release|x64.ActiveCfg = Release|x64
+ {D4BA9F39-6A35-4C8F-9CB2-67FCBE5CAB17}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/src/setup/win32/synergy.wixproj b/src/setup/win32/synergy.wixproj
new file mode 100644
index 00000000..ef098810
--- /dev/null
+++ b/src/setup/win32/synergy.wixproj
@@ -0,0 +1,31 @@
+
+
+
+ 3.8
+ {d4ba9f39-6a35-4c8f-9cb2-67fcbe5cab17}
+ 2.0
+ synergy
+ Package
+ $(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets
+ $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets
+ ..\..\..\bin\$(Configuration)\
+ ..\..\..\build\wix\obj\$(Configuration)\
+
+
+
+ $(WixExtDir)\WixFirewallExtension.dll
+ WixFirewallExtension
+
+
+ $(WixExtDir)\WixUtilExtension.dll
+ WixUtilExtension
+
+
+ C:\Program Files (x86)\WiX Toolset v3.8\bin\WixUIExtension.dll
+ WixUIExtension
+
+
+
+
+
+
\ No newline at end of file