Skip to content

Commit 1d78706

Browse files
committed
Merge branch 'master' into GPII-1108
Conflicts: gpii/node_modules/WindowsUtilities/WindowsUtilities.js
2 parents a425552 + 0889aed commit 1d78706

File tree

981 files changed

+2218
-209666
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

981 files changed

+2218
-209666
lines changed

.eslintrc.json

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"env": {
3+
"node": true
4+
},
5+
"rules": {
6+
"block-scoped-var": "error",
7+
"comma-style": [
8+
"error",
9+
"last"
10+
],
11+
"curly": [
12+
"error",
13+
"all"
14+
],
15+
"dot-notation": [
16+
"error",
17+
{
18+
"allowKeywords": false
19+
}
20+
],
21+
"eol-last": "error",
22+
"eqeqeq": [
23+
"error",
24+
"allow-null"
25+
],
26+
"indent": ["error", 4],
27+
"new-cap": ["error", { "properties": false }],
28+
"no-caller": "error",
29+
"no-cond-assign": [
30+
"error",
31+
"except-parens"
32+
],
33+
"no-debugger": "error",
34+
"no-empty": ["error", {"allowEmptyCatch": true}],
35+
"no-eval": "error",
36+
"no-extend-native": "error",
37+
"no-irregular-whitespace": "error",
38+
"no-iterator": "error",
39+
"no-loop-func": "error",
40+
"no-multi-str": "error",
41+
"no-new": "error",
42+
"no-proto": "error",
43+
"no-script-url": "error",
44+
"no-sequences": "error",
45+
"no-trailing-spaces": "error",
46+
"no-undef": "error",
47+
"no-unused-vars": "error",
48+
"no-with": "error",
49+
"quotes": [
50+
"error",
51+
"double"
52+
],
53+
"semi": [
54+
"error",
55+
"always"
56+
],
57+
"space-before-blocks": ["error", "always"],
58+
"space-before-function-paren": ["error", {"anonymous": "always", "named": "never"}],
59+
"space-infix-ops": "error",
60+
"space-unary-ops": [
61+
"error", {
62+
"words": true,
63+
"nonwords": false,
64+
"overrides": {
65+
"typeof": false
66+
}
67+
}],
68+
"strict": ["error", "safe"],
69+
"valid-typeof": "error",
70+
"wrap-iife": [
71+
"error",
72+
"inside"
73+
]
74+
}
75+
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/node_modules/
2+
.vagrant
3+
**/test/*.exe

.jshintrc

Lines changed: 0 additions & 32 deletions
This file was deleted.

Gruntfile.js

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,30 @@
1-
/*!
1+
/*
22
GPII Windows Personalization Framework Gruntfile
3+
Copyright 2013-2014 OCAD University
34
4-
Copyright 2014 RTF-US
5+
Licensed under the Educational Community License (ECL), Version 2.0 or the New
6+
BSD license. You may not use this file except in compliance with one these
7+
Licenses.
58
6-
Licensed under the New BSD license. You may not use this file except in
7-
compliance with this License.
8-
9-
You may obtain a copy of the License at
10-
https://github.com/gpii/universal/LICENSE.txt
9+
You may obtain a copy of the ECL 2.0 License and BSD License at
10+
https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
1111
*/
1212

1313
"use strict";
1414

1515
module.exports = function (grunt) {
16-
grunt.loadNpmTasks("grunt-contrib-jshint");
17-
grunt.loadNpmTasks("grunt-jsonlint");
18-
grunt.loadNpmTasks("grunt-shell");
19-
grunt.loadNpmTasks("grunt-gpii");
20-
21-
var gpiiGrunt = grunt.config.getRaw("gpiiGruntGlobal");
16+
2217
grunt.initConfig({
23-
jshint: {
24-
src: ["gpii/**/*.js", "tests/**/*.js", "index.js", "gpii.js"],
25-
buildScripts: ["Gruntfile.js"],
26-
options: {
27-
jshintrc: true
28-
}
18+
eslint: {
19+
src: ["./gpii/**/*.js", "./tests/**/*.js", "./*.js"]
2920
},
3021
jsonlint: {
31-
src: ["gpii/**/*.json", "tests/**/*.json"]
22+
src: ["gpii/**/*.json", "tests/**/*.json", "examples/**/*.json"]
3223
}
3324
});
3425

35-
grunt.registerTask("build", "Build the entire GPII", function () {
36-
grunt.task.run("gpii-universal");
37-
});
26+
grunt.loadNpmTasks("grunt-jsonlint");
27+
grunt.loadNpmTasks("fluid-grunt-eslint");
3828

39-
grunt.registerTask("start", "Start the GPII", function () {
40-
gpiiGrunt.shellImmediate({
41-
name: "start",
42-
command: "node gpii.js"
43-
});
44-
});
29+
grunt.registerTask("lint", "Apply jshint and jsonlint", ["eslint", "jsonlint"]);
4530
};

README.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,28 @@ Windows 7 SP1 and Windows 8 SP2) unless the following hotfix from Microsoft is a
99

