Skip to content

Commit 5f516a5

Browse files
committed
Make a separate VisualStudio project on C++ to compile GitWave executor
1 parent 9c75c1b commit 5f516a5

16 files changed

+383
-57
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ target/
3737
logs/
3838
config/
3939
temp/
40+
41+
# GitWave executor peojct
42+
tools/GitWaveExecutor/.vs/
43+
tools/GitWaveExecutor/GitWaveExecutor/x64/

pom.xml

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
<maven-assembly-plugin.version>3.6.0</maven-assembly-plugin.version>
2525
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
2626
<javafx-maven-plugin.version>0.0.8</javafx-maven-plugin.version>
27-
<exec-maven-plugin.version>3.1.0</exec-maven-plugin.version>
2827
</properties>
2928

3029
<dependencies>
@@ -76,7 +75,7 @@
7675
<archive>
7776
<manifest>
7877
<addClasspath>true</addClasspath>
79-
<mainClass>com.github.introfog.gitwave.gitwaveLauncher</mainClass>
78+
<mainClass>com.github.introfog.gitwave.GitWaveLauncher</mainClass>
8079
</manifest>
8180
</archive>
8281
</configuration>
@@ -117,60 +116,6 @@
117116
<noHeaderFiles>true</noHeaderFiles>
118117
</configuration>
119118
</plugin>
120-
<plugin>
121-
<!-- To run different command\tools -->
122-
<groupId>org.codehaus.mojo</groupId>
123-
<artifactId>exec-maven-plugin</artifactId>
124-
<version>${exec-maven-plugin.version}</version>
125-
<executions>
126-
<execution>
127-
<id>create-launcher-bat</id>
128-
<phase>package</phase>
129-
<goals>
130-
<goal>exec</goal>
131-
</goals>
132-
<configuration>
133-
<executable>cmd</executable>
134-
<arguments>
135-
<argument>/c</argument>
136-
<argument>echo "javaImage/bin/java" -m com.github.introfog.gitwave/com.github.introfog.gitwave.GitWaveLauncher > target/launcher.bat</argument>
137-
</arguments>
138-
</configuration>
139-
</execution>
140-
<execution>
141-
<!-- TODO Try to create .exe by C++ -->
142-
<id>create-exe-based-on-launcher</id>
143-
<phase>package</phase>
144-
<goals>
145-
<goal>exec</goal>
146-
</goals>
147-
<configuration>
148-
<executable>tools/batToExe.exe</executable>
149-
<arguments>
150-
<argument>/bat</argument>
151-
<argument>target/launcher.bat</argument>
152-
<argument>/exe</argument>
153-
<argument>target/${project.name}.exe</argument>
154-
<argument>/invisible</argument>
155-
<argument>/x64</argument>
156-
<argument>/overwrite</argument>
157-
<argument>/fileversion</argument>
158-
<argument>1.0.0.0</argument>
159-
<argument>/productversion</argument>
160-
<argument>${project.version}</argument>
161-
<argument>/productname</argument>
162-
<argument>${project.name}</argument>
163-
<argument>/company</argument>
164-
<argument>${project.groupId}</argument>
165-
<argument>/copyright</argument>
166-
<argument>2023-2024 Dmitry Chubrick</argument>
167-
<argument>/icon</argument>
168-
<argument>src/main/resources/logo.ico</argument>
169-
</arguments>
170-
</configuration>
171-
</execution>
172-
</executions>
173-
</plugin>
174119

175120
<plugin>
176121
<groupId>org.apache.maven.plugins</groupId>

src/assembly/zip.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<outputDirectory>/</outputDirectory>
2222
</fileSet>
2323
<fileSet>
24-
<directory>target</directory>
24+
<directory>tools</directory>
2525
<includes>
2626
<include>GitWave.exe</include>
2727
</includes>

tools/GitWave.exe

