Skip to content

Commit

Permalink
Merge main into unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlaltf24 committed Dec 7, 2024
2 parents 0dacd7a + 4b8f5ed commit 2522382
Show file tree
Hide file tree
Showing 73 changed files with 8,198 additions and 4,157 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/autobuild-main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build & release to test-builds repo
name: Auto-build & release to test-builds repo
on:
push:
branches:
Expand All @@ -22,12 +22,13 @@ jobs:
name: ${{ needs.build.outputs.bin_name }}
- name: Run shell tasks
run: |
echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
find -name LogosLinuxInstaller -type f -exec chmod +x {} \;
find -name oudedetai -type f -exec chmod +x {} \;
- name: Upload release to test repo
uses: softprops/action-gh-release@v1
with:
tag_name: main-${{ env.DATE }}-${{ needs.build.outputs.sha_short }}
tag_name: main-latest
# target_commitish: ${{ needs.build.outputs.sha }}
body: ''
prerelease: true
files: ${{ needs.build.outputs.bin_name }}
repository: FaithLife-Community/test-builds
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
bin_name:
description: "name of built binary"
value: ${{ jobs.build.outputs.bin_name }}
sha:
value: ${{ github.sha }}
sha_short:
description: "1st few chars of commit SHA"
value: ${{ jobs.build.outputs.sha_short }}
Expand Down Expand Up @@ -47,19 +49,17 @@ jobs:
run: |
# apt-get install python3-tk
pip install --upgrade pip
pip install -r requirements.txt
pip install coverage
pip install pyinstaller
pip install .[build,test]
- name: Build with pyinstaller
id: pyinstaller
run: |
pyinstaller LogosLinuxInstaller.spec --clean
echo "bin_name=LogosLinuxInstaller" >> $GITHUB_OUTPUT
./scripts/build-binary.sh
echo "bin_name=oudedetai" >> $GITHUB_OUTPUT
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: LogosLinuxInstaller
path: dist/LogosLinuxInstaller
name: oudedetai
path: dist/oudedetai
compression-level: 0
2 changes: 1 addition & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: download
uses: actions/download-artifact@v4
with:
name: LogosLinuxInstaller
name: oudedetai
- name: release
uses: softprops/action-gh-release@v1
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
name: ${{ needs.build.outputs.bin_name }}
- name: Fix file permissions
run: |
find -name LogosLinuxInstaller -type f
find -name LogosLinuxInstaller -type f -exec chmod +x {} \;
find -name oudedetai -type f
find -name oudedetai -type f -exec chmod +x {} \;
- name: Upload release to test repo
uses: softprops/action-gh-release@v1
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ env/
venv/
.venv/
.idea/
*.egg-info
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,54 @@
# Changelog

