hopefully fixed all installer build issues

This commit is contained in:
Faryan Rezagholi
2021-12-02 01:15:22 +01:00
parent 1df3c33f69
commit fc65c2583e
3 changed files with 55 additions and 54 deletions

View File

@@ -25,7 +25,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DefineConstants /> <DefineConstants />
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\x64\Release\</OutputPath>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors /> <WarningsAsErrors />
</PropertyGroup> </PropertyGroup>
@@ -33,7 +33,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Portable|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Portable|x64'">
<DefineConstants>DEBUG;PORTABLE</DefineConstants> <DefineConstants>DEBUG;PORTABLE</DefineConstants>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Debug Portable\</OutputPath> <OutputPath>bin\x64\Debug Portable\</OutputPath>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors /> <WarningsAsErrors />
</PropertyGroup> </PropertyGroup>
@@ -41,7 +41,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Portable|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Portable|x64'">
<DefineConstants>PORTABLE</DefineConstants> <DefineConstants>PORTABLE</DefineConstants>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Release Portable\</OutputPath> <OutputPath>bin\x64\Release Portable\</OutputPath>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors /> <WarningsAsErrors />
</PropertyGroup> </PropertyGroup>

View File

@@ -3,7 +3,7 @@
<?include $(sys.CURRENTDIR)Includes\Config.wxi?> <?include $(sys.CURRENTDIR)Includes\Config.wxi?>
<Fragment> <Fragment>
<Component Id="C.MainExe" Directory="INSTALLDIR" Guid="a028ee50-3135-46c7-83c0-1d14d36e146c"> <Component Id="C.MainExe" Directory="INSTALLDIR" Guid="a028ee50-3135-46c7-83c0-1d14d36e146c">
<File Id="MainExeFile" Source="$(var.SolutionDir)mRemoteNG\bin\$(var.Configuration)\mRemoteNG.exe" /> <File Id="MainExeFile" Source="$(var.SolutionDir)mRemoteNG\bin\x64\$(var.Configuration)\mRemoteNG.exe" />
</Component> </Component>
</Fragment> </Fragment>
</Wix> </Wix>

View File

