[IMP] mobile home installation and run

This commit is contained in:
Mathieu Benoit 2025-10-01 03:01:00 -04:00
parent 2400f4e6be
commit b14dc7a082
10 changed files with 85 additions and 0 deletions

1
.gitignore vendored
View file

@ -49,3 +49,4 @@ screenshots
screencasts
private/todo/todo_override_private.json
.erplibre.error.txt
/mobile/technolibre_home_mobile/

View file

@ -0,0 +1,3 @@
"filepath"
manifest/git_manifest_erplibre.xml
manifest/git_manifest_mobile_home.xml
1 filepath
2 manifest/git_manifest_erplibre.xml
3 manifest/git_manifest_mobile_home.xml

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<manifest>
<remote name="TechnoLibre" fetch="https://github.com/TechnoLibre/" />
<project
name="technolibre_home_mobile.git"
path="mobile/technolibre_home_mobile"
remote="TechnoLibre"
revision="main"
groups="mobile"
/>
</manifest>

19
mobile/compile_and_run.sh Executable file
View file

@ -0,0 +1,19 @@
#!/usr/bin/env bash
if [[ ! -d "./mobile/technolibre_home_mobile" ]]; then
echo "Please, run installation ./mobile/install_mobile_dev.sh before run this script ./mobile/compile_and_run.sh"
exit 1
fi
if [[ ! -d "./mobile/technolibre_home_mobile/technolibre_home" ]]; then
echo "Please, check repo is working."
exit 1
fi
cd mobile/technolibre_home_mobile/technolibre_home
npm install
npm run build && npx cap sync
npx cap run android
cd -

4
mobile/install_and_run.sh Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
mobile/install_mobile_dev.sh
mobile/compile_and_run.sh

5
mobile/install_mobile_dev.sh Executable file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
./script/install/install_erplibre.sh
./script/install/install_git_repo.sh
./script/manifest/update_manifest_local_mobile.sh

View file

@ -20,6 +20,9 @@ _logger = logging.getLogger(__name__)
DEFAULT_PATH_MANIFEST_CONF = os.path.join("conf", "git_manifest.csv")
DEFAULT_PATH_MANIFEST_MOBILE_CONF = os.path.join(
"conf", "git_manifest_mobile.csv"
)
DEFAULT_PATH_MANIFEST_ODOO_CONF = os.path.join("conf", "git_manifest_odoo.csv")
DEFAULT_PATH_MANIFEST_PRIVATE_CONF = os.path.join(
"private", "default_git_manifest.csv"
@ -59,6 +62,11 @@ def get_config():
parser.add_argument(
"--with_OCA", action="store_true", help="Add OCA manifest"
)
parser.add_argument(
"--with_mobile",
action="store_true",
help="Add mobile project manifest",
)
args = parser.parse_args()
return args
@ -117,6 +125,10 @@ def main():
if os.path.exists(path_manifest_odoo_version):
lst_input.append(path_manifest_odoo_version)
elif config.with_mobile:
append_file_path_manifest(
lst_input, DEFAULT_PATH_MANIFEST_MOBILE_CONF
)
else:
append_file_path_manifest(lst_input, DEFAULT_PATH_MANIFEST_CONF)
append_file_path_manifest(

View file

@ -3,3 +3,4 @@
python3 -m venv .venv.erplibre
source .venv.erplibre/bin/activate
pip3 install -r requirement/erplibre_require-ments.txt
npm install

View file

@ -0,0 +1,23 @@
#!/usr/bin/env bash
. ./env_var.sh
#EL_MANIFEST_PROD="./default.xml"
#EL_MANIFEST_DEV="./manifest/default.dev.xml"
# Update git-repo
git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose &
DAEMON_PID=$!
if [ -L "$EL_MANIFEST_DEV" ]; then
MANIFEST_TARGET=$(readlink -f "$EL_MANIFEST_DEV")
else
MANIFEST_TARGET="$EL_MANIFEST_DEV"
fi
# Generate local manifest
.venv.erplibre/bin/python ./script/git/git_merge_repo_manifest.py --output .repo/local_manifests/erplibre_manifest.xml --with_mobile
.venv.erplibre/bin/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --verify HEAD) -m ${MANIFEST_TARGET} "$@"
.venv.erplibre/bin/repo sync -c -j $(nproc --all) -v -m ${MANIFEST_TARGET}
kill ${DAEMON_PID}

View file

@ -323,6 +323,11 @@ class TODO:
"w: Install all Odoo version with ERPLibre",
"make install_odoo_all_version",
),
"m": (
"m",
"m: ERPLibre with mobile home",
"./mobile/install_and_run.sh",
),
"0": (
"0",
"0: Quitter",