aboutsummaryrefslogtreecommitdiff
path: root/subsonic-installer-windows/pom.xml
blob: 698749e6eb8361c7393980650760466af5414c4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>net.sourceforge.subsonic</groupId>
    <artifactId>subsonic-installer-windows</artifactId>
    <packaging>pom</packaging>
    <name>Subsonic Installer for Windows</name>

    <parent>
        <groupId>net.sourceforge.subsonic</groupId>
        <artifactId>subsonic</artifactId>
        <version>4.7.beta2</version>
    </parent>

    <properties>
        <exe4j.home>c:/Program Files/exe4j</exe4j.home>
        <nsis.home>c:/Program Files/NSIS</nsis.home>
    </properties>

    <dependencies>

        <dependency>
            <groupId>net.sourceforge.subsonic</groupId>
            <artifactId>subsonic-main</artifactId>
            <version>${project.version}</version>
            <type>war</type>
        </dependency>

        <dependency>
            <groupId>net.sourceforge.subsonic</groupId>
            <artifactId>subsonic-booter</artifactId>
            <version>${project.version}</version>
        </dependency>

    </dependencies>

    <profiles>

        <profile>
            <id>windows</id>
            <activation>
                <os>
                    <family>windows</family>
                </os>
            </activation>

            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>exe4j</id>
                                <phase>compile</phase>
                                <configuration>
                                    <target>
                                        <echo>Compiling exe4j...</echo>
                                        <copy file="${basedir}/src/main/exe4j/subsonic-agent.exe.vmoptions" todir="${project.build.directory}"/>
                                        <copy file="${basedir}/src/main/exe4j/subsonic-agent-elevated.exe.vmoptions" todir="${project.build.directory}"/>
                                        <copy file="${basedir}/src/main/exe4j/subsonic-service.exe.vmoptions" todir="${project.build.directory}"/>
                                        <exec executable="${exe4j.home}/bin/exe4jc">
                                            <arg value="--license=L-SINDRE_MEHUS#14926715500010001-1ty7dbe11l10ll#140"/>
                                        </exec>
                                        <exec executable="${exe4j.home}/bin/exe4jc">
                                            <arg value="${basedir}/src/main/exe4j/subsonic-agent.exe4j"/>
                                        </exec>
                                        <exec executable="${exe4j.home}/bin/exe4jc">
                                            <arg value="${basedir}/src/main/exe4j/subsonic-agent-elevated.exe4j"/>
                                        </exec>
                                        <exec executable="${exe4j.home}/bin/exe4jc">
                                            <arg value="${basedir}/src/main/exe4j/subsonic-service.exe4j"/>
                                        </exec>
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>

                            <execution>
                                <id>nsis</id>
                                <phase>compile</phase>
                                <configuration>
                                    <target>
                                        <echo>Compiling NSIS script...</echo>
                                        <mkdir dir="${project.build.directory}"/>
                                        <exec executable="${nsis.home}/makensis">
                                            <arg value="${basedir}/src/main/nsis/subsonic.nsi"/>
                                            <arg value="-XOutFile ${project.build.directory}/subsonic-${project.version}-setup.exe"/>
                                        </exec>
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>

        </profile>
    </profiles>
</project>