initial commit
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -0,0 +1,13 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Этот код создан программой.
|
||||
' Исполняемая версия:4.0.30319.42000
|
||||
'
|
||||
' Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
|
||||
' повторной генерации кода.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>false</MySubMain>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<ApplicationType>2</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
@@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' General Information about an assembly is controlled through the following
|
||||
' set of attributes. Change these attribute values to modify the information
|
||||
' associated with an assembly.
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
<Assembly: AssemblyTitle("app starter")>
|
||||
<Assembly: AssemblyDescription("app starter")>
|
||||
<Assembly: AssemblyCompany("app starter")>
|
||||
<Assembly: AssemblyProduct("app starter")>
|
||||
<Assembly: AssemblyCopyright("app starter Copyright © 2024")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
<Assembly: Guid("7b2cb46f-f55b-423a-851a-53437db2745b")>
|
||||
|
||||
' Version information for an assembly consists of the following four values:
|
||||
'
|
||||
' Major Version
|
||||
' Minor Version
|
||||
' Build Number
|
||||
' Revision
|
||||
'
|
||||
' You can specify all the values or you can default the Build and Revision Numbers
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
@@ -0,0 +1,63 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Этот код создан программой.
|
||||
' Исполняемая версия:4.0.30319.42000
|
||||
'
|
||||
' Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
|
||||
' повторной генерации кода.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'Этот класс создан автоматически классом StronglyTypedResourceBuilder
|
||||
'с помощью такого средства, как ResGen или Visual Studio.
|
||||
'Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
|
||||
'с параметром /str или перестройте свой проект VS.
|
||||
'''<summary>
|
||||
''' Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("SolrStarter.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Перезаписывает свойство CurrentUICulture текущего потока для всех
|
||||
''' обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Этот код создан программой.
|
||||
' Исполняемая версия:4.0.30319.42000
|
||||
'
|
||||
' Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
|
||||
' повторной генерации кода.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "Функция автоматического сохранения My.Settings"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.SolrStarter.My.MySettings
|
||||
Get
|
||||
Return Global.SolrStarter.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,77 @@
|
||||
Imports System.IO
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Module Mylogger
|
||||
Private ReadOnly errorDirPath As String = "errors"
|
||||
Private ReadOnly buildDirPath As String = "logs"
|
||||
|
||||
Public Sub LogError(ByVal userId As String, ByVal methodName As String, ByVal errorMessage As String)
|
||||
Try
|
||||
|
||||
Dim directoryPath As String = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, errorDirPath, userId)
|
||||
Directory.CreateDirectory(directoryPath)
|
||||
|
||||
|
||||
Dim currentDate As String = DateTime.Now.ToString("yyyy-MM-dd")
|
||||
Dim filePath As String = Path.Combine(directoryPath, $"{userId + "-" + currentDate}-log.json")
|
||||
|
||||
|
||||
Dim errorLog As New List(Of Object)()
|
||||
|
||||
If File.Exists(filePath) Then
|
||||
Dim existingLog As String = File.ReadAllText(filePath)
|
||||
errorLog = JsonConvert.DeserializeObject(Of List(Of Object))(existingLog)
|
||||
End If
|
||||
|
||||
Dim errorObject As New With {
|
||||
.Date = DateTime.Now.ToString(),
|
||||
.Method = methodName,
|
||||
.Content = errorMessage
|
||||
}
|
||||
|
||||
errorLog.Add(errorObject)
|
||||
|
||||
Dim jsonLog As String = JsonConvert.SerializeObject(errorLog, Formatting.Indented)
|
||||
|
||||
File.WriteAllText(filePath, jsonLog)
|
||||
Catch ex As Exception
|
||||
|
||||
Console.WriteLine($"Error logging failed: {ex.Message}")
|
||||
End Try
|
||||
End Sub
|
||||
Public Sub Logbuild(ByVal userId As String, ByVal methodName As String, ByVal msg As String)
|
||||
Try
|
||||
|
||||
Dim directoryPath As String = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, buildDirPath, userId)
|
||||
Directory.CreateDirectory(directoryPath)
|
||||
|
||||
|
||||
Dim currentDate As String = DateTime.Now.ToString("yyyy-MM-dd")
|
||||
Dim filePath As String = Path.Combine(directoryPath, $"{currentDate}-log.json")
|
||||
|
||||
|
||||
Dim errorLog As New List(Of Object)()
|
||||
|
||||
If File.Exists(filePath) Then
|
||||
Dim existingLog As String = File.ReadAllText(filePath)
|
||||
errorLog = JsonConvert.DeserializeObject(Of List(Of Object))(existingLog)
|
||||
End If
|
||||
|
||||
Dim errorObject As New With {
|
||||
.Date = DateTime.Now.ToString(),
|
||||
.Method = methodName,
|
||||
.Content = msg
|
||||
}
|
||||
|
||||
errorLog.Add(errorObject)
|
||||
|
||||
Dim jsonLog As String = JsonConvert.SerializeObject(errorLog, Formatting.Indented)
|
||||
|
||||
File.WriteAllText(filePath, jsonLog)
|
||||
Catch ex As Exception
|
||||
|
||||
Console.WriteLine($"build logging failed: {ex.Message}")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
@@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{013DD8EA-30DE-4CBE-869F-3D1A6B922AEE}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<StartupObject>SolrStarter.Starter</StartupObject>
|
||||
<RootNamespace>SolrStarter</RootNamespace>
|
||||
<AssemblyName>SolrStarter</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Console</MyType>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>..\..\..\..\..\..\xampp\htdocs\BTMOB\private\builder\</OutputPath>
|
||||
<DocumentationFile>SolrStarter.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>SolrStarter.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Mylogger.vb" />
|
||||
<Compile Include="Starter.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,283 @@
|
||||
Imports System.Text
|
||||
Imports Microsoft.Win32
|
||||
|
||||
Module Starter
|
||||
|
||||
Private userid As String
|
||||
Private appid As String
|
||||
Private ClientName As String = Nothing
|
||||
Private UserHost As String = Nothing
|
||||
|
||||
Private use_access As String = Nothing
|
||||
Private use_draw As String = Nothing
|
||||
Private use_antkill As String = Nothing
|
||||
Private use_atoprims As String = Nothing
|
||||
Private notifytitle As String = Nothing
|
||||
Private notifymsg As String = Nothing
|
||||
|
||||
Private allprims As String = Nothing
|
||||
Private Buildtype As String = Nothing
|
||||
|
||||
|
||||
Private appname As String = Nothing
|
||||
Private appversion As String = Nothing
|
||||
Private appicopath As String = Nothing
|
||||
Private appurl As String = Nothing
|
||||
Private logintitle As String = Nothing
|
||||
Private logindis As String = Nothing
|
||||
Private loginbtn As String = Nothing
|
||||
Private lngshort As String = Nothing
|
||||
Private hiddenapp As String = Nothing
|
||||
Private noemulator As String = Nothing
|
||||
Private miuiautostart As String = Nothing
|
||||
Private autorunback As String = Nothing
|
||||
Private installtype As String = Nothing
|
||||
Private hidetype As String = Nothing
|
||||
Private nosleep As String = Nothing
|
||||
Private caplock As String = Nothing
|
||||
Private trakingdata As String = Nothing
|
||||
Private allconfig As String = Nothing
|
||||
Private nodelete As String = Nothing
|
||||
|
||||
|
||||
|
||||
Private Email As String = Nothing
|
||||
Private MainActivity As String = Nothing
|
||||
Private appdir As String = Nothing
|
||||
|
||||
Private Workerid As String
|
||||
|
||||
|
||||
|
||||
'enum('onbuild', 'failed', 'finished')
|
||||
|
||||
|
||||
Sub Main()
|
||||
|
||||
|
||||
Try
|
||||
|
||||
Threading.Thread.Sleep(500)
|
||||
|
||||
Dim args() As String = Split(Command(), " ")
|
||||
If args Is Nothing Or args.Length = 0 Then
|
||||
Console.WriteLine("Invalid Parameter Builder.")
|
||||
Environment.Exit(0)
|
||||
End If
|
||||
|
||||
Dim com As String = args(0).Trim("""")
|
||||
|
||||
|
||||
Try
|
||||
appid = Base64Decode(args(1).Trim(""""))
|
||||
userid = Base64Decode(args(2).Trim(""""))
|
||||
ClientName = Base64Decode(args(3).Trim(""""))
|
||||
Email = Base64Decode(args(4).Trim(""""))
|
||||
MainActivity = Base64Decode(args(5).Trim(""""))
|
||||
appdir = Base64Decode(args(6).Trim(""""))
|
||||
UserHost = Base64Decode(args(7).Trim(""""))
|
||||
|
||||
use_access = Base64Decode(args(8).Trim(""""))
|
||||
use_draw = Base64Decode(args(9).Trim(""""))
|
||||
use_antkill = Base64Decode(args(10).Trim(""""))
|
||||
use_atoprims = Base64Decode(args(11).Trim(""""))
|
||||
notifytitle = Base64Decode(args(12).Trim(""""))
|
||||
notifymsg = Base64Decode(args(13).Trim(""""))
|
||||
|
||||
If String.IsNullOrWhiteSpace(notifytitle) Or String.IsNullOrEmpty(notifytitle) Then
|
||||
notifytitle = " "
|
||||
End If
|
||||
|
||||
If String.IsNullOrWhiteSpace(notifymsg) Or String.IsNullOrEmpty(notifymsg) Then
|
||||
notifymsg = " "
|
||||
End If
|
||||
|
||||
allprims = Base64Decode(args(14).Trim(""""))
|
||||
|
||||
Buildtype = Base64Decode(args(15).Trim(""""))
|
||||
appname = Base64Decode(args(16).Trim(""""))
|
||||
appversion = Base64Decode(args(17).Trim(""""))
|
||||
appicopath = Base64Decode(args(18).Trim(""""))
|
||||
appurl = Base64Decode(args(19).Trim(""""))
|
||||
logintitle = Base64Decode(args(20).Trim(""""))
|
||||
logindis = Base64Decode(args(21).Trim(""""))
|
||||
loginbtn = Base64Decode(args(22).Trim(""""))
|
||||
lngshort = Base64Decode(args(23).Trim(""""))
|
||||
|
||||
hiddenapp = Base64Decode(args(24).Trim(""""))
|
||||
noemulator = Base64Decode(args(25).Trim(""""))
|
||||
miuiautostart = Base64Decode(args(26).Trim(""""))
|
||||
autorunback = Base64Decode(args(27).Trim(""""))
|
||||
installtype = Base64Decode(args(28).Trim(""""))
|
||||
hidetype = Base64Decode(args(29).Trim(""""))
|
||||
nosleep = Base64Decode(args(30).Trim(""""))
|
||||
caplock = Base64Decode(args(31).Trim(""""))
|
||||
trakingdata = Base64Decode(args(32).Trim(""""))
|
||||
allconfig = Base64Decode(args(33).Trim(""""))
|
||||
nodelete = Base64Decode(args(34).Trim(""""))
|
||||
'If Buildtype = "C" Then
|
||||
' appname = Base64Decode(args(16).Trim(""""))
|
||||
' appversion = Base64Decode(args(17).Trim(""""))
|
||||
' appicopath = Base64Decode(args(18).Trim(""""))
|
||||
' appurl = Base64Decode(args(19).Trim(""""))
|
||||
' logintitle = Base64Decode(args(20).Trim(""""))
|
||||
' logindis = Base64Decode(args(21).Trim(""""))
|
||||
' loginbtn = Base64Decode(args(22).Trim(""""))
|
||||
' lngshort = Base64Decode(args(23).Trim(""""))
|
||||
|
||||
' hiddenapp = Base64Decode(args(24).Trim(""""))
|
||||
' noemulator = Base64Decode(args(25).Trim(""""))
|
||||
' miuiautostart = Base64Decode(args(26).Trim(""""))
|
||||
' autorunback = Base64Decode(args(27).Trim(""""))
|
||||
' installtype = Base64Decode(args(28).Trim(""""))
|
||||
' hidetype = Base64Decode(args(29).Trim(""""))
|
||||
' nosleep = Base64Decode(args(30).Trim(""""))
|
||||
|
||||
'Else
|
||||
' appname = "_"
|
||||
' appversion = "_"
|
||||
' appicopath = "_"
|
||||
' appurl = "_"
|
||||
' logintitle = "_"
|
||||
' logindis = "_"
|
||||
' loginbtn = "_"
|
||||
' hiddenapp = "_"
|
||||
' noemulator = "_"
|
||||
' miuiautostart = "_"
|
||||
' autorunback = "_"
|
||||
' installtype = "_"
|
||||
' hidetype = "_"
|
||||
' nosleep = "_"
|
||||
' lngshort = Base64Decode(args(16).Trim(""""))
|
||||
'End If
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
Console.WriteLine("> Error: " + "Something went wrong")
|
||||
Mylogger.LogError(userid, "inialize values error:", ex.Message)
|
||||
Environment.Exit(0)
|
||||
End Try
|
||||
|
||||
|
||||
Workerid = CovertToMD5(userid + "_" + appid)
|
||||
|
||||
Select Case com
|
||||
Case "lunch"
|
||||
|
||||
|
||||
If Busy(Workerid) Then
|
||||
Console.WriteLine("This app is building right now , please wait.")
|
||||
Environment.Exit(0)
|
||||
End If
|
||||
|
||||
Dim exePath As String = "SolrWorker.exe"
|
||||
|
||||
|
||||
Dim encodedArguments As String = ToBase64(Workerid) + " " +
|
||||
ToBase64(appid) + " " +
|
||||
ToBase64(userid) + " " +
|
||||
ToBase64(ClientName) + " " +
|
||||
ToBase64(Email) + " " +
|
||||
ToBase64(MainActivity) + " " +
|
||||
ToBase64(appdir) + " " +
|
||||
ToBase64(UserHost) + " " +
|
||||
ToBase64(use_access) + " " +
|
||||
ToBase64(use_draw) + " " +
|
||||
ToBase64(use_antkill) + " " +
|
||||
ToBase64(use_atoprims) + " " +
|
||||
ToBase64(notifytitle) + " " +
|
||||
ToBase64(notifymsg) + " " +
|
||||
ToBase64(allprims) + " " +
|
||||
ToBase64(Buildtype) + " " +
|
||||
ToBase64(appname) + " " +
|
||||
ToBase64(appversion) + " " +
|
||||
ToBase64(appicopath) + " " +
|
||||
ToBase64(appurl) + " " +
|
||||
ToBase64(logintitle) + " " +
|
||||
ToBase64(logindis) + " " +
|
||||
ToBase64(loginbtn) + " " +
|
||||
ToBase64(lngshort) + " " +
|
||||
ToBase64(hiddenapp) + " " +
|
||||
ToBase64(noemulator) + " " +
|
||||
ToBase64(miuiautostart) + " " +
|
||||
ToBase64(autorunback) + " " +
|
||||
ToBase64(installtype) + " " +
|
||||
ToBase64(hidetype) + " " +
|
||||
ToBase64(nosleep) + " " +
|
||||
ToBase64(caplock) + " " +
|
||||
ToBase64(trakingdata) + " " +
|
||||
ToBase64(allconfig) + " " +
|
||||
ToBase64(nodelete)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dim startInfo As New ProcessStartInfo()
|
||||
startInfo.FileName = exePath
|
||||
startInfo.Arguments = encodedArguments
|
||||
startInfo.CreateNoWindow = True
|
||||
|
||||
startInfo.WindowStyle = ProcessWindowStyle.Hidden
|
||||
startInfo.UseShellExecute = True
|
||||
|
||||
|
||||
Process.Start(startInfo)
|
||||
|
||||
Console.WriteLine("Your app is building now.")
|
||||
|
||||
Exit Select
|
||||
Case Else
|
||||
Console.WriteLine("Invalid Command.")
|
||||
Exit Select
|
||||
End Select
|
||||
|
||||
Environment.Exit(0)
|
||||
|
||||
Catch ex As Exception
|
||||
Console.WriteLine("> Starter: " + ex.Message)
|
||||
Mylogger.LogError(userid, "Main starter", ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
Function ToBase64(input As String) As String
|
||||
Dim bytes As Byte() = Encoding.UTF8.GetBytes(input)
|
||||
Return Convert.ToBase64String(bytes)
|
||||
End Function
|
||||
Function Busy(ByVal userid As String) As Boolean
|
||||
Try
|
||||
Dim key As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\AppWorkers")
|
||||
If key IsNot Nothing Then
|
||||
Dim value As Object = key.GetValue(userid)
|
||||
If value IsNot Nothing Then
|
||||
Dim pid As Integer
|
||||
If Integer.TryParse(value.ToString(), pid) Then
|
||||
Dim process As Process = Process.GetProcessById(pid)
|
||||
If process IsNot Nothing AndAlso Not process.HasExited Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Function CovertToMD5(retVal As String) As String
|
||||
Using MD5 = System.Security.Cryptography.MD5.Create()
|
||||
Return BitConverter.ToString(MD5.ComputeHash(Encoding.Default.GetBytes(retVal))).Replace("-", String.Empty)
|
||||
End Using
|
||||
End Function
|
||||
|
||||
|
||||
Public Function Base64Decode(encodedString As String) As String
|
||||
Dim decodedBytes As Byte() = Convert.FromBase64String(encodedString)
|
||||
Return System.Text.Encoding.UTF8.GetString(decodedBytes)
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
End Module
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
||||
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>
|
||||
SolrStarter
|
||||
</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:SolrStarter.My.Resources.Resources">
|
||||
<summary>
|
||||
A strongly-typed resource class, for looking up localized strings, etc.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:SolrStarter.My.Resources.Resources.ResourceManager">
|
||||
<summary>
|
||||
Returns the cached ResourceManager instance used by this class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:SolrStarter.My.Resources.Resources.Culture">
|
||||
<summary>
|
||||
Overrides the current thread's CurrentUICulture property for all
|
||||
resource lookups using this strongly typed resource class.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
@@ -0,0 +1,7 @@
|
||||
' <autogenerated/>
|
||||
Option Strict Off
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
<Assembly: Global.System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName:="")>
|
||||
@@ -0,0 +1,7 @@
|
||||
' <autogenerated/>
|
||||
Option Strict Off
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
<Assembly: Global.System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName:=".NET Framework 4.8")>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net45" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user