Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
gambhiro committed Jan 16, 2023
2 parents b9734e2 + 085da7f commit fea0f57
Show file tree
Hide file tree
Showing 163 changed files with 18,189 additions and 5,878 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/briefcase_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,21 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-12, windows-2022]
python-version: ["3.9"]
os: [ubuntu-22.04]
python-version: ["3.11"]
arch: ["x86_64"]
fail-fast: false
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.11

- name: Install Linux packages
if: runner.os == 'Linux'
Expand All @@ -42,14 +43,15 @@ jobs:
if: runner.os == 'Linux'
uses: jurplel/install-qt-action@v3
with:
version: '6.4.0'
version: '6.4.2'

- name: Install Python pip
run: python -m pip install --upgrade pip

- name: Install Python libs
run: |
python -m pip install --upgrade pip
python -m pip install briefcase
python -m pip install briefcase==0.3.11
python -m pip install MarkupSafe==2.1.1
python -m pip freeze
- name: Linux Create and Build Without Docker
if: runner.os == 'Linux'
Expand All @@ -76,21 +78,21 @@ jobs:
run: briefcase package --no-docker

- name: Upload Artifact for Linux
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: runner.os == 'Linux'
with:
name: simsapa-${{ github.ref_name }}-${{ matrix.os }}.AppImage
path: '**/*.AppImage'

- name: Upload Artifact for MacOS
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: runner.os == 'MacOS'
with:
name: simsapa-${{ github.ref_name }}-${{ matrix.os }}.dmg
name: simsapa-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.dmg
path: '**/*.dmg'

- name: Upload Artifact for Windows
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: runner.os == 'Windows'
with:
name: simsapa-${{ github.ref_name }}-${{ matrix.os }}.msi
Expand Down
37 changes: 27 additions & 10 deletions .github/workflows/pyinstaller_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,52 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022]
python-version: ["3.9"]
os: [macos-12, windows-2022]
python-version: ["3.11"]
arch: ["x86_64"]
fail-fast: false
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.11

- name: Install Python pip
run: python -m pip install --upgrade pip

- name: Install Python libs
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install dmgbuild
pip install -r requirements.txt
- name: Mac Build
if: runner.os == 'MacOS'
run: |
pyinstaller run.py --name "Simsapa Dhamma Reader" --onedir -w --clean --noupx -i "simsapa/assets/icons/appicons/simsapa.ico" --add-data "simsapa/assets:simsapa/assets" --add-data "simsapa/alembic:simsapa/alembic" --add-data "simsapa/alembic.ini:simsapa/alembic.ini" --target-architecture ${{ matrix.arch }} --osx-bundle-identifier 'com.profound-labs.dhamma.simsapa' && dmgbuild -s dmgbuild_settings.py "Simsapa Dhamma Reader" "./dist/Simsapa Dhamma Reader.dmg"
# NOTE: Windows uses \ in paths and expects ; not : in data names
- name: Windows Build
if: runner.os == 'Windows'
run: |
pyinstaller run.py --name "Simsapa Dhamma Reader" --onefile -w --clean --noupx -i "simsapa\assets\icons\appicons\simsapa.icns" --add-data "simsapa\assets;simsapa\assets" --add-data "simsapa\alembic;simsapa\alembic" --add-data "simsapa\alembic.ini;simsapa\alembic.ini"
pyinstaller run.py --name "Simsapa Dhamma Reader" --onedir -w --clean --noupx -i "simsapa\assets\icons\appicons\simsapa.ico" --add-data "simsapa\assets;simsapa\assets" --add-data "simsapa\alembic;simsapa\alembic" --add-data "simsapa\alembic.ini;simsapa\alembic.ini"
- name: Upload Artifact for MacOS
uses: actions/upload-artifact@v3
if: runner.os == 'MacOS'
with:
name: simsapa-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.dmg
path: 'dist/*.dmg'

- name: Upload Artifact for Windows
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: runner.os == 'Windows'
with:
name: simsapa-${{ github.ref_name }}-${{ matrix.os }}-pyinstaller.exe
path: 'dist/Simsapa Dhamma Reader.exe'
name: simsapa-${{ github.ref_name }}-${{ matrix.os }}
path: 'dist/Simsapa Dhamma Reader/'
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ __pycache__/
.coverage
.vscode/

# pyinstaller
# build folders
build/
dist/
dist_nuitka/

# mypy
.mypy_cache/
Expand Down Expand Up @@ -50,3 +51,6 @@ tags
# dotenv environment variables file
.env
.env.test

# MacOS
.DS_Store
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ sass-watch:
tests:
USE_TEST_DATA=true pytest tests/

bootstrap-appdata:
./scripts/bootstrap-appdata.sh
bootstrap-db:
./scripts/bootstrap_db.sh

count-code:
tokei --type Python --exclude simsapa/assets/ --exclude simsapa/keyboard/ . | grep -vE '===|Total'
tokei --type Python --exclude simsapa/layouts/word_scan_popup_borderless.py --exclude simsapa/assets/ --exclude simsapa/keyboard/ . | grep -vE '===|Total'
38 changes: 2 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

A sutta reader and Pali dictionary application.

Project website: <https://simsapa.github.io/>

Short feature demo: <https://vimeo.com/677880749>

![Sutta Search](docs/images/sutta-search-screenshot.jpg)
Expand All @@ -10,39 +12,3 @@ Short feature demo: <https://vimeo.com/677880749>

![Sutta Study](docs/images/sutta-study-screenshot.png)

## Install

Download the latest build from [Releases](https://github.com/simsapa/simsapa/releases/) for Linux (.AppImage), Mac (.dmg) or Windows (.msi).

On the first run, it downloads the application database and fulltext index.

- [Install on Linux](docs/install-linux.md)
- [Install on MacOS](docs/install-macos.md)
- [Install on Windows](docs/install-windows.md)
- [Development: Running from Source](docs/development-running-from-source.md)

## Removing the Application Database

The Simsapa application database (where the suttas, dictionaries, etc. are stored) is not removed when un-installing Simsapa.

Use the terminal to remove the applications local data folder:

**MacOS:**

``` shell
rm -r ~/Library/Application\ Support/simsapa
```

**Linux:**

``` shell
rm -r ~/.local/share/simsapa
```

**Windows:**

``` shell
rmdir /s /q C:\Users\%USERNAME%\AppData\Local\simsapa
```


29 changes: 21 additions & 8 deletions simsapa.spec → Simsapa Dhamma Reader.spec
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,34 @@ pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='simsapa',
exclude_binaries=True,
name='Simsapa Dhamma Reader',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
upx=False,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
target_arch='arm64',
codesign_identity=None,
entitlements_file=None,
icon=['simsapa/assets/icons/appicons/simsapa.ico'],
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=False,
upx_exclude=[],
name='Simsapa Dhamma Reader',
)
app = BUNDLE(
coll,
name='Simsapa Dhamma Reader.app',
icon='simsapa/assets/icons/appicons/simsapa.ico',
bundle_identifier='com.profound-labs.dhamma.simsapa',
)

0 comments on commit fea0f57

Please sign in to comment.