diff options
author | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2022-04-30 22:56:53 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-01 03:56:53 +0000 |
commit | 766ed654ba785cfe11e6ee8714fcb1199e073977 (patch) | |
tree | 7e18d54ee9498c80d2bf2863ac1a56898ee47793 /scripts/build-windows.ps1 | |
parent | Fix issue where 'macos-notification-state' was being loaded in non-macos (diff) | |
download | ferdium-app-766ed654ba785cfe11e6ee8714fcb1199e073977.tar.gz ferdium-app-766ed654ba785cfe11e6ee8714fcb1199e073977.tar.zst ferdium-app-766ed654ba785cfe11e6ee8714fcb1199e073977.zip |
Remove native compilation ('python', 'node-gyp') since we no longer have such dependencies (#73)
Diffstat (limited to 'scripts/build-windows.ps1')
-rw-r--r-- | scripts/build-windows.ps1 | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/scripts/build-windows.ps1 b/scripts/build-windows.ps1 index c871d0507..9f770dea1 100644 --- a/scripts/build-windows.ps1 +++ b/scripts/build-windows.ps1 | |||
@@ -1,7 +1,7 @@ | |||
1 | # INTRO: | 1 | # INTRO: |
2 | # This file is used to build ferdium on windows. | 2 | # This file is used to build ferdium on windows. |
3 | # It also handles any corrupted node modules with the 'CLEAN' env var (set it to 'true' for cleaning) | 3 | # It also handles any corrupted node modules with the 'CLEAN' env var (set it to 'true' for cleaning) |
4 | # It will install the system dependencies except for node and python (which are still verified) | 4 | # It will install the system dependencies except for node (which is still verified) |
5 | # I sometimes symlink my 'recipes' folder so that any changes that I need to do in it can also be committed and pushed independently | 5 | # I sometimes symlink my 'recipes' folder so that any changes that I need to do in it can also be committed and pushed independently |
6 | # This file can live anywhere in your PATH | 6 | # This file can live anywhere in your PATH |
7 | 7 | ||
@@ -40,8 +40,7 @@ Function Test-CommandExists { Param ($command, $1) | |||
40 | # Check for installed programmes | 40 | # Check for installed programmes |
41 | Test-CommandExists node "Node is not installed" | 41 | Test-CommandExists node "Node is not installed" |
42 | Test-CommandExists npm "npm is not installed" | 42 | Test-CommandExists npm "npm is not installed" |
43 | Test-CommandExists python "Python is not installed" | 43 | # TODO: Needs proper way to check MSVS Build Tools |
44 | # NEEDS proper way to CHECK MSVS Tools | ||
45 | 44 | ||
46 | # Check node version | 45 | # Check node version |
47 | $EXPECTED_NODE_VERSION = (cat .nvmrc) | 46 | $EXPECTED_NODE_VERSION = (cat .nvmrc) |
@@ -68,7 +67,6 @@ if ($env:CLEAN -eq "true") | |||
68 | $NPM_PATH = "$USERHOME\AppData\Roaming\npm\node_modules" | 67 | $NPM_PATH = "$USERHOME\AppData\Roaming\npm\node_modules" |
69 | $NPM_CACHE1_PATH = "$USERHOME\AppData\Local\npm-cache" | 68 | $NPM_CACHE1_PATH = "$USERHOME\AppData\Local\npm-cache" |
70 | $NPM_CACHE2_PATH = "$USERHOME\AppData\Roaming\npm-cache" | 69 | $NPM_CACHE2_PATH = "$USERHOME\AppData\Roaming\npm-cache" |
71 | $NODE_GYP = "$USERHOME\AppData\Local\node-gyp" | ||
72 | $ELECTRON_GYP = "$USERHOME\.electron-gyp" | 70 | $ELECTRON_GYP = "$USERHOME\.electron-gyp" |
73 | 71 | ||
74 | Write-Host "Cleaning!" | 72 | Write-Host "Cleaning!" |
@@ -88,7 +86,6 @@ if ($env:CLEAN -eq "true") | |||
88 | Remove-Item -Path $NPM_PATH -Recurse -ErrorAction SilentlyContinue | 86 | Remove-Item -Path $NPM_PATH -Recurse -ErrorAction SilentlyContinue |
89 | Remove-Item -Path $NPM_CACHE1_PATH -Recurse -ErrorAction SilentlyContinue | 87 | Remove-Item -Path $NPM_CACHE1_PATH -Recurse -ErrorAction SilentlyContinue |
90 | Remove-Item -Path $NPM_CACHE2_PATH -Recurse -ErrorAction SilentlyContinue | 88 | Remove-Item -Path $NPM_CACHE2_PATH -Recurse -ErrorAction SilentlyContinue |
91 | Remove-Item -Path $NODE_GYP -Recurse -ErrorAction SilentlyContinue | ||
92 | Remove-Item -Path $ELECTRON_GYP -Recurse -ErrorAction SilentlyContinue | 89 | Remove-Item -Path $ELECTRON_GYP -Recurse -ErrorAction SilentlyContinue |
93 | 90 | ||
94 | git -C recipes clean -fxd # Clean recipes folder/submodule | 91 | git -C recipes clean -fxd # Clean recipes folder/submodule |
@@ -97,15 +94,6 @@ if ($env:CLEAN -eq "true") | |||
97 | 94 | ||
98 | # ----------------------------------------------------------------------------- | 95 | # ----------------------------------------------------------------------------- |
99 | # Ensure that the system dependencies are at the correct version - fail if not | 96 | # Ensure that the system dependencies are at the correct version - fail if not |
100 | # Check python version | ||
101 | $EXPECTED_PYTHON_VERSION = "3.10.4" | ||
102 | $ACTUAL_PYTHON_VERSION = (python --version).trim("Python ") | ||
103 | if ([System.Version]$ACTUAL_PYTHON_VERSION -ne [System.Version]$EXPECTED_PYTHON_VERSION) { | ||
104 | fail_with_docs "You are not running the expected version of Python! | ||
105 | expected: [$EXPECTED_PYTHON_VERSION] | ||
106 | actual : [$ACTUAL_PYTHON_VERSION]" | ||
107 | } | ||
108 | |||
109 | # TODO: Needs proper way to check MSVS Tools | 97 | # TODO: Needs proper way to check MSVS Tools |
110 | # Check MSVS Tools through MSVS_VERSION | 98 | # Check MSVS Tools through MSVS_VERSION |
111 | $EXPECTED_MSVST_VERSION = "2015" | 99 | $EXPECTED_MSVST_VERSION = "2015" |