diff --git a/.gitignore b/.gitignore index 0c9c2e3..9964765 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ JDKSwitcher_forWindows.exe -jdks.cfg \ No newline at end of file +jdks.cfg +JDKSwitcher_private.res +JDKSwitcher_forWindows.layout +JDKSwitcher_forWindows.o \ No newline at end of file diff --git a/JDKSwitcher_forWindows.cpp b/JDKSwitcher_forWindows.cpp index 2d8af53..651d985 100644 --- a/JDKSwitcher_forWindows.cpp +++ b/JDKSwitcher_forWindows.cpp @@ -1,3 +1,7 @@ +#define VERSION "4.0" + + + #include #include #include @@ -367,7 +371,10 @@ void readFromConfig(std::vector& jdks){ } } void printMainScreen(){ - tellraw("&aJDK Sitcher\n"); + tellraw("&aJDK Sitcher - version "); + color(gray); + printf(VERSION); + printf("\n"); tellraw("&a Copyright (c) 2024 Hileb\n"); tellraw("&a this is a Software enable you change the \"JAVA_HOME\" fastly.\n"); printf("Current JAVA_HOME : %s \n",quoteString(getJava())->c_str()); diff --git a/JDKSwitcher_forWindows.dev b/JDKSwitcher_forWindows.dev new file mode 100644 index 0000000..549ea89 --- /dev/null +++ b/JDKSwitcher_forWindows.dev @@ -0,0 +1,62 @@ +[Project] +FileName=JDKSwitcher_forWindows.dev +Name=JDKSwitcher_forWindows +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource=JDKSwitcher_private.rc +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker= +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=JDKSwitcher_forWindows.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=1 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000000 +UnitCount=1 + +[VersionInfo] +Major=4 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName=Hileb +FileVersion=4.0.0.0 +FileDescription= +InternalName=JDKSwitcher +LegalCopyright=Hileb +LegalTrademarks=Hileb +OriginalFilename=JDKSwitcher +ProductName=JDKSwitcher +ProductVersion=4.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=JDKSwitcher_forWindows.cpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/JDKSwitcher_private.h b/JDKSwitcher_private.h new file mode 100644 index 0000000..478f848 --- /dev/null +++ b/JDKSwitcher_private.h @@ -0,0 +1,23 @@ +/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */ +/* DO NOT EDIT ! */ + +#ifndef JDKSWITCHER_PRIVATE_H +#define JDKSWITCHER_PRIVATE_H + +/* VERSION DEFINITIONS */ +#define VER_STRING "4.0.0.0" +#define VER_MAJOR 4 +#define VER_MINOR 0 +#define VER_RELEASE 0 +#define VER_BUILD 0 +#define COMPANY_NAME "Hileb" +#define FILE_VERSION "4.0.0.0" +#define FILE_DESCRIPTION "" +#define INTERNAL_NAME "JDKSwitcher" +#define LEGAL_COPYRIGHT "Hileb" +#define LEGAL_TRADEMARKS "Hileb" +#define ORIGINAL_FILENAME "JDKSwitcher" +#define PRODUCT_NAME "JDKSwitcher" +#define PRODUCT_VERSION "4.0.0.0" + +#endif /*JDKSWITCHER_PRIVATE_H*/ diff --git a/JDKSwitcher_private.rc b/JDKSwitcher_private.rc new file mode 100644 index 0000000..8656ead --- /dev/null +++ b/JDKSwitcher_private.rc @@ -0,0 +1,34 @@ +/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */ +/* DO NOT EDIT! */ + +#include // include for version info constants + + +// +// TO CHANGE VERSION INFORMATION, EDIT PROJECT OPTIONS... +// +1 VERSIONINFO +FILEVERSION 4,0,0,0 +PRODUCTVERSION 4,0,0,0 +FILETYPE VFT_APP +{ + BLOCK "StringFileInfo" + { + BLOCK "040904E4" + { + VALUE "CompanyName", "Hileb" + VALUE "FileVersion", "4.0.0.0" + VALUE "FileDescription", "" + VALUE "InternalName", "JDKSwitcher" + VALUE "LegalCopyright", "Hileb" + VALUE "LegalTrademarks", "Hileb" + VALUE "OriginalFilename", "JDKSwitcher" + VALUE "ProductName", "JDKSwitcher" + VALUE "ProductVersion", "4.0.0.0" + } + } + BLOCK "VarFileInfo" + { + VALUE "Translation", 0x0409, 1252 + } +} diff --git a/Makefile.win b/Makefile.win new file mode 100644 index 0000000..6df0e9b --- /dev/null +++ b/Makefile.win @@ -0,0 +1,33 @@ +# Project: JDKSwitcher_forWindows +# Makefile created by Dev-C++ 5.11 + +CPP = g++.exe +CC = gcc.exe +WINDRES = windres.exe +RES = JDKSwitcher_private.res +OBJ = JDKSwitcher_forWindows.o $(RES) +LINKOBJ = JDKSwitcher_forWindows.o $(RES) +LIBS = -L"D:/Program Files (x86)/Dev-Cpp/MinGW64/lib" -L"D:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib" -static-libgcc +INCS = -I"D:/Program Files (x86)/Dev-Cpp/MinGW64/include" -I"D:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Program Files (x86)/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" +CXXINCS = -I"D:/Program Files (x86)/Dev-Cpp/MinGW64/include" -I"D:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Program Files (x86)/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -I"D:/Program Files (x86)/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++" +BIN = JDKSwitcher_forWindows.exe +CXXFLAGS = $(CXXINCS) +CFLAGS = $(INCS) +RM = rm.exe -f + +.PHONY: all all-before all-after clean clean-custom + +all: all-before $(BIN) all-after + +clean: clean-custom + ${RM} $(OBJ) $(BIN) + +$(BIN): $(OBJ) + $(CPP) $(LINKOBJ) -o $(BIN) $(LIBS) + +JDKSwitcher_forWindows.o: JDKSwitcher_forWindows.cpp + $(CPP) -c JDKSwitcher_forWindows.cpp -o JDKSwitcher_forWindows.o $(CXXFLAGS) + +JDKSwitcher_private.res: JDKSwitcher_private.rc + $(WINDRES) -i JDKSwitcher_private.rc --input-format=rc -o JDKSwitcher_private.res -O coff + diff --git a/README.md b/README.md index 0540abf..d266443 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,11 @@ # JDKSwitcher - switch "JAVA_HOME" + + A software which enables you change the "JAVA_HOME" fastly. + +Use `jdks.cfg` to add custom jdk locations. + +for example: +cfg```D:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.3\jbr +D:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.3\jbr +D:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.3\jbr +``` \ No newline at end of file