22.5 KB
Binary file not shown.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.31129.286
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GitWaveExecutor", "GitWaveExecutor\GitWaveExecutor.vcxproj", "{3D99B705-3304-4D9F-BC0B-F742997B0511}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Win32 = Debug|Win32
11+
Debug|x64 = Debug|x64
12+
Release|Win32 = Release|Win32
13+
Release|x64 = Release|x64
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{3D99B705-3304-4D9F-BC0B-F742997B0511}.Debug|Win32.ActiveCfg = Debug|Win32
17+
{3D99B705-3304-4D9F-BC0B-F742997B0511}.Debug|Win32.Build.0 = Debug|Win32
18+
{3D99B705-3304-4D9F-BC0B-F742997B0511}.Debug|x64.ActiveCfg = Debug|x64
19+
{3D99B705-3304-4D9F-BC0B-F742997B0511}.Debug|x64.Build.0 = Debug|x64
20+
{3D99B705-3304-4D9F-BC0B-F742997B0511}.Release|Win32.ActiveCfg = Release|Win32
21+
{3D99B705-3304-4D9F-BC0B-F742997B0511}.Release|Win32.Build.0 = Release|Win32
22+
{3D99B705-3304-4D9F-BC0B-F742997B0511}.Release|x64.ActiveCfg = Release|x64
23+
{3D99B705-3304-4D9F-BC0B-F742997B0511}.Release|x64.Build.0 = Release|x64
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {22F43981-7736-471E-951B-18271DA266AF}
30+
EndGlobalSection
31+
EndGlobal
Binary file not shown.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#include <windows.h>
2+
3+
4+
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
5+
{
6+
PROCESS_INFORMATION ProcessInfo;
7+
8+
STARTUPINFO StartupInfo; //This is an [in] parameter
9+
ZeroMemory(&StartupInfo, sizeof(StartupInfo));
10+
StartupInfo.cb = sizeof StartupInfo; //Only compulsory field
11+
12+
13+
if (CreateProcess(NULL, "javaImage\\bin\\javaw.exe \"-m\" \"com.github.introfog.gitwave/com.github.introfog.gitwave.GitWaveLauncher\"",
14+
NULL, NULL, FALSE, 0, NULL,
15+
NULL, &StartupInfo, &ProcessInfo))
16+
{
17+
WaitForSingleObject(ProcessInfo.hProcess, INFINITE);
18+
CloseHandle(ProcessInfo.hThread);
19+
CloseHandle(ProcessInfo.hProcess);
20+
}
21+
22+
return 0;
23+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// Microsoft Visual C++ generated resource script.
2+
//
3+
4+
#include "resource.h"
5+
6+
#define APSTUDIO_READONLY_SYMBOLS
7+
/////////////////////////////////////////////////////////////////////////////
8+
//
9+
// Generated from the TEXTINCLUDE 2 resource.
10+
//
11+
#include "winres.h"
12+
13+
/////////////////////////////////////////////////////////////////////////////
14+
#undef APSTUDIO_READONLY_SYMBOLS
15+
16+
/////////////////////////////////////////////////////////////////////////////
17+
// English (United States) resources
18+
19+
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
20+
LANGUAGE 25, 1
21+
22+
#ifdef APSTUDIO_INVOKED
23+
/////////////////////////////////////////////////////////////////////////////
24+
//
25+
// TEXTINCLUDE
26+
//
27+
28+
1 TEXTINCLUDE
29+
BEGIN
30+
"resource.h\0"
31+
END
32+
33+
2 TEXTINCLUDE
34+
BEGIN
35+
"#include ""winres.h""\r\n"
36+
"\0"
37+
END
38+
39+
3 TEXTINCLUDE
40+
BEGIN
41+
"\r\n"
42+
"\0"
43+
END
44+
45+
#endif // APSTUDIO_INVOKED
46+
47+
#endif // English (United States) resources
48+
/////////////////////////////////////////////////////////////////////////////
49+
50+
51+
52+
#ifndef APSTUDIO_INVOKED
53+
/////////////////////////////////////////////////////////////////////////////
54+
//
55+
// Generated from the TEXTINCLUDE 3 resource.
56+
//
57+
58+
59+
/////////////////////////////////////////////////////////////////////////////
60+
#endif // not APSTUDIO_INVOKED
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Debug|x64">
9+
<Configuration>Debug</Configuration>
10+
<Platform>x64</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Release|Win32">
13+
<Configuration>Release</Configuration>
14+
<Platform>Win32</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<ProjectGuid>{3D99B705-3304-4D9F-BC0B-F742997B0511}</ProjectGuid>
23+
<RootNamespace>GitWaveExecutor</RootNamespace>
24+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
25+
</PropertyGroup>
26+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
27+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
28+
<ConfigurationType>Application</ConfigurationType>
29+
<UseDebugLibraries>true</UseDebugLibraries>
30+
<PlatformToolset>v142</PlatformToolset>
31+
<CharacterSet>MultiByte</CharacterSet>
32+
</PropertyGroup>
33+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
34+
<ConfigurationType>Application</ConfigurationType>
35+
<UseDebugLibraries>false</UseDebugLibraries>
36+
<PlatformToolset>v142</PlatformToolset>
37+
<WholeProgramOptimization>true</WholeProgramOptimization>
38+
<CharacterSet>MultiByte</CharacterSet>
39+
</PropertyGroup>
40+
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
41+
<PlatformToolset>v142</PlatformToolset>
42+
</PropertyGroup>
43+
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
44+
<PlatformToolset>v142</PlatformToolset>
45+
</PropertyGroup>
46+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
47+
<ImportGroup Label="ExtensionSettings">
48+
</ImportGroup>
49+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
50+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
51+
</ImportGroup>
52+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
53+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
54+
</ImportGroup>
55+
<PropertyGroup Label="UserMacros" />
56+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
57+
<TargetName>GitWave</TargetName>
58+
<OutDir>..\..</OutDir>
59+
<LinkIncremental>false</LinkIncremental>
60+
</PropertyGroup>
61+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
62+
<ClCompile>
63+
<WarningLevel>Level3</WarningLevel>
64+
<Optimization>Disabled</Optimization>
65+
</ClCompile>
66+
<Link>
67+
<GenerateDebugInformation>true</GenerateDebugInformation>
68+
</Link>
69+
</ItemDefinitionGroup>
70+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
71+
<ClCompile>
72+
<WarningLevel>Level3</WarningLevel>
73+
<Optimization>MaxSpeed</Optimization>
74+
<FunctionLevelLinking>true</FunctionLevelLinking>
75+
<IntrinsicFunctions>true</IntrinsicFunctions>
76+
</ClCompile>
77+
<Link>
78+
<GenerateDebugInformation>true</GenerateDebugInformation>
79+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
80+
<OptimizeReferences>true</OptimizeReferences>
81+
</Link>
82+
</ItemDefinitionGroup>
83+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
84+
<Link>
85+
<SubSystem>Windows</SubSystem>
86+
<EntryPointSymbol>
87+
</EntryPointSymbol>
88+
<GenerateDebugInformation>false</GenerateDebugInformation>
89+
</Link>
90+
<ClCompile>
91+
<DebugInformationFormat>None</DebugInformationFormat>
92+
</ClCompile>
93+
</ItemDefinitionGroup>
94+
<ItemGroup>
95+
<ClCompile Include="GitWaveExecutor.cpp" />
96+
</ItemGroup>
97+
<ItemGroup>
98+
<ClInclude Include="resource1.h" />
99+
</ItemGroup>
100+
<ItemGroup>
101+
<ResourceCompile Include="GitWaveExecutor1.rc" />
102+
</ItemGroup>
103+
<ItemGroup>
104+
<Image Include="..\..\..\src\main\resources\logo.ico" />
105+
</ItemGroup>
106+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
107+
<ImportGroup Label="ExtensionTargets">
108+
</ImportGroup>
109+
</Project>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup />
4+
</Project>

0 commit comments

Comments
 (0)