Create windows conda installer
To create Openvibe installer
For Linux and Mac, step 1 is sufficient. For Windows, go all the way
- create a recipe for openvibe and publish it
- install conda-lock, condansis if needed
mamba install -c conda-forge conda-lock condansis
- create a file environment.yml (with openvibe package in it)
conda-lock -f environment.yml -p win-64
- look at https://github.com/guilhermebs/CondaNSIS/tree/main/example/script
"""
This example creates and environment based in a conda-lock file (https://github.com/conda-incubator/conda-lock)
"""
import os
import condansis
if __name__ == "__main__":
this_dir = os.path.dirname(__file__)
# instantiate Installer
installer = condansis.Installer(
package_name="snake-simulator",
package_root=this_dir,
package_version="0.2",
include=["snake.py"],
install_root_package=False, # do not run pip install in the package root
env_file=os.path.join(this_dir, "conda-win-64.lock"),
conda_command="conda" # To use a conda-lock file, we need to overwrite the default ("conda-env")
)
# Create a shortcut in the install directory to run
# $PYTHON $INSTDIR\snake.py
# where $PYTHON is the path to the interpreter after installation
installer.add_shortcut(
shortcut_name=os.path.join("$INSTDIR", "snake.lnk"),
target_file="$PYTHON",
parameters=os.path.join("$INSTDIR", "snake.py"),
)
# Create the installer
installer.create()