Skip to content

Commit 47d4de4

Browse files
committed
Remaster
1 parent 99a6335 commit 47d4de4

3 files changed

Lines changed: 501 additions & 31 deletions

File tree

README.md

Lines changed: 231 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,269 @@
11
# GdPy
22

3-
GdPy is a custom scripting language written in Python with its own `.gdpy` script format, a Windows installer, example scripts, and helper tools for local installation.
3+
> Warning (English): This project was created with the help of ChatGPT and contains AI-generated code, structure, and documentation. Review everything before using it in production.
4+
>
5+
> Предупреждение (Русский): Этот проект был создан с помощью ChatGPT и содержит код, структуру и документацию, сгенерированные ИИ. Перед реальным использованием всё нужно проверить вручную.
46
5-
## What is included
7+
## Overview
8+
9+
GdPy is a custom scripting language project built on top of Python.
10+
It uses `.gdpy` files, a Python interpreter, a Windows installer, example scripts, and helper tools for local installation and maintenance.
11+
12+
The repository includes:
13+
14+
- a language interpreter in `gdpy.py`
15+
- command documentation in `COMMANDS.txt`
16+
- example `.gdpy` programs in `examples/`
17+
- batch and PowerShell tooling for install, uninstall, shortcuts, and file associations
18+
- a standalone Windows installer in `installer-release/GdPyInstaller.exe`
19+
20+
## Project Goals
21+
22+
The project is designed to provide:
23+
24+
- a simple custom language syntax
25+
- script execution through `.gdpy` files
26+
- a Windows-focused local installation workflow
27+
- a standalone installer that already contains the project payload
28+
- update checking through GitHub Releases
29+
30+
## Current Repository Structure
31+
32+
Main files:
633

734
- `gdpy.py` - the interpreter
835
- `COMMANDS.txt` - command reference
36+
- `VERSION.txt` - project version
37+
- `README.md` - English documentation
38+
- `README.ru.md` - Russian documentation
39+
- `install.bat` - console installer
40+
- `uninstall.bat` - console uninstaller
41+
- `run_gdpy.bat` - run `.gdpy` scripts from the source folder
42+
- `open_source.bat` - open the source code quickly
43+
- `build_installer_exe.bat` - build the standalone installer
44+
45+
Important folders:
46+
947
- `examples/` - example `.gdpy` scripts
10-
- `install.bat` / `uninstall.bat` - console install and uninstall
11-
- `installer-release/GdPyInstaller.exe` - standalone Windows installer
48+
- `tools/` - PowerShell helper scripts
49+
- `installer-exe/` - standalone installer source
50+
- `installer-release/` - final standalone installer output
51+
52+
## Main Features
1253

13-
## Main features
54+
Language-level features:
1455

15-
- Custom commands like `say`, `set`, `if`, `while`, `for`
16-
- Direct `.gdpy` script execution
17-
- Windows integration for `.gdpy` file association
18-
- Desktop shortcut creation
19-
- Standalone installer with embedded payload
20-
- Automatic update check against GitHub Releases
56+
- variables and expressions
57+
- console output with `say`
58+
- conditions with `if`, `elif`, `else`
59+
- loops with `while` and `for`
60+
- list, string, JSON, and file operations
61+
- import-like feature switches such as `import python`, `import rights`, `import error`
62+
- direct Python execution when Python mode is enabled
2163

22-
## Run from source
64+
Windows integration features:
65+
66+
- `.gdpy` file association
67+
- desktop shortcut creation
68+
- standalone installer with embedded payload
69+
- repair/update mode
70+
- uninstall mode
71+
- GitHub release update check
72+
73+
## Running Scripts
74+
75+
Run directly from Python:
2376

2477
```bat
2578
python gdpy.py example.gdpy
2679
```
2780

28-
Or:
81+
Run through the helper batch file:
2982

3083
```bat
3184
run_gdpy.bat example.gdpy
3285
```
3386

34-
## Build the standalone installer
87+
Run a file by double-click after installation:
3588

36-
```bat
37-
build_installer_exe.bat
89+
- install GdPy
90+
- double-click a `.gdpy` file if file association was registered successfully
91+
92+
## Example Syntax
93+
94+
Basic output:
95+
96+
```gdpy
97+
say "Hello from GdPy"
3898
```
3999

40-
The built installer is written to:
100+
Variables and expressions:
41101

42-
```text
43-
installer-release\GdPyInstaller.exe
102+
```gdpy
103+
set a = 2
104+
set b = 3
105+
set total = a + b
106+
say total
44107
```
45108

46-
## Installer behavior
109+
Conditions:
47110

