summary refs log tree commit diff stats
path: root/src/htm
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2016-12-13 16:12:03 -0500
committerPatrick Griffis <tingping@tingping.se>2017-06-13 23:54:51 -0400
commit628100c19f5d82747170acdf2917cba8c119ccbf (patch)
tree351a7e9714a1a58390ba349808df5703cef25c3e /src/htm
parent2edf50d4ddc61ce6f73bf02263c9bdd09632c66b (diff)
build: Replace Autotools with Meson
Quick rundown of benefits:

- Much faster:
  - Autotools (with autogen): 22 seconds
  - Meson: 7 seconds
  - Meson (with ccache): 2 seconds

- Simpler:
  - ~1000 lines smaller
  - Single simple language

- Potentially better Windows (Visual Studio) support

What is not done:

- Complete Windows support
- OSX support (easy)

Closes #2013
Closes #1937
Closes #1803
Diffstat (limited to 'src/htm')
-rw-r--r--src/htm/Makefile.am15
-rw-r--r--src/htm/htm-mono.csproj144
-rw-r--r--src/htm/meson.build33
-rw-r--r--src/htm/thememan.HTM.resourcesbin0 -> 10228 bytes
-rwxr-xr-x[-rw-r--r--]src/htm/thememan.in0
5 files changed, 33 insertions, 159 deletions
diff --git a/src/htm/Makefile.am b/src/htm/Makefile.am
deleted file mode 100644
index e524bf27..00000000
--- a/src/htm/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-theme_SCRIPTS = thememan.exe thememan
-themedir = $(bindir)
-
-mdtool_verbose = $(mdtool_verbose_$(V))
-mdtool_verbose_ = $(mdtool_verbose_$(AM_DEFAULT_VERBOSITY))
-mdtool_verbose_0 = @echo "  MDTOOL  " $@; $(MDTOOL) build $< > /dev/null;
-mdtool_verbose_1 = $(MDTOOL) --verbose build $<;
-
-thememan.exe: htm-mono.csproj
-	$(mdtool_verbose)
-
-clean-local:
-	rm -f thememan.exe thememan.exe.config thememan.exe.mdb thememan Main.resources
-
-EXTRA_DIST = thememan.in
diff --git a/src/htm/htm-mono.csproj b/src/htm/htm-mono.csproj
deleted file mode 100644
index 7bed3d97..00000000
--- a/src/htm/htm-mono.csproj
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <PropertyGroup>

-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>

-    <ProductVersion>8.0.30703</ProductVersion>

-    <SchemaVersion>2.0</SchemaVersion>

-    <ProjectGuid>{DE87FFCA-9606-4116-B747-062D88A56A28}</ProjectGuid>

-    <OutputType>WinExe</OutputType>

-    <AppDesignerFolder>Properties</AppDesignerFolder>

-    <RootNamespace>thememan</RootNamespace>

-    <FileAlignment>512</FileAlignment>

-    <IsWebBootstrapper>false</IsWebBootstrapper>

-    <PublishUrl>publish\</PublishUrl>

-    <Install>true</Install>

-    <InstallFrom>Disk</InstallFrom>

-    <UpdateEnabled>false</UpdateEnabled>

-    <UpdateMode>Foreground</UpdateMode>

-    <UpdateInterval>7</UpdateInterval>

-    <UpdateIntervalUnits>Days</UpdateIntervalUnits>

-    <UpdatePeriodically>false</UpdatePeriodically>

-    <UpdateRequired>false</UpdateRequired>

-    <MapFileExtensions>true</MapFileExtensions>

-    <AutorunEnabled>true</AutorunEnabled>

-    <ApplicationRevision>1</ApplicationRevision>

-    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>

-    <UseApplicationTrust>false</UseApplicationTrust>

-    <PublishWizardCompleted>true</PublishWizardCompleted>

-    <BootstrapperEnabled>true</BootstrapperEnabled>

-    <AssemblyName>thememan</AssemblyName>

-  </PropertyGroup>

-  <PropertyGroup>

-    <ApplicationIcon>Resources\htm.ico</ApplicationIcon>

-  </PropertyGroup>

-  <PropertyGroup>

-    <ManifestCertificateThumbprint>25412E3EF25458D894050F8209E4D9DCCDF432D7</ManifestCertificateThumbprint>

-  </PropertyGroup>

-  <PropertyGroup>

-    <ManifestKeyFile>htm_TemporaryKey.pfx</ManifestKeyFile>

-  </PropertyGroup>

-  <PropertyGroup>

-    <GenerateManifests>false</GenerateManifests>

-  </PropertyGroup>

-  <PropertyGroup>

-    <SignManifests>false</SignManifests>

-  </PropertyGroup>

-  <PropertyGroup>

-    <TargetZone>LocalIntranet</TargetZone>

-  </PropertyGroup>

-  <PropertyGroup />

-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

-    <DebugSymbols>True</DebugSymbols>

-    <DebugType>full</DebugType>

-    <Optimize>False</Optimize>

-    <OutputPath>.</OutputPath>

-    <WarningLevel>4</WarningLevel>

-  </PropertyGroup>

