diff --git a/.gitignore b/.gitignore index 9770d71..585357f 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ build dll main.js main.js.map +venv .idea npm-debug.log.* diff --git a/README.md b/README.md index 507bbef..ea00b4b 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,80 @@ -# Forcebuy Activator -# Package manager: yarn -# Scripts: +## Requirements + +Install Windows SDK by installing [Visual Studio](https://visualstudio.microsoft.com/ru/downloads/) (requirement of node-gyp, select MS SDK and Classic Console CPP apps in Visual Studio Installer) +Install [Python](https://www.python.org/) +Install pyinstaller pip module globally: + +```bash +pip install pyinstaller +``` + +Install virtualenv pip package globally: + +```bash +pip install virtualenv +``` + +Create a Virtual Environment using “virtualenv” pip module wich was installed at previous step: + +```bash +# write it in root dir +cd src/python +virtualenv venv +``` + +Activate Virtual Environment and install requirements: + +```bash +# write it in src/python dir +source venv/Scripts/activate +pip install -r requirements.txt +``` + +Install node-gyp npm package globally: + +```bash +npm i -g node-gyp +``` + +Install rimraf npm package globally: + +```bash +npm i -g rimraf +``` + +Install concurrently npm package globally: + +```bash +npm i -g concurrently +``` + +Install electron-rebuild npm package globally: + +```bash +npm i -g electron-rebuild +``` + +Install yarn npm package globally: + +```bash +npm i -g yarn +``` + +## Deploy requirements + +Copy github personal token with repo scope from package.json and add it to Windows environment variables as GH_TOKEN. + +Before "yarn deploy" dont forget to bump app version in src/package.json + +## Package manager: yarn + +## Main scripts + ```bash # start yarn start -# package without publish +# package all app without publish yarn package -# package and publish to github +# package all app and publish it to github yarn deploy -``` \ No newline at end of file +``` diff --git a/package.json b/package.json index 39a4842..3d7fd71 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "build": "concurrently \"yarn build:main\" \"yarn build:renderer\" \"yarn build:python\"", "build:main": "cross-env NODE_ENV=production webpack --config ./.erb/configs/webpack.config.main.prod.babel.js", "build:renderer": "cross-env NODE_ENV=production webpack --config ./.erb/configs/webpack.config.renderer.prod.babel.js", - "build:python": "pyinstaller --noconsole --noconfirm --clean --hidden-import flask --distpath ./python --icon ./assets/icon.ico ./src/python/app.py", + "build:python": "pyinstaller --noconsole --noconfirm --clean --hidden-import flask --distpath ./python --paths ./src/python/venv/Lib/site-packages --icon ./assets/icon.ico ./src/python/app.py", "rebuild": "electron-rebuild --parallel --types prod,dev,optional --module-dir src", "lint": "cross-env NODE_ENV=development eslint . --cache --ext .js,.jsx,.ts,.tsx", "package": "rimraf src/dist && yarn build && electron-builder build --win --publish never", diff --git a/src/python/__pycache__/app.cpython-39.pyc b/src/python/__pycache__/app.cpython-39.pyc new file mode 100644 index 0000000..00cef2b Binary files /dev/null and b/src/python/__pycache__/app.cpython-39.pyc differ diff --git a/src/python/requirements.txt b/src/python/requirements.txt new file mode 100644 index 0000000..eb06b54 --- /dev/null +++ b/src/python/requirements.txt @@ -0,0 +1,5 @@ +Flask +flask-cors +requests +pywinauto +flask_limiter \ No newline at end of file