mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-28 19:00:03 -05:00
a0c08bbdf3
* try installing on Windows * Handle windows setup - no browser detection on windows yet, just placeholder code - symlink types * add appveyor file * add appveyor windows build * use execa to run server unit tests * run server unit tests on appveyor * ignore root install errors * upgrade rebuild-node-sass and work on Json unit test that fails on Windows * print npm version before installing, commented out caching node modules in the root * a few small tweaks for windows support * fix bin-up in launcher project use bin-up@1.1.0 for windows support, close #491 * cli: build script on Windows, close #492 * cli: build errors are fatal * use cross-env in extension Fixes environment variables on Windows in #490 * extension: fix 3 tests on Windows 1 more broken test remaining * extension: use EOL before comparing text * example: update test for Windows * example: replace build.sh with build.js Close #488 * remove trailing whitespace * cli: build script again * server: work on unit tests for windows * binary: add windows as build platform * windows: try building binary started work on building on CI for windows
53 lines
1000 B
CoffeeScript
53 lines
1000 B
CoffeeScript
os = require("os")
|
|
path = require("path")
|
|
|
|
distPath = "dist/Cypress"
|
|
|
|
execPath = {
|
|
darwin: "Cypress.app/Contents/MacOS/Cypress"
|
|
freebsd: "Cypress"
|
|
linux: "Cypress"
|
|
win32: "Cypress.exe"
|
|
}
|
|
|
|
resourcesPath = {
|
|
darwin: "Cypress.app/Contents/Resources"
|
|
freebsd: "resources"
|
|
linux: "resources"
|
|
win32: "resources"
|
|
}
|
|
|
|
unknownPlatformErr = ->
|
|
throw new Error("Unknown platform: '#{os.platform()}'")
|
|
|
|
normalize = (paths...) ->
|
|
path.join(__dirname, "..", paths...)
|
|
|
|
module.exports = {
|
|
getPathToDist: (paths...) ->
|
|
paths = [distPath].concat(paths)
|
|
|
|
normalize(paths...)
|
|
|
|
getPathToExec: ->
|
|
p = execPath[os.platform()] ? unknownPlatformErr()
|
|
|
|
@getPathToDist(p)
|
|
|
|
getPathToResources: (paths...) ->
|
|
p = resourcesPath[os.platform()] ? unknownPlatformErr()
|
|
|
|
p = [].concat(p, paths)
|
|
|
|
@getPathToDist(p...)
|
|
|
|
getPathToVersion: ->
|
|
@getPathToDist("version")
|
|
|
|
getSymlinkType: ->
|
|
if os.platform() == "win32"
|
|
"junction"
|
|
else
|
|
"dir"
|
|
}
|