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 @@
1
+start-scripts/windows.cmd binary

+ 1
- 1
README.md View File

@@ -21,7 +21,7 @@ Starting Things Up
21 21
 
22 22
        - macOS: Double-click the `macos.command` file
23 23
 
24
-       - Windows: (cmd file coming soon)
24
+       - Windows: Double-click the `windows.cmd` file
25 25
 
26 26
        - Linux/*BSD: Open a term and use `linux.sh`
27 27
 

+ 1
- 1
default.nix View File

@@ -97,6 +97,6 @@ pkgs.stdenv.mkDerivation rec {
97 97
     )
98 98
 
99 99
     # Build archives:
100
-    ( cd $out && zip -r ${name}.zip ${name} )
100
+    ( cd $out && zip -9 -y -r -q ${name}.zip ${name} )
101 101
   '';
102 102
 }

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

@@ -0,0 +1,17 @@
1
+@ECHO OFF
2
+SETLOCAL ENABLEEXTENSIONS
3
+PUSHD "%~dp0" >NUL && SET parent=%CD% && POPD >NUL
4
+
5
+WHERE node
6
+IF %ERRORLEVEL% NEQ 0 (
7
+  START https://nodejs.org/
8
+  EXIT
9
+)
10
+
11
+CD %parent%\..\src
12
+IF NOT EXIST "node_modules" npm install
13
+
14
+START "" /B node bin\server.js
15
+TIMEOUT 2 >NULL
16
+START http://localhost:3000/
17
+PAUSE

Loading…
Cancel
Save