forked from Anime4000/IFME
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Welcoming Internet Friendly Media Encoder to GitHub!
- Loading branch information
Showing
92 changed files
with
13,381 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
@echo off | ||
@title Build IFME and Release! | ||
set BUILDDIR=_build | ||
cls | ||
echo. | ||
echo This script allowing publish IFME after compile. Using Debug build. | ||
echo because "Release" got some issue with x265... | ||
echo 1. ifme.exe | ||
echo 2. ifme.hitoha.dll | ||
echo 3. ifme.hitoha.kawaii.dll | ||
echo. | ||
echo IFME require some file, download and save it to "%BUILDDIR%" folder after complete. | ||
echo 1. MediaInfo.dll (64bit) | ||
echo 2. 7za.exe (rename to za.dll) | ||
echo. | ||
echo IFME will create empty folder: | ||
echo 1. addons | ||
echo 2. lang | ||
echo. | ||
echo IFME will use dummy addon, you need actual addon, get from webpage | ||
echo. | ||
echo Press any key to start making (existing folder will be removed!)... | ||
pause >nul | ||
echo. | ||
echo. | ||
echo. | ||
echo DELETEING %BUILDDIR%! | ||
rmdir /s %BUILDDIR% | ||
mkdir %BUILDDIR% | ||
mkdir %BUILDDIR%\addons | ||
mkdir %BUILDDIR%\lang | ||
copy installer\text_gpl2.txt %BUILDDIR%\LICENSE | ||
copy ifme\bin\x64\Debug\lang\*.* %BUILDDIR%\lang | ||
copy ifme\bin\x64\Debug\ifme.exe %BUILDDIR%\ | ||
copy ifme\bin\x64\Debug\ifme.hitoha.dll %BUILDDIR%\ | ||
copy ifme\bin\x64\Debug\ifme.hitoha.kawaii.dll %BUILDDIR%\ | ||
copy ifme\bin\x64\Debug\iso.gg %BUILDDIR%\ | ||
echo. | ||
echo DONE! Now copy "7za.exe" (rename to za.dll) | ||
echo and copy "MediaInfo.dll" to "%BUILDDIR%" folder | ||
echo. | ||
echo After that, download IFME addons and extract to "addons" folder. | ||
echo Then can be release via Installer or Archive :) | ||
echo. | ||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
; Script generated by the Inno Setup Script Wizard. | ||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | ||
|
||
#define MyAppName "Internet Friendly Media Encoder" | ||
#define MyAppVersion "4.0.0.0" | ||
#define MyAppPublisher "Anime4000" | ||
#define MyAppURL "http://ifme.sf.net/" | ||
#define MyAppExeName "ifme.exe" | ||
|
||
[Setup] | ||
; NOTE: The value of AppId uniquely identifies this application. | ||
; Do not use the same AppId value in installers for other applications. | ||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) | ||
AppId={{90310E77-D70E-4A63-8A25-BD4C38F0F9B5} | ||
AppName={#MyAppName} | ||
AppVersion={#MyAppVersion} | ||
;AppVerName={#MyAppName} {#MyAppVersion} | ||
AppPublisher={#MyAppPublisher} | ||
AppPublisherURL={#MyAppURL} | ||
AppSupportURL={#MyAppURL} | ||
AppUpdatesURL={#MyAppURL} | ||
DefaultDirName={pf64}\{#MyAppName} | ||
DefaultGroupName={#MyAppName} | ||
AllowNoIcons=yes | ||
|
||
ArchitecturesInstallIn64BitMode=x64 | ||
|
||
SourceDir=_build | ||
LicenseFile=LICENSE | ||
InfoBeforeFile=..\installer\text_patents_and_royalties.txt | ||
InfoAfterFile=..\installer\text_whatsnew.txt | ||
SetupIconFile=..\installer\download.ico | ||
|
||
Compression=lzma2/ultra64 | ||
SolidCompression=yes | ||
|
||
WizardImageFile=..\installer\inno_banner.bmp | ||
WizardSmallImageFile=..\installer\inno_small.bmp | ||
|
||
OutputDir=D:\ | ||
OutputBaseFilename=x265ui-x64_setup | ||
|
||
[Languages] | ||
Name: "english"; MessagesFile: "compiler:Default.isl" | ||
|
||
[Tasks] | ||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkedonce | ||
|
||
[Files] | ||
Source: "*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs | ||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files | ||
|
||
[Icons] | ||
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; WorkingDir: "{app}"; Comment: "x265 GUI Encoder with Internet Friendly Media Encoder!"; Tasks: desktopicon | ||
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; WorkingDir: "{app}"; Comment: "x265 GUI Encoder with Internet Friendly Media Encoder!" | ||
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}" | ||
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" | ||
|
||
[Run] | ||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent | ||
|
||
[Code] | ||
function IsDotNetDetected(version: string; service: cardinal): boolean; | ||
// Indicates whether the specified version and service pack of the .NET Framework is installed. | ||
// | ||
// version -- Specify one of these strings for the required .NET Framework version: | ||
// 'v1.1.4322' .NET Framework 1.1 | ||
// 'v2.0.50727' .NET Framework 2.0 | ||
// 'v3.0' .NET Framework 3.0 | ||
// 'v3.5' .NET Framework 3.5 | ||
// 'v4\Client' .NET Framework 4.0 Client Profile | ||
// 'v4\Full' .NET Framework 4.0 Full Installation | ||
// 'v4.5' .NET Framework 4.5 | ||
// | ||
// service -- Specify any non-negative integer for the required service pack level: | ||
// 0 No service packs required | ||
// 1, 2, etc. Service pack 1, 2, etc. required | ||
var | ||
key: string; | ||
install, release, serviceCount: cardinal; | ||
check45, success: boolean; | ||
begin | ||
// .NET 4.5 installs as update to .NET 4.0 Full | ||
if version = 'v4.5' then begin | ||
version := 'v4\Full'; | ||
check45 := true; | ||
end else | ||
check45 := false; | ||
// installation key group for all .NET versions | ||
key := 'SOFTWARE\Microsoft\NET Framework Setup\NDP\' + version; | ||
// .NET 3.0 uses value InstallSuccess in subkey Setup | ||
if Pos('v3.0', version) = 1 then begin | ||
success := RegQueryDWordValue(HKLM, key + '\Setup', 'InstallSuccess', install); | ||
end else begin | ||
success := RegQueryDWordValue(HKLM, key, 'Install', install); | ||
end; | ||
// .NET 4.0/4.5 uses value Servicing instead of SP | ||
if Pos('v4', version) = 1 then begin | ||
success := success and RegQueryDWordValue(HKLM, key, 'Servicing', serviceCount); | ||
end else begin | ||
success := success and RegQueryDWordValue(HKLM, key, 'SP', serviceCount); | ||
end; | ||
// .NET 4.5 uses additional value Release | ||
if check45 then begin | ||
success := success and RegQueryDWordValue(HKLM, key, 'Release', release); | ||
success := success and (release >= 378389); | ||
end; | ||
result := success and (install = 1) and (serviceCount >= service); | ||
end; | ||
function InitializeSetup(): Boolean; | ||
begin | ||
if not IsDotNetDetected('v4.5', 0) then begin | ||
MsgBox('{#MyAppName} requires Microsoft .NET Framework 4.5!'#13#13 | ||
'Please install and then re-run the setup program.', mbInformation, MB_OK); | ||
result := false; | ||
end else | ||
result := true; | ||
end; |
25 changes: 25 additions & 0 deletions
25
ifme.hitoha.kawaii/IniFileParser/Exceptions/ParsingException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
|
||
namespace IniParser.Exceptions | ||
{ | ||
/// <summary> | ||
/// Represents an error ococcurred while parsing data | ||
/// </summary> | ||
public class ParsingException : Exception | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ParsingException"/> class. | ||
/// </summary> | ||
/// <param name="msg">The message describing the exception cause.</param> | ||
public ParsingException(string msg) | ||
: base("Parsing Error: " + msg) { } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ParsingException"/> class. | ||
/// </summary> | ||
/// <param name="msg">The message describing the exception cause.</param> | ||
/// <param name="innerException">An inner exception.</param> | ||
public ParsingException(string msg, Exception innerException) | ||
: base("Parsing Error: " + msg, innerException) { } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
using System; | ||
using System.IO; | ||
using System.Text; | ||
using IniParser.Exceptions; | ||
using IniParser.Model; | ||
|
||
namespace IniParser | ||
{ | ||
/// <summary> | ||
/// Represents an INI data parser for files. | ||
/// </summary> | ||
public class FileIniDataParser : StreamIniDataParser | ||
{ | ||
#region Deprecated methods | ||
|
||
[Obsolete("Please use ReadFile method instead of this one as is more semantically accurate")] | ||
public IniData LoadFile(string filePath) | ||
{ | ||
return ReadFile(filePath); | ||
} | ||
|
||
[Obsolete("Please use ReadFile method instead of this one as is more semantically accurate")] | ||
public IniData LoadFile(string filePath, Encoding fileEncoding) | ||
{ | ||
return ReadFile(filePath, fileEncoding); | ||
} | ||
#endregion | ||
|
||
/// <summary> | ||
/// Implements reading ini data from a file. | ||
/// </summary> | ||
/// <remarks> | ||
/// Uses <see cref="Encoding.Default"/> codification for the file. | ||
/// </remarks> | ||
/// <param name="filePath"> | ||
/// Path to the file | ||
/// </param> | ||
public IniData ReadFile(string filePath) | ||
{ | ||
return ReadFile(filePath, Encoding.Default); | ||
} | ||
|
||
/// <summary> | ||
/// Implements reading ini data from a file. | ||
/// </summary> | ||
/// <param name="filePath"> | ||
/// Path to the file | ||
/// </param> | ||
/// <param name="fileEncoding"> | ||
/// File's encoding. | ||
/// </param> | ||
public IniData ReadFile(string filePath, Encoding fileEncoding) | ||
{ | ||
if (filePath == string.Empty) | ||
throw new ArgumentException("Bad filename."); | ||
|
||
try | ||
{ | ||
using (FileStream fs = File.Open(filePath, FileMode.Open, FileAccess.Read)) | ||
{ | ||
using (StreamReader sr = new StreamReader(fs, fileEncoding)) | ||
{ | ||
return ReadData(sr); | ||
} | ||
} | ||
} | ||
catch (IOException ex) | ||
{ | ||
throw new ParsingException(String.Format("Could not parse file {0}", filePath), ex); | ||
} | ||
|
||
} | ||
|
||
/// <summary> | ||
/// Saves INI data to a file. | ||
/// </summary> | ||
/// <remarks> | ||
/// Creats an ASCII encoded file by default. | ||
/// </remarks> | ||
/// <param name="filePath"> | ||
/// Path to the file. | ||
/// </param> | ||
/// <param name="parsedData"> | ||
/// IniData to be saved as an INI file. | ||
/// </param> | ||
[Obsolete("Please use WriteFile method instead of this one as is more semantically accurate")] | ||
public void SaveFile(string filePath, IniData parsedData) | ||
{ | ||
WriteFile(filePath, parsedData, Encoding.ASCII); | ||
} | ||
|
||
/// <summary> | ||
/// Writes INI data to a text file. | ||
/// </summary> | ||
/// <param name="filePath"> | ||
/// Path to the file. | ||
/// </param> | ||
/// <param name="parsedData"> | ||
/// IniData to be saved as an INI file. | ||
/// </param> | ||
/// <param name="fileEncoding"> | ||
/// Specifies the encoding used to create the file. | ||
/// </param> | ||
public void WriteFile(string filePath, IniData parsedData, Encoding fileEncoding = null) | ||
{ | ||
// The default value can't be assigned as a default parameter value because it is not | ||
// a constant expression. | ||
if (fileEncoding == null) | ||
fileEncoding = Encoding.ASCII; | ||
|
||
if (string.IsNullOrEmpty(filePath)) | ||
throw new ArgumentException("Bad filename."); | ||
|
||
if (parsedData == null) | ||
throw new ArgumentNullException("parsedData"); | ||
|
||
using (FileStream fs = File.Open(filePath, FileMode.Create, FileAccess.Write)) | ||
{ | ||
using (StreamWriter sr = new StreamWriter(fs, fileEncoding)) | ||
{ | ||
WriteData(sr, parsedData); | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace IniParser.Helpers | ||
{ | ||
internal static class Assert | ||
{ | ||
/// <summary> | ||
/// Asserts that a strings has no blank spaces. | ||
/// </summary> | ||
/// <param name="s">The string to be checked.</param> | ||
/// <returns></returns> | ||
internal static bool StringHasNoBlankSpaces(string s) | ||
{ | ||
return !s.Contains(" "); | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.