Skip to content

Commit

Permalink
Add build configuration for WinXP
Browse files Browse the repository at this point in the history
This one removes cURL completely (and wxEmail along with it) as I can't get it to compile with WinXP compatibility.

The NOCURL preprocessor define will remove all cURL stuff and change the crash report dialog to remove the email sending stuff.

This is probably the last thing I'm going to do for WinXP compatibility, if something breaks it in future I won't be fixing it (myself, at least) and official builds will no longer support it.

Also, openal32.dll is actually still needed, apparently I have it in my windows/system32 folder >_>
  • Loading branch information
sirjuddington committed Jan 17, 2017
1 parent 8c2a68c commit 7162aa9
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 6 deletions.
10 changes: 5 additions & 5 deletions build/msvc/SLADE.sln
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30501.0
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SLADE", "SLADE.vcxproj", "{33CC5FBD-4EB0-48A9-9069-0EC0B5FF5A46}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release - FTGL|Win32 = Release - FTGL|Win32
Release - WinXP|Win32 = Release - WinXP|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{33CC5FBD-4EB0-48A9-9069-0EC0B5FF5A46}.Debug|Win32.ActiveCfg = Debug|Win32
{33CC5FBD-4EB0-48A9-9069-0EC0B5FF5A46}.Debug|Win32.Build.0 = Debug|Win32
{33CC5FBD-4EB0-48A9-9069-0EC0B5FF5A46}.Release - FTGL|Win32.ActiveCfg = Release - FTGL|Win32
{33CC5FBD-4EB0-48A9-9069-0EC0B5FF5A46}.Release - FTGL|Win32.Build.0 = Release - FTGL|Win32
{33CC5FBD-4EB0-48A9-9069-0EC0B5FF5A46}.Release - WinXP|Win32.ActiveCfg = Release - No CURL|Win32
{33CC5FBD-4EB0-48A9-9069-0EC0B5FF5A46}.Release - WinXP|Win32.Build.0 = Release - No CURL|Win32
{33CC5FBD-4EB0-48A9-9069-0EC0B5FF5A46}.Release|Win32.ActiveCfg = Release|Win32
{33CC5FBD-4EB0-48A9-9069-0EC0B5FF5A46}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
Expand Down
60 changes: 60 additions & 0 deletions build/msvc/SLADE.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<Configuration>Release - FTGL</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - No CURL|Win32">
<Configuration>Release - No CURL</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
Expand All @@ -26,6 +30,11 @@
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - No CURL|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - FTGL|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
Expand All @@ -42,6 +51,9 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - No CURL|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - FTGL|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
Expand All @@ -55,16 +67,22 @@
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\dist\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - No CURL|Win32'">..\..\dist\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - FTGL|Win32'">.\dist\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release - No CURL|Win32'">$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release - FTGL|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - No CURL|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - FTGL|Win32'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release - No CURL|Win32'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release - FTGL|Win32'">true</GenerateManifest>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\..\src;$(ProjectDir)\fluidsynth\include;$(ProjectDir)..\..\src\External\dumb;$(WXWIN)\lib\vc_lib\mswu;$(WXWIN)\include;$(FREEIMAGE)\Dist\x32;$(SFML)\include;$(ProjectDir)..\..\src\Application;$(CURL)\include;$(IncludePath)</IncludePath>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release - No CURL|Win32'">$(ProjectDir)..\..\src;$(ProjectDir)\fluidsynth\include;$(ProjectDir)..\..\src\External\dumb;$(WXWIN)\lib\vc_lib\mswu;$(WXWIN)\include;$(FREEIMAGE)\Dist\x32;$(SFML)\include;$(ProjectDir)..\..\src\Application;$(CURL)\include;$(IncludePath)</IncludePath>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release - FTGL|Win32'">$(ProjectDir)src;$(FLUIDSYNTH)\include;$(WXWIN)\lib\vc_lib\mswu;$(WXWIN)\include;$(FREEIMAGE)\Dist;$(SFML)\include;$(FTGL)\src;$(FREETYPE)\include;$(IncludePath)</IncludePath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)\fluidsynth\lib;$(SolutionDir)$(Configuration)\;$(WXWIN)\lib\vc_lib;$(FREEIMAGE)\Dist\x32;$(SFML)\lib;$(CURL)\lib\static-release-x86;$(LibraryPath)</LibraryPath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release - No CURL|Win32'">$(ProjectDir)\fluidsynth\lib;$(SolutionDir)$(Configuration)\;$(WXWIN)\lib\vc_lib;$(FREEIMAGE)\Dist\x32;$(SFML)\lib;$(CURL)\lib\static-release-x86;$(LibraryPath)</LibraryPath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release - FTGL|Win32'">$(FLUIDSYNTH)\lib;$(WXWIN)\lib\vc_lib;$(FREEIMAGE)\Dist;$(SFML)\lib;$(FTGL)\msvc\build;$(FREETYPE)\objs\win32;$(SolutionDir)$(Configuration)\;$(LibraryPath)</LibraryPath>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\src;$(ProjectDir)\fluidsynth\include;$(ProjectDir)..\..\src\External\dumb;$(WXWIN)\lib\vc_lib\mswu;$(WXWIN)\include;$(FREEIMAGE)\Dist\x32;$(SFML)\include;$(ProjectDir)..\..\src\Application;$(CURL)\include;$(IncludePath)</IncludePath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)\fluidsynth\lib;$(SolutionDir)$(Configuration)\;$(WXWIN)\lib\vc_lib;$(FREEIMAGE)\Dist\x32;$(SFML)\lib;$(CURL)\lib\static-release-x86;$(LibraryPath)</LibraryPath>
Expand All @@ -78,6 +96,14 @@
<Linkage-sfml-graphics>static</Linkage-sfml-graphics>
<Linkage-sfml-window>static</Linkage-sfml-window>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - No CURL|Win32'">
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<Linkage-sfml-audio>static</Linkage-sfml-audio>
<Linkage-sfml-system>static</Linkage-sfml-system>
<Linkage-sfml-graphics>static</Linkage-sfml-graphics>
<Linkage-sfml-window>static</Linkage-sfml-window>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - FTGL|Win32'">
<CodeAnalysisRuleSet>MixedRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
Expand Down Expand Up @@ -146,6 +172,40 @@
<AdditionalManifestFiles>SLADE.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - No CURL|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PreprocessorDefinitions>SFML_STATIC;WIN32;USE_SFML_RENDERWINDOW;USE_WEBVIEW_STARTPAGE;__WXMSW__;_WINDOWS;NOPCH;_CRT_SECURE_NO_WARNINGS;NDEBUG;GLEW_STATIC;NOLIBMODPLUG;NOCURL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessToFile>false</PreprocessToFile>
<PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<FloatingPointModel>Fast</FloatingPointModel>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
</ClCompile>
<Link>
<AdditionalDependencies>fluidsynth.lib;winmm.lib;rpcrt4.lib;kernel32.lib;user32.lib;gdi32.lib;ole32.lib;oleaut32.lib;comctl32.lib;comdlg32.lib;uuid.lib;advapi32.lib;shell32.lib;wxbase31u.lib;wxbase31u_net.lib;wxmsw31u_core.lib;wxmsw31u_gl.lib;wxmsw31u_aui.lib;wxmsw31u_webview.lib;wxmsw31u_adv.lib;wxmsw31u_stc.lib;wxmsw31u_propgrid.lib;wxmsw31u_media.lib;wxregexu.lib;wxzlib.lib;wxpng.lib;wxtiff.lib;wxjpeg.lib;wxscintilla.lib;opengl32.lib;glu32.lib;FreeImage.lib;sfml-graphics-s.lib;sfml-audio-s.lib;sfml-window-s.lib;sfml-system-s.lib;sfml-main.lib;freetype.lib;openal32.lib;wsock32.lib;flac.lib;ogg.lib;vorbis.lib;vorbisfile.lib;%(AdditionalDependencies)</AdditionalDependencies>
<EnableUAC>false</EnableUAC>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<TargetMachine>MachineX86</TargetMachine>
<AllowIsolation>true</AllowIsolation>
<Profile>true</Profile>
</Link>
<Manifest>
<AdditionalManifestFiles>SLADE.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - FTGL|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
Expand Down
2 changes: 2 additions & 0 deletions dist/makebuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Write-Host "Done" -foregroundcolor green
Write-Host "`nCopying SLADE files..." -foregroundcolor yellow
Copy-Item (resolve-path ".\FreeImage.dll") "$releasedir" -Force
Copy-Item (resolve-path ".\libfluidsynth.dll") "$releasedir" -Force
Copy-Item (resolve-path ".\openal32.dll") "$releasedir" -Force
Copy-Item (resolve-path ".\SLADE.exe") "$releasedir" -Force
Copy-Item (resolve-path ".\SLADE.pdb") "$releasedir" -Force
Copy-Item (resolve-path ".\slade.pk3") "$releasedir" -Force
Expand All @@ -66,6 +67,7 @@ if ($buildbinaries.ToLower() -eq "y")
& $7zpath a -t7z "$releasedir\slade_$version.7z" `
"$releasedir\FreeImage.dll" `
"$releasedir\libfluidsynth.dll" `
"$releasedir\openal32.dll" `
"$releasedir\SLADE.exe" `
"$releasedir\SLADE.pdb" `
"$releasedir\slade.pk3"
Expand Down
12 changes: 12 additions & 0 deletions src/Application/MainApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,18 +224,26 @@ class SLADECrashDialog : public wxDialog, public wxThreadHelper
hbox->Add(picture, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxTOP|wxBOTTOM, 10);

