Conversation
Convert protocol templates (HTTP, POST, Redis, SMTP) to raw string literals so backslashes are preserved. Change payload_to_printf to convert actual newlines to literal "\r\n" in the "Escapes" mode. In NcCommandBuilder, convert literal "\r\n" sequences back to real newlines for the payload preview so the GUI shows human-readable output. These tweaks make escaping consistent between storage, formatting, and display.
Replace minimal platform notes with a full Build (Portable / Single-file) guide. Adds per-OS PyInstaller commands and expected outputs for Windows, macOS, and Linux, macOS .icns conversion notes, and system-wide/user install instructions. Also adds the netcat-logo.ico asset used by the examples.
Add icon assets (netcat-logo.ico, netcat-logo.png, netcat-logo.svg) under icons/ and update main.py to load them at startup. The code checks APP_DIR/icons, uses iconbitmap() with the .ico on Windows and PhotoImage + iconphoto() with the .png (keeping a reference in self._icon_img) so the application window shows the app icon across platforms.
Move icon assets into an icons/ subdirectory and update build instructions to match. Update Windows and macOS pyinstaller commands to use icons/netcat-logo.(ico|png), adjust macOS icon conversion steps to read/write from icons/, produce icons/netcat-logo.icns, and clarify the macOS output as dist/nc-command-builder.app.
Update packaging docs to include --add-data for icons (Windows uses "icons;icons", macOS uses "icons:icons"). In code, add RESOURCE_DIR that uses sys._MEIPASS when frozen and switch icon_dir to RESOURCE_DIR/icons so the packaged executable can locate bundled icon resources.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves the build process documentation and enhances cross-platform compatibility and usability for the application, especially regarding resource handling and payload formatting. The most significant changes are grouped by documentation improvements and application functionality updates:
Documentation and Build Process:
build.mdto provide detailed, platform-specific build instructions for Windows, macOS, and Linux, including icon usage and post-build installation steps. Also added guidance for creating.icnsicons for macOS and desktop entries for Linux.Cross-Platform Resource and Icon Handling:
RESOURCE_DIRto correctly locate bundled resources (like icons) when running as a PyInstaller executable, ensuring icons are found on all platforms..icoicons on Windows and.pngicons on other platforms, improving the native look and feel across operating systems.Payload Formatting and Usability:
r"...") for network protocol templates, ensuring escape sequences are handled correctly and consistently.\r\nescape sequences, and when displaying protocol templates, human-readable newlines are shown in the text area for better user experience. [1] [2]