Skip to content

Instantly share code, notes, and snippets.

@HoriLiu
Last active August 18, 2017 23:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HoriLiu/00c3254184d8146f5c36cfaa7d6867e7 to your computer and use it in GitHub Desktop.
Save HoriLiu/00c3254184d8146f5c36cfaa7d6867e7 to your computer and use it in GitHub Desktop.
Test in Windows 10 x64 only
# Must use administrator privileges in cmd.exe in below instructions.
# Goto https://chocolatey.org/install, find the "Install with cmd.exe"
(copy command text)
# Goto https://nodejs.org/en/download/package-manager/#windows
# Using Chocolatey to install node and npm:
cinst nodejs
# Do you want to run the script?([Y]es/[N]o/[P]rint):
Press "Y"
# Check version can be showed
node -v
npm -v
# Refer to https://github.com/nodejs/node-gyp for installing build tool command as:
npm install --global --production windows-build-tools
#Check python version that must be v2.7.x
python -v
# Download the code or clone the repo (by vsc), i.e.
# Copy git source from https://github.com/pycom/pymakr-vsc.git to X:/Users/YourDir/your-pymakr-vsc-dir
cd /Users/YourDir/your-pymakr-vsc-dir
# npm your packages in "your-pymakr-vsc-dir", then pre-check the build status as below two commands
npm install serialport
npm install electron-rebuild
# copy ./precompiles/serialport-win32 to overwrite ./node_modules/serialport,
# modify install-win.js and check the ./node_modules directory that installed serialport,
# Change file name install-win.js to install.js
npm install.js
# Rebuilding must be "Done" and no error
# Open the folder in vsc for test Extensions in "your-pymakr-vsc-dir"
# Press F1 and execute 'Tasks: Run build task' to run the babel builder (show the copy libs in console)
# Press F5 to run the plugin (opens a new vsc window)
# Check test result no fail
#Publishing Extensions in "your-pymakr-vsc-dir"
npm install -g vsce
#Packaging Extensions in "your-pymakr-vsc-dir"
vsce package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment