{"id":19369899,"url":"https://github.com/captainzero93/cross-platform-c-compile-github","last_synced_at":"2025-10-30T01:03:04.584Z","repository":{"id":259448354,"uuid":"877906938","full_name":"captainzero93/Cross-platform-C-Compile-Github","owner":"captainzero93","description":"Detects Compiler, automates build in one line","archived":false,"fork":false,"pushed_at":"2024-11-12T17:43:37.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-06T23:44:39.220Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/captainzero93.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-24T12:56:52.000Z","updated_at":"2024-11-12T17:43:41.000Z","dependencies_parsed_at":"2024-10-25T14:31:54.643Z","dependency_job_id":"32a177ff-2eaf-40ab-9273-4ea31322099a","html_url":"https://github.com/captainzero93/Cross-platform-C-Compile-Github","commit_stats":null,"previous_names":["captainzero93/cross-platform-c-compile-github"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captainzero93%2FCross-platform-C-Compile-Github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captainzero93%2FCross-platform-C-Compile-Github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captainzero93%2FCross-platform-C-Compile-Github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captainzero93%2FCross-platform-C-Compile-Github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/captainzero93","download_url":"https://codeload.github.com/captainzero93/Cross-platform-C-Compile-Github/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240492008,"owners_count":19810006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T08:13:41.385Z","updated_at":"2025-10-30T01:03:04.570Z","avatar_url":"https://github.com/captainzero93.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"edit\"a few bugs needs fixing\"\n\n# GitHub C Project Builder\n\nA Python script that automatically downloads and builds C projects from GitHub repositories. Supports multiple build systems including CMake, Make, and Autotools.\n\n## Features\n\n- Automatic build system detection (CMake, Make, Autotools)\n- Cross-platform support (Windows, Linux, macOS)\n- Organized output structure\n- Comprehensive dependency checking\n- Detailed error reporting and troubleshooting guidance\n\n## Prerequisites\n\n### Python Requirements\n\n- Python 3.8 or higher\n- Required packages:\n  ```bash\n  pip install pathlib\n  ```\n\n## Build Tools Installation\n\n### Windows\n\n#### 1. Native Windows Tools\n\n1. **Visual Studio Build Tools**\n   - Download: [Visual Studio Build Tools 2022](https://aka.ms/vs/17/release/vs_buildtools.exe)\n   - During installation, select:\n     - \"Desktop development with C++\"\n     - MSVC Build Tools\n     - Windows 10/11 SDK\n     - C++ CMake tools\n\n2. **CMake**\n   - Download: [CMake](https://cmake.org/download/)\n   - Choose \"Windows x64 Installer\"\n   - During installation, select \"Add CMake to system PATH\"\n\n3. **Git**\n   - Download: [Git for Windows](https://git-scm.com/download/win)\n   - During installation, select \"Add to PATH\"\n\n#### 2. MSYS2 Environment (Required for Make and Autotools on Windows)\nMSYS2 provides Unix-like tools on Windows, including its own package manager called `pacman`.\n\n1. **Download and Install MSYS2**\n   - Download [MSYS2](https://www.msys2.org/)\n   - Run the installer (msys2-x86_64-yyyymmdd.exe)\n   - Complete the installation (default: C:\\msys64)\n\n2. **Install Required Tools**\n   - Open \"MSYS2 MINGW64\" from Start Menu\n   - Run these commands in the MSYS2 terminal:\n     ```bash\n     # Update MSYS2 first\n     pacman -Syu\n     # Close and reopen terminal when prompted\n     pacman -Syu\n\n     # Install MinGW-w64 toolchain and build tools\n     pacman -S --needed mingw-w64-x86_64-toolchain\n     pacman -S --needed mingw-w64-x64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-make mingw-w64-x86_64-autotools\n     pacman -S --needed autoconf automake libtool make\n     ```\n\n3. **Add to System PATH**\n   - Open Windows Settings\n   - Search for \"Environment Variables\"\n   - Edit the \"Path\" variable\n   - Add these paths IN ORDER:\n     ```\n     C:\\msys64\\mingw64\\bin\n     C:\\msys64\\usr\\bin\n     ```\n\n### Linux\n\nChoose the commands for your distribution:\n\n#### Debian/Ubuntu\n```bash\n# Update package list\nsudo apt update\n\n# Install build essentials\nsudo apt install -y build-essential\n\n# Install CMake\nsudo apt install -y cmake\n\n# Install Git\nsudo apt install -y git\n\n# Install Autotools\nsudo apt install -y autoconf automake libtool\n```\n\n#### Fedora/RHEL\n```bash\n# Install development tools\nsudo dnf groupinstall \"Development Tools\"\n\n# Install CMake\nsudo dnf install cmake\n\n# Install Git\nsudo dnf install git\n\n# Install Autotools\nsudo dnf install autoconf automake libtool\n```\n\n#### Arch Linux\n```bash\n# Install development tools\nsudo pacman -S base-devel\n\n# Install CMake\nsudo pacman -S cmake\n\n# Install Git\nsudo pacman -S git\n\n# Install Autotools\nsudo pacman -S autoconf automake libtool\n```\n\n### Verifying Installation\n\n#### Windows\nOpen a new Command Prompt (not MSYS2) and verify:\n```cmd\ngcc --version\nmake --version\ncmake --version\nautoconf --version\nautomake --version\n```\n\n#### Linux\nOpen a terminal and verify:\n```bash\ngcc --version\nmake --version\ncmake --version\nautoconf --version\nautomake --version\n```\n\n## Installation\n\n1. Clone or download this repository:\n   ```bash\n   git clone https://github.com/captainzero93/github-c-builder.git\n   cd github-c-builder\n   ```\n\n2. Make the script executable (Linux/macOS):\n   ```bash\n   chmod +x builder.py\n   ```\n\n## Usage\n\nBasic usage:\n```bash\npython builder.py \u003cgithub_url\u003e [branch]\n```\n\nExample:\n```bash\npython builder.py https://github.com/username/project.git main\n```\n\n### Directory Structure\n\nThe script creates the following directory structure:\n```\ngithub-c-builder/\n├── source/             # Cloned repositories\n│   └── project_name/\n├── build/              # Build files\n│   └── project_name/\n└── output/             # Compiled binaries and libraries\n    └── project_name/\n```\n\n## Troubleshooting\n\n### Windows Common Issues\n\n1. **Command not found errors**\n   - Verify PATH entries are correct\n   - Log out and log back in, or restart computer\n   - Check if binaries exist in the specified directories\n   - Ensure PATH order is correct (mingw64\\bin before usr\\bin)\n\n2. **Visual Studio Build Tools errors**\n   - Verify installation is complete\n   - Try running \"Developer Command Prompt for VS 2022\"\n   - Repair or reinstall Visual Studio Build Tools\n\n3. **MSYS2 issues**\n   - Use \"MSYS2 MINGW64\" for package installation\n   - If updates fail, try `pacman -Syu --needed`\n   - For DLL errors, verify PATH order and MINGW64 packages\n\n4. **CMake configuration fails**\n   - Ensure CMake is in System PATH\n   - Check if the project supports Windows\n   - Try running from \"Developer Command Prompt for VS 2022\"\n\n### Linux Common Issues\n\n1. **Missing dependencies**\n   - Run package manager update (apt update, etc.)\n   - Install build-essential package\n   - Check project-specific dependencies\n\n2. **Permission denied**\n   - Use `sudo` for installation commands\n   - Check file permissions\n   - Ensure write access to output directories\n\n### General Issues\n\n1. **Git clone fails**\n   - Verify internet connection\n   - Check if repository URL is correct\n   - Ensure Git is installed and in PATH\n\n2. **Build system not detected**\n   - Check if project uses supported build system\n   - Verify source files are properly cloned\n   - Look for specific build instructions in project README\n\n## Windows Terminal Choice\n\n1. **For Installing Packages**\n   - Use \"MSYS2 MINGW64\" terminal\n\n2. **For Building Projects**\n   - Use regular Windows Command Prompt or PowerShell\n   - Or use \"Developer Command Prompt for VS 2022\"\n\n3. **When to use \"MSYS2 MSYS\"**\n   - Only if specifically required by a project\n   - Not recommended for general use\n\n## Maintenance\n\n### Windows MSYS2\nUpdate packages regularly:\n```bash\n# In MSYS2 MINGW64 terminal\npacman -Syu\n```\n\n### Linux\nKeep build tools updated:\n```bash\n# Debian/Ubuntu\nsudo apt update \u0026\u0026 sudo apt upgrade\n\n# Fedora\nsudo dnf update\n\n# Arch Linux\nsudo pacman -Syu\n```\n\n## Debugging\n\nWhen errors occur, the builder provides detailed error messages including:\n- Build tool output\n- Git operation results\n- Directory operation status\n- Platform-specific error details\n\nLogs can be found in:\n- Build output in the /build directory\n- CMake configuration logs\n- MSBuild detailed output (Windows)\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Support\n\nIf you encounter any issues or need help:\n1. Check the Troubleshooting section\n2. Open an issue on GitHub\n3. Provide detailed error messages and system information\n\nRemember to always check the project's original documentation for specific build requirements or dependencies.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptainzero93%2Fcross-platform-c-compile-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaptainzero93%2Fcross-platform-c-compile-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptainzero93%2Fcross-platform-c-compile-github/lists"}