1010
See http://issues.gpii.net/browse/GPII-49 for more details of this issue.
1111

12-
# Grunt Builds
12+
# Building
1313

14-
We are in the process of adding support for building and running utility tasks
15-
with grunt.js. At some point these will replace the current build scripts.
14+
This package depends on the node 4.x LTS infrastructure - at the time of writing, node 4.4.1 and npm 2.1.14.
1615

17-
To use these, you must be running a recent version of npm, necessarily greater
18-
than 1.4. If you need to upgrade npm you can issue the following command:
19-
20-
npm install -g npm
21-
22-
To build the GPII for Windows using grunt, perform the following:
16+
To build the GPII for Windows, perform the following:
2317

2418
git clone https://github.com/GPII/windows.git
2519
cd windows
26-
npm install --ignore-scripts=true
27-
grunt build
28-
29-
Note that whenever you run the `npm install` task for this project, you must use the option appearing above.
20+
npm install
3021

31-
# Old Builds
22+
# Test VM
3223

33-
This project is still bundled with command-line build scripts (with the same effect as the above grunt builds) - support for these
34-
will be withdrawn soon. You can operate these as follows:
24+
It is possible to provision a Windows VM for testing purposes. Please ensure you have met [these VM requirements](https://github.com/GPII/qi-development-environments/#requirements) before proceeding. After that you can use the ``vagrant up`` command to create an instance of a [Windows 10 Evaluation VM](https://github.com/idi-ops/packer-windows) which will boot an instance of the Windows 10 VM, pull in the GPII Framework's npm dependencies, and then build it.
3525

26+
If this is your first time creating this VM an 8 GB download will take place. The downloaded image will be valid for 90 days after which the Windows installation will no longer be useable. To remove an expired image you can use the ``vagrant box remove "inclusivedesign/windows10-eval"`` command.
3627

37-
* `build.cmd` will check out GPII's universal project https://github.com/GPII/universal in a subdirectory.
38-
* `start.cmd` will run the GPII personalisation system
28+
Once the VM has finished booting up you will need to type the ``vagrant reload`` command to cause it to restart. This is required so changes made to the Windows VM's ``PATH`` environment variable as part of the provisioning process are available in terminal sessions. This step is a temporary workaround and will be removed in the near future.
3929

30+
Now you can open a command prompt window and use the following commands to test the framework:
4031

32+
```
33+
cd c:\vagrant
34+
node tests\UnitTests.js
35+
node tests\AcceptanceTests.js builtIn
36+
```

Vagrantfile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
Vagrant.require_version ">= 1.8.0"
5+
6+
# By default this VM will use 2 processor cores and 2GB of RAM. The 'VM_CPUS' and
7+
# "VM_RAM" environment variables can be used to change that behaviour.
8+
cpus = ENV["VM_CPUS"] || 2
9+
ram = ENV["VM_RAM"] || 2048
10+
11+
Vagrant.configure(2) do |config|
12+
13+
config.vm.box = "inclusivedesign/windows10-eval"
14+
config.vm.guest = :windows
15+
16+
config.vm.communicator = "winrm"
17+
config.winrm.username = "vagrant"
18+
config.winrm.password = "vagrant"
19+
config.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct:true
20+
config.vm.network :forwarded_port, guest: 5985, host: 5985, id: "rdp", auto_correct:true
21+
22+
config.vm.provider :virtualbox do |vm|
23+
vm.gui = true
24+
vm.customize ["modifyvm", :id, "--memory", ram]
25+
vm.customize ["modifyvm", :id, "--cpus", cpus]
26+
vm.customize ["modifyvm", :id, "--vram", "256"]
27+
vm.customize ["modifyvm", :id, "--accelerate3d", "off"]
28+
vm.customize ["modifyvm", :id, "--audio", "null", "--audiocontroller", "hda"]
29+
vm.customize ["modifyvm", :id, "--ioapic", "on"]
30+
vm.customize ["setextradata", "global", "GUI/SuppressMessages", "all"]
31+
end
32+
33+
config.vm.provision "shell", inline: <<-SHELL
34+
choco upgrade firefox googlechrome -y
35+
SHELL
36+
37+
config.vm.provision "shell", path: "provisioning/chocolatey-packages.bat"
38+
config.vm.provision "shell", path: "provisioning/npm-packages.bat"
39+
config.vm.provision "shell", path: "provisioning/build.bat"
40+
41+
end

build.cmd

Lines changed: 0 additions & 20 deletions
This file was deleted.

clean.cmd

Lines changed: 0 additions & 3 deletions
This file was deleted.

gpii.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* https://github.com/GPII/universal/blob/master/LICENSE.txt
1515
*/
1616

17+
"use strict";
1718

1819
var fluid = require("universal"),
1920
gpii = fluid.registerNamespace("gpii");

0 commit comments

Comments
 (0)