diff --git a/.github/workflows/build-binary.yml b/.github/workflows/build-binary.yml index 35deaa64a..7adf61866 100644 --- a/.github/workflows/build-binary.yml +++ b/.github/workflows/build-binary.yml @@ -25,12 +25,15 @@ jobs: pip install --no-deps -r requirements.txt pip install -r requirements.txt --no-cache-dir - - name: Build Binary (Linux/Mac) - if: runner.os != 'Windows' - run: pyinstaller --onedir --contents-directory "." core.py --dist ./dist/output/${{ inputs.name }} --collect-submodules pyreadstat --add-data=$pythonLocation/lib/python3.12/site-packages/xmlschema/schemas:xmlschema/schemas --add-data=resources/cache:resources/cache --add-data=resources/templates:resources/templates --add-data=resources/schema:resources/schema --add-data=tests/resources/datasets:tests/resources/datasets --add-data=resources/jsonata:resources/jsonata + - name: Build Binary (Linux) + if: runner.os == 'Linux' + run: pyinstaller --onedir --contents-directory "." core.py --icon=resources/assets/CORE_logo_sm.ico --dist ./dist/output/${{ inputs.name }} --collect-submodules pyreadstat --add-data=$pythonLocation/lib/python3.12/site-packages/xmlschema/schemas:xmlschema/schemas --add-data=resources/cache:resources/cache --add-data=resources/templates:resources/templates --add-data=resources/schema:resources/schema --add-data=tests/resources/datasets:tests/resources/datasets --add-data=resources/jsonata:resources/jsonata + - name: Build Binary (Mac) + if: runner.os == 'macOS' + run: pyinstaller --onedir --contents-directory "." core.py --icon=resources/assets/CORE_logo_sm.icns --dist ./dist/output/${{ inputs.name }} --collect-submodules pyreadstat --add-data=$pythonLocation/lib/python3.12/site-packages/xmlschema/schemas:xmlschema/schemas --add-data=resources/cache:resources/cache --add-data=resources/templates:resources/templates --add-data=resources/schema:resources/schema --add-data=tests/resources/datasets:tests/resources/datasets --add-data=resources/jsonata:resources/jsonata - name: Build Binary (Windows) if: runner.os == 'Windows' - run: pyinstaller --onedir --contents-directory "." core.py --dist ./dist/output/${{ inputs.name }} --collect-submodules pyreadstat --add-data="$env:pythonLocation\Lib\site-packages\xmlschema\schemas;xmlschema/schemas" --hidden-import numpy --hidden-import numpy.core._methods --hidden-import numpy.lib.format --add-data="resources/cache;resources/cache" --add-data="resources/templates;resources/templates" --add-data="resources/schema;resources/schema" --add-data="tests/resources/datasets;tests/resources/datasets" --add-data="resources/jsonata;resources/jsonata" + run: pyinstaller --onedir --contents-directory "." core.py --icon=resources/assets/CORE_logo_sm.ico --dist ./dist/output/${{ inputs.name }} --collect-submodules pyreadstat --add-data="$env:pythonLocation\Lib\site-packages\xmlschema\schemas;xmlschema/schemas" --hidden-import numpy --hidden-import numpy.core._methods --hidden-import numpy.lib.format --add-data="resources/cache;resources/cache" --add-data="resources/templates;resources/templates" --add-data="resources/schema;resources/schema" --add-data="tests/resources/datasets;tests/resources/datasets" --add-data="resources/jsonata;resources/jsonata" - name: Archive Binary uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/build_version.yml b/.github/workflows/build_version.yml index 1f253a445..1066e9001 100644 --- a/.github/workflows/build_version.yml +++ b/.github/workflows/build_version.yml @@ -32,6 +32,7 @@ jobs: pyinstaller --onedir \ --contents-directory "." \ core.py \ + --icon=resources/assets/CORE_logo_sm.ico \ --dist ./dist/output/core-ubuntu-22.04 \ --collect-submodules pyreadstat \ --add-data="resources/cache:resources/cache" \ @@ -81,7 +82,7 @@ jobs: # run: | # python core.py update-cache # - name: Build Binary (Windows) -# run: pyinstaller --onedir --contents-directory "." core.py --dist ./dist/output/core-windows --collect-submodules pyreadstat --add-data="resources/cache;resources/cache" --add-data="resources/templates;resources/templates" --add-data="resources/schema;resources/schema" --add-data="tests/resources/datasets;tests/resources/datasets" --add-data="resources/jsonata;resources/jsonata" +# run: pyinstaller --onedir --contents-directory "." core.py --icon=resources/assets/CORE_logo_sm.ico --dist ./dist/output/core-windows --collect-submodules pyreadstat --add-data="resources/cache;resources/cache" --add-data="resources/templates;resources/templates" --add-data="resources/schema;resources/schema" --add-data="tests/resources/datasets;tests/resources/datasets" --add-data="resources/jsonata;resources/jsonata" # - name: Prepare executable (Windows) # shell: pwsh # run: | @@ -129,6 +130,7 @@ jobs: # pyinstaller --onedir \ # --contents-directory "." \ # core.py \ +# --icon=resources/assets/CORE_logo_sm.icns \ # --dist ./dist/output/core-macos \ # --collect-submodules pyreadstat \ # --add-data="resources/cache:resources/cache" \ diff --git a/Dockerfile.build b/Dockerfile.build index 257fef419..a809a4e47 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -27,6 +27,7 @@ RUN python3.12 -m pip install --upgrade pip && \ RUN pyinstaller --onedir \ --contents-directory "." \ core.py \ + --icon=resources/assets/CORE_logo_sm.ico \ --dist ./dist/output/core-ubuntu-22.04 \ --collect-submodules pyreadstat \ --add-data="resources/cache:resources/cache" \ diff --git a/README.md b/README.md index 8dcc80d60..98f538d6d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![](https://www.cdisc.org/themes/custom/cdiscd8/logo.svg)](https://www.cdisc.org) +[![](./resources/assets/CORE_logo_sm.png)](https://www.cdisc.org) [![](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3120) [![](https://img.shields.io/pypi/v/cdisc-rules-engine.svg)](https://pypi.org/project/cdisc-rules-engine) [![](https://img.shields.io/docker/v/cdiscdocker/cdisc-rules-engine?label=docker)](https://hub.docker.com/r/cdiscdocker/cdisc-rules-engine) @@ -477,11 +477,15 @@ NOTE: if you have multiple versions of python on your machine, you can call pyth **Linux** -`pyinstaller core.py --add-data=venv/lib/python3.12/site-packages/xmlschema/schemas:xmlschema/schemas --add-data=resources/cache:resources/cache --add-data=resources/templates:resources/templates --add-data=resources/jsonata:resources/jsonata` +`pyinstaller core.py --icon=resources/assets/CORE_logo_sm.ico --add-data=venv/lib/python3.12/site-packages/xmlschema/schemas:xmlschema/schemas --add-data=resources/cache:resources/cache --add-data=resources/templates:resources/templates --add-data=resources/jsonata:resources/jsonata` + +**Mac** + +`pyinstaller core.py --icon=resources/assets/CORE_logo_sm.icns --add-data=venv/lib/python3.12/site-packages/xmlschema/schemas:xmlschema/schemas --add-data=resources/cache:resources/cache --add-data=resources/templates:resources/templates --add-data=resources/jsonata:resources/jsonata` **Windows** -`pyinstaller core.py --add-data=".venv/Lib/site-packages/xmlschema/schemas;xmlschema/schemas" --add-data="resources/cache;resources/cache" --add-data="resources/templates;resources/templates" --add-data="resources/jsonata;resources/jsonata"` +`pyinstaller core.py --icon=resources/assets/CORE_logo_sm.ico --add-data=".venv/Lib/site-packages/xmlschema/schemas;xmlschema/schemas" --add-data="resources/cache;resources/cache" --add-data="resources/templates;resources/templates" --add-data="resources/jsonata;resources/jsonata"` _Note .venv should be replaced with path to python installation or virtual environment_ diff --git a/resources/assets/CORE_logo_sm.icns b/resources/assets/CORE_logo_sm.icns new file mode 100644 index 000000000..8f3fd195d Binary files /dev/null and b/resources/assets/CORE_logo_sm.icns differ diff --git a/resources/assets/CORE_logo_sm.ico b/resources/assets/CORE_logo_sm.ico new file mode 100644 index 000000000..9173607e8 Binary files /dev/null and b/resources/assets/CORE_logo_sm.ico differ diff --git a/resources/assets/CORE_logo_sm.png b/resources/assets/CORE_logo_sm.png new file mode 100644 index 000000000..cb9e58fb5 Binary files /dev/null and b/resources/assets/CORE_logo_sm.png differ