Skip to content

Commit a850cc8

Browse files
Update README.md
1 parent 91635e7 commit a850cc8

File tree

1 file changed

+130
-0
lines changed

1 file changed

+130
-0
lines changed

README.md

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,134 @@ It mimics the behavior of Windows `cmd.exe` with commands like `dir`, `cd`, `ech
1111
---
1212

1313
## 📂 Project Structure
14+
```
15+
MyCMD/
16+
┣ README.md # Project description, badges, usage
17+
┣ pom.xml # Maven build config
18+
┣ src/
19+
┃ ┗ main/
20+
┃ ┗ java/
21+
┃ ┗ com/
22+
┃ ┗ mycmd/
23+
┃ ┣ App.java # Main entry point (starts the shell)
24+
┃ ┣ ShellContext.java # Stores current working dir, state
25+
┃ ┣ Command.java # Interface for all commands
26+
┃ ┗ commands/ # All custom command classes
27+
┃ ┣ DirCommand.java
28+
┃ ┣ CdCommand.java
29+
┃ ┣ EchoCommand.java
30+
┃ ┣ MkdirCommand.java
31+
┃ ┣ RmdirCommand.java
32+
┃ ┣ CopyCommand.java
33+
┃ ┣ DelCommand.java
34+
┃ ┣ TypeCommand.java
35+
┃ ┣ ClsCommand.java
36+
┃ ┣ HelpCommand.java
37+
┃ ┣ ExitCommand.java
38+
┃ ┗ VersionCommand.java
39+
┣ icons/
40+
┃ ┗ mycmd.ico # App/installer icon
41+
┣ scripts/
42+
┃ ┣ build-windows.bat # Build + package EXE + run installer script
43+
┃ ┗ build-linux.sh # Build + package for Linux (deb/rpm)
44+
┣ installer/
45+
┃ ┗ mycmd.iss # Inno Setup script for Windows installer
46+
┗ dist/ # Output folder (auto-created after build)
47+
┣ bin/
48+
┃ ┗ MyCMD.exe # Wrapped executable (via Launch4j or jpackage)
49+
┣ lib/
50+
┃ ┗ dependencies.jar # Extra JAR dependencies (if any)
51+
┗ setup.exe # Generated installer (from Inno Setup)
52+
```
1453

54+
55+
---
56+
57+
## 🚀 Features
58+
59+
- ✅ Windows-like commands (`dir`, `cd`, `mkdir`, `del`, `copy`, `type`, `cls`)
60+
- ✅ Extensible via Java classes (easy to add new commands)
61+
- ✅ Packaged into `.exe` using **Launch4j**
62+
- ✅ Installer wizard using **Inno Setup**
63+
- ✅ Works on **Windows** and **Linux** (via `jpackage`)
64+
65+
---
66+
67+
## 📦 Requirements
68+
69+
To build MyCMD you need:
70+
71+
- [Java JDK 17+](https://adoptium.net/)
72+
- [Apache Maven](https://maven.apache.org/)
73+
- [Launch4j](https://launch4j.sourceforge.net/) (for `.exe` wrapping)
74+
- [Inno Setup](https://jrsoftware.org/isinfo.php) (for Windows installer)
75+
76+
*(Linux users can use `jpackage` instead of Launch4j/Inno Setup.)*
77+
78+
---
79+
80+
## 🛠️ Build Instructions
81+
82+
### 🔹 Windows
83+
```bash
84+
scripts\build-windows.bat
85+
```
86+
👆🏻 This will:
87+
88+
- Build the JAR with Maven
89+
90+
- Wrap it into an .exe with Launch4j
91+
92+
- Generate a setup.exe installer with Inno Setup
93+
94+
### Final Output
95+
```
96+
dist/
97+
┣ bin/MyCMD.exe
98+
┣ lib/dependencies.jar
99+
┗ setup.exe
100+
```
101+
### Linux
102+
```
103+
chmod +x scripts/build-linux.sh
104+
./scripts/build-linux.sh
105+
```
106+
This will build a `.deb` or `.rpm` package using `jpackage`.
107+
108+
## 🖥️ Usage
109+
110+
After installation, run:
111+
```
112+
MyCMD
113+
```
114+
115+
You can now use commands like:
116+
```
117+
> dir
118+
> cd ..
119+
> mkdir test
120+
> echo Hello World!
121+
> type file.txt
122+
> del file.txt
123+
> help
124+
> exit
125+
```
126+
127+
## 🧩 Extending MyCMD
128+
> [!NOTE]
129+
> There are many commands left like `ls` and `Ping Command`
130+
131+
### 🤝 Contributing
132+
133+
- Fork the repo (or request an invite if it’s in the org)
134+
135+
- Create a feature branch
136+
137+
- Commit your changes
138+
139+
- Open a Pull Request
140+
141+
## 📜 License
142+
143+
Licensed under the Apache License
144+
You are free to use, modify, and distribute.

0 commit comments

Comments
 (0)