Browse Source

Add a batch script for Windows

  * Also try to make the zip file open faster on Windows

  * Force the Windows batch file to be binary
tags/v0.2.1
Peter J. Jones 1 year ago
parent
commit
10044d1f58
Signed by: Peter Jones <pjones@devalot.com> GPG Key ID: 9DAFAA8D01941E49
4 changed files with 20 additions and 2 deletions
  1. 1
    0
      .gitattributes
  2. 1
    1
      README.md
  3. 1
    1
      default.nix
  4. 17
    0
      start-scripts/windows.cmd

+ 1
- 0
.gitattributes View File

@@ -0,0 +1 @@
start-scripts/windows.cmd binary

+ 1
- 1
README.md View File

@@ -21,7 +21,7 @@ Starting Things Up

- macOS: Double-click the `macos.command` file

- Windows: (cmd file coming soon)
- Windows: Double-click the `windows.cmd` file

- Linux/*BSD: Open a term and use `linux.sh`


+ 1
- 1
default.nix View File

@@ -97,6 +97,6 @@ pkgs.stdenv.mkDerivation rec {
)

# Build archives:
( cd $out && zip -r ${name}.zip ${name} )
( cd $out && zip -9 -y -r -q ${name}.zip ${name} )
'';
}

+ 17
- 0
start-scripts/windows.cmd View File

@@ -0,0 +1,17 @@
@ECHO OFF
SETLOCAL ENABLEEXTENSIONS
PUSHD "%~dp0" >NUL && SET parent=%CD% && POPD >NUL

WHERE node
IF %ERRORLEVEL% NEQ 0 (
START https://nodejs.org/
EXIT
)

CD %parent%\..\src
IF NOT EXIST "node_modules" npm install

START "" /B node bin\server.js
TIMEOUT 2 >NULL
START http://localhost:3000/
PAUSE

Loading…
Cancel
Save