48-
- Fixed install path: `%LOCALAPPDATA%\GdPy`
49-
- Modes:
111+
```gdpy
112+
if total > 3:
113+
say "big"
114+
elif total == 3:
115+
say "equal"
116+
else:
117+
say "small"
118+
endif
119+
```
120+
121+
Loops:
122+
123+
```gdpy
124+
set count = 3
125+
while count > 0
126+
say count
127+
sub count 1
128+
endwhile
129+
```
130+
131+
Import modes:
132+
133+
```gdpy
134+
import python
135+
import error
136+
import rights
137+
```
138+
139+
## Installer Behavior
140+
141+
The standalone installer:
142+
143+
- uses a fixed install path: `%LOCALAPPDATA%\GdPy`
144+
- provides three actions:
50145
- Install program
51146
- Repair or update program
52147
- Remove program
53-
- Checks GitHub Releases for newer versions:
54-
- `https://github.com/GdStepan2/GdPy/releases`
148+
- extracts the project payload from inside the EXE
149+
- runs `install.bat` after extraction
150+
- supports uninstall through the installed `uninstall.bat`
55151

56-
## Versioning
152+
The final standalone installer file is:
57153

58-
The project version is stored in `VERSION.txt`.
59-
The installer compares the local version with the latest GitHub release tag, for example:
154+
```text
155+
installer-release\GdPyInstaller.exe
156+
```
157+
158+
## Update Checking
159+
160+
The installer checks GitHub Releases here:
161+
162+
```text
163+
https://github.com/GdStepan2/GdPy/releases
164+
```
165+
166+
It uses the latest release endpoint internally and compares versions numerically.
167+
168+
Examples of valid upgrade detection:
60169

61170
- `1.0` -> `1.0.1`
62171
- `1.0` -> `1.1`
63172
- `1.0` -> `2.0`
173+
- `1.0.9` -> `1.1.0`
174+
- `1.9.9` -> `2.0.0`
175+
176+
Version data is stored in:
177+
178+
```text
179+
VERSION.txt
180+
```
181+
182+
## Building the Standalone Installer
183+
184+
Use:
185+
186+
```bat
187+
build_installer_exe.bat
188+
```
189+
190+
This build process:
191+
192+
1. collects the payload files listed in `installer-exe/payload_manifest.txt`
193+
2. compresses them into an embedded payload archive
194+
3. compiles the installer EXE
195+
4. writes the result into `installer-release/`
196+
197+
## Installation from Source
198+
199+
Console install:
200+
201+
```bat
202+
install.bat
203+
```
204+
205+
Console uninstall:
206+
207+
```bat
208+
uninstall.bat
209+
```
210+
211+
GUI launcher:
212+
213+
```bat
214+
install_gui.bat
215+
```
216+
217+
VBS launcher:
218+
219+
```text
220+
GdPy Installer.vbs
221+
```
222+
223+
## Uninstall Behavior
224+
225+
The uninstall flow currently:
226+
227+
- removes Windows integration
228+
- removes `.venv` if it exists
229+
- removes Python cache directories
230+
- schedules deletion of the installed root folder when uninstall is launched from the standard installed location
231+
232+
## Documentation Files
233+
234+
- `README.md` - English version
235+
- `README.ru.md` - Russian version
236+
- `COMMANDS.txt` - command list
237+
- `INSTALL.txt` - installer notes
238+
239+
## Known Limitations
240+
241+
- the project is Windows-oriented in several installer-related parts
242+
- some script features are intentionally experimental
243+
- direct Python execution is powerful but should be treated carefully
244+
- system integration depends on the local environment and permissions
245+
- update checking depends on GitHub availability
246+
247+
## Safety Note
248+
249+
Because the project includes:
250+
251+
- direct Python execution
252+
- process control
253+
- file operations
254+
- optional admin-rights logic
255+
256+
you should review scripts before running them on a real machine.
257+
258+
## License / Ownership Note
259+
260+
No license file is currently defined in this repository snapshot.
261+
If you want public distribution, add an explicit license file.
64262

65-
## Notes
263+
## Quick Start
66264

67-
- The interpreter itself is Python-based.
68-
- The standalone installer is a Windows `.exe` built with the local C# compiler.
69-
- `install.bat` tries to create `.venv`, and falls back to user Python mode if needed.
265+
1. Open `installer-release/GdPyInstaller.exe`
266+
2. Install to the fixed path
267+
3. Run `example.gdpy`
268+
4. Check `examples/` for more scripts
269+
5. Read `COMMANDS.txt` for supported syntax

0 commit comments

Comments
 (0)