From e9a1994d43b0518ae21d33cd40247a397db9b4fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AD=E3=81=93=20=E7=99=BD=E3=81=84?= Date: Sun, 11 Feb 2024 23:59:39 +0700 Subject: [PATCH] update docs --- CONTRIBUTING | 18 --------------- CONTRIBUTING.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 51 ++++++++++++++++++++++++++++++----------- 3 files changed, 99 insertions(+), 31 deletions(-) delete mode 100644 CONTRIBUTING create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING b/CONTRIBUTING deleted file mode 100644 index 47549c578..000000000 --- a/CONTRIBUTING +++ /dev/null @@ -1,18 +0,0 @@ -This directory contains various GNU tools for Windows, including -binutils , busybox, cppcheck, ctags, expat, gcc/g++, gdb, libiconv, -make, mingw-64, mpc, mpfr, nasm, PDCurses, vim. - -Each directory (except the one started with dot(.) - these folders -are main and admin folder) contains tools, with its own COPYRIGHT, -assigned with various developers. These folder must be reserved, -except in maintaince, for building the binaries. - -See https://github.com/tfsmetadata/gnu-windows/issues for reporting -issues. Note please describe your issue as much detail as possible. - -Copyright years on source files may be listed using range notation, -e.g., 1987-2012, indicating that every year in the range, inclusive, -is a copyrightable year that could otherwise be listed individually. - -For updating repo, try script in folder `.admin`. Don't forget to -delete the layout and move extracted layout from that folder. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..88f02382d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,61 @@ +# CONTRIBUTING + +## Unchangable folders + +Except the following folders, these unlisted folder should not be changed, in any circumstances, because these are originally created by GNU, and should be stored in there as the rest-overs. + +* `.admin` - Admin folder, for further changing in the repo +* `.github` - Containing GitHub related files and actions. +* `.gnu-windows` - Including sources and build instruction. May can change to compatible with the installation +* `.gitattributes`, `.gitignore`, `*.md`, `dockerfile`, and `LICENSE` are all generated by GitHub Actions workflows or manually written. + +## Changes in repo layout and updating versions and tools + +For in repo layout and updating versions and tools, please run `.admin/run_admin.sh` with changes variables. + +Once it's done, make sure you move all extracted folders into the main repo, remove all compressed files and also update versioning, paths, and build instruction in `.gnu-windows/build.sh` + +## Building the repo + +> :warning: Warning +> +> Because an unknown error detected in Windows Subsystem for Linux, we recommend you building the repo in Linux, or using Docker Desktop within Hyper-V. + +### Building within Docker + +You need to run the pre-defined Docker image, mounting your cloned GitHub repo into, and build from that. + +Replace `` with your real path to the local repo. Double-quote is needed is there are spaces in your path. + +```shell +docker run -it -v :/root shiroinekotfs/gnu-windows:latest bash +``` + +Once you're in the `bash`, try this command: + +```shell +/root/.gnu-windows/build.sh +``` + +Once it's done, you'll see your GNU application is building in folder `.gnu-windows\bootstrap` + +### Building within Linux + +Make sure you've installed all of these packages before building GNU Windows + +```bash +autotools-dev binutils binutils-x86-64-linux-gnu cmake-data cpp cpp-12 fakeroot +fontconfig-config fonts-dejavu-core g++-12 gcc-12 libalgorithm-diff-perl libalgorithm-diff-xs-perl +libalgorithm-merge-perl libaom3 libarchive13 libasan8 libatomic1 libbinutils libbrotli1 libc-dev-bin +libc-devtools libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 libcurl4 libde265-0 libdeflate0 +libdpkg-perl libexpat1 libfakeroot libfile-fcntllock-perl libfl2 libfontconfig1 libfreetype6 +libgcc-12-dev libgd3 libgmpxx4ldbl libgomp1 libheif1 libitm1 libjbig0 libjsoncpp25 liblsan0 +libnghttp2-14 libnsl-dev libnsl2 libnuma1 libpng16-16 libpsl5 libquadmath0 librhash0 librtmp1 +libssh2-1 libstdc++-12-dev libtirpc-dev libtsan2 libubsan1 libuv1 libwebp7 libx11-6 libx11-data +libx265-199 libxau6 libxcb1 libxdmcp6 libxml2 libxpm4 libyuv0 linux-libc-dev manpages-dev patch +publicsuffix rpcsvc-proto unzip autoconf automake bison build-essential cmake curl dpkg-dev flex +g++ gcc libfl-dev libgmp-dev libmpc-dev libmpfr-dev m4 make wget zip texinfo pkg-config python3 +python3-pip python3-venv file mingw-w64-x86-64-dev mingw-w64-i686-dev mingw-w64-tools +``` + +Just run the `/.gnu-windows/build.sh` directly, without changing the current console directory. Don't forget to use `chmod` command. diff --git a/README.md b/README.md index 0fa58e6a1..bc2c12ad2 100644 --- a/README.md +++ b/README.md @@ -28,28 +28,53 @@ All exclusive documents, you can try search for yourself on over the Internet. ## Getting started -### Pre-building +### Building GNU Windows -You may need to install these packages before installing. Recommend to build and install on Ubuntu 22.04 +#### Building within Docker + +You need to run the pre-defined Docker image, mounting your cloned GitHub repo into, and build from that. + +Replace `` with your real path to the local repo. Double-quote is needed is there are spaces in your path. ```shell -sudo apt install -y build-essential curl libgmp-dev libmpc-dev libmpfr-dev m4 zip wget +docker run -it -v :/root shiroinekotfs/gnu-windows:latest bash ``` -### Build from source (GitHub) - -You must run the configuration within Linux configuration. Once it's done, the folder `.gnu-windows/bootstrap` is your binaries. You can use it. +Once you're in the `bash`, try this command: -```bash -chmod +x .gnu-windows/build.sh -.gnu-windows/build.sh +```shell +/root/.gnu-windows/build.sh ``` -### (For admins) Update source layout +Once it's done, you'll see your GNU application is building in folder `.gnu-windows\bootstrap` + +#### Building within Linux -Run the configuration in `.admin`. Once it's done, move all extracted to the repo folder. Don't forget to delete the old layout before moving! +Make sure you've installed all of these packages before building GNU Windows ```bash -chmod +x .admin/download_and_extract.sh -.admin/download_and_extract.sh +autotools-dev binutils binutils-x86-64-linux-gnu cmake-data cpp cpp-12 fakeroot +fontconfig-config fonts-dejavu-core g++-12 gcc-12 libalgorithm-diff-perl libalgorithm-diff-xs-perl +libalgorithm-merge-perl libaom3 libarchive13 libasan8 libatomic1 libbinutils libbrotli1 libc-dev-bin +libc-devtools libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 libcurl4 libde265-0 libdeflate0 +libdpkg-perl libexpat1 libfakeroot libfile-fcntllock-perl libfl2 libfontconfig1 libfreetype6 +libgcc-12-dev libgd3 libgmpxx4ldbl libgomp1 libheif1 libitm1 libjbig0 libjsoncpp25 liblsan0 +libnghttp2-14 libnsl-dev libnsl2 libnuma1 libpng16-16 libpsl5 libquadmath0 librhash0 librtmp1 +libssh2-1 libstdc++-12-dev libtirpc-dev libtsan2 libubsan1 libuv1 libwebp7 libx11-6 libx11-data +libx265-199 libxau6 libxcb1 libxdmcp6 libxml2 libxpm4 libyuv0 linux-libc-dev manpages-dev patch +publicsuffix rpcsvc-proto unzip autoconf automake bison build-essential cmake curl dpkg-dev flex +g++ gcc libfl-dev libgmp-dev libmpc-dev libmpfr-dev m4 make wget zip texinfo pkg-config python3 +python3-pip python3-venv file mingw-w64-x86-64-dev mingw-w64-i686-dev mingw-w64-tools ``` + +Just run the `/.gnu-windows/build.sh` directly, without changing the current console directory. Don't forget to use `chmod` command. + +### Contributing + +Read the instruction [here](CONTRIBUTING.md) + +## License + +This project is linked with GNU GPL 3.0 License. With no restriction in distriution and reuse. + +GNU Windows is made by team of TheFlightSims - Department of Research.