Add GUI.
20
exeinfogui.Desktop/Info.plist
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleName</key>
|
||||
<string>exeinfogui</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.example.exeinfogui</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.7</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string></string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>MacIcon.icns</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
exeinfogui.Desktop/MacIcon.icns
Normal file
15
exeinfogui.Desktop/Program.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using Eto.Forms;
|
||||
using Eto.Drawing;
|
||||
|
||||
namespace exeinfogui.Desktop
|
||||
{
|
||||
class Program
|
||||
{
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
new Application(Eto.Platform.Detect).Run(new MainForm());
|
||||
}
|
||||
}
|
||||
}
|
||||
14
exeinfogui.Desktop/exeinfogui.Desktop.csproj
Normal file
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net461</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Eto.Platform.Wpf" Version="2.4.1" />
|
||||
<PackageReference Include="Eto.Platform.Gtk" Version="2.4.1" />
|
||||
<PackageReference Include="Eto.Platform.Mac64" Version="2.4.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\exeinfogui\exeinfogui.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 7.9 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 711 B |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 174 KiB |
|
After Width: | Height: | Size: 58 KiB |
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"images": [
|
||||
{
|
||||
"filename": "AppIcon-16.png",
|
||||
"size": "16x16",
|
||||
"scale": "1x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"filename": "AppIcon-16@2x.png",
|
||||
"size": "16x16",
|
||||
"scale": "2x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"filename": "AppIcon-32.png",
|
||||
"size": "32x32",
|
||||
"scale": "1x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"filename": "AppIcon-32@2x.png",
|
||||
"size": "32x32",
|
||||
"scale": "2x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"filename": "AppIcon-128.png",
|
||||
"size": "128x128",
|
||||
"scale": "1x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"filename": "AppIcon-128@2x.png",
|
||||
"size": "128x128",
|
||||
"scale": "2x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"filename": "AppIcon-256.png",
|
||||
"size": "256x256",
|
||||
"scale": "1x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"filename": "AppIcon-256@2x.png",
|
||||
"size": "256x256",
|
||||
"scale": "2x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"filename": "AppIcon-512.png",
|
||||
"size": "512x512",
|
||||
"scale": "1x",
|
||||
"idiom": "mac"
|
||||
},
|
||||
{
|
||||
"filename": "AppIcon-512@2x.png",
|
||||
"size": "512x512",
|
||||
"scale": "2x",
|
||||
"idiom": "mac"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
||||
6
exeinfogui.XamMac/Assets.xcassets/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
||||
30
exeinfogui.XamMac/Info.plist
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleName</key>
|
||||
<string>EtoApp</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.example.EtoApp</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.7</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string></string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>XSAppIconAssets</key>
|
||||
<string>Assets.xcassets/AppIcon.appiconset</string>
|
||||
</dict>
|
||||
</plist>
|
||||
13
exeinfogui.XamMac/Program.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using AppKit;
|
||||
using Eto.Forms;
|
||||
|
||||
namespace exeinfogui.XamMac
|
||||
{
|
||||
static class MainClass
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
new Application(Eto.Platforms.XamMac2).Run(new MainForm());
|
||||
}
|
||||
}
|
||||
}
|
||||
56
exeinfogui.XamMac/exeinfogui.XamMac.csproj
Normal file
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{E2DC1857-A942-419B-849E-58AC8BBB94CD}</ProjectGuid>
|
||||
<ProjectTypeGuids>{A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>exeinfogui.XamMac</RootNamespace>
|
||||
<AssemblyName>exeinfogui.XamMac</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkIdentifier>Xamarin.Mac</TargetFrameworkIdentifier>
|
||||
<MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<UseSGen>false</UseSGen>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<UseSGen>false</UseSGen>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Xamarin.Mac" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-128.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-128%402x.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-16.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-16%402x.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-256.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-256%402x.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-32.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-32%402x.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-512.png" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-512%402x.png" />
|
||||
<ImageAsset Include="Assets.xcassets\Contents.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Info.plist" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Eto.Platform.XamMac2">
|
||||
<Version>2.4.1</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\exeinfogui\exeinfogui.csproj">
|
||||
<Project>{223AE794-0CBD-42D3-8C98-D79090006DE5}</Project>
|
||||
<Name>exeinfogui</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
|
||||
</Project>
|
||||
42
exeinfogui/MainForm.xeto
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Form xmlns="http://schema.picoe.ca/eto.forms" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="ExeInfo GUI" ClientSize="400, 350" Padding="10">
|
||||
<StackLayout Orientation="Vertical">
|
||||
<StackLayoutItem HorizontalAlignment="Stretch">
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<Label ID="lblFile">File:</Label>
|
||||
<StackLayoutItem Expand="True">
|
||||
<TextBox ID="txtFile" ReadOnly="True" />
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Right">
|
||||
<Button ID="btnLoad" Click="OnBtnLoadClick">Load</Button>
|
||||
</StackLayoutItem>
|
||||
</StackLayout>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch">
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<Label ID="lblType">Type:</Label>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<TextBox ID="txtType" ReadOnly="True" />
|
||||
</StackLayoutItem>
|
||||
</StackLayout>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<StackLayout Orientation="Vertical">
|
||||
<Label ID="lblInformation">Type:</Label>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Expand="True">
|
||||
<TextArea ID="txtInformation" ReadOnly="True" />
|
||||
</StackLayoutItem>
|
||||
</StackLayout>
|
||||
</StackLayoutItem>
|
||||
</StackLayout>
|
||||
<Form.Menu>
|
||||
<MenuBar>
|
||||
<MenuBar.QuitItem>
|
||||
<ButtonMenuItem ID="mnuQuit" Text="Quit" Shortcut="CommonModifier+Q" Click="OnMnuQuitClick" />
|
||||
</MenuBar.QuitItem>
|
||||
<MenuBar.AboutItem>
|
||||
<ButtonMenuItem ID="mnuAbout" Text="About..." Click="OnMnuAboutClick" />
|
||||
</MenuBar.AboutItem>
|
||||
</MenuBar>
|
||||
</Form.Menu>
|
||||
</Form>
|
||||
87
exeinfogui/MainForm.xeto.cs
Normal file
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Eto.Forms;
|
||||
using Eto.Serialization.Xaml;
|
||||
using libexeinfo;
|
||||
|
||||
namespace exeinfogui
|
||||
{
|
||||
public class MainForm : Form
|
||||
{
|
||||
TextBox txtFile;
|
||||
TextBox txtType;
|
||||
TextArea txtInformation;
|
||||
|
||||
public MainForm()
|
||||
{
|
||||
XamlReader.Load(this);
|
||||
}
|
||||
|
||||
protected void OnBtnLoadClick(object sender, EventArgs e)
|
||||
{
|
||||
txtFile.Text = "";
|
||||
txtType.Text = "";
|
||||
txtInformation.Text ="";
|
||||
|
||||
OpenFileDialog dlgOpen = new OpenFileDialog {Title = "Choose executable file", MultiSelect = false};
|
||||
|
||||
if(dlgOpen.ShowDialog(this) != DialogResult.Ok) return;
|
||||
|
||||
txtFile.Text = dlgOpen.FileName;
|
||||
|
||||
FileStream exeFs = File.Open(dlgOpen.FileName, FileMode.Open, FileAccess.Read);
|
||||
|
||||
MZ mzExe = new MZ(exeFs);
|
||||
NE neExe = new NE(exeFs);
|
||||
AtariST stExe = new AtariST(exeFs);
|
||||
LX lxExe = new LX(exeFs);
|
||||
COFF coffExe = new COFF(exeFs);
|
||||
PE peExe = new PE(exeFs);
|
||||
|
||||
if(mzExe.IsMZ)
|
||||
{
|
||||
if(neExe.IsNE)
|
||||
{
|
||||
txtType.Text = "New Executable (NE)";
|
||||
txtInformation.Text = neExe.GetInfo();
|
||||
}
|
||||
else if(lxExe.IsLX)
|
||||
{
|
||||
txtType.Text = "Linear eXecutable (LX)";
|
||||
txtInformation.Text = lxExe.GetInfo();
|
||||
}
|
||||
else if(peExe.IsPE)
|
||||
{
|
||||
txtType.Text = "Portable Executable (PE)";
|
||||
txtInformation.Text = peExe.GetInfo();
|
||||
}
|
||||
else
|
||||
txtType.Text = "DOS Executable (MZ)";
|
||||
|
||||
txtInformation.Text += mzExe.GetInfo();
|
||||
}
|
||||
else if(stExe.IsAtariST)
|
||||
{
|
||||
txtType.Text = "Atari ST executable";
|
||||
txtInformation.Text = stExe.GetInfo();
|
||||
}
|
||||
else if(coffExe.IsCOFF)
|
||||
{
|
||||
txtType.Text = "Common Object File Format (COFF)";
|
||||
txtInformation.Text = coffExe.GetInfo();
|
||||
}
|
||||
else
|
||||
txtType.Text = "Format not recognized";
|
||||
}
|
||||
|
||||
protected void OnMnuAboutClick(object sender, EventArgs e)
|
||||
{
|
||||
new AboutDialog().ShowDialog(this);
|
||||
}
|
||||
|
||||
protected void OnMnuQuitClick(object sender, EventArgs e)
|
||||
{
|
||||
Application.Instance.Quit();
|
||||
}
|
||||
}
|
||||
}
|
||||
20
exeinfogui/exeinfogui.csproj
Normal file
@@ -0,0 +1,20 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net461</TargetFramework>
|
||||
<RootNamespace>exeinfogui</RootNamespace>
|
||||
<PackageVersion>1.0</PackageVersion>
|
||||
<Title>exeinfogui</Title>
|
||||
<Copyright>Copyright © 2018</Copyright>
|
||||
<Description>Description of exeinfogui</Description>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Eto.Forms" Version="2.4.1" />
|
||||
<PackageReference Include="Eto.Serialization.Xaml" Version="2.4.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\libexeinfo\libexeinfo.csproj">
|
||||
<Project>{5DD22357-AEA1-4B1D-9CAB-F51873A3A5D0}</Project>
|
||||
<Name>libexeinfo</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,10 +1,16 @@
|
||||
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "exeinfo", "exeinfo\exeinfo.csproj", "{504F0A15-25DC-42B1-81FE-BA22A8EF24B5}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "libexeinfo", "libexeinfo\libexeinfo.csproj", "{5DD22357-AEA1-4B1D-9CAB-F51873A3A5D0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "exeinfogui", "exeinfogui\exeinfogui.csproj", "{8628775A-F351-4B1C-9EA6-ED836980C9B2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "exeinfogui.Desktop", "exeinfogui.Desktop\exeinfogui.Desktop.csproj", "{65F985F1-E73C-4515-93B3-25F49C22F1AC}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "exeinfogui.XamMac", "exeinfogui.XamMac\exeinfogui.XamMac.csproj", "{E2DC1857-A942-419B-849E-58AC8BBB94CD}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x86 = Debug|x86
|
||||
@@ -19,6 +25,18 @@ Global
|
||||
{5DD22357-AEA1-4B1D-9CAB-F51873A3A5D0}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{5DD22357-AEA1-4B1D-9CAB-F51873A3A5D0}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{5DD22357-AEA1-4B1D-9CAB-F51873A3A5D0}.Release|x86.Build.0 = Release|Any CPU
|
||||
{8628775A-F351-4B1C-9EA6-ED836980C9B2}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{8628775A-F351-4B1C-9EA6-ED836980C9B2}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{8628775A-F351-4B1C-9EA6-ED836980C9B2}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{8628775A-F351-4B1C-9EA6-ED836980C9B2}.Release|x86.Build.0 = Release|Any CPU
|
||||
{65F985F1-E73C-4515-93B3-25F49C22F1AC}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{65F985F1-E73C-4515-93B3-25F49C22F1AC}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{65F985F1-E73C-4515-93B3-25F49C22F1AC}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{65F985F1-E73C-4515-93B3-25F49C22F1AC}.Release|x86.Build.0 = Release|Any CPU
|
||||
{E2DC1857-A942-419B-849E-58AC8BBB94CD}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{E2DC1857-A942-419B-849E-58AC8BBB94CD}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{E2DC1857-A942-419B-849E-58AC8BBB94CD}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{E2DC1857-A942-419B-849E-58AC8BBB94CD}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(MonoDevelopProperties) = preSolution
|
||||
version = 0.2
|
||||
|
||||