Skip to content

Commit

Permalink
Merge pull request #508 from usc-isi-i2/master-test-0920
Browse files Browse the repository at this point in the history
Karma-app build fixes
  • Loading branch information
Bidisha010496 authored Oct 25, 2021
2 parents 01a2643 + c3a723c commit c208038
Show file tree
Hide file tree
Showing 8 changed files with 140 additions and 151 deletions.
6 changes: 3 additions & 3 deletions karma-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ You can set maximum heap size for karma on the main window. Once you change it,
```
brew doctor
brew update
brew tap caskroom/cask
brew cask install xquartz
brew install wine
brew tap homebrew/cask
brew install --cask xquartz
brew install --cask wine-stable
```
* if building on Linux: `sudo apt-get install wine`

Expand Down
13 changes: 2 additions & 11 deletions karma-app/build
Original file line number Diff line number Diff line change
Expand Up @@ -47,39 +47,33 @@ wget https://github.com/alseambusher/karma-app-deps/archive/master.zip
unzip master.zip
mv karma-app-deps-master/*.tar.gz .
rm -rf karma-app-deps-master master.zip

# download tomcat binary
wget http://mirror.cc.columbia.edu/pub/software/apache/tomcat/tomcat-8/v8.5.30/bin/apache-tomcat-8.5.30.zip
wget https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.72/bin/apache-tomcat-8.5.72.zip
unzip apache-tomcat-*.zip
rm apache-tomcat-*.zip

mv apache-tomcat* tomcat
rm -rf tomcat/webapps/*
mv *.war tomcat/webapps
chmod +x tomcat/bin/*.sh

cp $CURRENT/conf/* tomcat/conf/

rm -rf $CURRENT/desktop/app/tomcat
mv tomcat $CURRENT/desktop/app/


cd $CURRENT/desktop/app/tomcat/webapps
mkdir ROOT
mv ROOT.war ROOT/ROOT.zip
cd ROOT
unzip ROOT.zip

cd $CURRENT/desktop
npm install
npm run prerelease
cd app

tar -xzvf $CURRENT/target/jre*windows*.tar.gz
electron-packager . --platform=win32 --arch=x64 --icon=../resources/icons/karma.ico --overwrite
rm -rf jre*
tar -xzvf $CURRENT/target/jre*macosx*.tar.gz
electron-packager . --platform=darwin --arch=x64 --icon=../resources/icons/karma.icns --overwrite
electron-packager . --platform=darwin --arch=x64 --icon=../resources/icons/karma.icns --overwrite
rm -rf jre*
tar -xzvf $CURRENT/target/jre*linux*.tar.gz
electron-packager . --platform=linux --arch=x64 --icon=../resources/icons/karma.png --overwrite
Expand All @@ -88,21 +82,18 @@ rm -rf jre*
cp -rf Karma-darwin* $CURRENT/target/Karma-Mac
cp -rf Karma-linux* $CURRENT/target/Karma-Linux
cp -rf Karma-win* $CURRENT/target/Karma-Windows

set +e
rm -rf Karma-*

cd $CURRENT/target
rm *.tar.gz

set -e
#put our license
for build_folder in `ls |grep Karma`
do
mv $build_folder/LICENSE $build_folder/LICENSE.electron.packager
cp $CURRENT/../LICENSE.txt $build_folder/
done

if [ "$1" == "--archive" ]
then
for i in `ls |grep 'Karma-*'`
Expand Down
3 changes: 1 addition & 2 deletions karma-app/desktop/app/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
<title>Karma</title>

<link href="stylesheets/main.css" rel="stylesheet" type="text/css">

<script src="helpers/context_menu.js"></script>
<script src="helpers/context_menu.js"></script>
<script src="helpers/external_links.js"></script>

<script src="app.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions karma-app/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
},
"devDependencies": {
"chai": "^3.5.0",
"electron": "10.2.0",
"electron": "11.5.0",
"electron-builder": "^5.12.1",
"electron-mocha": "^3.0.0",
"fs-jetpack": "^0.9.0",
"gulp": "^3.9.0",
"gulp": "^4.0.2",
"gulp-batch": "^1.0.5",
"gulp-less": "^3.0.3",
"gulp-plumber": "^1.1.0",
Expand Down
6 changes: 5 additions & 1 deletion karma-app/desktop/src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ app.on('ready', function () {

var mainWindow = createWindow('main', {
width: 1000,
height: 600
height: 600,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
},
});

mainWindow.loadURL('file://' + __dirname + '/app.html');
Expand Down
215 changes: 105 additions & 110 deletions karma-web/pom.xml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>war</packaging>

<parent>
<groupId>edu.isi</groupId>
<artifactId>karma-common-web</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../karma-common-web</relativePath>
</parent>
<parent>
<groupId>edu.isi</groupId>
<artifactId>karma-common-web</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../karma-common-web</relativePath>
</parent>

<artifactId>karma-web</artifactId>
<artifactId>karma-web</artifactId>

<dependencies>


<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>

<dependency>
<groupId>de.micromata.jak</groupId>
<artifactId>JavaAPIforKml</artifactId>
</dependency>

</dependencies>


<build>

<plugins>
<!-- Configuration for Jetty -->
<plugin>
Expand Down Expand Up @@ -80,104 +80,99 @@
</plugin>
</plugins>
</build>

<profiles>


<profile>
<id>tomcat-deploy</id>
<build>
<plugins>
<!-- Configuration for Tomcat -->
<!--
For Tomcat, add the following roles and user to the conf/tomcat-users.xml file as follows
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="myusername" password="mypassword" roles="manager-gui,manager-script"/>
Start (or restart) your Tomcat instance to pick up the user configuration changes
Add a corresponding server block to your $M2_HOME/conf/settings.xml:
<server>
<id>TomcatServer</id>
<username>myusername</username>
<password>mypassword</password>
</server>
Set the tomcat url, port and path settings and then run
mvn package -Ptomcat-deploy tomcat:deploy
from the Web-Karma folder
to deploy WAR in the tomcat container
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<argLine>-XX:MaxPermSize=128m</argLine>
<server>TomcatServer</server>
<path>/</path>
<url>http://localhost:8080/manager/text</url>
<update>true</update>
</configuration>

<executions>
<execution>
<id>cleaningService</id>
<phase>package</phase>

<profile>
<id>tomcat-deploy</id>
<build>
<plugins>
<!-- Configuration for Tomcat -->
<!--
For Tomcat, add the following roles and user to the conf/tomcat-users.xml file as follows
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="myusername" password="mypassword" roles="manager-gui,manager-script"/>
Start (or restart) your Tomcat instance to pick up the user configuration changes
Add a corresponding server block to your $M2_HOME/conf/settings.xml:
<server>
<id>TomcatServer</id>
<username>myusername</username>
<password>mypassword</password>
</server>
Set the tomcat url, port and path settings and then run
mvn package -Ptomcat-deploy tomcat:deploy
from the Web-Karma folder
to deploy WAR in the tomcat container
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<argLine>-XX:MaxPermSize=128m</argLine>
<server>TomcatServer</server>
<path>/</path>
<url>http://localhost:8080/manager/text</url>
<update>true</update>
</configuration>

<executions>
<execution>
<id>cleaningService</id>
<phase>package</phase>
<goals><goal>deploy</goal></goals>
<configuration>
<server>TomcatServer</server>
<path>/cleaningService</path>
<url>http://localhost:8080/manager/text</url>
<warFile>${project.basedir}/external_webapps/cleaningService.war</warFile>
<update>true</update>
</configuration>
</execution>
<execution>
<id>clusterService</id>
<phase>package</phase>
<configuration>
<server>TomcatServer</server>
<path>/cleaningService</path>
<url>http://localhost:8080/manager/text</url>
<warFile>${project.basedir}/external_webapps/cleaningService.war</warFile>
<update>true</update>
</configuration>
</execution>
<execution>
<id>clusterService</id>
<phase>package</phase>
<goals><goal>deploy</goal></goals>
<configuration>
<server>TomcatServer</server>
<path>/clusterService</path>
<url>http://localhost:8080/manager/text</url>
<warFile>${project.basedir}/external_webapps/cluster-1.0.war</warFile>
<update>true</update>
</configuration>
</execution>
<execution>
<id>openrdfworkbench</id>
<phase>package</phase>
<configuration>
<server>TomcatServer</server>
<path>/clusterService</path>
<url>http://localhost:8080/manager/text</url>
<warFile>${project.basedir}/external_webapps/cluster-1.0.war</warFile>
<update>true</update>
</configuration>
</execution>
<execution>
<id>openrdfworkbench</id>
<phase>package</phase>
<goals><goal>deploy</goal></goals>
<configuration>
<server>TomcatServer</server>
<path>/openrdf-workbench</path>
<url>http://localhost:8080/manager/text</url>
<warFile>${project.basedir}/external_webapps/openrdf-workbench.war</warFile>
<update>true</update>
</configuration>
</execution>
<execution>
<id>openrdfsesame</id>
<phase>package</phase>
<configuration>
<server>TomcatServer</server>
<path>/openrdf-workbench</path>
<url>http://localhost:8080/manager/text</url>
<warFile>${project.basedir}/external_webapps/openrdf-workbench.war</warFile>
<update>true</update>
</configuration>
</execution>
<execution>
<id>openrdfsesame</id>
<phase>package</phase>
<goals><goal>deploy</goal></goals>
<configuration>
<server>TomcatServer</server>
<path>/openrdf-sesame</path>
<url>http://localhost:8080/manager/text</url>
<warFile>${project.basedir}/external_webapps/openrdf-sesame.war</warFile>
<update>true</update>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
<configuration>
<server>TomcatServer</server>
<path>/openrdf-sesame</path>
<url>http://localhost:8080/manager/text</url>
<warFile>${project.basedir}/external_webapps/openrdf-sesame.war</warFile>
<update>true</update>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ body
{
border-left-color: @table-even-vertical-grid-border-color; //@color-even-dark;
}
.wk-row-even:first-child,
.wk-row-even:first-child
{
border-top-color: @color-even-dark;
}
Expand Down
Loading

0 comments on commit c208038

Please sign in to comment.