Skip to content

Commit

Permalink
Added nBug and created build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Axadiw committed Jan 2, 2017
1 parent d683e9f commit 11b06c5
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 8 deletions.
51 changes: 51 additions & 0 deletions BuildAll.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
echo off
SET VS=14.0
SET BUILDER=%ProgramFiles(x86)%\MSBuild\%VS%\Bin\MSBuild.exe
SET InnoCompiler=%ProgramFiles(x86)%\Inno Setup 5\ISCC.exe


:build32
echo %DATE% %TIME%: Cleaning MFIGamepadFeeder (x86)
"%BUILDER%" MFIGamepadFeeder.sln /maxcpucount:1 /t:clean /p:Platform=x86;Configuration="Release (Local)"
set BUILD_STATUS=%ERRORLEVEL%
if not %BUILD_STATUS%==0 goto fail

echo %DATE% %TIME%: Building MFIGamepadFeeder (x86)
"%BUILDER%" MFIGamepadFeeder.sln /maxcpucount:4 /p:Platform=x86;Configuration="Release (Local)"
set BUILD_STATUS=%ERRORLEVEL%
if not %BUILD_STATUS%==0 goto fail

:build64
echo %DATE% %TIME%: Cleaning MFIGamepadFeeder (x64)
"%BUILDER%" MFIGamepadFeeder.sln /maxcpucount:1 /t:clean /p:Platform=x64;Configuration="Release (Local)"
set BUILD_STATUS=%ERRORLEVEL%
if not %BUILD_STATUS%==0 goto fail

echo %DATE% %TIME%: Building MFIGamepadFeeder (x64)
"%BUILDER%" MFIGamepadFeeder.sln /maxcpucount:4 /p:Platform=x64;Configuration="Release (Local)"
set BUILD_STATUS=%ERRORLEVEL%
if not %BUILD_STATUS%==0 goto fail

:inno32
echo %DATE% %TIME%: Compiling the Inno Setup Script (x86)
IF NOT EXIST "%InnoCompiler%" GOTO NOINNO
"%InnoCompiler%" setup_x86.iss
set INNO_STATUS=%ERRORLEVEL%
if not %INNO_STATUS%==0 goto fail
echo %DATE% %TIME%: Compiling the Inno Setup Script (x86) - OK

:inno64
echo %DATE% %TIME%: Compiling the Inno Setup Script (x64)
IF NOT EXIST "%InnoCompiler%" GOTO NOINNO
"%InnoCompiler%" setup_x64.iss
set INNO_STATUS=%ERRORLEVEL%
if not %INNO_STATUS%==0 goto fail
echo %DATE% %TIME%: Compiling the Inno Setup Script (x64) - OK
exit /b 0

:NOINNO
echo %DATE% %TIME%: Could not find Inno Setup Compiler
goto fail

:fail
exit /b 1
17 changes: 10 additions & 7 deletions MFIGamepadFeeder/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using NBug;

namespace MFIGamepadFeeder
{
/// <summary>
/// Interaction logic for App.xaml
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
public App()
{
Settings.ReleaseMode = true;

AppDomain.CurrentDomain.UnhandledException += Handler.UnhandledException;
Current.DispatcherUnhandledException += Handler.DispatcherUnhandledException;
}
}
}
}
4 changes: 4 additions & 0 deletions MFIGamepadFeeder/MFIGamepadFeeder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@
<HintPath>..\packages\HidSharp.1.5\lib\net35\HidSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NBug, Version=1.2.0.0, Culture=neutral, PublicKeyToken=a4292a325f69b123, processorArchitecture=MSIL">
<HintPath>..\packages\NBug.1.2.2\lib\net40-client\NBug.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
Expand Down
2 changes: 1 addition & 1 deletion MFIGamepadFeeder/MappingEditorWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public MappingEditorWindow()
private SimplifiedHidPreview SimplifiedHidPreview { get; }

private void Grid_Loaded(object sender, RoutedEventArgs e)
{
{
HidDeviceCombobox.ItemsSource = SimplifiedHidPreview.HidManager.FoundDevices;
SimplifiedHidPreview.CurrentHidState
.ObserveOn(Application.Current.Dispatcher)
Expand Down
1 change: 1 addition & 0 deletions MFIGamepadFeeder/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<packages>
<package id="Hardcodet.NotifyIcon.Wpf" version="1.0.5" targetFramework="net452" />
<package id="HidSharp" version="1.5" targetFramework="net452" />
<package id="NBug" version="1.2.2" targetFramework="net452" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net452" />
<package id="ReactiveProperty" version="3.4.0" targetFramework="net452" />
<package id="System.Interactive" version="3.1.1" targetFramework="net452" />
Expand Down

0 comments on commit 11b06c5

Please sign in to comment.