- 4.0.0-beta.4
- Fix #220 [N. Shaaban]
- 4.0.0-beta.3
- Fix various regressions from beta (e.g., #209, #213) [N. Shaaban]
- Fix #191 [N. Shaaban]
- 4.0.0-beta.2
- Fix #171 [N. Marti]
- Fix #185 [N. Marti]
- 4.0.0-beta.1
- Migrate .config and logs from `~/.config/Logos_on_Linux` and `~/.local/state/Logos_on_Linux` to `~/.config/FaithLife-Community` and `~/.local/state/FaithLife-Community`
- Add Logos State Manager [T. H. Wright, N. Marti]
- Numerous bug fixes [N. Marti, ctrlaltf24]
- Make config.WINE_EXE dynamic [T. H. Wright]
- Add Docker Build File [jimbob88]
- Fix numerous TUI issues [T. H. Wright]
- Fix #16 [T. H. Wright]
- Fix #84 [T. H. Wright]
- Fix #106 [T. H. Wright]
- Fix #127 [T. H. Wright]
- Fix #128 [T. H. Wright]
- Fix #142 [T. H. Wright]
- Fix #143 [T. H. Wright]
- Fix #153 [T. H. Wright]
- Fix #157 [T. H. Wright]
- Fix #181 [T. H. Wright]
- Fix #188 [T. H. Wright]
- 4.0.0-alpha.14
- Fix install routine [N. Marti, T. H. Wright]
- Fix #144, #154, #156
- 4.0.0-alpha.13
- Fix #22. [T. Bleher, J. Goodman, N. Marti, S. Freilichtbuenhe, M. Malevic, T. H. Wright]
- Fix package installer and TUI app. Also fix #135, #136, #140. [T. H. Wright, N. Marti]
- Introduce network.py and system.py
- 4.0.0-alpha.12
- Fix TUI app's installer [T. H. Wright]
- 4.0.0-alpha.11
- Fix #124 [T. H. Wright]
- 4.0.0-alpha.10
- Fix #121 [T. H. Wright]
- Prep for Logos 30+ support [N. Marti, T. H. Wright]
- 4.0.0-alpha.9
- Fix #42 [T. H. Wright]
- Fix #76, #104, #111, #115 [T. H. Wright]
- 4.0.0-alpha.8
- Fix #1 [T. H. Wright, N. Marti, T. Bleher, C. Reeder]
- Fix #102 [T. H. Wright]
- Fix #110 [N. Marti]
- 4.0.0-alpha.7
- Various fixes [N. Marti]
- 4.0.0-alpha.6
- Hotfix to get correct LOGOS_EXE value after installation [N. Marti]
- 4.0.0-alpha.5
Expand Down
100 changes: 100 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Contributor Documentation

## Installing/running from Source (for developers)

You can clone the repo and install the app from source. To do so, you will need to ensure a few prerequisites:
1. Install build dependencies
2. Clone this repository
3. Build/install Python 3.12 and Tcl/Tk
4. Set up a virtual environment

### Install build dependencies

e.g. for debian-based systems:
```
sudo apt-get install git build-essential gdb lcov pkg-config \
libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \
libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \
lzma lzma-dev python3-tk tk-dev uuid-dev zlib1g-dev
```
*See Python's [Build dependencies](https://devguide.python.org/getting-started/setup-building/index.html#build-dependencies) section for further info.*

### Clone this repository
```
git clone 'https://github.com/FaithLife-Community/LogosLinuxInstaller.git'
```

### Install Python 3.12 and Tcl/Tk
Your system might already include Python 3.12 built with Tcl/Tk. This will verify
the installation:
```
$ python3 --version
Python 3.12.5
$ python3 -m tkinter # should open a basic Tk window
```
If your Python version is < 3.12, then you might want to install 3.12 and tcl/tk
using your system's package manager or compile it from source using the
following guide or the script provided in `scripts/ensure-python.sh`. This is
because the app is built using 3.12 and might have errors if run with other
versions.

**Install & build python 3.12 using the script:**
```
./LogosLinuxInstaller/scripts/ensure-python.sh
```

**Install & build python 3.12 manually:**
```
$ ver=$(wget -qO- https://www.python.org/ftp/python/ | grep -oE '3\.12\.[0-9]+' | sort -u | tail -n1)
$ wget "https://www.python.org/ftp/python/${ver}/Python-${ver}.tar.xz"
$ tar xf Python-${ver}.tar.xz
$ cd Python-${ver}
Python-3.12$ ./configure --prefix=/opt --enable-shared
Python-3.12$ make
Python-3.12$ sudo make install
Python-3.12$ LD_LIBRARY_PATH=/opt/lib /opt/bin/python3.12 --version
Python 3.12.5
$ cd ~
```
Both methods install python into `/opt` to avoid interfering with system python installations.

### Enter the repository folder
```
$ cd LogosLinuxInstaller
LogosLinuxInstaller$
```

### Set up and use a virtual environment
Use the following guide or the provided script at `scripts/ensure-venv.sh` to set
up a virtual environment for running and/or building locally.

**Using the script:**
```
./scripts/ensure-venv.sh
```

**Manual setup:**

```
LogosLinuxInstaller$ LD_LIBRARY_PATH=/opt/lib /opt/bin/python3.12 -m venv env # create a virtual env folder called "env" using python3.12's path
LogosLinuxInstaller$ echo "LD_LIBRARY_PATH=/opt/lib" >> env/bin/activate # tell python where to find libs
LogosLinuxInstaller$ echo "export LD_LIBRARY_PATH" >> env/bin/activate
LogosLinuxInstaller$ source env/bin/activate # activate the env
(env) LogosLinuxInstaller$ python --version # verify python version
Python 3.12.5
(env) LogosLinuxInstaller$ python -m tkinter # verify that tkinter test window opens
(env) LogosLinuxInstaller$ pip install -r .[build] # install python packages
(env) LogosLinuxInstaller$ python -m ou_dedetai.main --help # run the script
```

### Building using docker

```bash
$ git clone 'https://github.com/FaithLife-Community/LogosLinuxInstaller.git'
$ cd LogosLinuxInstaller
# docker build -t logosinstaller .
# docker run --rm -v $(pwd):/usr/src/app logosinstaller
```

The built binary will now be in `./dist/oudedetai`.

33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# syntax=docker.io/docker/dockerfile:1.7-labs

FROM ubuntu:focal

# Prevent popups during install of requirements
ENV DEBIAN_FRONTEND=noninteractive

# App Requirements
RUN apt-get update -qq \
&& apt-get install -y -qq git build-essential gdb lcov pkg-config \
libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \
libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \
lzma lzma-dev python3-tk tk-dev uuid-dev zlib1g-dev \
curl \
&& rm -rf /var/lib/apt/lists/*

# pyenv for guaranteed py 3.12
ENV HOME="/root"
WORKDIR ${HOME}
RUN curl https://pyenv.run | bash
ENV PYENV_ROOT="${HOME}/.pyenv"
ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PATH}"

# Ensure tkinter
ENV PYTHON_CONFIGURE_OPTS "--enable-shared"

# install py 3.12
ENV PYTHON_VERSION=3.12.6
RUN pyenv install --verbose ${PYTHON_VERSION}
RUN pyenv global ${PYTHON_VERSION}

WORKDIR /usr/src/app
ENTRYPOINT ["sh", "-c", "pip install --no-cache-dir .[build] && pyinstaller ou_dedetai.spec"]
Loading

0 comments on commit 2522382

Please sign in to comment.