Quantcast
Channel: SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 789

OPENUI5/SAPUI5 on a Memory Stick in less than 12 Simple Steps (and Eclipse in 2 Steps)

$
0
0

After John post on running SAPUI5 SDK with node.js, UI5 SDK on Node.js, the next step was to see if this could run on a memory stick and be used anywhere.  Which is great for carrying your own sandbox/POC or even as John suggests to send as a business card

 

For the below example I thought I would use the OpenUI5 build, so the memory stick had open source only on it.

 

John Blog goes more into detail than mine, so please read that first to understand the steps below in more detail.

 

Step 1) Install node.js node.js, click the link and click Install.

Step 2) Get yourself the latest build of OpenUI5 SDK from OpenUI5 - Download or the SAPUI5 SDK

Step 3) Get a Memory stick and insert into your machine

Step 4) Create a base folder called openui5 on the memory stick.

Step 5) unzip and copy the OpenUI5/SAPUI5 SDK folder and contents to the openui5 folderNB for me I renamed this to the version so you can have more than one SDK installed, as John suggests in his post.

Step 6) Copy the contents of your nodejs folder, not the folder, to the openui5 folder.

Step 7) start the command prompt and navigate to your openui5 folder.

Step 8) type and execute ./npm install expressjs

Step 9) type and execute ./npm install open

Step 10) create the static_server.js file and save in openui5 folder

 

var express = require('express'),  open = require('open');  app = express(),  port = process.env.PORT || 8888,  openui5 = '/openui5'  url = 'http://localhost:' + port + openui5,    year = 60 * 60 * 24 * 365 * 1000;
// Use compress middleware to gzip content
app.use(express.compress());
//set default mime type to xml for ".library" files
express.static.mime.default_type = "text/xml";
// Serve up content directory showing hidden (leading dot) files
app.use(openui5,express.static(__dirname, { maxAge: year, hidden: true }));
// enable directory listening
app.use(openui5,express.directory(__dirname));
app.listen(port);
open(url); //open in default browser
console.log("Static file server running at\n  => " + url + " \nCTRL + C to shutdown")

Your openui5 folder should now look like this

openui5.JPG

Step 11) Start the command prompt and navigate to the openui5 folder and type ./node static_server 

 

Your server should now start and you can run this memory stick on machines without node.js or OpenUI5/SAPUI5 SDK installed.

 

Next Steps lets get Eclipse running on that memory stick as well.

 

Step 1) Download and unzip Eclispe to your memory stick.

Step 2) Download the correct Java Runtime and copy to the Eclipse folder as JRE.

 

Eclipse.JPG

Eclipse is now ready to run from the memory stick as well, a bit slow to start but performance good once loaded.

 

Martin


Viewing all articles
Browse latest Browse all 789

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>