-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

-    <DebugType>none</DebugType>

-    <Optimize>True</Optimize>

-    <OutputPath>.</OutputPath>

-    <WarningLevel>4</WarningLevel>

-  </PropertyGroup>

-  <ItemGroup>

-    <Reference Include="System" />

-    <Reference Include="System.Core" />

-    <Reference Include="System.Xml.Linq" />

-    <Reference Include="System.Data.DataSetExtensions" />

-    <Reference Include="Microsoft.CSharp" />

-    <Reference Include="System.Data" />

-    <Reference Include="System.Drawing" />

-    <Reference Include="System.Windows.Forms" />

-    <Reference Include="System.Xml" />

-    <Reference Include="WindowsBase" />

-  </ItemGroup>

-  <ItemGroup>

-    <Compile Include="Main.cs">

-      <SubType>Form</SubType>

-    </Compile>

-    <Compile Include="Main.Designer.cs">

-      <DependentUpon>Main.cs</DependentUpon>

-    </Compile>

-    <Compile Include="Program.cs" />

-    <Compile Include="Properties\AssemblyInfo.cs" />

-    <EmbeddedResource Include="Main.resx">

-      <DependentUpon>Main.cs</DependentUpon>

-    </EmbeddedResource>

-    <EmbeddedResource Include="Properties\Resources.resx">

-      <Generator>ResXFileCodeGenerator</Generator>

-      <LastGenOutput>Resources.Designer.cs</LastGenOutput>

-      <SubType>Designer</SubType>

-    </EmbeddedResource>

-    <Compile Include="Properties\Resources.Designer.cs">

-      <AutoGen>True</AutoGen>

-      <DependentUpon>Resources.resx</DependentUpon>

-      <DesignTime>True</DesignTime>

-    </Compile>

-    <None Include="app.config">

-      <SubType>Designer</SubType>

-    </None>

-    <None Include="Properties\Settings.settings">

-      <Generator>SettingsSingleFileGenerator</Generator>

-      <LastGenOutput>Settings.Designer.cs</LastGenOutput>

-    </None>

-    <Compile Include="Properties\Settings.Designer.cs">

-      <AutoGen>True</AutoGen>

-      <DependentUpon>Settings.settings</DependentUpon>

-      <DesignTimeSharedInput>True</DesignTimeSharedInput>

-    </Compile>

-  </ItemGroup>

-  <ItemGroup>

-    <BootstrapperPackage Include=".NETFramework,Version=v4.0">

-      <Visible>False</Visible>

-      <ProductName>Microsoft .NET Framework 4 Full Profile %28x86 and x64%29</ProductName>

-      <Install>true</Install>

-    </BootstrapperPackage>

-    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">

-      <Visible>False</Visible>

-      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>

-      <Install>false</Install>

-    </BootstrapperPackage>

-    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">

-      <Visible>False</Visible>

-      <ProductName>.NET Framework 3.5 SP1</ProductName>

-      <Install>false</Install>

-    </BootstrapperPackage>

-    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">

-      <Visible>False</Visible>

-      <ProductName>Windows Installer 3.1</ProductName>

-      <Install>true</Install>

-    </BootstrapperPackage>

-  </ItemGroup>

-  <ItemGroup>

-    <Content Include="Resources\htm.ico" />

-  </ItemGroup>

-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 

-       Other similar extension points exist, see Microsoft.Common.targets.

-  <Target Name="BeforeBuild">

-  </Target>

-  <Target Name="AfterBuild">

-  </Target>

-  -->

-</Project>
\ No newline at end of file
diff --git a/src/htm/meson.build b/src/htm/meson.build
new file mode 100644
index 00000000..8fa93b03
--- /dev/null
+++ b/src/htm/meson.build
@@ -0,0 +1,33 @@
+add_languages('cs')
+
+executable('thememan',
+  sources: [
+    'Program.cs',
+    'Main.cs',
+    'Main.Designer.cs',
+  ],
+  resources: [
+    # 'Main.resx', # FIXME: Allow setting resource id
+    'thememan.HTM.resources',
+  ],
+  cs_args: [
+    '-r:WindowsBase',
+    '-r:System.Data',
+    '-r:System.Drawing',
+    '-r:System.Windows.Forms',
+    '-win32icon:' + meson.current_source_dir() + '/Resources/htm.ico'
+  ],
+  install: true,
+)
+
+thememan_conf = configuration_data()
+thememan_conf.set('exec_prefix', get_option('prefix'))
+thememan_conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
+
+configure_file(
+  input: 'thememan.in',
+  output: 'thememan',
+  configuration: thememan_conf,
+  install: true,
+  install_dir: get_option('bindir'),
+)
diff --git a/src/htm/thememan.HTM.resources b/src/htm/thememan.HTM.resources
new file mode 100644
index 00000000..39374ac0
--- /dev/null
+++ b/src/htm/thememan.HTM.resources
Binary files differdiff --git a/src/htm/thememan.in b/src/htm/thememan.in
index f6f80df6..f6f80df6 100644..100755
--- a/src/htm/thememan.in
+++ b/src/htm/thememan.in