Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion install_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,22 @@ if (!$?) {
exit
}


$git_url = "https://github.com/git-for-windows/git/releases/download/v2.39.2.windows.1/Git-2.39.2-64-bit.exe"
if ($args[0] -eq "--gitee") {
$git_url = "https://registry.npmmirror.com/-/binary/git-for-windows/v2.39.2.windows.1/Git-2.39.2-64-bit.exe"
}
if (!(Test-Command git)) {
echo "Git not installed. Will install Git."
echo "Installing git."
winget install --id Git.Git -e --source winget
if (!$?) {
echo "Can't find winget cmd, Will install git 2.39.2."
echo "downloading git."
wget -O Git64.exe $git_url
echo "Please install git. when install done, close the current terminal and run this script again."
cmd /c Git64.exe /quiet PrependPath=1
exit
}
}

$PIP_SOURCE = "https://pypi.org/simple"
Expand Down
4 changes: 2 additions & 2 deletions package.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@
Return('group')
'''


import codecs
class PackageOperation:
pkg = None

def parse(self, filename):
with open(filename, "r") as f:
with codecs.open(filename, "r", encoding='utf-8') as f:
json_str = f.read()

if json_str:
Expand Down
1 change: 1 addition & 0 deletions pkgs.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python $HOME/.env/tools/scripts/env.py package $args
1 change: 1 addition & 0 deletions touch_env.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ if (!(Test-Path -Path $env_dir)) {
echo 'source "$PKGS_DIR/packages/Kconfig"' | Out-File -FilePath $env_dir/packages/Kconfig -Encoding ASCII
git clone $ENV_URL $env_dir/tools/scripts
echo '$env:path="$HOME\.env\tools\scripts;$env:path"' > $env_dir/env.ps1
echo '$env:pathext=".PS1;$env:pathext"' >> $env_dir/env.ps1
}