// Add general crash message
#ifndef NOCURL
string message = "SLADE has crashed unexpectedly. To help fix the problem that caused this crash, "
"please (optionally) enter a short description of what you were doing at the time "
"of the crash, and click the 'Send Crash Report' button.";
#else
string message = "SLADE has crashed unexpectedly. To help fix the problem that caused this crash, "
"please email a copy of the stack trace below to [email protected], along with a "
"description of what you were doing at the time of the crash.";
#endif
wxStaticText* label = new wxStaticText(this, -1, message);
hbox->Add(label, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 10);
label->Wrap(480 - 20 - picture->GetSize().x);

#ifndef NOCURL
// Add description text area
text_description = new wxTextCtrl(this, -1, wxEmptyString, wxDefaultPosition, wxSize(-1, 100), wxTE_MULTILINE);
sizer->Add(new wxStaticText(this, -1, "Description:"), 0, wxLEFT|wxRIGHT, 10);
sizer->AddSpacer(2);
sizer->Add(text_description, 0, wxEXPAND|wxLEFT|wxRIGHT|wxBOTTOM, 10);
#endif

// SLADE info
trace = S_FMT("Version: %s\n", Global::version);
Expand Down Expand Up @@ -278,12 +286,14 @@ class SLADECrashDialog : public wxDialog, public wxThreadHelper
// Also dump stack trace to console
std::cerr << trace;