@@ -2,7 +2,7 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ProductVersion>3.10</ProductVersion> <ProductVersion>3.10</ProductVersion>
<ProjectGuid>f0168b9f-6815-40df-ba53-46cee7683b68</ProjectGuid> <ProjectGuid>f0168b9f-6815-40df-ba53-46cee7683b68</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
@@ -81,22 +81,23 @@
</Target> </Target>
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<LinkerAdditionalOptions> <LinkerAdditionalOptions>
</LinkerAdditionalOptions> </LinkerAdditionalOptions>
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\Release;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants> <DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Release;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants>
<Cultures>en-US</Cultures> <Cultures>en-US</Cultures>
<SuppressPdbOutput>True</SuppressPdbOutput> <SuppressPdbOutput>True</SuppressPdbOutput>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<Cultures>en-US</Cultures> <Cultures>en-US</Cultures>
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\Debug;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants> <DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Debug;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug Portable|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug Portable|x64' ">
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\Debug Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants> <DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Debug Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release Portable|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release Portable|x64' ">
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\Release Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants> <DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Release Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants>
<OutputPath>bin\x64\$(Platform)\$(Configuration)\</OutputPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>:: When passing paths to powershell scripts, check if the path ends with a backslash "\" <PostBuildEvent>:: When passing paths to powershell scripts, check if the path ends with a backslash "\"
@@ -111,35 +112,49 @@ set /p buildenv=&lt;buildenv.tmp
:: Call the post build powershell script :: Call the post build powershell script
powershell.exe -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\postbuild_installer.ps1" -SolutionDir "$(SolutionDir)\" -TargetDir "%25cd%25" -TargetFileName "mRemoteNG.exe" -ConfigurationName "%25buildenv%25" -CertificatePath "$(CertPath)" -CertificatePassword "$(CertPassword)" -ExcludeFromSigning "PuTTYNG.exe"</PostBuildEvent> powershell.exe -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\postbuild_installer.ps1" -SolutionDir "$(SolutionDir)\" -TargetDir "%25cd%25" -TargetFileName "mRemoteNG.exe" -ConfigurationName "%25buildenv%25" -CertificatePath "$(CertPath)" -CertificatePassword "$(CertPassword)" -ExcludeFromSigning "PuTTYNG.exe"</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>REM Clean the TargetDir
rmdir /S /Q "$(TargetDir)"
echo $(ConfigurationName) &gt; buildenv.tmp
REM Harvest bin directory of the mRemoteNG project
"$(WIX)bin\heat.exe" dir "$(SolutionDir)mRemoteNG\bin\$(Configuration)" -ag -nologo -dr INSTALLDIR -var var.HarvestPath -srd -scom -sreg -cg MandatoryComponents -template fragment -out "$(ProjectDir)Fragments\FilesFragment.wxs" -t "$(ProjectDir)Filters\Harvest_Filter.xslt"
REM Convert the license file "COPYING.TXT" to "License.rtf" to be shown in the installer GUI
"$(ProjectDir)Resources\Pandoc\pandoc.exe" -s -t rtf -o "$(ProjectDir)\Resources\License.rtf" "$(SolutionDir)COPYING.TXT"</PreBuildEvent>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<Cultures>en-US</Cultures> <Cultures>en-US</Cultures>
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\Debug;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants> <DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Debug;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath> <IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<LinkerAdditionalOptions /> <LinkerAdditionalOptions />
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\Release;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants> <DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Release;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants>
<Cultures>en-US</Cultures> <Cultures>en-US</Cultures>
<SuppressPdbOutput>True</SuppressPdbOutput> <SuppressPdbOutput>True</SuppressPdbOutput>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath> <IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug Portable|x64' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug Portable|x64' ">
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\Debug Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants> <DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Debug Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release Portable|x64' ">
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Release Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants>
<OutputPath>bin\x64\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
<SuppressAllWarnings>True</SuppressAllWarnings>
<Pedantic>False</Pedantic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<Cultures>en-US</Cultures>
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Debug;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<LinkerAdditionalOptions />
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Release;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants>
<Cultures>en-US</Cultures>
<SuppressPdbOutput>True</SuppressPdbOutput>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug Portable|x64' ">
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Debug Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath> <IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup> </PropertyGroup>
@@ -147,32 +162,6 @@ REM Convert the license file "COPYING.TXT" to "License.rtf" to be shown in the i
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Release Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants> <DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Release Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath> <IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
<SuppressAllWarnings>True</SuppressAllWarnings>
<Pedantic>False</Pedantic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<Cultures>en-US</Cultures>
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\Debug;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<LinkerAdditionalOptions />
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\Release;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants>
<Cultures>en-US</Cultures>
<SuppressPdbOutput>True</SuppressPdbOutput>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug Portable|x64' ">
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\Debug Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release Portable|x64' ">
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteNG\bin\Release Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteNG\Resources\Help</DefineConstants>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
@@ -190,4 +179,16 @@ REM Convert the license file "COPYING.TXT" to "License.rtf" to be shown in the i
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath> <IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<PreBuildEvent>REM Clean the TargetDir
rmdir /S /Q "$(TargetDir)"
echo $(ConfigurationName) &gt; buildenv.tmp
REM Harvest bin directory of the mRemoteNG project
"$(WIX)bin\heat.exe" dir "$(SolutionDir)mRemoteNG\bin\x64\$(Configuration)" -ag -nologo -dr INSTALLDIR -var var.HarvestPath -srd -scom -sreg -cg MandatoryComponents -template fragment -out "$(ProjectDir)Fragments\FilesFragment.wxs" -t "$(ProjectDir)Filters\Harvest_Filter.xslt"
REM Convert the license file "COPYING.TXT" to "License.rtf" to be shown in the installer GUI
"$(ProjectDir)Resources\Pandoc\pandoc.exe" -s -t rtf -o "$(ProjectDir)\Resources\License.rtf" "$(SolutionDir)COPYING.TXT"</PreBuildEvent>
</PropertyGroup>
</Project> </Project>