-
Notifications
You must be signed in to change notification settings - Fork 284
Add AGENTS.md (comprehensive agent guide) #1490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,91 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Repository Guidelines | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## Dos and Don’ts | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Do ensure Lazarus is discoverable: set `LAZARUS_DIR` for `make`, or pass `--lazarusdir` to `lazbuild` as in our scripts. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Do keep `.pas` and `.lfm` changes synchronized through Lazarus; update `lang/transgui.template` plus locale files together. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Do run only the CI steps relevant to touched files, mirroring the commands in `.travis.yml`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Don’t edit generated artifacts such as `Makefile` or commit outputs under `Release/`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Don’t modify third-party sources in `synapse/` or bundled libraries in `setup/win/openssl/` unless you are porting an upstream fix. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## Project Structure and Module Organization | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Transmission Remote GUI is a Lazarus/Free Pascal desktop client for Transmission’s RPC API. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `transgui.lpi`, `transgui.lpr`, and the root `.pas`/`.lfm` pairs implement the application UI and logic. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `lang/` contains key-value locale files; `transgui.template` is the canonical English resource. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `synapse/` bundles the Synapse networking library; treat it as vendor code. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `setup/` hosts packaging assets for Unix, macOS, and Windows builds (e.g., `unix/build.sh`, `macosx/create_app_new.sh`, `win/make_zipdist.bat`). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `snap/` stores `snapcraft.yaml` and the desktop entry used for Snap builds. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `.github/workflows/` and `.travis.yml` define automation; `VERSION.txt`, `history.txt`, and the various README files document releases. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## Build, Test, and Development Commands | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Install Lazarus (≥2.2.6) and FPC (≥3.2.2); most scripts assume `lazbuild` is on PATH or pointed to by `LAZARUS_DIR`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Core workflow | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `cat VERSION.txt` shows the release number consumed by build scripts. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `./setup/unix/debian-ubuntu-install_deps.sh` installs Debian/Ubuntu prerequisites (requires sudo and network access). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `LAZARUS_DIR=/usr/lib/lazarus/default/ lazbuild -B transgui.lpi` regenerates Lazarus resources before compiling. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `LAZARUS_DIR=/usr/lib/lazarus/default/ make -j$(nproc) all` builds the desktop binary without packaging; expect `transgui` (or `transgui.exe`) in the repository root. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `LAZARUS_DIR=/usr/lib/lazarus/default/ make -j$(nproc) zipdist` builds the Linux zip bundle into `Release/`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+30
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The example path
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `./setup/unix/build.sh` produces compressed txz releases and temporarily rewrites `about.lfm`; the script restores the backup at the end. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `make clean` (with `LAZARUS_DIR` set) removes generated objects after a build. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+29
to
+35
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `./setup/unix/debian-ubuntu-install_deps.sh` installs Debian/Ubuntu prerequisites (requires sudo and network access). | |
| - `LAZARUS_DIR=/usr/lib/lazarus/default/ lazbuild -B transgui.lpi` regenerates Lazarus resources before compiling. | |
| - `LAZARUS_DIR=/usr/lib/lazarus/default/ make -j$(nproc) all` builds the desktop binary without packaging; expect `transgui` (or `transgui.exe`) in the repository root. | |
| - `LAZARUS_DIR=/usr/lib/lazarus/default/ make -j$(nproc) zipdist` builds the Linux zip bundle into `Release/`. | |
| - `./setup/unix/build.sh` produces compressed txz releases and temporarily rewrites `about.lfm`; the script restores the backup at the end. | |
| - `make clean` (with `LAZARUS_DIR` set) removes generated objects after a build. | |
| #### Linux | |
| - `./setup/unix/debian-ubuntu-install_deps.sh` installs Debian/Ubuntu prerequisites (requires sudo and network access). | |
| - `export LAZARUS_DIR=/usr/lib/lazarus/default/` (or set to your Lazarus installation path). | |
| - `lazbuild -B transgui.lpi` regenerates Lazarus resources before compiling. | |
| - `make -j$(nproc) all` builds the desktop binary without packaging; expect `transgui` in the repository root. | |
| - `make -j$(nproc) zipdist` builds the Linux zip bundle into `Release/`. | |
| - `./setup/unix/build.sh` produces compressed txz releases and temporarily rewrites `about.lfm`; the script restores the backup at the end. | |
| - `make clean` removes generated objects after a build. | |
| #### macOS | |
| - `export LAZARUS_DIR=/Library/Lazarus/` (or set to your Lazarus installation path). | |
| - `lazbuild -B transgui.lpi` regenerates Lazarus resources before compiling. | |
| - `make all` builds the desktop binary; expect `transgui` in the repository root. | |
| - `setup/macosx/create_app_new.sh [/Library/Lazarus/]` emits a signed DMG and resets `about.lfm` afterward. | |
| - `make clean` removes generated objects after a build. | |
| #### Windows | |
| - Set `LAZARUS_DIR` to your Lazarus installation path. | |
| - Use `lazbuild -B transgui.lpi` to regenerate Lazarus resources before compiling. | |
| - Use `make all` to build the desktop binary; expect `transgui.exe` in the repository root. | |
| - `setup/win/make_zipdist.bat <lazarus_dir>` creates the Windows portable zip and optionally compresses `transgui.exe` with UPX. | |
| - `setup/win/make_setup.bat <lazarus_dir> "<Inno Setup dir>"` builds the Windows installer, honoring an optional `CODECERT` for signing. | |
| - `setup/win/install_deps.bat` bootstraps Chocolatey-based dependencies (run in an elevated Windows shell). | |
| - `make clean` removes generated objects after a build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prompt for AI agents
Address the following comment on AGENTS.md at line 40:
<comment></comment>
<file context>
@@ -0,0 +1,91 @@
+
+- `setup/win/make_zipdist.bat <lazarus_dir>` creates the Windows portable zip and optionally compresses `transgui.exe` with UPX.
+- `setup/win/make_setup.bat <lazarus_dir> "<Inno Setup dir>"` builds the Windows installer, honoring an optional `CODECERT` for signing.
+- `setup/win/install_deps.bat` bootstraps Chocolatey-based dependencies (run in an elevated Windows shell).
+- `setup/macosx/create_app_new.sh [/Library/Lazarus/]` emits a signed DMG and resets `about.lfm` afterward.
+- `snapcraft` (run from the repository root) packages the app using `snap/snapcraft.yaml`.
</file context>
✅ Addressed in 2d710e6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of -it in the docker run command is for interactive sessions. For automation and CI/CD pipelines, it's generally better to run containers in a non-interactive mode. Using -it can sometimes cause issues or hang a script if it's expecting input. I suggest removing it to make the command more robust for automation.
| - `docker run -it --rm -v "$(pwd)":/sh -w /sh peterdavehello/shfmt:3.4.0 shfmt -sr -i 2 -l -w -ci .` formats shell scripts like the Travis job. | |
| - `docker run --rm -v "$(pwd)":/sh -w /sh peterdavehello/shfmt:3.4.0 shfmt -sr -i 2 -l -w -ci .` formats shell scripts like the Travis job. |
Copilot
AI
Sep 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] This statement about "No automated Pascal tests are present" could become outdated if tests are added in the future. Consider rephrasing to "Currently no automated Pascal tests are present" or similar to indicate this is the current state.
| - No automated Pascal tests are present; perform manual regression on features affected (torrent list, dialogs, localization paths). | |
| - Currently, no automated Pascal tests are present; perform manual regression on features affected (torrent list, dialogs, localization paths). |
Uh oh!
There was an error while loading. Please reload this page.