Skip to content

Commit

Permalink
Added installer configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
santiagolizardo committed Sep 30, 2014
1 parent f18f220 commit 1823d82
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 36 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ target
.project
.settings
.classpath
*.exe
39 changes: 39 additions & 0 deletions installer.nsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

!define APP_VENDOR "Ponup"
!define APP_NAME "TetrisKit"
!define APP_VERSION "1.0.1"
!define APP_FILENAME "${APP_NAME}-${APP_VERSION}-jar-with-dependencies.jar"

Name "${APP_VENDOR} ${APP_NAME}"
OutFile "${APP_NAME}-${APP_VERSION}-installer.exe"

# For removing Start Menu shortcut in Windows 7
RequestExecutionLevel user
WindowIcon Off

ShowInstDetails show
ShowUninstDetails show

Page directory # or InstallDir $DESKTOP
Page instfiles

Section
SetOutPath $INSTDIR
File "target\${APP_FILENAME}" # File directive after SetOutPath
WriteUninstaller "$INSTDIR\uninstall.exe"
CreateDirectory "$SMPROGRAMS\${APP_VENDOR}"
CreateShortCut "$SMPROGRAMS\${APP_VENDOR}\${APP_NAME}.lnk" "$INSTDIR\${APP_FILENAME}"
CreateShortCut "$SMPROGRAMS\${APP_VENDOR}\Uninstall.lnk" "$INSTDIR\uninstall.exe"
SectionEnd

Section "uninstall"
Delete "$SMPROGRAMS\${APP_VENDOR}\${APP_NAME}.lnk"
Delete "$SMPROGRAMS\${APP_VENDOR}\Uninstall.lnk"
RmDir "$SMPROGRAMS\${APP_VENDOR}"
Delete "$INSTDIR\${APP_FILENAME}"
Delete "$INSTDIR\uninstall.exe"
RmDir "$INSTDIR"
SectionEnd

UninstPage uninstConfirm
UninstPage instfiles
81 changes: 45 additions & 36 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,51 +1,60 @@
<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>
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>

<groupId>com.santiagolizardo.tetriskit</groupId>
<artifactId>TetrisKit</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<groupId>com.santiagolizardo.tetriskit</groupId>
<artifactId>TetrisKit</artifactId>
<version>1.0.1</version>
<packaging>jar</packaging>

<name>TetrisKit</name>
<url>http://www.santiagolizardo.com</url>
<name>TetrisKit</name>
<url>https://github.com/ponup/tetriskit</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<version>3.1</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.santiagolizardo.tetriskit.MainGUI</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.santiagolizardo.tetriskit.MainGUI</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</plugins>
</build>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

0 comments on commit 1823d82

Please sign in to comment.