#ifndef NOCURL
// Add small privacy disclaimer
string privacy = "Sending a crash report will only send the information displayed above, "
"along with a copy of the logs for this session.";
label = new wxStaticText(this, -1, privacy);
label->Wrap(480);
sizer->Add(label, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxBOTTOM, 10);
#endif

// Add 'Copy Stack Trace' button
hbox = new wxBoxSizer(wxHORIZONTAL);
Expand All @@ -298,10 +308,12 @@ class SLADECrashDialog : public wxDialog, public wxThreadHelper
hbox->Add(btn_exit, 0, wxLEFT|wxRIGHT|wxBOTTOM, 4);
btn_exit->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &SLADECrashDialog::onBtnExit, this);

#ifndef NOCURL
// Add 'Send Crash Report' button
btn_send = new wxButton(this, -1, "Send Crash Report");
hbox->Add(btn_send, 0, wxLEFT|wxRIGHT|wxBOTTOM, 4);
btn_send->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &SLADECrashDialog::onBtnSend, this);
#endif

Bind(wxEVT_THREAD, &SLADECrashDialog::onThreadUpdate, this);
Bind(wxEVT_CLOSE_WINDOW, &SLADECrashDialog::onClose, this);
Expand Down
6 changes: 6 additions & 0 deletions src/External/email/wxMailer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
// wxEmail by Eran Ifrah (https://github.com/eranif/wxEmail)

#include "wxMailer.h"
#ifndef NOCURL
#include <curl/curl.h>
#endif
#ifdef __WXMSW__
#include "wx/msw/winundef.h"
#endif
Expand Down Expand Up @@ -36,6 +38,7 @@ static size_t payload_source(void* ptr, size_t size, size_t nmemb, void* userp)

bool wxMailer::Send(const wxEmailMessage& message)
{
#ifndef NOCURL
CURL* curl;
curl = curl_easy_init();

Expand Down Expand Up @@ -71,4 +74,7 @@ bool wxMailer::Send(const wxEmailMessage& message)
curl_easy_cleanup(curl);
}
return true;
#else
return false;
#endif
}
2 changes: 1 addition & 1 deletion win_installer/SLADE.iss
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescrip
Source: "..\dist\SLADE.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\dist\FreeImage.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\dist\libfluidsynth.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\dist\openal32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\dist\slade.pk3"; DestDir: "{app}"; Flags: ignoreversion
; Source: "..\dist\slade3.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\dist\SLADE.pdb"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

Expand Down

0 comments on commit 7162aa9

Please sign in to comment.