VSCode tasks optimized for Windows and Linux

This commit is contained in:
Profitroll 2023-01-27 15:34:20 +01:00
parent c4813d62c8
commit 76defcea2f
14 changed files with 47 additions and 9 deletions

29
.vscode/tasks.json vendored
View File

@ -6,13 +6,23 @@
{
"label": "Clean up",
"type": "shell",
"command": "./.vscode/tasks/cleanup.bat",
"windows": {
"command": "./.vscode/tasks/windows/cleanup.bat"
},
"linux": {
"command": "./.vscode/tasks/linux/cleanup.sh"
},
"problemMatcher": []
},
{
"label": "Build",
"type": "shell",
"command": "./.vscode/tasks/build.bat",
"windows": {
"command": "./.vscode/tasks/windows/build.bat"
},
"linux": {
"command": "./.vscode/tasks/linux/build.sh"
},
"problemMatcher": [],
"group": {
"kind": "build",
@ -20,15 +30,22 @@
}
},
{
"label": "Test EXE",
"label": "Test",
"type": "shell",
"command": "./.vscode/tasks/test_exe.bat",
"windows": {
"command": "./.vscode/tasks/windows/test.bat"
},
"linux": {
"command": "./.vscode/tasks/linux/test.sh"
},
"problemMatcher": []
},
{
"label": "Configure Setup.exe",
"label": "Configure Setup",
"type": "shell",
"command": "./.vscode/tasks/configure_setup.bat",
"windows": {
"command": "./.vscode/tasks/windows/configure_setup.bat"
},
"problemMatcher": []
},
]

View File

@ -1 +0,0 @@
rmdir /S /Q dist\app && .\buildenv\scripts\activate && pyinstaller app.spec --noconfirm

View File

@ -1 +0,0 @@
.\dist\InstallForge\install_forge.ifp

6
.vscode/tasks/linux/build.sh vendored Normal file
View File

@ -0,0 +1,6 @@
#/bin/bash
rm -rf dist/linux/app
buildenv/bin/activate
pyinstaller app.spec --noconfirm

4
.vscode/tasks/linux/cleanup.sh vendored Normal file
View File

@ -0,0 +1,4 @@
#/bin/bash
python -Bc "import pathlib; [p.unlink() for p in pathlib.Path('.').rglob('*.py[co]')]"
python -Bc "import pathlib; [p.rmdir() for p in pathlib.Path('.').rglob('__pycache__')]"

View File

@ -0,0 +1,3 @@
#/bin/bash
# .\dist\InstallForge\install_forge.ifp

4
.vscode/tasks/linux/test.sh vendored Normal file
View File

@ -0,0 +1,4 @@
#/bin/bash
cd dist/linux/app
./StardewSync

View File

@ -1 +0,0 @@
cd .\dist\app && .\StardewSync.exe

4
.vscode/tasks/windows/build.bat vendored Normal file
View File

@ -0,0 +1,4 @@
rmdir /S /Q dist\windows\app
.\buildenv\scripts\activate
pyinstaller app.spec --noconfirm

View File

@ -0,0 +1 @@
.\dist\windows\install_forge.ifp

2
.vscode/tasks/windows/test.bat vendored Normal file
View File

@ -0,0 +1,2 @@
cd dist\windows\app
.\StardewSync.exe

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB