diff --git a/.gitignore b/.gitignore index 2089f4fb..382b6d9d 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ FUSION_CONFIG.js FUSION_CONFIG.*.js !FUSION_CONFIG.sample.js .jira-prefix +.project +installer/Output \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d345996..f628c239 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # CHANGELOG -## 1.2.0 - Cersei's Iron Tiara +## 1.3.0 - Pikachu's Invisible Tiara +**New Features** +* Added a Windows packaged build, you can now run View on Windows +* Improved performance by minifying builds by default and turning off page change animations +* You can now specify which port View runs on +* Introduced developer mode, which allows you to develop with unminified build objects, just ```npm run start-dev``` + +## 1.2.0 - Cersei's Iron Tiara - June 30, 2016 **New Features** * Now support range facet type * Add multi select faceting, meaning you can facet on multiple items within a single query diff --git a/FUSION_CONFIG.sample.js b/FUSION_CONFIG.sample.js index c979150f..902d5e9e 100644 --- a/FUSION_CONFIG.sample.js +++ b/FUSION_CONFIG.sample.js @@ -21,10 +21,13 @@ appConfig = { //eslint-disable-line * To use https set the https server key and certificate. And set use_https to true. */ host: 'http://localhost', - port:'8764', + port: '8764', proxy_allow_self_signed_cert: false, // Only turn on if you have a self signed proxy in front of fusion. + // The port from which View will be served. defaults to 3000. + server_port: 3000, + // Serve View via https. // use_https: true, // https: { diff --git a/README.md b/README.md index 8d1c1289..16d75fde 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ You can also use View as the basis for developing a more sophisticated Web interface, using Foundation for Apps: http://foundation.zurb.com/apps/docs/ - If you need help setting up Fusion, see https://doc.lucidworks.com/. + If you need help setting up Fusion, see https://doc.lucidworks.com/. To ask questions about View, see the [Lucidworks View Q&A](https://support.lucidworks.com/hc/en-us/community/topics/200922728-Lucidworks-View-Q-A) site. ## Requirements @@ -74,6 +74,14 @@ To run the compiling process once, without watching any files, use the `build` c ```bash npm run build ``` +this command creates a built version of View which can be copied from the build folder to another folder/machine and served on your own webserver. + +For development purposes, you can develop without a minified build by using the command +```bash +npm run start-dev +``` + +this command runs a node server, with minimized packages, and works similarly to the `npm start` command. ## Unit testing @@ -102,6 +110,10 @@ Templates for various UI components are located in client/assets/components. Search results from different document types can use different templates. The `client/assets/components/document` directory contains templates for some common document types, plus default templates for all others. Data types correspond to Connectors in Fusion. See [Customizing Documents](docs/Customizing_Documents.md) for details about working with these. +## View on Windows + + Download the latest view installer from and run it **as an administrator**. + ## What's Next For more details about configuring and customizing View, see the [docs](docs/) directory. @@ -109,22 +121,3 @@ For more details about configuring and customizing View, see the [docs](docs/) d ## Contributions View is open source! Pull requests welcome. This is a great way to give back to the community and help others build a better search app. - -## Building the the tar.gz dist - -``` - npm install - bower install - gulp build - gulp cook - gulp package -``` - -Or if you don't have node on your path, you can do something like: - -~/Downloads/node-v5.2.0-linux-x64/bin/npm install -~/Downloads/node-v5.2.0-linux-x64/bin/node bower install -~/Downloads/node-v5.2.0-linux-x64/bin/node node_modules/gulp/bin/gulp.js build --buildTarget=linux -~/Downloads/node-v5.2.0-linux-x64/bin/node node_modules/gulp/bin/gulp.js cook --buildTarget=linux -~/Downloads/node-v5.2.0-linux-x64/bin/node node_modules/gulp/bin/gulp.js package --buildTarget=linux - diff --git a/bower.json b/bower.json index 41dfbd70..417f6c45 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "lucidworks-view", - "version": "1.2.0", + "version": "1.3.0", "authors": [ "Lucidworks" ], diff --git a/client/assets/js/services/LocalParamService.js b/client/assets/js/services/LocalParamService.js index 2b2fbc3b..a8dbdeff 100644 --- a/client/assets/js/services/LocalParamService.js +++ b/client/assets/js/services/LocalParamService.js @@ -37,9 +37,9 @@ //extract the current fq key var curFilterKey = str.substring(0, _.indexOf(str, ':')); //extract the current fq values applied - var curFilterValue = str.substring(_.indexOf(str, '(')+1, _.indexOf(str, ')')); + var curFilterValue = str.substring(_.indexOf(str, '(')+1, _.lastIndexOf(str, ')')); //extract the values of the new filter value which will be joined to the existing filter value with an OR - var newValue = values.substring(_.indexOf(values, '(')+1, _.indexOf(values, ')')); + var newValue = values.substring(_.indexOf(values, '(')+1, _.lastIndexOf(values, ')')); var qbFilterVal = '(' + QueryBuilderProvider.arrayJoinString(curFilterValue, newValue, ' OR ') + ')'; return QueryBuilderProvider.arrayJoinString(curFilterKey, qbFilterVal, ':'); } diff --git a/client/templates/home.html b/client/templates/home.html index 4186ab5a..22efbdc0 100644 --- a/client/templates/home.html +++ b/client/templates/home.html @@ -1,8 +1,6 @@ --- name: home url: /search?query -animationIn: slideInRight -animationOut: slideOutLeft controller: HomeController as hc --- diff --git a/client/templates/login.html b/client/templates/login.html index d1119c39..d97a80d0 100644 --- a/client/templates/login.html +++ b/client/templates/login.html @@ -1,8 +1,6 @@ --- name: login url: /login -animationIn: slideInLeft -animationOut: slideOutRight controller: LoginController as vm ---
diff --git a/docs/Packaging.md b/docs/Packaging.md new file mode 100644 index 00000000..30289949 --- /dev/null +++ b/docs/Packaging.md @@ -0,0 +1,9 @@ +## Building the the packaging + +``` + npm install + bower install + gulp build + gulp cook + gulp package --buildTarget=MACHINE_VARIANT +``` diff --git a/gulp/build.js b/gulp/build.js index 02419e55..f492684b 100644 --- a/gulp/build.js +++ b/gulp/build.js @@ -73,10 +73,10 @@ gulp.task('uglify:app', function() { sourcemapsWrite = $.if(!global.isProduction, $.sourcemaps.write('.')); return gulp.src(global.paths.appJS, { base: 'client' }) - .pipe(sourcemapsInit) - .pipe(uglify) .pipe($.plumber()) + .pipe(sourcemapsInit) .pipe($.ngAnnotate()) + .pipe(uglify) .pipe($.directiveReplace({root: 'client'})) .pipe($.concat('app.js')) .pipe(sourcemapsWrite) diff --git a/gulp/package.js b/gulp/package.js index 4c9a4504..6df5a7dd 100644 --- a/gulp/package.js +++ b/gulp/package.js @@ -9,6 +9,7 @@ var sequence = require('run-sequence'); var child_process = require('child_process'); var nodeversion = 'v5.2.0'; +var isWindows = (argv.buildTarget === 'win64') || (argv.buildTarget === 'win32'); var fileLocations = { bower: ['bower_components/*/**'], @@ -21,6 +22,7 @@ var fileLocations = { docs: ['docs/**/*'], gulp: ['gulp/**/*', '!gulp/package.js'], tests: ['tests/**/*'], + win64: ['win64/**/*'], main_components: [ '.bowerrc', '.eslintrc', @@ -44,14 +46,14 @@ gulp.task('cook', function(cb) { //Tarballs gulp.task('package', function(cb){ if(!argv.buildTarget && !(argv.buildname && argv.os && argv.platform && argv.extension)){ - console.log('\nTo use package you need to use a valid buildTarget parameter.\n Ex: gulp package --buildTarget=mac\n Possible build targets: {mac, linux, linux32, sunos, sunos32}\n\nOR all of these parameters:\nbuildname, buildTarget, os, platform, extension\n Ex: gulp build --buildname=mac --os=darwin --platform=x64 --extension=tar.gz\n'); + console.log('\nTo use package you need to use a valid buildTarget parameter.\n Ex: gulp package --buildTarget=mac\n Possible build targets: {mac, linux, linux32, win64, win32, sunos, sunos32}\n\nOR all of these parameters:\nbuildname, buildTarget, os, platform, extension\n Ex: gulp build --buildname=mac --os=darwin --platform=x64 --extension=tar.gz\n'); cb(); } else { sequence('package:bashCommands', cb); } }); -gulp.task('move:app', ['move:bower', 'move:node_modules', 'move:client', 'move:docs', 'move:gulp', 'move:tests'], function(cb){ +gulp.task('move:app', ['move:bower', 'move:node_modules', 'move:client', 'move:docs', 'move:gulp', 'move:tests', 'move:win64'], function(cb){ gulp.src(fileLocations.main_components) .pipe(gulp.dest('tmp/lucidworks-view')); cb(); @@ -85,25 +87,55 @@ gulp.task('move:tests', function(cb){ cb(); }); +gulp.task('move:win64', function(cb) { + gulp.src(fileLocations.win64) + .pipe(gulp.dest('tmp/lucidworks-view/win64')); + cb(); +}); + gulp.task('package:bashCommands', function(cb){ - var shellCommands = [ - 'mkdir -p tmp/node', - 'mkdir -p tmp/node/'+packageName(getOsTarget()), - 'mkdir -p tmp/lucidworks-view/lib/nodejs', - 'curl -o tmp/node/'+packageName(getOsTarget())+'.'+getOsTarget().extension+' '+buildUrl(getOsTarget()), - 'tar -xzf tmp/node/'+packageName(getOsTarget())+'.'+getOsTarget().extension+' -C tmp/lucidworks-view/lib/nodejs --strip-components=1', - 'mkdir -p packages', - 'mkdir -p packages/'+getVersion(), - 'chmod +x tmp/lucidworks-view/lib/nodejs/bin/npm', - 'chmod +x tmp/lucidworks-view/lib/nodejs/bin/node', - 'chmod +x tmp/lucidworks-view/lib/nodejs/lib/node_modules/npm/bin/npm', - 'cd tmp/; tar -cpzf ../packages/'+getVersion()+'/lucidworks-view-'+getOsTarget().os+'-'+getOsTarget().platform+'-'+getVersion()+'.tar.gz lucidworks-view/.' - ]; + var version = getVersion(); + var osTarget = getOsTarget(); + var tarOptions = ' --exclude=win64 lucidworks-view/'; + var nodeDir = 'tmp/lucidworks-view/lib/nodejs/'; + var nodeDownloadDest = 'tmp/node/'; + var nodePackageUrl = getNodePackageUrl(osTarget); + var nodePackageName = nodePackageUrl.split('/').pop(); + var nodePackageDir = nodePackageName.replace('.' + osTarget.extension, ''); + var nodeFilePath = nodeDownloadDest + nodePackageName; + var shellCommands = [ 'mkdir -p packages/' + version ]; + + var unpackCommandMap = { + 'tar.gz': 'tar -xzf ' + nodeFilePath + ' -C ' + nodeDir + ' --strip-components=1', + 'zip': ['unzip -qo', nodeFilePath, '-d', nodeDir].join(' ') + }; + + shellCommands.push.apply(shellCommands, [ + 'mkdir -p ' + nodeDownloadDest, + 'rm -r ' + nodeDir + '; mkdir -p ' + nodeDir, + 'curl -o ' + nodeFilePath + ' ' + nodePackageUrl, + unpackCommandMap[osTarget.extension] + ]); + + if (isWindows) { + tarOptions = ' --exclude=lucidworks-view' + tarOptions + ' -C lucidworks-view/win64 . -C .. .'; + shellCommands.push(['cd ' + nodeDir, 'mv ' + nodePackageDir + '/* .', 'rm -r ' + nodePackageDir, 'cd -'].join(';')); + } else { + shellCommands.push.apply(shellCommands, [ + 'chmod +x ' + nodeDir + 'bin/npm', + 'chmod +x ' + nodeDir + 'bin/node', + 'chmod +x ' + nodeDir + 'lib/node_modules/npm/bin/npm' + ]); + } + + shellCommands.push('cd tmp; tar -cpzf ../packages/' + version + '/lucidworks-view-'+ osTarget.os + '-' + osTarget.platform + '-' + version + '.tar.gz' + tarOptions); + for(var index = 0; index < shellCommands.length; index++){ var command = shellCommands[index]; console.log(command); console.log(child_process.execSync(command).toString('utf8')); } + cb(); }); @@ -115,14 +147,15 @@ function getVersion(){ return packageJson.version; } +// Url with format - https://nodejs.org/dist/v5.8.0/node-v5.8.0-darwin-x64.tar.gz +function getNodePackageUrl(target) { + var url = target.nodeInstallerUrl; -function buildUrl(target){ - //Format https://nodejs.org/dist/v5.8.0/node-v5.8.0-darwin-x64.tar.gz - return 'http://nodejs.org/dist/'+target.nodeVersion+'/'+packageName(target)+'.'+target.extension; + return url || ('http://nodejs.org/dist/' + target.nodeVersion + '/' + packageName(target) + '.' + target.extension); } function packageName(target){ - return 'node-'+target.nodeVersion+'-'+target.os+'-'+target.platform; + return 'node-' + target.nodeVersion + '-' + target.os + '-' + target.platform; } function getOsTarget(){ @@ -148,6 +181,25 @@ function getOsTarget(){ platform: 'x86', extension: 'tar.gz' }, + + win32: { + name: 'win32', + nodeVersion: 'v6.2.1', + nodeInstallerUrl: 'https://nodejs.org/dist/v6.2.1/node-v6.2.1-win-x86.zip', + os: 'windows', + platform: 'x86', + extension: 'zip' + }, + + win64: { + name: 'win64', + nodeVersion: 'v6.2.1', + nodeInstallerUrl: 'https://nodejs.org/dist/v6.2.1/node-v6.2.1-win-x64.zip', + os: 'windows', + platform: 'x64', + extension: 'zip' + }, + sunos: { name: 'sunos', nodeVersion: nodeversion, @@ -163,31 +215,16 @@ function getOsTarget(){ extension: 'tar.gz' } }; + var os_target = argv.buildTarget ? buildTargets[argv.buildTarget] : {}; // individual overrides. os_target.name = argv.buildname ? argv.buildname: os_target.name; os_target.nodeVersion = argv.nodeVersion ? argv.nodeVersion: os_target.nodeVersion; + os_target.nodeInstallerUrl = argv.nodeInstallerUrl || os_target.nodeInstallerUrl; os_target.os = argv.os ? argv.os: os_target.os; os_target.platform = argv.platform ? argv.platform: os_target.platform; os_target.extension = argv.extension ? argv.extension: os_target.extension; - return os_target; -} -/** - * If an expresion is true run a callback and log errors to console. - * @param {boolean} expression Result of an expression - * @param {Function} cb Callback to fire - * @param {array|false} parameters An array of parameters to pass through to the callback - * @return {Function} Function to fire - */ -function ifExpression(expression, cb, parameters){ - if(Array.isArray(parameters)){ - return $.if(expression, cb.apply(null, parameters).on('error', function (e) { - console.log(e); - })); - } - return $.if(expression, cb().on('error', function (e) { - console.log(e); - })); + return os_target; } diff --git a/gulp/serve.js b/gulp/serve.js index 6191fe72..e198c8fc 100644 --- a/gulp/serve.js +++ b/gulp/serve.js @@ -42,9 +42,16 @@ gulp.task('browsersync', ['build'], function() { } } + var serverPort = 3000; + if(fusionConfig.server_port && fusionConfig.server_port !== false){ + serverPort = fusionConfig.server_port; + } + browserSync.init({ server: browserSyncConfig, - ghostMode: false + ghostMode: false, + ui: false, + port: serverPort }); // gulp.watch("app/scss/*.scss", ['sass']); diff --git a/package.json b/package.json index c1b4ad78..f04546fb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lucidworks-view", - "version": "1.2.0", + "version": "1.3.0", "description": "Lucidworks View: Create custom user experiences for your Fusion-powered apps.", "repository": { "type": "git", @@ -26,7 +26,8 @@ "changelog": "https://github.com/lucidworks/lucidworks-view/blob/master/CHANGELOG.md", "homepage": "https://lucidworks.com/products/view", "scripts": { - "start": "./node_modules/gulp/bin/gulp.js", + "start": "./node_modules/gulp/bin/gulp.js --production", + "start-dev": "./node_modules/gulp/bin/gulp.js", "build": "./node_modules/gulp/bin/gulp.js build --production", "test": "./node_modules/karma/bin/karma start karma.conf.js" }, @@ -74,4 +75,4 @@ "yargs": "^3.15.0" }, "engine": "node >=5.2.0" -} \ No newline at end of file +} diff --git a/win64/getting-started-on-windows.md b/win64/getting-started-on-windows.md new file mode 100644 index 00000000..75a713d1 --- /dev/null +++ b/win64/getting-started-on-windows.md @@ -0,0 +1,29 @@ +# Lucidworks View on Windows + + After downloading `Lucidworks-View-Installer.exe` and running it **as an administrator**, go to services, find the Lucidworks View service, right click and select start. + + Navigate to localhost:3000 on your preferred browser. + + To stop the service go to services, right click the Lucidworks View service and select stop + + To uninstall the service, run the `.\uninstall-service.cmd` **as an administrator**. + +## Basic Configuration + +The first time you run the View service, `FUSION_CONFIG.sample.js` is copied to `FUSION_CONFIG.js`. Modify this file to configure View's basic options. Documentation about the configuration keys is included in the file. + +At a minimum, you _must_ configure the `collection` key to match the name of your Fusion collection. + +In a production environment, you must also configure `host` and `port` to point to the UI service of your Fusion deployment. The default is `localhost:8764` for development purposes. + +When the app is running with `.\view.cmd`, it reloads the configuration every time you save `FUSION_CONFIG.js`. You can modify the configuration and watch the app change in real time in your browser. + +## Basic Customization + +The title and logo for your interface are configured in FUSION_CONFIG.js as `search_app_title` and `logo_location`. + +CSS options are configured in the files in `client\assets\scss`. + +Templates for various UI components are located in `client\assets\components`. + +Search results from different document types can use different templates. The `client\assets\components\document` directory contains templates for some common document types, plus default templates for all others. Data types correspond to Connectors in Fusion. See [Customizing Documents](docs/Customizing_Documents.md) for details about working with these. diff --git a/win64/install.cmd b/win64/install.cmd new file mode 100644 index 00000000..6f911081 --- /dev/null +++ b/win64/install.cmd @@ -0,0 +1,26 @@ +echo You can safely ignore any warnings on the console and close the console when this process completes. + +set NEXT_APP=lucidworks-view +echo Installing service using View installed at %~dp0 +%~dp0nssm stop %NEXT_APP% +%~dp0nssm remove %NEXT_APP% confirm +%~dp0nssm install %NEXT_APP% %~dp0view.cmd start +%~dp0nssm set %NEXT_APP% AppDirectory %~dp0 +%~dp0nssm set %NEXT_APP% DisplayName Lucidworks View +%~dp0nssm set %NEXT_APP% Description Lucidworks View Windows Service +%~dp0nssm set %NEXT_APP% AppStdout %~dp0service.log +%~dp0nssm set %NEXT_APP% AppStderr %~dp0service.log +%~dp0nssm set %NEXT_APP% AppStdoutCreationDisposition 4 +%~dp0nssm set %NEXT_APP% AppStderrCreationDisposition 4 +%~dp0nssm set %NEXT_APP% AppRotateFiles 1 +%~dp0nssm set %NEXT_APP% AppRotateOnline 0 +%~dp0nssm set %NEXT_APP% AppRotateSeconds 86400 +%~dp0nssm set %NEXT_APP% AppRotateBytes 1048576 + +cd %~dp0 + +%~dp0lib\nodejs\npm install && %~dp0lib\nodejs\npm install -g gulp bower && %~dp0lib\nodejs\node %~dp0node_modules\bower\bin\bower install && %~dp0lib\nodejs\npm rebuild node-sass && %~dp0lib\nodejs\npm install -g gulp bower + +echo Reminder: You can safely ignore any warnings on the console and close the console when this process completes. + +%~dp0nssm set %NEXT_APP% DisplayName Lucidworks View diff --git a/win64/installer/Lucidworks View Windows Installer Creation Guide.md b/win64/installer/Lucidworks View Windows Installer Creation Guide.md new file mode 100644 index 00000000..a2cc12c2 --- /dev/null +++ b/win64/installer/Lucidworks View Windows Installer Creation Guide.md @@ -0,0 +1,40 @@ +# Lucidworks View Windows Installer Creation Guide + +## How to build the lucidworks view windows installer: + +Do the following steps from a windows box + +1. Pull the latest changes from lucidworks-view repository and build the tar.gz file from Linux with option `--buildTarget=win64`. (See the README.md for build instructions on how to build lucidworks-view tar ball or download the latest tar at ) + +2. Move the tar build on Linux and Untar on Windows to a directory we will refer to as **VIEW_HOME**. + +3. Get latest version of **inno setup** installed + +4. Launch **VIEW_HOME**\installer\create-installer.cmd + - This will create the Installer `Lucidworks-View-Installer.exe` in **VIEW_HOME**\installer\Output directory. + +## How to use the Windows Installer: + + * Launch the `Lucidworks-View-Installer.exe` **as an administrator**. + +**Note:** At the end of the installer, it attempts to run npm installs. If the install cmd script closes too fast, you probably didn't have admin permissions and it abruptly failed. Right click on the install.cmd and run as administrator if that happens. + +## How to Uninstall the Lucidworks-view service + + * To uninstall the service simply run the **VIEW_HOME**\uninstall-service.cmd as administrator + +## Common issues: + +- File could not be access, file in use + + - Or you have one of the installer files open with a CMD or locked somewhere. Close it and try again. + +- Services didn't install. + + - You probably forgot to Run installer "as administrator" + +- Services won't start. + + - Did you enter correct password when prompted for the user that is launch the service? + + - Don't forget windows domain if needed. If my domain is **CORPORATE** then **"CORPORATE\nicholas"** diff --git a/win64/installer/Lucidworks-Glyph.ico b/win64/installer/Lucidworks-Glyph.ico new file mode 100644 index 00000000..ad6808cd Binary files /dev/null and b/win64/installer/Lucidworks-Glyph.ico differ diff --git a/win64/installer/create-installer.cmd b/win64/installer/create-installer.cmd new file mode 100644 index 00000000..b595e7e2 --- /dev/null +++ b/win64/installer/create-installer.cmd @@ -0,0 +1,2 @@ +start %~dp0instcr.cmd +set /p go="Any key to continue" \ No newline at end of file diff --git a/win64/installer/inno-setup-installer.iss b/win64/installer/inno-setup-installer.iss new file mode 100644 index 00000000..12e04426 --- /dev/null +++ b/win64/installer/inno-setup-installer.iss @@ -0,0 +1,54 @@ +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +#define MyAppName "Lucidworks View" +#define MyAppVersion "1.3.0" +#define MyAppPublisher "Lucidworks" +#define MyAppURL "https://www.lucidworks.com/products/view" +#define MyAppExeName "view.cmd" + +[Setup] +; NOTE: The value of AppId uniquely identifies this application. +; Do not use the same AppId value in installers for other applications. +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) +AppId={{088A54F9-BABA-4F09-A288-0F8BB4DD9E54} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +;AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName=\lucidworks-view +DefaultGroupName={#MyAppName} +DisableProgramGroupPage=yes +OutputBaseFilename=Lucidworks-View-Installer +SetupIconFile={#SourcePath}\Lucidworks-Glyph.ico +Compression=lzma +SolidCompression=yes + +[Registry] +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType:expandsz; ValueName:"PATH"; ValueData:"{olddata};{app}\lib\nodejs"; Flags: preservestringtype +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType:expandsz; ValueName:"PATH"; ValueData:"{olddata};{app}\node_modules\.bin"; Flags: preservestringtype + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Files] +Source: "{#SourcePath}\..\*"; Excludes: "\installer"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Icons] +Name: "{group}\Uninstall Lucidworks View"; Filename: "{uninstallexe}" + +[Code] +procedure CurPageChanged(CurPageID: Integer); +var + ErrorCode : Integer ; +begin + if CurPageID = wpFinished then + ShellExecAsOriginalUser('', ExpandConstant('{app}\install.cmd'), '', '',SW_SHOWNORMAL, ewNoWait, ErrorCode); +end; + +[Run] +Filename: "{app}\getting-started-on-windows.md"; Description: "View the README file"; Flags: postinstall shellexec skipifsilent diff --git a/win64/installer/instcr.cmd b/win64/installer/instcr.cmd new file mode 100644 index 00000000..87926592 --- /dev/null +++ b/win64/installer/instcr.cmd @@ -0,0 +1 @@ +"C:\Program Files (x86)\Inno Setup 5\compil32" /cc "%~dp0inno-setup-installer.iss" \ No newline at end of file diff --git a/win64/nssm.exe b/win64/nssm.exe new file mode 100755 index 00000000..8faee45b Binary files /dev/null and b/win64/nssm.exe differ diff --git a/win64/uninstall-service.cmd b/win64/uninstall-service.cmd new file mode 100644 index 00000000..76cb854a --- /dev/null +++ b/win64/uninstall-service.cmd @@ -0,0 +1,7 @@ +@echo off + +set NEXT_APP=lucidworks-view +nssm stop %NEXT_APP% +nssm remove %NEXT_APP% confirm + +sc.exe delete lucidworks-view diff --git a/win64/view.cmd b/win64/view.cmd new file mode 100644 index 00000000..f3479cf7 --- /dev/null +++ b/win64/view.cmd @@ -0,0 +1,10 @@ +@echo off + +set NODEJS_EXE=%~dp0lib\nodejs\node.exe +echo Checking node js version: +%NODEJS_EXE% -v + +set thecmd=%1 +if [%1]==[] set thecmd=start + +%NODEJS_EXE% %~dp0node_modules\gulp\bin\gulp.js --production