Skip to content

Commit

Permalink
4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ecdcaeb committed Jan 24, 2024
1 parent 2cf4e1b commit c0749de
Show file tree
Hide file tree
Showing 7 changed files with 174 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
JDKSwitcher_forWindows.exe
jdks.cfg
jdks.cfg
JDKSwitcher_private.res
JDKSwitcher_forWindows.layout
JDKSwitcher_forWindows.o
9 changes: 8 additions & 1 deletion JDKSwitcher_forWindows.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#define VERSION "4.0"



#include <io.h>
#include <string>
#include <vector>
Expand Down Expand Up @@ -367,7 +371,10 @@ void readFromConfig(std::vector<std::string>& 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());
Expand Down
62 changes: 62 additions & 0 deletions JDKSwitcher_forWindows.dev
Original file line number Diff line number Diff line change
@@ -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=

23 changes: 23 additions & 0 deletions JDKSwitcher_private.h
Original file line number Diff line number Diff line change
@@ -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*/
34 changes: 34 additions & 0 deletions JDKSwitcher_private.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */
/* DO NOT EDIT! */

#include <windows.h> // 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
}
}
33 changes: 33 additions & 0 deletions Makefile.win
Original file line number Diff line number Diff line change
@@ -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

11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit c0749de

Please sign in to comment.