diff --git a/HMCL/HMCLauncher.exe b/HMCL/HMCLauncher.exe new file mode 100644 index 000000000..0dab2c5ca Binary files /dev/null and b/HMCL/HMCLauncher.exe differ diff --git a/HMCL/build.gradle b/HMCL/build.gradle index 72ffa3234..cc136272b 100644 --- a/HMCL/build.gradle +++ b/HMCL/build.gradle @@ -5,10 +5,6 @@ import java.util.jar.JarFile import java.util.jar.Pack200 import java.util.zip.GZIPOutputStream -plugins { - id "edu.sc.seis.launch4j" version "2.4.4" -} - if (!hasProperty('mainClass')) { ext.mainClass = 'org.jackhuang.hmcl.Main' } @@ -97,21 +93,29 @@ task makePackGZ(dependsOn: jar) doLast { fileEx.append sha1Hex } -launch4j { - mainClassName = mainClass - icon = "${projectDir}/icon.ico" +task makeExecutable(dependsOn: jar) doLast { + ext { + jar.classifier = '' + makeExecutableinjar = jar.archivePath + jar.classifier = '' + makeExecutableoutjar = jar.archivePath + jar.classifier = '' + } + def loc = new File(project.buildDir, "libs/" + makeExecutableoutjar.getName().substring(0, makeExecutableoutjar.getName().length() - 4) + ".exe") + def fos = new FileOutputStream(loc) + def is = new FileInputStream(new File(project.buildDir, '../HMCLauncher.exe')) + int read + def bytes = new byte[8192] + while((read = is.read(bytes)) != -1) + fos.write(bytes, 0, read) + is.close() + is = new FileInputStream(makeExecutableoutjar) + while((read = is.read(bytes)) != -1) + fos.write(bytes, 0, read) + is.close() + fos.close() - jvmOptions = ["-XX:MinHeapFreeRatio=5", "-XX:MaxHeapFreeRatio=15"] - - version = mavenVersion - productName = "HMCL" - internalName = "HMCL-${mavenVersion}" - outfile = "HMCL-${mavenVersion}.exe" - - outputDir = "libs" - - copyright = "Copyright (C) 2018 huangyuhui " } build.dependsOn makePackGZ -build.dependsOn createExe \ No newline at end of file +build.dependsOn makeExecutable \ No newline at end of file diff --git a/HMCLauncher/.gitignore b/HMCLauncher/.gitignore new file mode 100644 index 000000000..f54d7c2f9 --- /dev/null +++ b/HMCLauncher/.gitignore @@ -0,0 +1,3 @@ +Debug +Release +.vs diff --git a/HMCLauncher/HMCL/HMCL.APS b/HMCLauncher/HMCL/HMCL.APS new file mode 100644 index 000000000..37e75846d Binary files /dev/null and b/HMCLauncher/HMCL/HMCL.APS differ diff --git a/HMCLauncher/HMCL/HMCL.cpp b/HMCLauncher/HMCL/HMCL.cpp new file mode 100644 index 000000000..c324f3e74 Binary files /dev/null and b/HMCLauncher/HMCL/HMCL.cpp differ diff --git a/HMCLauncher/HMCL/HMCL.h b/HMCLauncher/HMCL/HMCL.h new file mode 100644 index 000000000..c4aafa38e Binary files /dev/null and b/HMCLauncher/HMCL/HMCL.h differ diff --git a/HMCLauncher/HMCL/HMCL.ico b/HMCLauncher/HMCL/HMCL.ico new file mode 100644 index 000000000..fe7ac703b Binary files /dev/null and b/HMCLauncher/HMCL/HMCL.ico differ diff --git a/HMCLauncher/HMCL/HMCL.rc b/HMCLauncher/HMCL/HMCL.rc new file mode 100644 index 000000000..80b93e6b6 Binary files /dev/null and b/HMCLauncher/HMCL/HMCL.rc differ diff --git a/HMCLauncher/HMCL/HMCL.vcxproj b/HMCLauncher/HMCL/HMCL.vcxproj new file mode 100644 index 000000000..74d43bf5c --- /dev/null +++ b/HMCLauncher/HMCL/HMCL.vcxproj @@ -0,0 +1,174 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {672B1019-E741-4C0D-A986-627E2ACE157B} + Win32Proj + HMCL + 8.1 + + + + Application + true + v141_xp + Unicode + + + Application + false + v141_xp + true + Unicode + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + Use + Level3 + Disabled + true + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + false + + + Windows + true + + + + + Use + Level3 + Disabled + true + _DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + Use + Level3 + MinSpace + true + true + true + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreaded + + + Windows + true + true + true + + + + + Use + Level3 + MaxSpeed + true + true + true + NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + + + + + + + + Create + Create + Create + Create + + + + + + + + + + + + \ No newline at end of file diff --git a/HMCLauncher/HMCL/HMCL.vcxproj.filters b/HMCLauncher/HMCL/HMCL.vcxproj.filters new file mode 100644 index 000000000..04ebb26dd --- /dev/null +++ b/HMCLauncher/HMCL/HMCL.vcxproj.filters @@ -0,0 +1,49 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + + + 源文件 + + + 源文件 + + + + + 资源文件 + + + + + 资源文件 + + + \ No newline at end of file diff --git a/HMCLauncher/HMCL/HMCL.vcxproj.user b/HMCLauncher/HMCL/HMCL.vcxproj.user new file mode 100644 index 000000000..be2507870 --- /dev/null +++ b/HMCLauncher/HMCL/HMCL.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/HMCLauncher/HMCL/resource.h b/HMCLauncher/HMCL/resource.h new file mode 100644 index 000000000..3a62c19cf Binary files /dev/null and b/HMCLauncher/HMCL/resource.h differ diff --git a/HMCLauncher/HMCL/stdafx.cpp b/HMCLauncher/HMCL/stdafx.cpp new file mode 100644 index 000000000..c5cbb45c7 Binary files /dev/null and b/HMCLauncher/HMCL/stdafx.cpp differ diff --git a/HMCLauncher/HMCL/stdafx.h b/HMCLauncher/HMCL/stdafx.h new file mode 100644 index 000000000..277af7347 Binary files /dev/null and b/HMCLauncher/HMCL/stdafx.h differ diff --git a/HMCLauncher/HMCL/targetver.h b/HMCLauncher/HMCL/targetver.h new file mode 100644 index 000000000..e2da66c05 Binary files /dev/null and b/HMCLauncher/HMCL/targetver.h differ diff --git a/HMCLauncher/HMCLauncher.sln b/HMCLauncher/HMCLauncher.sln new file mode 100644 index 000000000..d516c1066 --- /dev/null +++ b/HMCLauncher/HMCLauncher.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27428.2005 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HMCL", "HMCL\HMCL.vcxproj", "{672B1019-E741-4C0D-A986-627E2ACE157B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {672B1019-E741-4C0D-A986-627E2ACE157B}.Debug|x64.ActiveCfg = Debug|x64 + {672B1019-E741-4C0D-A986-627E2ACE157B}.Debug|x64.Build.0 = Debug|x64 + {672B1019-E741-4C0D-A986-627E2ACE157B}.Debug|x86.ActiveCfg = Debug|Win32 + {672B1019-E741-4C0D-A986-627E2ACE157B}.Debug|x86.Build.0 = Debug|Win32 + {672B1019-E741-4C0D-A986-627E2ACE157B}.Release|x64.ActiveCfg = Release|x64 + {672B1019-E741-4C0D-A986-627E2ACE157B}.Release|x64.Build.0 = Release|x64 + {672B1019-E741-4C0D-A986-627E2ACE157B}.Release|x86.ActiveCfg = Release|Win32 + {672B1019-E741-4C0D-A986-627E2ACE157B}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FE40055B-673D-42F5-8AE4-6DF2C87EB659} + EndGlobalSection +EndGlobal