Merge tag 'v6.1.rc1' into stable

Libresonic v6.1.rc1

Conflicts:
	INSTALL.md
master
Eugene E. Kashpureff Jr 8 years ago
commit 6ec5b4ef25
  1. 150
      .gitignore
  2. 15
      .travis.yml
  3. 92
      BUILD.md
  4. 21
      CHANGELOG.md
  5. 109
      INSTALL.md
  6. 36
      MIGRATE.md
  7. 12
      contrib/deploy.sh
  8. 143
      documentation/FreeBSD-FreeNAS-Install.md
  9. 111
      documentation/INSTALL.md
  10. 17
      libresonic-assembly/pom.xml
  11. 12
      libresonic-assembly/src/main/assembly/src.xml
  12. 14
      libresonic-assembly/src/main/assembly/standalone.xml
  13. 4
      libresonic-assembly/src/main/assembly/war.xml
  14. 13
      libresonic-booter/pom.xml
  15. 10
      libresonic-booter/src/main/java/org/libresonic/player/booter/Main.java
  16. 34
      libresonic-booter/src/main/java/org/libresonic/player/booter/agent/LibresonicAgent.java
  17. 26
      libresonic-booter/src/main/java/org/libresonic/player/booter/agent/LibresonicFrame.java
  18. 12
      libresonic-booter/src/main/java/org/libresonic/player/booter/agent/LibresonicListener.java
  19. 64
      libresonic-booter/src/main/java/org/libresonic/player/booter/agent/SettingsPanel.java
  20. 26
      libresonic-booter/src/main/java/org/libresonic/player/booter/agent/StatusPanel.java
  21. 34
      libresonic-booter/src/main/java/org/libresonic/player/booter/agent/TrayController.java
  22. 2
      libresonic-booter/src/main/java/org/libresonic/player/booter/deployer/DeploymentStatus.java
  23. 84
      libresonic-booter/src/main/java/org/libresonic/player/booter/deployer/LibresonicDeployer.java
  24. 17
      libresonic-booter/src/main/java/org/libresonic/player/booter/deployer/LibresonicDeployerService.java
  25. 22
      libresonic-booter/src/main/java/org/libresonic/player/booter/mac/LibresonicController.java
  26. 18
      libresonic-booter/src/main/java/org/libresonic/player/booter/mac/LibresonicFrame.java
  27. 12
      libresonic-booter/src/main/java/org/libresonic/player/booter/mac/StatusPanel.java
  28. 2
      libresonic-booter/src/main/resources/META-INF/MANIFEST.MF
  29. 12
      libresonic-booter/src/main/resources/applicationContext-agent.xml
  30. 6
      libresonic-booter/src/main/resources/applicationContext-deployer.xml
  31. 6
      libresonic-booter/src/main/resources/applicationContext-mac.xml
  32. 0
      libresonic-booter/src/main/resources/images/libresonic-16.png
  33. 0
      libresonic-booter/src/main/resources/images/libresonic-21.png
  34. 0
      libresonic-booter/src/main/resources/images/libresonic-32.png
  35. 0
      libresonic-booter/src/main/resources/images/libresonic-512.png
  36. 0
      libresonic-booter/src/main/resources/images/libresonic-started-16.png
  37. 0
      libresonic-booter/src/main/resources/images/libresonic-stopped-16.png
  38. BIN
      libresonic-booter/src/main/resources/libresonic.keystore
  39. 10
      libresonic-booter/src/main/resources/web-jetty.xml
  40. 24
      libresonic-booter/src/main/script/libresonic.bat
  41. 134
      libresonic-booter/src/main/script/libresonic.sh
  42. 33
      libresonic-installer-debian/pom.xml
  43. 1
      libresonic-installer-debian/src/DEBIAN/conffiles
  44. 10
      libresonic-installer-debian/src/DEBIAN/control
  45. 16
      libresonic-installer-debian/src/DEBIAN/postinst
  46. 4
      libresonic-installer-debian/src/DEBIAN/postrm
  47. 15
      libresonic-installer-debian/src/DEBIAN/preinst
  48. 8
      libresonic-installer-debian/src/DEBIAN/prerm
  49. 25
      libresonic-installer-debian/src/etc/default/libresonic
  50. 34
      libresonic-installer-debian/src/etc/init.d/libresonic
  51. 57
      libresonic-installer-mac/pom.xml
  52. 0
      libresonic-installer-mac/src/libresonic.icns
  53. 16
      libresonic-installer-mac/src/libresonic.pkgproj
  54. 0
      libresonic-installer-mac/src/libresonic.png
  55. 13
      libresonic-installer-mac/src/postinstall.sh
  56. 11
      libresonic-installer-mac/src/preinstall.sh
  57. 45
      libresonic-installer-rpm/pom.xml
  58. 34
      libresonic-installer-rpm/src/etc/init.d/libresonic
  59. 25
      libresonic-installer-rpm/src/etc/sysconfig/libresonic
  60. 78
      libresonic-installer-rpm/src/libresonic.spec
  61. 35
      libresonic-installer-windows/pom.xml
  62. 0
      libresonic-installer-windows/src/main/exe4j/libresonic-16.ico
  63. 0
      libresonic-installer-windows/src/main/exe4j/libresonic-agent-elevated.exe.vmoptions
  64. 8
      libresonic-installer-windows/src/main/exe4j/libresonic-agent-elevated.exe4j
  65. 0
      libresonic-installer-windows/src/main/exe4j/libresonic-agent.exe.vmoptions
  66. 8
      libresonic-installer-windows/src/main/exe4j/libresonic-agent.exe4j
  67. 6
      libresonic-installer-windows/src/main/exe4j/libresonic-service.exe.vmoptions
  68. 8
      libresonic-installer-windows/src/main/exe4j/libresonic-service.exe4j
  69. 0
      libresonic-installer-windows/src/main/nsis/jre-8u31-windows-i586-iftw.exe
  70. 213
      libresonic-installer-windows/src/main/nsis/libresonic.nsi
  71. 10
      libresonic-main/Getting Started.html
  72. 0
      libresonic-main/LICENSE.TXT
  73. 26
      libresonic-main/dreamplug.txt
  74. 34
      libresonic-main/pom.xml
  75. 0
      libresonic-main/src/main/java/org/json/CDL.java
  76. 0
      libresonic-main/src/main/java/org/json/Cookie.java
  77. 0
      libresonic-main/src/main/java/org/json/CookieList.java
  78. 0
      libresonic-main/src/main/java/org/json/HTTP.java
  79. 0
      libresonic-main/src/main/java/org/json/HTTPTokener.java
  80. 0
      libresonic-main/src/main/java/org/json/JSONArray.java
  81. 0
      libresonic-main/src/main/java/org/json/JSONException.java
  82. 0
      libresonic-main/src/main/java/org/json/JSONML.java
  83. 0
      libresonic-main/src/main/java/org/json/JSONObject.java
  84. 0
      libresonic-main/src/main/java/org/json/JSONString.java
  85. 0
      libresonic-main/src/main/java/org/json/JSONStringer.java
  86. 0
      libresonic-main/src/main/java/org/json/JSONTokener.java
  87. 0
      libresonic-main/src/main/java/org/json/JSONWriter.java
  88. 0
      libresonic-main/src/main/java/org/json/XML.java
  89. 0
      libresonic-main/src/main/java/org/json/XMLTokener.java
  90. 27
      libresonic-main/src/main/java/org/libresonic/player/Logger.java
  91. 12
      libresonic-main/src/main/java/org/libresonic/player/ajax/ArtistInfo.java
  92. 19
      libresonic-main/src/main/java/org/libresonic/player/ajax/ChatService.java
  93. 13
      libresonic-main/src/main/java/org/libresonic/player/ajax/CoverArtInfo.java
  94. 23
      libresonic-main/src/main/java/org/libresonic/player/ajax/CoverArtService.java
  95. 13
      libresonic-main/src/main/java/org/libresonic/player/ajax/LyricsInfo.java
  96. 17
      libresonic-main/src/main/java/org/libresonic/player/ajax/LyricsService.java
  97. 33
      libresonic-main/src/main/java/org/libresonic/player/ajax/MultiService.java
  98. 13
      libresonic-main/src/main/java/org/libresonic/player/ajax/NetworkStatus.java
  99. 13
      libresonic-main/src/main/java/org/libresonic/player/ajax/NowPlayingInfo.java
  100. 35
      libresonic-main/src/main/java/org/libresonic/player/ajax/NowPlayingService.java
  101. Some files were not shown because too many files have changed in this diff Show More

150
.gitignore vendored

@ -1 +1,151 @@
#
# .gitignore
# Libresonic/libresonic
#
# Project-wide gitignores
#
#
# Sourced from https://github.com/github/gitignore/
# Redistributed under GPLv3+, as allowed by LICENSE found there
# Copyright (c) 2014 Github, Inc.
#
## Windows.gitignore
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
## OSX.gitignore
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
## vim.gitignore
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist
*~
## NotepadPP.gitignore
# Notepad++ backups #
*.bak
## Java.gitignore
*.class
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
## Maven.gitignore
target/ target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
## Eclipse.gitignore
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders
# Eclipse Core
.project
# Intellij
*.iml
.idea
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# PyDev specific (Python IDE for Eclipse)
*.pydevproject
# CDT-specific (C/C++ Development Tooling)
.cproject
# JDT-specific (Eclipse Java Development Tools)
.classpath
# Java annotation processor (APT)
.factorypath
# PDT-specific (PHP Development Tools)
.buildpath
# sbteclipse plugin
.target
# Tern plugin
.tern-project
# TeXlipse plugin
.texlipse
# STS (Spring Tool Suite)
.springBeans
# Code Recommenders
.recommenders/

@ -0,0 +1,15 @@
language: java
sudo: required
jdk:
- oraclejdk8
cache:
directories:
- $HOME/.m2
install:
- sudo apt-get -qq update
- sudo apt-get -y install lintian fakeroot rpm python-rpm
- git clone https://github.com/rpm-software-management/rpmlint -o rpmlint-1.9
- sudo make -C rpmlint install
script:
- mvn -Pfull,rpm package install
- mvn -Pfull -pl libresonic-assembly assembly:single

@ -0,0 +1,92 @@
<!--
# BUILD.md
# Libresonic/libresonic
-->
Requirements
------------
* Recent version of [Maven](http://maven.apache.org/).
* A JDK installation. 1.8.x series of OpenJDK or Oracle JDK 8+ should work.
* Optional: lintian and fakeroot, for .deb package
* Optional: rpm and rpmlint, for .rpm package
* Test as follows:
```
$ which mvn
/usr/local/bin/mvn
$ echo $JAVA_HOME
/usr/lib/jvm/java-1.8.0-openjdk.x86_64
$
```
Now you can clone a copy of this repository:
```
$ git clone git://github.com/Libresonic/libresonic.git
$ cd libresonic
$
```
Standalone WAR
--------------
At this point you are ready to build the basic Libresonic WAR. This is required for all the other build targets, so you should do it before proceeding.
```
$ mvn package
<lots of buildspam>
[INFO] Building war: /path/to/repo/libresonic/libresonic-main/target/libresonic.war
<more buildspam>
$
```
Tomcat Installation
-------------------
The WAR may be copied directly to a Tomcat server's webapps/ directory and deployed.
```
$ cp libresonic-main/target/libresonic.war /var/lib/tomcat6/webapps/
$
```
Packaged .deb
-------------
You can furthermore go ahead to create a .deb suitable for installation on
Debian or Ubuntu.
```
$ mvn -P full -pl libresonic-booter -am install
$ mvn -P full -pl libresonic-installer-debian -am install
$ sudo dpkg -i ./libresonic-installer-debian/target/libresonic-*.deb
```
Packaged RPM
------------
Building a RPM package is very similar :
```
$ mvn -P full -pl libresonic-booter -am install
$ mvn -P full,rpm -pl libresonic-installer-rpm -am install
$ sudo rpm -ivh libresonic-installer-rpm/target/libresonic-*.rpm
```
Additional release archives
---------------------------
Additional release archives can be built using the following commands :
```
$ mvn -Pfull -pl libresonic-assembly assembly:single
```
These archives are built in `libresonic-assembly/targets` and include :
* The source distribution
* The standalone archive (for use without a WAR container)
* The WAR archive (for WAR containers)
Good luck!

@ -3,6 +3,27 @@
# Libresonic/libresonic # Libresonic/libresonic
# --> # -->
v6.1.rc1
--------
* Metaproject: Jenkins builds!
* More documentation
* Translation updates
* Improve shuffling behaviour
* Lots of small fixes, many more to come
v6.1.beta1
----------
* Meant as a release candidate; failed to make it past the Primary election.
v6.1-alpha1
-----------
* Search+replace subsonic-->libresonic
* Move out of org.sourceforge.subsonic namespace
* Develop becomes horribly unstable, you shouldn't be using this.
v6.0.1 v6.0.1
------ ------

@ -2,7 +2,110 @@
# INSTALL.md # INSTALL.md
# Libresonic/libresonic # Libresonic/libresonic
--> -->
Libresonic Installation
-----------------------
At present, building from the `stable` branch is not recommended. See the `develop` branch for more information. You can download the [Stable WAR](https://github.com/Libresonic/libresonic/releases) and [deploy using Tomcat](https://tomcat.apache.org/tomcat-8.0-doc/deployer-howto.html). # Installing Libresonic
This document is designed to explain how to install LibreSonic as a Tomcat module, on a computer running Linux. As the project expands, this guide will also expand to include other operating systems.
## Installing From Pre-Compiled Package
### Prerequisites
In order to install and run Libresonic, you will need:
* A JDK installation. 1.8.x series of OpenJDK or Oracle JDK 8+ should work.
* A running [Tomcat](http://tomcat.apache.org/) server. If you're unfamiliar with Tomcat, there are many [guides](https://www.linode.com/docs/websites/frameworks/apache-tomcat-on-ubuntu-16-04) on it.
### Download Libresonic
Daily WAR files are built by Jenkins and available [here](https://jenkins.zifnab.net/job/libresonic/), curtesy of [zifnab06](https://github.com/zifnab06).
1. Download the latest war file:
wget https://jenkins.zifnab.net/job/libresonic/lastSuccessfulBuild/artifact/.repository/org/libresonic/player/libresonic-main/6.1.rc1/libresonic-main-6.1.rc1.war -O /var/lib/tomcat8/webapps/libresonic.war
Note that this command copies the war file directly to the Tomcat webapps directory, and renames it to `libresonic.war`.
2. Create the libresonic directory and assign ownership to the Tomcat system user (if running tomcat as a service):
mkdir /var/libresonic
chown tomcat8:tomcat8 /var/libresonic/
3. Start Tomcat, or restart it if running as a service, as in the example below using Systemd:
systemctl restart tomcat8.service
Note that it may take ~30 seconds after the service restarts for Tomcat to fully deploy the app. You can monitor /var/log/tomcat8/catalina.out for the following message:
INFO: Deployment of web application archive /var/lib/tomcat8/webapps/libresonic.war has finished in 46,192 ms
4. In your web browser, navigate to `192.0.2.10:8080/libresonic/`, replacing `192.0.2.0` with your server's IP address, or `127.0.0.1` if installing locally.
## Installing From Source
### Prerequisites
In order to build, install, and run Libresonic, you will need:
* A recent version of [Maven](http://maven.apache.org/).
* A JDK installation. 1.8.x series of OpenJDK or Oracle JDK 8+ should work.
* A running [Tomcat](http://tomcat.apache.org/) server. If you're unfamiliar with Tomcat, there are many [guides](https://www.linode.com/docs/websites/frameworks/apache-tomcat-on-ubuntu-16-04) on it.
On a Debian-based system, you can install all these prerequisites at once with:
apt-get update; apt-get install tomcat8 openjdk-7-jdk maven
### Test Your System
1. Confirm your Maven installation:
which mvn
2. Confirm that the $JAVA_HOME environment variable is set:
echo $JAVA_HOME
3. If Java is installed, but the `JAVA_HOME` variable not set, be sure to [set it](http://www.cyberciti.biz/faq/linux-unix-set-java_home-path-variable/) before you continue.
### Download and Build Libresonic
1. Clone the Libresonic repo:
git clone git://github.com/Libresonic/libresonic.git
cd libresonic
If you don't have a GitHub account, use https://github.com/Libresonic/libresonic.git instead.
2. At the time of this writing, we reccomend building from the development branch, as Libresonic has not had a stable release since being forked.
git checkout develop
3. Using Maven, build Subsonic:
mvn package
4. You should know have a war file:
ls libresonic-main/target/libresonic.war
libresonic-main/target/libresonic.war
5. Copy the war file to the Tomcat webapps directory:
cp libresonic-main/target/libresonic.war /var/lib/tomcat8/webapps
6. Create the libresonic directory and assign ownership to the Tomcat system user (if running tomcat as a service):
mkdir /var/libresonic
chown tomcat8:tomcat8 /var/libresonic/
7. Start Tomcat, or restart it if running as a service, as in the example below using Systemd:
systemctl restart tomcat8.service
Note that it may take ~30 seconds after the service restarts for Tomcat to fully deploy the app. You can monitor /var/log/tomcat8/catalina.out for the following message:
INFO: Deployment of web application archive /var/lib/tomcat8/webapps/libresonic.war has finished in 46,192 ms
8. In your web browser, navigate to `192.0.2.10:8080/libresonic/`, replacing `192.0.2.0` with your server's IP address, or `127.0.0.1` if installing locally.

@ -0,0 +1,36 @@
Upgrade to Libresonic from Subsonic
================
This guide helps you to migrate your data from Subsonic to Libresonic. It has been tested with Subsonic 5 to Libresonic 6.
Install Libresonic as described in INSTALL.md. The author of this guide used the standalone solution without Java Tomcat.
After installation of Libresonic, the database needs to be migrated. In preperation for that, stop the Libresonic service
sudo service libresonic stop
If you ran Subsonic before, your data will be (by default) stored in `/var/subsonic`. Assuming you did not use Libresonic before, we will delete all data from Libresonic
sudo rm -r /var/libresonic # WARNING: DELETES all Libresonic data (Subsonic data will be kept)
We then copy Subsonic data to Libresonic location. Be aware that a couple of files need to be renamed:
sudo cp -a /var/subsonic /var/libresonic
sudo mv /var/libresonic/subsonic_sh.log libresonic_sh.log
sudo mv /var/libresonic/subsonic.log libresonic.log
sudo mv /var/libresonic/subsonic.properties libresonic.properties
sudo mv /var/libresonic/db/subsonic.backup /var/libresonic/db/libresonic.backup
sudo mv /var/libresonic/db/subsonic.data /var/libresonic/db/libresonic.data
sudo mv /var/libresonic/db/subsonic.lck /var/libresonic/db/libresonic.lck
sudo mv /var/libresonic/db/subsonic.log /var/libresonic/db/libresonic.log
sudo mv /var/libresonic/db/subsonic.properties /var/libresonic/db/libresonic.properties
sudo mv /var/libresonic/db/subsonic.script /var/libresonic/db/libresonic.script
Then start Libresonic service again.
sudo service libresonic start
Your old settings will be there. If you wish, you can delete subsonic data
sudo rm -r /var/subsonic # Optional, THIS WILL DELETE SUBSONIC DATA

@ -0,0 +1,12 @@
#!/bin/bash
# contrib/deploy.sh
# Libresonic/libresonic
#
# Helper script to shorten dev/build/deployment
#
sudo systemctl stop tomcat
sudo rm /var/lib/tomcat/webapps/libresonic* -rf
sudo cp libresonic-main/target/libresonic.war /var/lib/tomcat/webapps/
sudo systemctl start tomcat

@ -0,0 +1,143 @@
# Installing Libresonic on FreeBSD 10.3 and FreeNAS 9.10
### Preamble
This guide will wallk you through the process of deploying Libresonic on FreeBSD either in a Jail on on the main system. The prerequisites are you have root access on your FreeBSD machine (or jail), the ip address of the machine (or jail) and the Libresonic war available at the [Libresonic github page](https://github.com/Libresonic/libresonic/releases)
If on FreeNAS create a standard jail in the web interface and enter the shell.
### 1. Install Tomcat
To run Libresonic we need a server to run it in. Log into your machine and then run these commands either as root or with sudo
#pkg install tomcat8 nano
Hit y on all prompts to complete installation of Tomcat
### 2.Configure Tomcat
Edit Tomcat's user configuration file with your favourite text editor. We installed nano in step 1.
#rm /usr/local/apache-tomcat-8.0/conf/tomcat-users.xml
#nano /usr/local/apache-tomcat-8.0/conf/tomcat-users.xml
Copy this
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<user username="admin" password="admin" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/>
</tomcat-users>
Use Ctrl-O to save and y to confirm. Ctrl-X to exit Nano.
If you wish to use a different username and password please append the second last line to contain your preferred username and password.
<user username="yourusername" password="yourpassword" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/>
### 3. Start and test Tomcat
#echo tomcat8_enable="YES" >> /etc/rc.conf
#service tomcat8 start
Test Tomcat is listening on port 8080
# netstat -an | grep 8080
It should return a line containing the IP address of your system (or jail). ie mine returns
tcp4 0 0 10.0.0.10.8080 *.* LISTEN
If in a jail it may also return the line "netstat: kvm not available: /dev/mem: No such file or directory" This can be ignored.
### 4. Create directories and set up permissions
#mkdir /var/libresonic
#chown -R www:www /var/libresonic
#chown -R www:www /usr/local/apache-tomcat-8.0/webapps
### 5. Deploy Libresonic
Open a web browser and enter your servers IP address in the url bar followed by :8080 eg
10.0.0.10:8080
You should be greeted by the Apache Tomcat page. Click on the Manager App button on the right of the page and enter the username and password used in step 3. Default was username: admin and password: admin
Scroll down to Deploy and the subheading "WAR file to deploy" hit choose file and select the libresonic.war downloaded in the preamble. After selecting press the deploy button. Scroll up and press start. When the page refreshes a message "OK - Started application at context path /libresonic-v6.1.rc1" should be visible.
### 6. Navigate to Libresonic
In a browser. Take your server IP address and port and append the the context path from above
ie if the War deployed was called libresonic-v6.1.rc1.war navigate to:
10.0.0.10:8080/libresonic-v6.1.rc1/
### 7. Log into Libresonic
Log in. The default is username: admin password: admin
Follow the prompts on the web page to change the password. This will log you out. Please re-login with your new password
### 8. Set up media
If you are on FreeBSD in a jail, consult the documentation for your Jail Manager tool on how to pass through storage. If using FreeNAS please use the FreeNAS webui to pass through the dataset containing your music.
In Libresonic click 2. Setup Media folders.
Name your media folder and put in the path to your music. Then click "Scan media folders now"
Congratulations you have set up Libresonic
##Transcoding Support
If you want transcoding and DON'T need mp3 support
#pkg install ffmpeg
#ln -s /usr/local/bin/ffmpeg /var/libresonic/transcode/ffmpeg
#service tomcat8 restart
Congratulations you have transcoding enabled
If you need mp3 support and most likely you will the process is more arduous as FreeBSD's ffmpeg doesn't contain mp3 support by default and must be configured and compiled by the user.
### 1. Install ffmpeg dependencies and Ports Tree
Install the dependencies required to build and use ffmpeg
#pkg install yasm binutils texi2html frei0r v4l_compat gmake pkgconf perl5 fontconfig freetype2 opencv-core schroedinger libtheora libv4l libva libvdpau libvorbis libvpx libx264 xvid gnutls libiconv
Now install the FreeBSD Ports Tree
#portsnap fetch
#portsnap extract
### 2. Build ffmpeg
Navigate to the ffmpeg port directory
#cd /usr/ports/multimedia/ffmpeg
Configure ffmpeg build
#make configure
This will bring up a menu. Scroll down using arrow keys to "LAME" and hit the spacebar to enable it. Press enter to continue.
The ffmpeg source files will automatically be downloaded then you will be presented with an additional prompt to install documentation. I uncheck with spacebar then press enter to continue.
Commence build and installation of ffmpeg
#make install clean
Building ffmpeg will take some time depending on the capabilities of your machine, please be patient.
Link ffmpeg to where Libresonic expects the transcoder to be.
#ln -s /usr/local/bin/ffmpeg /var/libresonic/transcode/ffmpeg
Finally restart tomcat
#service tomcat8 restart
Congratulations you have ffmpeg with mp3 support installed ready for Libresonic to use.

@ -0,0 +1,111 @@
<!--
# INSTALL.md
# Libresonic/libresonic
-->
# Installing Libresonic
This document is designed to explain how to install LibreSonic as a Tomcat module, on a computer running Linux. As the project expands, this guide will also expand to include other operating systems.
## Installing From Pre-Compiled Package
### Prerequisites
In order to install and run Libresonic, you will need:
* A JDK installation. 1.8.x series of OpenJDK or Oracle JDK 8+ should work.
* A running [Tomcat](http://tomcat.apache.org/) server. If you're unfamiliar with Tomcat, there are many [guides](https://www.linode.com/docs/websites/frameworks/apache-tomcat-on-ubuntu-16-04) on it.
### Download Libresonic
Daily WAR files are built by Jenkins and available [here](https://jenkins.zifnab.net/job/libresonic/), curtesy of [zifnab06](https://github.com/zifnab06).
1. Download the latest war file:
wget https://jenkins.zifnab.net/job/libresonic/lastSuccessfulBuild/artifact/.repository/org/libresonic/player/libresonic-main/6.1.rc1/libresonic-main-6.1.rc1.war -O /var/lib/tomcat8/webapps/libresonic.war
Note that this command copies the war file directly to the Tomcat webapps directory, and renames it to `libresonic.war`.
2. Create the libresonic directory and assign ownership to the Tomcat system user (if running tomcat as a service):
mkdir /var/libresonic
chown tomcat8:tomcat8 /var/libresonic/
3. Start Tomcat, or restart it if running as a service, as in the example below using Systemd:
systemctl restart tomcat8.service
Note that it may take ~30 seconds after the service restarts for Tomcat to fully deploy the app. You can monitor /var/log/tomcat8/catalina.out for the following message:
INFO: Deployment of web application archive /var/lib/tomcat8/webapps/libresonic.war has finished in 46,192 ms
4. In your web browser, navigate to `192.0.2.10:8080/libresonic/`, replacing `192.0.2.0` with your server's IP address, or `127.0.0.1` if installing locally.
## Installing From Source
### Prerequisites
In order to build, install, and run Libresonic, you will need:
* A recent version of [Maven](http://maven.apache.org/).
* A JDK installation. 1.8.x series of OpenJDK or Oracle JDK 8+ should work.
* A running [Tomcat](http://tomcat.apache.org/) server. If you're unfamiliar with Tomcat, there are many [guides](https://www.linode.com/docs/websites/frameworks/apache-tomcat-on-ubuntu-16-04) on it.
On a Debian-based system, you can install all these prerequisites at once with:
apt-get update; apt-get install tomcat8 openjdk-7-jdk maven
### Test Your System
1. Confirm your Maven installation:
which mvn
2. Confirm that the $JAVA_HOME environment variable is set:
echo $JAVA_HOME
3. If Java is installed, but the `JAVA_HOME` variable not set, be sure to [set it](http://www.cyberciti.biz/faq/linux-unix-set-java_home-path-variable/) before you continue.
### Download and Build Libresonic
1. Clone the Libresonic repo:
git clone git://github.com/Libresonic/libresonic.git
cd libresonic
If you don't have a GitHub account, use https://github.com/Libresonic/libresonic.git instead.
2. At the time of this writing, we reccomend building from the development branch, as Libresonic has not had a stable release since being forked.
git checkout develop
3. Using Maven, build Subsonic:
mvn package
4. You should know have a war file:
ls libresonic-main/target/libresonic.war
libresonic-main/target/libresonic.war
5. Copy the war file to the Tomcat webapps directory:
cp libresonic-main/target/libresonic.war /var/lib/tomcat8/webapps
6. Create the libresonic directory and assign ownership to the Tomcat system user (if running tomcat as a service):
mkdir /var/libresonic
chown tomcat8:tomcat8 /var/libresonic/
7. Start Tomcat, or restart it if running as a service, as in the example below using Systemd:
systemctl restart tomcat8.service
Note that it may take ~30 seconds after the service restarts for Tomcat to fully deploy the app. You can monitor /var/log/tomcat8/catalina.out for the following message:
INFO: Deployment of web application archive /var/lib/tomcat8/webapps/libresonic.war has finished in 46,192 ms
8. In your web browser, navigate to `192.0.2.10:8080/libresonic/`, replacing `192.0.2.0` with your server's IP address, or `127.0.0.1` if installing locally.

@ -2,21 +2,20 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.subsonic</groupId> <artifactId>libresonic-assembly</artifactId>
<artifactId>subsonic-assembly</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Subsonic Assembly</name> <name>Libresonic Assembly</name>
<parent> <parent>
<groupId>net.sourceforge.subsonic</groupId> <groupId>org.libresonic.player</groupId>
<artifactId>subsonic</artifactId> <artifactId>libresonic</artifactId>
<version>6.0.1</version> <version>6.1.rc1</version>
</parent> </parent>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>net.sourceforge.subsonic</groupId> <groupId>org.libresonic.player</groupId>
<artifactId>subsonic-main</artifactId> <artifactId>libresonic-main</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>war</type> <type>war</type>
</dependency> </dependency>
@ -24,7 +23,7 @@
</dependencies> </dependencies>
<build> <build>
<finalName>subsonic-${project.version}</finalName> <finalName>libresonic-${project.version}</finalName>
<plugins> <plugins>
<!-- Configuration of assembly plugin for creating the distributions. --> <!-- Configuration of assembly plugin for creating the distributions. -->

@ -22,7 +22,7 @@
</fileSet> </fileSet>
<fileSet> <fileSet>
<directory>../subsonic-main</directory> <directory>../libresonic-main</directory>
<includes> <includes>
<include>src/**</include> <include>src/**</include>
<include>pom.xml</include> <include>pom.xml</include>
@ -31,25 +31,25 @@
<include>README.TXT</include> <include>README.TXT</include>
<include>Getting Started.html</include> <include>Getting Started.html</include>
</includes> </includes>
<outputDirectory>subsonic-main</outputDirectory> <outputDirectory>libresonic-main</outputDirectory>
</fileSet> </fileSet>
<fileSet> <fileSet>
<directory>../subsonic-rest-api</directory> <directory>../libresonic-rest-api</directory>
<includes> <includes>
<include>src/**</include> <include>src/**</include>
<include>pom.xml</include> <include>pom.xml</include>
</includes> </includes>
<outputDirectory>subsonic-rest-api</outputDirectory> <outputDirectory>libresonic-rest-api</outputDirectory>
</fileSet> </fileSet>
<fileSet> <fileSet>
<directory>../subsonic-sonos-api</directory> <directory>../libresonic-sonos-api</directory>
<includes> <includes>
<include>src/**</include> <include>src/**</include>
<include>pom.xml</include> <include>pom.xml</include>
</includes> </includes>
<outputDirectory>subsonic-sonos-api</outputDirectory> <outputDirectory>libresonic-sonos-api</outputDirectory>
</fileSet> </fileSet>
</fileSets> </fileSets>

@ -8,7 +8,7 @@
<includeBaseDirectory>false</includeBaseDirectory> <includeBaseDirectory>false</includeBaseDirectory>
<fileSets> <fileSets>
<fileSet> <fileSet>
<directory>../subsonic-main</directory> <directory>../libresonic-main</directory>
<outputDirectory/> <outputDirectory/>
<includes> <includes>
<include>README.TXT</include> <include>README.TXT</include>
@ -17,25 +17,25 @@
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<directory>../subsonic-main/target</directory> <directory>../libresonic-main/target</directory>
<outputDirectory/> <outputDirectory/>
<includes> <includes>
<include>*.war</include> <include>*.war</include>
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<directory>../subsonic-booter/target</directory> <directory>../libresonic-booter/target</directory>
<outputDirectory/> <outputDirectory/>
<includes> <includes>
<include>subsonic-booter-jar-with-dependencies.jar</include> <include>libresonic-booter-jar-with-dependencies.jar</include>
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<directory>../subsonic-booter/src/main/script</directory> <directory>../libresonic-booter/src/main/script</directory>
<outputDirectory/> <outputDirectory/>
<includes> <includes>
<include>subsonic.sh</include> <include>libresonic.sh</include>
<include>subsonic.bat</include> <include>libresonic.bat</include>
</includes> </includes>
<fileMode>0777</fileMode> <fileMode>0777</fileMode>
</fileSet> </fileSet>

@ -8,7 +8,7 @@
<includeBaseDirectory>false</includeBaseDirectory> <includeBaseDirectory>false</includeBaseDirectory>
<fileSets> <fileSets>
<fileSet> <fileSet>
<directory>../subsonic-main</directory> <directory>../libresonic-main</directory>
<outputDirectory></outputDirectory> <outputDirectory></outputDirectory>
<includes> <includes>
<include>README.TXT</include> <include>README.TXT</include>
@ -17,7 +17,7 @@
</includes> </includes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<directory>../subsonic-main/target</directory> <directory>../libresonic-main/target</directory>
<outputDirectory></outputDirectory> <outputDirectory></outputDirectory>
<includes> <includes>
<include>*.war</include> <include>*.war</include>

@ -2,14 +2,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.subsonic</groupId> <artifactId>libresonic-booter</artifactId>
<artifactId>subsonic-booter</artifactId> <name>Libresonic Booter</name>
<name>Subsonic Booter</name>
<parent> <parent>
<groupId>net.sourceforge.subsonic</groupId> <groupId>org.libresonic.player</groupId>
<artifactId>subsonic</artifactId> <artifactId>libresonic</artifactId>
<version>6.0.1</version> <version>6.1.rc1</version>
</parent> </parent>
<dependencies> <dependencies>
@ -68,7 +67,7 @@
</dependencies> </dependencies>
<build> <build>
<finalName>subsonic-booter</finalName> <finalName>libresonic-booter</finalName>
<plugins> <plugins>
<plugin> <plugin>

@ -1,4 +1,4 @@
package net.sourceforge.subsonic.booter; package org.libresonic.player.booter;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -7,11 +7,11 @@ import javax.swing.JOptionPane;
import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext;
import net.sourceforge.subsonic.booter.agent.SettingsPanel; import org.libresonic.player.booter.agent.SettingsPanel;
import net.sourceforge.subsonic.booter.agent.SubsonicAgent; import org.libresonic.player.booter.agent.LibresonicAgent;
/** /**
* Application entry point for Subsonic booter. * Application entry point for Libresonic booter.
* <p/> * <p/>
* Use command line argument "-agent" to start the Windows service monitoring agent, * Use command line argument "-agent" to start the Windows service monitoring agent,
* or "-mac" to start the Mac version of the deployer. * or "-mac" to start the Mac version of the deployer.
@ -25,7 +25,7 @@ public class Main {
if ("-agent".equals(contextName)) { if ("-agent".equals(contextName)) {
SubsonicAgent agent = (SubsonicAgent) context.getBean("agent"); LibresonicAgent agent = (LibresonicAgent) context.getBean("agent");
SettingsPanel settingsPanel = (SettingsPanel) context.getBean("settingsPanel"); SettingsPanel settingsPanel = (SettingsPanel) context.getBean("settingsPanel");
agent.setElevated(args.contains("-elevated")); agent.setElevated(args.contains("-elevated"));

@ -1,4 +1,4 @@
package net.sourceforge.subsonic.booter.agent; package org.libresonic.player.booter.agent;
import java.awt.Desktop; import java.awt.Desktop;
import java.net.URI; import java.net.URI;
@ -16,35 +16,35 @@ import org.apache.commons.io.IOUtils;
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; import com.jgoodies.looks.plastic.PlasticXPLookAndFeel;
import net.sourceforge.subsonic.booter.deployer.DeploymentStatus; import org.libresonic.player.booter.deployer.DeploymentStatus;
import net.sourceforge.subsonic.booter.deployer.SubsonicDeployerService; import org.libresonic.player.booter.deployer.LibresonicDeployerService;
/** /**
* Responsible for deploying the Subsonic web app in * Responsible for deploying the Libresonic web app in
* the embedded Jetty container. * the embedded Jetty container.
* *
* @author Sindre Mehus * @author Sindre Mehus
*/ */
public class SubsonicAgent { public class LibresonicAgent {
private final List<SubsonicListener> listeners = new ArrayList<SubsonicListener>(); private final List<LibresonicListener> listeners = new ArrayList<LibresonicListener>();
private final TrayController trayController; private final TrayController trayController;
private SubsonicFrame frame; private LibresonicFrame frame;
private final SubsonicDeployerService service; private final LibresonicDeployerService service;
private static final int POLL_INTERVAL_DEPLOYMENT_INFO_SECONDS = 5; private static final int POLL_INTERVAL_DEPLOYMENT_INFO_SECONDS = 5;
private static final int POLL_INTERVAL_SERVICE_STATUS_SECONDS = 5; private static final int POLL_INTERVAL_SERVICE_STATUS_SECONDS = 5;
private String url; private String url;
private boolean serviceStatusPollingEnabled; private boolean serviceStatusPollingEnabled;
private boolean elevated; private boolean elevated;
public SubsonicAgent(SubsonicDeployerService service) { public LibresonicAgent(LibresonicDeployerService service) {
this.service = service; this.service = service;
setLookAndFeel(); setLookAndFeel();
trayController = new TrayController(this); trayController = new TrayController(this);
startPolling(); startPolling();
} }
public void setFrame(SubsonicFrame frame) { public void setFrame(LibresonicFrame frame) {
this.frame = frame; this.frame = frame;
} }
@ -85,7 +85,7 @@ public class SubsonicAgent {
} }
private String getServiceStatus() throws Exception { private String getServiceStatus() throws Exception {
Process process = Runtime.getRuntime().exec("subsonic-service.exe -status"); Process process = Runtime.getRuntime().exec("libresonic-service.exe -status");
return IOUtils.toString(process.getInputStream()); return IOUtils.toString(process.getInputStream());
} }
@ -95,7 +95,7 @@ public class SubsonicAgent {
public void startOrStopService(boolean start) { public void startOrStopService(boolean start) {
try { try {
String cmd = "subsonic-service.exe " + (start ? "-start" : "-stop"); String cmd = "libresonic-service.exe " + (start ? "-start" : "-stop");
System.err.println("Executing: " + cmd); System.err.println("Executing: " + cmd);
Runtime.getRuntime().exec(cmd); Runtime.getRuntime().exec(cmd);
@ -114,7 +114,7 @@ public class SubsonicAgent {
List<String> command = new ArrayList<String>(); List<String> command = new ArrayList<String>();
command.add("cmd"); command.add("cmd");
command.add("/c"); command.add("/c");
command.add("subsonic-agent-elevated.exe"); command.add("libresonic-agent-elevated.exe");
command.addAll(Arrays.asList(args)); command.addAll(Arrays.asList(args));
ProcessBuilder builder = new ProcessBuilder(); ProcessBuilder builder = new ProcessBuilder();
@ -123,7 +123,7 @@ public class SubsonicAgent {
builder.start(); builder.start();
System.exit(0); System.exit(0);
} catch (Exception x) { } catch (Exception x) {
JOptionPane.showMessageDialog(frame, "Failed to elevate Subsonic Control Panel. " + x, "Error", JOptionPane.WARNING_MESSAGE); JOptionPane.showMessageDialog(frame, "Failed to elevate Libresonic Control Panel. " + x, "Error", JOptionPane.WARNING_MESSAGE);
x.printStackTrace(); x.printStackTrace();
} }
} }
@ -154,7 +154,7 @@ public class SubsonicAgent {
} }
} }
public void addListener(SubsonicListener listener) { public void addListener(LibresonicListener listener) {
listeners.add(listener); listeners.add(listener);
} }
@ -163,13 +163,13 @@ public class SubsonicAgent {
url = status.getURL(); url = status.getURL();
} }
for (SubsonicListener listener : listeners) { for (LibresonicListener listener : listeners) {
listener.notifyDeploymentStatus(status); listener.notifyDeploymentStatus(status);
} }
} }
private void notifyServiceStatus(String status) { private void notifyServiceStatus(String status) {
for (SubsonicListener listener : listeners) { for (LibresonicListener listener : listeners) {
listener.notifyServiceStatus(status); listener.notifyServiceStatus(status);
} }
} }

@ -1,8 +1,8 @@
package net.sourceforge.subsonic.booter.agent; package org.libresonic.player.booter.agent;
import com.jgoodies.forms.factories.Borders; import com.jgoodies.forms.factories.Borders;
import com.jgoodies.forms.factories.ButtonBarFactory; import com.jgoodies.forms.factories.ButtonBarFactory;
import net.sourceforge.subsonic.booter.Main; import org.libresonic.player.booter.Main;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -17,18 +17,18 @@ import java.util.Arrays;
* *
* @author Sindre Mehus * @author Sindre Mehus
*/ */
public class SubsonicFrame extends JFrame { public class LibresonicFrame extends JFrame {
private final SubsonicAgent subsonicAgent; private final LibresonicAgent libresonicAgent;
private final StatusPanel statusPanel; private final StatusPanel statusPanel;
private final SettingsPanel settingsPanel; private final SettingsPanel settingsPanel;
private JTabbedPane tabbedPane; private JTabbedPane tabbedPane;
private JButton closeButton; private JButton closeButton;
public SubsonicFrame(SubsonicAgent subsonicAgent, StatusPanel statusPanel, SettingsPanel settingsPanel) { public LibresonicFrame(LibresonicAgent libresonicAgent, StatusPanel statusPanel, SettingsPanel settingsPanel) {
super("Subsonic Control Panel"); super("Libresonic Control Panel");
this.subsonicAgent = subsonicAgent; this.libresonicAgent = libresonicAgent;
this.statusPanel = statusPanel; this.statusPanel = statusPanel;
this.settingsPanel = settingsPanel; this.settingsPanel = settingsPanel;
createComponents(); createComponents();
@ -43,18 +43,18 @@ public class SubsonicFrame extends JFrame {
private void setupIcons() { private void setupIcons() {
Toolkit toolkit = Toolkit.getDefaultToolkit(); Toolkit toolkit = Toolkit.getDefaultToolkit();
// Window.setIconImages() was added in Java 1.6. Since Subsonic only requires 1.5, we // Window.setIconImages() was added in Java 1.6. Since Libresonic only requires 1.5, we
// use reflection to invoke it. // use reflection to invoke it.
try { try {
Method method = Window.class.getMethod("setIconImages", java.util.List.class); Method method = Window.class.getMethod("setIconImages", java.util.List.class);
java.util.List<Image> images = Arrays.asList( java.util.List<Image> images = Arrays.asList(
toolkit.createImage(Main.class.getResource("/images/subsonic-16.png")), toolkit.createImage(Main.class.getResource("/images/libresonic-16.png")),
toolkit.createImage(Main.class.getResource("/images/subsonic-32.png")), toolkit.createImage(Main.class.getResource("/images/libresonic-32.png")),
toolkit.createImage(Main.class.getResource("/images/subsonic-512.png"))); toolkit.createImage(Main.class.getResource("/images/libresonic-512.png")));
method.invoke(this, images); method.invoke(this, images);
} catch (Throwable x) { } catch (Throwable x) {
// Fallback to old method. // Fallback to old method.
setIconImage(toolkit.createImage(Main.class.getResource("/images/subsonic-32.png"))); setIconImage(toolkit.createImage(Main.class.getResource("/images/libresonic-32.png")));
} }
} }
@ -92,7 +92,7 @@ public class SubsonicFrame extends JFrame {
@Override @Override
public void setVisible(boolean b) { public void setVisible(boolean b) {
super.setVisible(b); super.setVisible(b);
subsonicAgent.setServiceStatusPollingEnabled(b); libresonicAgent.setServiceStatusPollingEnabled(b);
} }
public void showStatusPanel() { public void showStatusPanel() {

@ -1,17 +1,17 @@
package net.sourceforge.subsonic.booter.agent; package org.libresonic.player.booter.agent;
import net.sourceforge.subsonic.booter.deployer.DeploymentStatus; import org.libresonic.player.booter.deployer.DeploymentStatus;
/** /**
* Callback interface implemented by GUI classes that wants to be notified when * Callback interface implemented by GUI classes that wants to be notified when
* the state of the Subsonic deployment changes. * the state of the Libresonic deployment changes.
* *
* @author Sindre Mehus * @author Sindre Mehus
*/ */
public interface SubsonicListener { public interface LibresonicListener {
/** /**
* Invoked when new information about the Subsonic deployment is available. * Invoked when new information about the Libresonic deployment is available.
* *
* @param deploymentStatus The new deployment status, or <code>null</code> if an * @param deploymentStatus The new deployment status, or <code>null</code> if an
* error occurred while retrieving the status. * error occurred while retrieving the status.
@ -19,7 +19,7 @@ public interface SubsonicListener {
void notifyDeploymentStatus(DeploymentStatus deploymentStatus); void notifyDeploymentStatus(DeploymentStatus deploymentStatus);
/** /**
* Invoked when new information about the Subsonic Windows service is available. * Invoked when new information about the Libresonic Windows service is available.
* *
* @param serviceStatus The new service status, or <code>null</code> if an * @param serviceStatus The new service status, or <code>null</code> if an
* error occurred while retrieving the status. * error occurred while retrieving the status.

@ -1,11 +1,11 @@
package net.sourceforge.subsonic.booter.agent; package org.libresonic.player.booter.agent;
import com.jgoodies.forms.builder.DefaultFormBuilder; import com.jgoodies.forms.builder.DefaultFormBuilder;
import com.jgoodies.forms.factories.Borders; import com.jgoodies.forms.factories.Borders;
import com.jgoodies.forms.factories.ButtonBarFactory; import com.jgoodies.forms.factories.ButtonBarFactory;
import com.jgoodies.forms.layout.FormLayout; import com.jgoodies.forms.layout.FormLayout;
import net.sourceforge.subsonic.booter.deployer.DeploymentStatus; import org.libresonic.player.booter.deployer.DeploymentStatus;
import net.sourceforge.subsonic.booter.deployer.SubsonicDeployer; import org.libresonic.player.booter.deployer.LibresonicDeployer;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -29,15 +29,15 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
/** /**
* Panel displaying the settings of the Subsonic service. * Panel displaying the settings of the Libresonic service.
* *
* @author Sindre Mehus * @author Sindre Mehus
*/ */
public class SettingsPanel extends JPanel implements SubsonicListener { public class SettingsPanel extends JPanel implements LibresonicListener {
private static final Format INTEGER_FORMAT = new DecimalFormat("0", DecimalFormatSymbols.getInstance(Locale.UK)); private static final Format INTEGER_FORMAT = new DecimalFormat("0", DecimalFormatSymbols.getInstance(Locale.UK));
private final SubsonicAgent subsonicAgent; private final LibresonicAgent libresonicAgent;
private JFormattedTextField portTextField; private JFormattedTextField portTextField;
private JCheckBox httpsPortCheckBox; private JCheckBox httpsPortCheckBox;
private JFormattedTextField httpsPortTextField; private JFormattedTextField httpsPortTextField;
@ -45,14 +45,14 @@ public class SettingsPanel extends JPanel implements SubsonicListener {
private JFormattedTextField memoryTextField; private JFormattedTextField memoryTextField;
private JButton defaultButton; private JButton defaultButton;
private JButton saveButton; private JButton saveButton;
public SettingsPanel(SubsonicAgent subsonicAgent) { public SettingsPanel(LibresonicAgent libresonicAgent) {
this.subsonicAgent = subsonicAgent; this.libresonicAgent = libresonicAgent;
createComponents(); createComponents();
configureComponents(); configureComponents();
layoutComponents(); layoutComponents();
addBehaviour(); addBehaviour();
readValues(); readValues();
subsonicAgent.addListener(this); libresonicAgent.addListener(this);
} }
public void readValues() { public void readValues() {
@ -68,21 +68,21 @@ public class SettingsPanel extends JPanel implements SubsonicListener {
private int getHttpsPortFromOptionsFile() { private int getHttpsPortFromOptionsFile() {
try { try {
String s = grep("-Dsubsonic.httpsPort=(\\d+)"); String s = grep("-Dlibresonic.httpsPort=(\\d+)");
return Integer.parseInt(s); return Integer.parseInt(s);
} catch (Exception x) { } catch (Exception x) {
x.printStackTrace(); x.printStackTrace();
return SubsonicDeployer.DEFAULT_HTTPS_PORT; return LibresonicDeployer.DEFAULT_HTTPS_PORT;
} }
} }
private int getPortFromOptionsFile() { private int getPortFromOptionsFile() {
try { try {
String s = grep("-Dsubsonic.port=(\\d+)"); String s = grep("-Dlibresonic.port=(\\d+)");
return Integer.parseInt(s); return Integer.parseInt(s);
} catch (Exception x) { } catch (Exception x) {
x.printStackTrace(); x.printStackTrace();
return SubsonicDeployer.DEFAULT_PORT; return LibresonicDeployer.DEFAULT_PORT;
} }
} }
@ -92,20 +92,20 @@ public class SettingsPanel extends JPanel implements SubsonicListener {
return Integer.parseInt(s); return Integer.parseInt(s);
} catch (Exception x) { } catch (Exception x) {
x.printStackTrace(); x.printStackTrace();
return SubsonicDeployer.DEFAULT_MEMORY_LIMIT; return LibresonicDeployer.DEFAULT_MEMORY_LIMIT;
} }
} }
private String getContextPathFromOptionsFile() { private String getContextPathFromOptionsFile() {
try { try {
String s = grep("-Dsubsonic.contextPath=(.*)"); String s = grep("-Dlibresonic.contextPath=(.*)");
if (s == null) { if (s == null) {
throw new NullPointerException(); throw new NullPointerException();
} }
return s; return s;
} catch (Exception x) { } catch (Exception x) {
x.printStackTrace(); x.printStackTrace();
return SubsonicDeployer.DEFAULT_CONTEXT_PATH; return LibresonicDeployer.DEFAULT_CONTEXT_PATH;
} }
} }
@ -122,7 +122,7 @@ public class SettingsPanel extends JPanel implements SubsonicListener {
private void configureComponents() { private void configureComponents() {
contextPathComboBox.setEditable(true); contextPathComboBox.setEditable(true);
contextPathComboBox.addItem("/"); contextPathComboBox.addItem("/");
contextPathComboBox.addItem("/subsonic"); contextPathComboBox.addItem("/libresonic");
contextPathComboBox.addItem("/music"); contextPathComboBox.addItem("/music");
} }
@ -145,7 +145,7 @@ public class SettingsPanel extends JPanel implements SubsonicListener {
saveButton.addActionListener(new ActionListener() { saveButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
try { try {
subsonicAgent.checkElevation("-settings", getMemoryLimit() + "," + getPort() + "," + getHttpsPort() + "," + getContextPath()); libresonicAgent.checkElevation("-settings", getMemoryLimit() + "," + getPort() + "," + getHttpsPort() + "," + getContextPath());
saveSettings(getMemoryLimit(), getPort(), getHttpsPort(), getContextPath()); saveSettings(getMemoryLimit(), getPort(), getHttpsPort(), getContextPath());
} catch (Exception x) { } catch (Exception x) {
JOptionPane.showMessageDialog(SettingsPanel.this, x.getMessage(), "Error", JOptionPane.WARNING_MESSAGE); JOptionPane.showMessageDialog(SettingsPanel.this, x.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
@ -155,12 +155,12 @@ public class SettingsPanel extends JPanel implements SubsonicListener {
defaultButton.addActionListener(new ActionListener() { defaultButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
portTextField.setValue(SubsonicDeployer.DEFAULT_PORT); portTextField.setValue(LibresonicDeployer.DEFAULT_PORT);
httpsPortTextField.setValue(4443); httpsPortTextField.setValue(4443);
httpsPortTextField.setEnabled(false); httpsPortTextField.setEnabled(false);
httpsPortCheckBox.setSelected(false); httpsPortCheckBox.setSelected(false);
memoryTextField.setValue(SubsonicDeployer.DEFAULT_MEMORY_LIMIT); memoryTextField.setValue(LibresonicDeployer.DEFAULT_MEMORY_LIMIT);
contextPathComboBox.setSelectedItem(SubsonicDeployer.DEFAULT_CONTEXT_PATH); contextPathComboBox.setSelectedItem(LibresonicDeployer.DEFAULT_CONTEXT_PATH);
} }
}); });
@ -237,14 +237,14 @@ public class SettingsPanel extends JPanel implements SubsonicListener {
if (line.startsWith("-Xmx")) { if (line.startsWith("-Xmx")) {
newLines.add("-Xmx" + memoryLimit + "m"); newLines.add("-Xmx" + memoryLimit + "m");
memoryLimitAdded = true; memoryLimitAdded = true;
} else if (line.startsWith("-Dsubsonic.port=")) { } else if (line.startsWith("-Dlibresonic.port=")) {
newLines.add("-Dsubsonic.port=" + port); newLines.add("-Dlibresonic.port=" + port);
portAdded = true; portAdded = true;
} else if (line.startsWith("-Dsubsonic.httpsPort=")) { } else if (line.startsWith("-Dlibresonic.httpsPort=")) {
newLines.add("-Dsubsonic.httpsPort=" + httpsPort); newLines.add("-Dlibresonic.httpsPort=" + httpsPort);
httpsPortAdded = true; httpsPortAdded = true;
} else if (line.startsWith("-Dsubsonic.contextPath=")) { } else if (line.startsWith("-Dlibresonic.contextPath=")) {
newLines.add("-Dsubsonic.contextPath=" + contextPath); newLines.add("-Dlibresonic.contextPath=" + contextPath);
contextPathAdded = true; contextPathAdded = true;
} else { } else {
newLines.add(line); newLines.add(line);
@ -255,25 +255,25 @@ public class SettingsPanel extends JPanel implements SubsonicListener {
newLines.add("-Xmx" + memoryLimit + "m"); newLines.add("-Xmx" + memoryLimit + "m");
} }
if (!portAdded) { if (!portAdded) {
newLines.add("-Dsubsonic.port=" + port); newLines.add("-Dlibresonic.port=" + port);
} }
if (!httpsPortAdded) { if (!httpsPortAdded) {
newLines.add("-Dsubsonic.httpsPort=" + httpsPort); newLines.add("-Dlibresonic.httpsPort=" + httpsPort);
} }
if (!contextPathAdded) { if (!contextPathAdded) {
newLines.add("-Dsubsonic.contextPath=" + contextPath); newLines.add("-Dlibresonic.contextPath=" + contextPath);
} }
writeLines(file, newLines); writeLines(file, newLines);
JOptionPane.showMessageDialog(SettingsPanel.this, JOptionPane.showMessageDialog(SettingsPanel.this,
"Please restart Subsonic for the new settings to take effect.", "Please restart Libresonic for the new settings to take effect.",
"Settings changed", JOptionPane.INFORMATION_MESSAGE); "Settings changed", JOptionPane.INFORMATION_MESSAGE);
} }
private File getOptionsFile() throws SettingsException { private File getOptionsFile() throws SettingsException {
File file = new File("subsonic-service.exe.vmoptions"); File file = new File("libresonic-service.exe.vmoptions");
if (!file.isFile() || !file.exists()) { if (!file.isFile() || !file.exists()) {
throw new SettingsException("File " + file.getAbsolutePath() + " not found."); throw new SettingsException("File " + file.getAbsolutePath() + " not found.");
} }

@ -1,10 +1,10 @@
package net.sourceforge.subsonic.booter.agent; package org.libresonic.player.booter.agent;
import com.jgoodies.forms.builder.DefaultFormBuilder; import com.jgoodies.forms.builder.DefaultFormBuilder;
import com.jgoodies.forms.factories.Borders; import com.jgoodies.forms.factories.Borders;
import com.jgoodies.forms.factories.ButtonBarFactory; import com.jgoodies.forms.factories.ButtonBarFactory;
import com.jgoodies.forms.layout.FormLayout; import com.jgoodies.forms.layout.FormLayout;
import net.sourceforge.subsonic.booter.deployer.DeploymentStatus; import org.libresonic.player.booter.deployer.DeploymentStatus;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -14,15 +14,15 @@ import java.text.DateFormat;
import java.util.Locale; import java.util.Locale;
/** /**
* Panel displaying the status of the Subsonic service. * Panel displaying the status of the Libresonic service.
* *
* @author Sindre Mehus * @author Sindre Mehus
*/ */
public class StatusPanel extends JPanel implements SubsonicListener { public class StatusPanel extends JPanel implements LibresonicListener {
private static final DateFormat DATE_FORMAT = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM, Locale.US); private static final DateFormat DATE_FORMAT = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM, Locale.US);
private final SubsonicAgent subsonicAgent; private final LibresonicAgent libresonicAgent;
private JTextField statusTextField; private JTextField statusTextField;
private JTextField startedTextField; private JTextField startedTextField;
@ -32,13 +32,13 @@ public class StatusPanel extends JPanel implements SubsonicListener {
private JButton stopButton; private JButton stopButton;
private JButton urlButton; private JButton urlButton;
public StatusPanel(SubsonicAgent subsonicAgent) { public StatusPanel(LibresonicAgent libresonicAgent) {
this.subsonicAgent = subsonicAgent; this.libresonicAgent = libresonicAgent;
createComponents(); createComponents();
configureComponents(); configureComponents();
layoutComponents(); layoutComponents();
addBehaviour(); addBehaviour();
subsonicAgent.addListener(this); libresonicAgent.addListener(this);
} }
private void createComponents() { private void createComponents() {
@ -86,19 +86,19 @@ public class StatusPanel extends JPanel implements SubsonicListener {
private void addBehaviour() { private void addBehaviour() {
urlButton.addActionListener(new ActionListener() { urlButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
subsonicAgent.openBrowser(); libresonicAgent.openBrowser();
} }
}); });
startButton.addActionListener(new ActionListener() { startButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
subsonicAgent.checkElevation("-start"); libresonicAgent.checkElevation("-start");
subsonicAgent.startOrStopService(true); libresonicAgent.startOrStopService(true);
} }
}); });
stopButton.addActionListener(new ActionListener() { stopButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
subsonicAgent.checkElevation("-stop"); libresonicAgent.checkElevation("-stop");
subsonicAgent.startOrStopService(false); libresonicAgent.startOrStopService(false);
} }
}); });
} }

@ -1,4 +1,4 @@
package net.sourceforge.subsonic.booter.agent; package org.libresonic.player.booter.agent;
import java.awt.Image; import java.awt.Image;
import java.awt.MenuItem; import java.awt.MenuItem;
@ -12,16 +12,16 @@ import java.net.URL;
import javax.swing.AbstractAction; import javax.swing.AbstractAction;
import javax.swing.Action; import javax.swing.Action;
import net.sourceforge.subsonic.booter.deployer.DeploymentStatus; import org.libresonic.player.booter.deployer.DeploymentStatus;
/** /**
* Controls the Subsonic tray icon. * Controls the Libresonic tray icon.
* *
* @author Sindre Mehus * @author Sindre Mehus
*/ */
public class TrayController implements SubsonicListener { public class TrayController implements LibresonicListener {
private final SubsonicAgent subsonicAgent; private final LibresonicAgent libresonicAgent;
private TrayIcon trayIcon; private TrayIcon trayIcon;
private Action openAction; private Action openAction;
@ -30,48 +30,48 @@ public class TrayController implements SubsonicListener {
private Image startedImage; private Image startedImage;
private Image stoppedImage; private Image stoppedImage;
public TrayController(SubsonicAgent subsonicAgent) { public TrayController(LibresonicAgent libresonicAgent) {
this.subsonicAgent = subsonicAgent; this.libresonicAgent = libresonicAgent;
try { try {
createActions(); createActions();
createComponents(); createComponents();
addBehaviour(); addBehaviour();
installComponents(); installComponents();
subsonicAgent.addListener(this); libresonicAgent.addListener(this);
} catch (Throwable x) { } catch (Throwable x) {
System.err.println("Disabling tray support."); System.err.println("Disabling tray support.");
} }
} }
public void showMessage() { public void showMessage() {
trayIcon.displayMessage("Subsonic", "Subsonic is now running. Click this balloon to get started.", trayIcon.displayMessage("Libresonic", "Libresonic is now running. Click this balloon to get started.",
TrayIcon.MessageType.INFO); TrayIcon.MessageType.INFO);
} }
private void createActions() { private void createActions() {
openAction = new AbstractAction("Open Subsonic in Browser") { openAction = new AbstractAction("Open Libresonic in Browser") {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
subsonicAgent.openBrowser(); libresonicAgent.openBrowser();
} }
}; };
controlPanelAction = new AbstractAction("Subsonic Control Panel") { controlPanelAction = new AbstractAction("Libresonic Control Panel") {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
subsonicAgent.showStatusPanel(); libresonicAgent.showStatusPanel();
} }
}; };
hideAction = new AbstractAction("Hide Tray Icon") { hideAction = new AbstractAction("Hide Tray Icon") {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
subsonicAgent.exit(); libresonicAgent.exit();
} }
}; };
} }
private void createComponents() { private void createComponents() {
startedImage = createImage("/images/subsonic-started-16.png"); startedImage = createImage("/images/libresonic-started-16.png");
stoppedImage = createImage("/images/subsonic-stopped-16.png"); stoppedImage = createImage("/images/libresonic-stopped-16.png");
PopupMenu menu = new PopupMenu(); PopupMenu menu = new PopupMenu();
menu.add(createMenuItem(openAction)); menu.add(createMenuItem(openAction));
@ -79,7 +79,7 @@ public class TrayController implements SubsonicListener {
menu.addSeparator(); menu.addSeparator();
menu.add(createMenuItem(hideAction)); menu.add(createMenuItem(hideAction));
trayIcon = new TrayIcon(stoppedImage, "Subsonic Music Streamer", menu); trayIcon = new TrayIcon(stoppedImage, "Libresonic Music Streamer", menu);
} }
private Image createImage(String resourceName) { private Image createImage(String resourceName) {

@ -1,4 +1,4 @@
package net.sourceforge.subsonic.booter.deployer; package org.libresonic.player.booter.deployer;
import java.util.Date; import java.util.Date;
import java.io.Serializable; import java.io.Serializable;

@ -1,4 +1,4 @@
package net.sourceforge.subsonic.booter.deployer; package org.libresonic.player.booter.deployer;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
@ -20,42 +20,42 @@ import org.mortbay.jetty.security.SslSocketConnector;
import org.mortbay.jetty.webapp.WebAppContext; import org.mortbay.jetty.webapp.WebAppContext;
/** /**
* Responsible for deploying the Subsonic web app in * Responsible for deploying the Libresonic web app in
* the embedded Jetty container. * the embedded Jetty container.
* <p/> * <p/>
* The following system properties may be used to customize the behaviour: * The following system properties may be used to customize the behaviour:
* <ul> * <ul>
* <li><code>subsonic.contextPath</code> - The context path at which Subsonic is deployed. Default "/".</li> * <li><code>libresonic.contextPath</code> - The context path at which Libresonic is deployed. Default "/".</li>
* <li><code>subsonic.port</code> - The port Subsonic will listen to. Default 4040.</li> * <li><code>libresonic.port</code> - The port Libresonic will listen to. Default 4040.</li>
* <li><code>subsonic.httpsPort</code> - The port Subsonic will listen to for HTTPS. Default 0, which disables HTTPS.</li> * <li><code>libresonic.httpsPort</code> - The port Libresonic will listen to for HTTPS. Default 0, which disables HTTPS.</li>
* <li><code>subsonic.war</code> - Subsonic WAR file, or exploded directory. Default "subsonic.war".</li> * <li><code>libresonic.war</code> - Libresonic WAR file, or exploded directory. Default "libresonic.war".</li>
* <li><code>subsonic.createLinkFile</code> - If set to "true", a Subsonic.url file is created in the working directory.</li> * <li><code>libresonic.createLinkFile</code> - If set to "true", a Libresonic.url file is created in the working directory.</li>
* <li><code>subsonic.ssl.keystore</code> - Path to an alternate SSL keystore.</li> * <li><code>libresonic.ssl.keystore</code> - Path to an alternate SSL keystore.</li>
* <li><code>subsonic.ssl.password</code> - Password of the alternate SSL keystore.</li> * <li><code>libresonic.ssl.password</code> - Password of the alternate SSL keystore.</li>
* </ul> * </ul>
* *
* @author Sindre Mehus * @author Sindre Mehus
*/ */
public class SubsonicDeployer implements SubsonicDeployerService { public class LibresonicDeployer implements LibresonicDeployerService {
public static final String DEFAULT_HOST = "0.0.0.0"; public static final String DEFAULT_HOST = "0.0.0.0";
public static final int DEFAULT_PORT = 4040; public static final int DEFAULT_PORT = 4040;
public static final int DEFAULT_HTTPS_PORT = 0; public static final int DEFAULT_HTTPS_PORT = 0;
public static final int DEFAULT_MEMORY_LIMIT = 150; public static final int DEFAULT_MEMORY_LIMIT = 150;
public static final String DEFAULT_CONTEXT_PATH = "/"; public static final String DEFAULT_CONTEXT_PATH = "/";
public static final String DEFAULT_WAR = "subsonic.war"; public static final String DEFAULT_WAR = "libresonic.war";
private static final int MAX_IDLE_TIME_MILLIS = 7 * 24 * 60 * 60 * 1000; // One week. private static final int MAX_IDLE_TIME_MILLIS = 7 * 24 * 60 * 60 * 1000; // One week.
private static final int HEADER_BUFFER_SIZE = 64 * 1024; private static final int HEADER_BUFFER_SIZE = 64 * 1024;
// Subsonic home directory. // Libresonic home directory.
private static final File SUBSONIC_HOME_WINDOWS = new File("c:/subsonic"); private static final File LIBRESONIC_HOME_WINDOWS = new File("c:/libresonic");
private static final File SUBSONIC_HOME_OTHER = new File("/var/subsonic"); private static final File LIBRESONIC_HOME_OTHER = new File("/var/libresonic");
private Throwable exception; private Throwable exception;
private File subsonicHome; private File libresonicHome;
private final Date startTime; private final Date startTime;
public SubsonicDeployer() { public LibresonicDeployer() {
// Enable shutdown hook for Ehcache. // Enable shutdown hook for Ehcache.
System.setProperty("net.sf.ehcache.enableShutdownHook", "true"); System.setProperty("net.sf.ehcache.enableShutdownHook", "true");
@ -66,16 +66,16 @@ public class SubsonicDeployer implements SubsonicDeployerService {
} }
private void createLinkFile() { private void createLinkFile() {
if ("true".equals(System.getProperty("subsonic.createLinkFile"))) { if ("true".equals(System.getProperty("libresonic.createLinkFile"))) {
Writer writer = null; Writer writer = null;
try { try {
writer = new FileWriter("subsonic.url"); writer = new FileWriter("libresonic.url");
writer.append("[InternetShortcut]"); writer.append("[InternetShortcut]");
writer.append(System.getProperty("line.separator")); writer.append(System.getProperty("line.separator"));
writer.append("URL=").append(getUrl()); writer.append("URL=").append(getUrl());
writer.flush(); writer.flush();
} catch (Throwable x) { } catch (Throwable x) {
System.err.println("Failed to create subsonic.url."); System.err.println("Failed to create libresonic.url.");
x.printStackTrace(); x.printStackTrace();
} finally { } finally {
if (writer != null) { if (writer != null) {
@ -108,8 +108,8 @@ public class SubsonicDeployer implements SubsonicDeployerService {
sslConnector.setHeaderBufferSize(HEADER_BUFFER_SIZE); sslConnector.setHeaderBufferSize(HEADER_BUFFER_SIZE);
sslConnector.setHost(getHost()); sslConnector.setHost(getHost());
sslConnector.setPort(getHttpsPort()); sslConnector.setPort(getHttpsPort());
sslConnector.setKeystore(System.getProperty("subsonic.ssl.keystore", getClass().getResource("/subsonic.keystore").toExternalForm())); sslConnector.setKeystore(System.getProperty("libresonic.ssl.keystore", getClass().getResource("/libresonic.keystore").toExternalForm()));
sslConnector.setPassword(System.getProperty("subsonic.ssl.password", "subsonic")); sslConnector.setPassword(System.getProperty("libresonic.ssl.password", "libresonic"));
server.addConnector(sslConnector); server.addConnector(sslConnector);
} }
@ -134,7 +134,7 @@ public class SubsonicDeployer implements SubsonicDeployerService {
server.addHandler(context); server.addHandler(context);
server.start(); server.start();
System.err.println("Subsonic running on: " + getUrl()); System.err.println("Libresonic running on: " + getUrl());
if (isHttpsEnabled()) { if (isHttpsEnabled()) {
System.err.println(" and: " + getHttpsUrl()); System.err.println(" and: " + getHttpsUrl());
} }
@ -155,8 +155,8 @@ public class SubsonicDeployer implements SubsonicDeployerService {
} }
private File getJettyDirectory() { private File getJettyDirectory() {
File dir = new File(getSubsonicHome(), "jetty"); File dir = new File(getLibresonicHome(), "jetty");
String buildNumber = getSubsonicBuildNumber(); String buildNumber = getLibresonicBuildNumber();
if (buildNumber != null) { if (buildNumber != null) {
dir = new File(dir, buildNumber); dir = new File(dir, buildNumber);
} }
@ -169,7 +169,7 @@ public class SubsonicDeployer implements SubsonicDeployerService {
return dir; return dir;
} }
private String getSubsonicBuildNumber() { private String getLibresonicBuildNumber() {
File war = new File(getWar()); File war = new File(getWar());
InputStream in = null; InputStream in = null;
try { try {
@ -194,12 +194,12 @@ public class SubsonicDeployer implements SubsonicDeployerService {
} }
private String getContextPath() { private String getContextPath() {
return System.getProperty("subsonic.contextPath", DEFAULT_CONTEXT_PATH); return System.getProperty("libresonic.contextPath", DEFAULT_CONTEXT_PATH);
} }
private String getWar() { private String getWar() {
String war = System.getProperty("subsonic.war"); String war = System.getProperty("libresonic.war");
if (war == null) { if (war == null) {
war = DEFAULT_WAR; war = DEFAULT_WAR;
} }
@ -215,19 +215,19 @@ public class SubsonicDeployer implements SubsonicDeployerService {
} }
private String getHost() { private String getHost() {
return System.getProperty("subsonic.host", DEFAULT_HOST); return System.getProperty("libresonic.host", DEFAULT_HOST);
} }
private int getPort() { private int getPort() {
int port = DEFAULT_PORT; int port = DEFAULT_PORT;
String portString = System.getProperty("subsonic.port"); String portString = System.getProperty("libresonic.port");
if (portString != null) { if (portString != null) {
port = Integer.parseInt(portString); port = Integer.parseInt(portString);
} }
// Also set it so that the webapp can read it. // Also set it so that the webapp can read it.
System.setProperty("subsonic.port", String.valueOf(port)); System.setProperty("libresonic.port", String.valueOf(port));
return port; return port;
} }
@ -235,13 +235,13 @@ public class SubsonicDeployer implements SubsonicDeployerService {
private int getHttpsPort() { private int getHttpsPort() {
int port = DEFAULT_HTTPS_PORT; int port = DEFAULT_HTTPS_PORT;
String portString = System.getProperty("subsonic.httpsPort"); String portString = System.getProperty("libresonic.httpsPort");
if (portString != null) { if (portString != null) {
port = Integer.parseInt(portString); port = Integer.parseInt(portString);
} }
// Also set it so that the webapp can read it. // Also set it so that the webapp can read it.
System.setProperty("subsonic.httpsPort", String.valueOf(port)); System.setProperty("libresonic.httpsPort", String.valueOf(port));
return port; return port;
} }
@ -293,40 +293,40 @@ public class SubsonicDeployer implements SubsonicDeployerService {
} }
/** /**
* Returns the Subsonic home directory. * Returns the Libresonic home directory.
* *
* @return The Subsonic home directory, if it exists. * @return The Libresonic home directory, if it exists.
* @throws RuntimeException If directory doesn't exist. * @throws RuntimeException If directory doesn't exist.
*/ */
private File getSubsonicHome() { private File getLibresonicHome() {
if (subsonicHome != null) { if (libresonicHome != null) {
return subsonicHome; return libresonicHome;
} }
File home; File home;
String overrideHome = System.getProperty("subsonic.home"); String overrideHome = System.getProperty("libresonic.home");
if (overrideHome != null) { if (overrideHome != null) {
home = new File(overrideHome); home = new File(overrideHome);
} else { } else {
boolean isWindows = System.getProperty("os.name", "Windows").toLowerCase().startsWith("windows"); boolean isWindows = System.getProperty("os.name", "Windows").toLowerCase().startsWith("windows");
home = isWindows ? SUBSONIC_HOME_WINDOWS : SUBSONIC_HOME_OTHER; home = isWindows ? LIBRESONIC_HOME_WINDOWS : LIBRESONIC_HOME_OTHER;
} }
// Attempt to create home directory if it doesn't exist. // Attempt to create home directory if it doesn't exist.
if (!home.exists() || !home.isDirectory()) { if (!home.exists() || !home.isDirectory()) {
boolean success = home.mkdirs(); boolean success = home.mkdirs();
if (success) { if (success) {
subsonicHome = home; libresonicHome = home;
} else { } else {
String message = "The directory " + home + " does not exist. Please create it and make it writable. " + String message = "The directory " + home + " does not exist. Please create it and make it writable. " +
"(You can override the directory location by specifying -Dsubsonic.home=... when " + "(You can override the directory location by specifying -Dlibresonic.home=... when " +
"starting the servlet container.)"; "starting the servlet container.)";
System.err.println("ERROR: " + message); System.err.println("ERROR: " + message);
} }
} else { } else {
subsonicHome = home; libresonicHome = home;
} }
return home; return home;

@ -0,0 +1,17 @@
package org.libresonic.player.booter.deployer;
/**
* RMI interface implemented by the Libresonic deployer and used by the agent.
*
* @author Sindre Mehus
*/
public interface LibresonicDeployerService {
/**
* Returns information about the Libresonic deployment, such
* as URL, memory consumption, start time etc.
*
* @return Deployment information.
*/
DeploymentStatus getDeploymentInfo();
}

@ -1,6 +1,6 @@
package net.sourceforge.subsonic.booter.mac; package org.libresonic.player.booter.mac;
import net.sourceforge.subsonic.booter.deployer.SubsonicDeployerService; import org.libresonic.player.booter.deployer.LibresonicDeployerService;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -13,15 +13,15 @@ import java.net.URI;
* *
* @author Sindre Mehus * @author Sindre Mehus
*/ */
public class SubsonicController { public class LibresonicController {
private final SubsonicDeployerService deployer; private final LibresonicDeployerService deployer;
private final SubsonicFrame frame; private final LibresonicFrame frame;
private Action openAction; private Action openAction;
private Action controlPanelAction; private Action controlPanelAction;
private Action quitAction; private Action quitAction;
public SubsonicController(SubsonicDeployerService deployer, SubsonicFrame frame) { public LibresonicController(LibresonicDeployerService deployer, LibresonicFrame frame) {
this.deployer = deployer; this.deployer = deployer;
this.frame = frame; this.frame = frame;
createActions(); createActions();
@ -29,20 +29,20 @@ public class SubsonicController {
} }
private void createActions() { private void createActions() {
openAction = new AbstractAction("Open Subsonic Web Page") { openAction = new AbstractAction("Open Libresonic Web Page") {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
openBrowser(); openBrowser();
} }
}; };
controlPanelAction = new AbstractAction("Subsonic Control Panel") { controlPanelAction = new AbstractAction("Libresonic Control Panel") {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
frame.setActive(false); frame.setActive(false);
frame.setActive(true); frame.setActive(true);
} }
}; };
quitAction = new AbstractAction("Quit Subsonic") { quitAction = new AbstractAction("Quit Libresonic") {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
System.exit(0); System.exit(0);
} }
@ -56,9 +56,9 @@ public class SubsonicController {
menu.addSeparator(); menu.addSeparator();
menu.add(createMenuItem(quitAction)); menu.add(createMenuItem(quitAction));
URL url = getClass().getResource("/images/subsonic-21.png"); URL url = getClass().getResource("/images/libresonic-21.png");
Image image = Toolkit.getDefaultToolkit().createImage(url); Image image = Toolkit.getDefaultToolkit().createImage(url);
TrayIcon trayIcon = new TrayIcon(image, "Subsonic Music Streamer", menu); TrayIcon trayIcon = new TrayIcon(image, "Libresonic Music Streamer", menu);
trayIcon.setImageAutoSize(false); trayIcon.setImageAutoSize(false);
try { try {

@ -1,9 +1,9 @@
package net.sourceforge.subsonic.booter.mac; package org.libresonic.player.booter.mac;
import com.jgoodies.forms.factories.Borders; import com.jgoodies.forms.factories.Borders;
import com.jgoodies.forms.factories.ButtonBarFactory; import com.jgoodies.forms.factories.ButtonBarFactory;
import net.sourceforge.subsonic.booter.Main; import org.libresonic.player.booter.Main;
import net.sourceforge.subsonic.booter.deployer.SubsonicDeployerService; import org.libresonic.player.booter.deployer.LibresonicDeployerService;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -12,25 +12,25 @@ import java.awt.event.ActionListener;
import java.net.URL; import java.net.URL;
/** /**
* Frame with Subsonic status. Used on Mac installs. * Frame with Libresonic status. Used on Mac installs.
* *
* @author Sindre Mehus * @author Sindre Mehus
*/ */
public class SubsonicFrame extends JFrame { public class LibresonicFrame extends JFrame {
private final SubsonicDeployerService deployer; private final LibresonicDeployerService deployer;
private StatusPanel statusPanel; private StatusPanel statusPanel;
private JButton hideButton; private JButton hideButton;
private JButton exitButton; private JButton exitButton;
public SubsonicFrame(SubsonicDeployerService deployer) { public LibresonicFrame(LibresonicDeployerService deployer) {
super("Subsonic"); super("Libresonic");
this.deployer = deployer; this.deployer = deployer;
createComponents(); createComponents();
layoutComponents(); layoutComponents();
addBehaviour(); addBehaviour();
URL url = Main.class.getResource("/images/subsonic-512.png"); URL url = Main.class.getResource("/images/libresonic-512.png");
setIconImage(Toolkit.getDefaultToolkit().createImage(url)); setIconImage(Toolkit.getDefaultToolkit().createImage(url));
} }

@ -1,4 +1,4 @@
package net.sourceforge.subsonic.booter.mac; package org.libresonic.player.booter.mac;
import java.awt.Color; import java.awt.Color;
import java.awt.Desktop; import java.awt.Desktop;
@ -19,11 +19,11 @@ import com.jgoodies.forms.builder.DefaultFormBuilder;
import com.jgoodies.forms.factories.Borders; import com.jgoodies.forms.factories.Borders;
import com.jgoodies.forms.layout.FormLayout; import com.jgoodies.forms.layout.FormLayout;
import net.sourceforge.subsonic.booter.deployer.DeploymentStatus; import org.libresonic.player.booter.deployer.DeploymentStatus;
import net.sourceforge.subsonic.booter.deployer.SubsonicDeployerService; import org.libresonic.player.booter.deployer.LibresonicDeployerService;
/** /**
* Panel displaying the status of the Subsonic service. * Panel displaying the status of the Libresonic service.
* *
* @author Sindre Mehus * @author Sindre Mehus
*/ */
@ -31,14 +31,14 @@ public class StatusPanel extends JPanel {
private static final DateFormat DATE_FORMAT = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM, Locale.US); private static final DateFormat DATE_FORMAT = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM, Locale.US);
private final SubsonicDeployerService deployer; private final LibresonicDeployerService deployer;
private JTextField startedTextField; private JTextField startedTextField;
private JTextField memoryTextField; private JTextField memoryTextField;
private JTextArea errorTextField; private JTextArea errorTextField;
private JButton urlButton; private JButton urlButton;
public StatusPanel(SubsonicDeployerService deployer) { public StatusPanel(LibresonicDeployerService deployer) {
this.deployer = deployer; this.deployer = deployer;
createComponents(); createComponents();
configureComponents(); configureComponents();

@ -0,0 +1,2 @@
Manifest-Version: 1.0
Main-Class: org.libresonic.player.booter.Main

@ -5,28 +5,28 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="service" class="org.springframework.remoting.rmi.RmiProxyFactoryBean"> <bean id="service" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
<property name="serviceUrl" value="rmi://localhost:9412/SubsonicDeployerService"/> <property name="serviceUrl" value="rmi://localhost:9412/LibresonicDeployerService"/>
<property name="serviceInterface" value="net.sourceforge.subsonic.booter.deployer.SubsonicDeployerService"/> <property name="serviceInterface" value="org.libresonic.player.booter.deployer.LibresonicDeployerService"/>
<property name="lookupStubOnStartup" value="false"/> <property name="lookupStubOnStartup" value="false"/>
<property name="refreshStubOnConnectFailure" value="true"/> <property name="refreshStubOnConnectFailure" value="true"/>
</bean> </bean>
<bean id="agent" class="net.sourceforge.subsonic.booter.agent.SubsonicAgent"> <bean id="agent" class="org.libresonic.player.booter.agent.LibresonicAgent">
<constructor-arg ref="service"/> <constructor-arg ref="service"/>
<property name="frame" ref="frame"/> <property name="frame" ref="frame"/>
</bean> </bean>
<bean id="frame" class="net.sourceforge.subsonic.booter.agent.SubsonicFrame"> <bean id="frame" class="org.libresonic.player.booter.agent.LibresonicFrame">
<constructor-arg ref="agent"/> <constructor-arg ref="agent"/>
<constructor-arg ref="statusPanel"/> <constructor-arg ref="statusPanel"/>
<constructor-arg ref="settingsPanel"/> <constructor-arg ref="settingsPanel"/>
</bean> </bean>
<bean id="settingsPanel" class="net.sourceforge.subsonic.booter.agent.SettingsPanel"> <bean id="settingsPanel" class="org.libresonic.player.booter.agent.SettingsPanel">
<constructor-arg ref="agent"/> <constructor-arg ref="agent"/>
</bean> </bean>
<bean id="statusPanel" class="net.sourceforge.subsonic.booter.agent.StatusPanel"> <bean id="statusPanel" class="org.libresonic.player.booter.agent.StatusPanel">
<constructor-arg ref="agent"/> <constructor-arg ref="agent"/>
</bean> </bean>

@ -4,12 +4,12 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="service" class="net.sourceforge.subsonic.booter.deployer.SubsonicDeployer"/> <bean id="service" class="org.libresonic.player.booter.deployer.LibresonicDeployer"/>
<bean class="org.springframework.remoting.rmi.RmiServiceExporter"> <bean class="org.springframework.remoting.rmi.RmiServiceExporter">
<property name="serviceName" value="SubsonicDeployerService"/> <property name="serviceName" value="LibresonicDeployerService"/>
<property name="service" ref="service"/> <property name="service" ref="service"/>
<property name="serviceInterface" value="net.sourceforge.subsonic.booter.deployer.SubsonicDeployerService"/> <property name="serviceInterface" value="org.libresonic.player.booter.deployer.LibresonicDeployerService"/>
<property name="registryPort" value="9412"/> <property name="registryPort" value="9412"/>
</bean> </bean>
</beans> </beans>

@ -4,13 +4,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="deployer" class="net.sourceforge.subsonic.booter.deployer.SubsonicDeployer"/> <bean id="deployer" class="org.libresonic.player.booter.deployer.LibresonicDeployer"/>
<bean id="frame" class="net.sourceforge.subsonic.booter.mac.SubsonicFrame"> <bean id="frame" class="org.libresonic.player.booter.mac.LibresonicFrame">
<constructor-arg ref="deployer"/> <constructor-arg ref="deployer"/>
</bean> </bean>
<bean id="controller" class="net.sourceforge.subsonic.booter.mac.SubsonicController"> <bean id="controller" class="org.libresonic.player.booter.mac.LibresonicController">
<constructor-arg ref="deployer"/> <constructor-arg ref="deployer"/>
<constructor-arg ref="frame"/> <constructor-arg ref="frame"/>
</bean> </bean>

@ -1,24 +1,24 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!-- <!--
~ This file is part of Subsonic. ~ This file is part of Libresonic.
~ ~
~ Subsonic is free software: you can redistribute it and/or modify ~ Libresonic is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by ~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or ~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version. ~ (at your option) any later version.
~ ~
~ Subsonic is distributed in the hope that it will be useful, ~ Libresonic is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details. ~ GNU General Public License for more details.
~ ~
~ You should have received a copy of the GNU General Public License ~ You should have received a copy of the GNU General Public License
~ along with Subsonic. If not, see <http://www.gnu.org/licenses/>. ~ along with Libresonic. If not, see <http://www.gnu.org/licenses/>.
~ ~
~ Copyright 2014 (C) Sindre Mehus ~ Copyright 2014 (C) Sindre Mehus
--> -->
<web-app id="subsonic" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" <web-app id="libresonic" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

@ -0,0 +1,24 @@
@echo off
REM The directory where Libresonic will create files. Make sure it is writable.
set LIBRESONIC_HOME=c:\libresonic
REM The host name or IP address on which to bind Libresonic. Only relevant if you have
REM multiple network interfaces and want to make Libresonic available on only one of them.
REM The default value 0.0.0.0 will bind Libresonic to all available network interfaces.
set LIBRESONIC_HOST=0.0.0.0
REM The port on which Libresonic will listen for incoming HTTP traffic.
set LIBRESONIC_PORT=4040
REM The port on which Libresonic will listen for incoming HTTPS traffic (0 to disable).
set LIBRESONIC_HTTPS_PORT=0
REM The context path (i.e., the last part of the Libresonic URL). Typically "/" or "/libresonic".
set LIBRESONIC_CONTEXT_PATH=/
REM The memory limit (max Java heap size) in megabytes.
set MAX_MEMORY=150
java -Xmx%MAX_MEMORY%m -Dlibresonic.home=%LIBRESONIC_HOME% -Dlibresonic.host=%LIBRESONIC_HOST% -Dlibresonic.port=%LIBRESONIC_PORT% -Dlibresonic.httpsPort=%LIBRESONIC_HTTPS_PORT% -Dlibresonic.contextPath=%LIBRESONIC_CONTEXT_PATH% -jar libresonic-booter-jar-with-dependencies.jar

@ -0,0 +1,134 @@
#!/bin/sh
###################################################################################
# Shell script for starting Libresonic. See http://libresonic.org.
#
# Author: Sindre Mehus
###################################################################################
LIBRESONIC_HOME=/var/libresonic
LIBRESONIC_HOST=0.0.0.0
LIBRESONIC_PORT=4040
LIBRESONIC_HTTPS_PORT=0
LIBRESONIC_CONTEXT_PATH=/
LIBRESONIC_MAX_MEMORY=150
LIBRESONIC_PIDFILE=
LIBRESONIC_DEFAULT_MUSIC_FOLDER=/var/music
LIBRESONIC_DEFAULT_PODCAST_FOLDER=/var/music/Podcast
LIBRESONIC_DEFAULT_PLAYLIST_FOLDER=/var/playlists
quiet=0
usage() {
echo "Usage: libresonic.sh [options]"
echo " --help This small usage guide."
echo " --home=DIR The directory where Libresonic will create files."
echo " Make sure it is writable. Default: /var/libresonic"
echo " --host=HOST The host name or IP address on which to bind Libresonic."
echo " Only relevant if you have multiple network interfaces and want"
echo " to make Libresonic available on only one of them. The default value"
echo " will bind Libresonic to all available network interfaces. Default: 0.0.0.0"
echo " --port=PORT The port on which Libresonic will listen for"
echo " incoming HTTP traffic. Default: 4040"
echo " --https-port=PORT The port on which Libresonic will listen for"
echo " incoming HTTPS traffic. Default: 0 (disabled)"
echo " --context-path=PATH The context path, i.e., the last part of the Libresonic"
echo " URL. Typically '/' or '/libresonic'. Default '/'"
echo " --max-memory=MB The memory limit (max Java heap size) in megabytes."
echo " Default: 100"
echo " --pidfile=PIDFILE Write PID to this file. Default not created."
echo " --quiet Don't print anything to standard out. Default false."
echo " --default-music-folder=DIR Configure Libresonic to use this folder for music. This option "
echo " only has effect the first time Libresonic is started. Default '/var/music'"
echo " --default-podcast-folder=DIR Configure Libresonic to use this folder for Podcasts. This option "
echo " only has effect the first time Libresonic is started. Default '/var/music/Podcast'"
echo " --default-playlist-folder=DIR Configure Libresonic to use this folder for playlists. This option "
echo " only has effect the first time Libresonic is started. Default '/var/playlists'"
exit 1
}
# Parse arguments.
while [ $# -ge 1 ]; do
case $1 in
--help)
usage
;;
--home=?*)
LIBRESONIC_HOME=${1#--home=}
;;
--host=?*)
LIBRESONIC_HOST=${1#--host=}
;;
--port=?*)
LIBRESONIC_PORT=${1#--port=}
;;
--https-port=?*)
LIBRESONIC_HTTPS_PORT=${1#--https-port=}
;;
--context-path=?*)
LIBRESONIC_CONTEXT_PATH=${1#--context-path=}
;;
--max-memory=?*)
LIBRESONIC_MAX_MEMORY=${1#--max-memory=}
;;
--pidfile=?*)
LIBRESONIC_PIDFILE=${1#--pidfile=}
;;
--quiet)
quiet=1
;;
--default-music-folder=?*)
LIBRESONIC_DEFAULT_MUSIC_FOLDER=${1#--default-music-folder=}
;;
--default-podcast-folder=?*)
LIBRESONIC_DEFAULT_PODCAST_FOLDER=${1#--default-podcast-folder=}
;;
--default-playlist-folder=?*)
LIBRESONIC_DEFAULT_PLAYLIST_FOLDER=${1#--default-playlist-folder=}
;;
*)
usage
;;
esac
shift
done
# Use JAVA_HOME if set, otherwise assume java is in the path.
JAVA=java
if [ -e "${JAVA_HOME}" ]
then
JAVA=${JAVA_HOME}/bin/java
fi
# Create Libresonic home directory.
mkdir -p ${LIBRESONIC_HOME}
LOG=${LIBRESONIC_HOME}/libresonic_sh.log
rm -f ${LOG}
cd $(dirname $0)
if [ -L $0 ] && ([ -e /bin/readlink ] || [ -e /usr/bin/readlink ]); then
cd $(dirname $(readlink $0))
fi
${JAVA} -Xmx${LIBRESONIC_MAX_MEMORY}m \
-Dlibresonic.home=${LIBRESONIC_HOME} \
-Dlibresonic.host=${LIBRESONIC_HOST} \
-Dlibresonic.port=${LIBRESONIC_PORT} \
-Dlibresonic.httpsPort=${LIBRESONIC_HTTPS_PORT} \
-Dlibresonic.contextPath=${LIBRESONIC_CONTEXT_PATH} \
-Dlibresonic.defaultMusicFolder=${LIBRESONIC_DEFAULT_MUSIC_FOLDER} \
-Dlibresonic.defaultPodcastFolder=${LIBRESONIC_DEFAULT_PODCAST_FOLDER} \
-Dlibresonic.defaultPlaylistFolder=${LIBRESONIC_DEFAULT_PLAYLIST_FOLDER} \
-Djava.awt.headless=true \
-verbose:gc \
-jar libresonic-booter-jar-with-dependencies.jar > ${LOG} 2>&1 &
# Write pid to pidfile if it is defined.
if [ $LIBRESONIC_PIDFILE ]; then
echo $! > ${LIBRESONIC_PIDFILE}
fi
if [ $quiet = 0 ]; then
echo Started Libresonic [PID $!, ${LOG}]
fi

@ -2,15 +2,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.subsonic</groupId> <artifactId>libresonic-installer-debian</artifactId>
<artifactId>subsonic-installer-debian</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Subsonic Installer for Debian</name> <name>Libresonic Installer for Debian</name>
<parent> <parent>
<groupId>net.sourceforge.subsonic</groupId> <groupId>org.libresonic.player</groupId>
<artifactId>subsonic</artifactId> <artifactId>libresonic</artifactId>
<version>6.0.1</version> <version>6.1.rc1</version>
</parent> </parent>
<profiles> <profiles>
@ -41,11 +40,11 @@
</filterset> </filterset>
</copy> </copy>
<copy file="../subsonic-booter/src/main/script/subsonic.sh" todir="${project.build.directory}/deb/usr/share/subsonic"/> <copy file="../libresonic-booter/src/main/script/libresonic.sh" todir="${project.build.directory}/deb/usr/share/libresonic"/>
<copy file="../subsonic-booter/target/subsonic-booter-jar-with-dependencies.jar" todir="${project.build.directory}/deb/usr/share/subsonic"/> <copy file="../libresonic-booter/target/libresonic-booter-jar-with-dependencies.jar" todir="${project.build.directory}/deb/usr/share/libresonic"/>
<copy file="../subsonic-main/target/subsonic.war" todir="${project.build.directory}/deb/usr/share/subsonic"/> <copy file="../libresonic-main/target/libresonic.war" todir="${project.build.directory}/deb/usr/share/libresonic"/>
<copy file="../subsonic-transcode/linux/ffmpeg" todir="${project.build.directory}/deb/var/subsonic/transcode"/> <copy file="../libresonic-transcode/linux/ffmpeg" todir="${project.build.directory}/deb/var/libresonic/transcode"/>
<copy file="../subsonic-transcode/linux/lame" todir="${project.build.directory}/deb/var/subsonic/transcode"/> <copy file="../libresonic-transcode/linux/lame" todir="${project.build.directory}/deb/var/libresonic/transcode"/>
<exec executable="chmod"> <exec executable="chmod">
<arg value="oug+x"/> <arg value="oug+x"/>
@ -53,10 +52,10 @@
<arg value="${project.build.directory}/deb/DEBIAN/postinst"/> <arg value="${project.build.directory}/deb/DEBIAN/postinst"/>
<arg value="${project.build.directory}/deb/DEBIAN/prerm"/> <arg value="${project.build.directory}/deb/DEBIAN/prerm"/>
<arg value="${project.build.directory}/deb/DEBIAN/postrm"/> <arg value="${project.build.directory}/deb/DEBIAN/postrm"/>
<arg value="${project.build.directory}/deb/usr/share/subsonic/subsonic.sh"/> <arg value="${project.build.directory}/deb/usr/share/libresonic/libresonic.sh"/>
<arg value="${project.build.directory}/deb/etc/init.d/subsonic"/> <arg value="${project.build.directory}/deb/etc/init.d/libresonic"/>
<arg value="${project.build.directory}/deb/var/subsonic/transcode/ffmpeg"/> <arg value="${project.build.directory}/deb/var/libresonic/transcode/ffmpeg"/>
<arg value="${project.build.directory}/deb/var/subsonic/transcode/lame"/> <arg value="${project.build.directory}/deb/var/libresonic/transcode/lame"/>
</exec> </exec>
<exec executable="sleep"> <exec executable="sleep">
<arg value="2"/> <arg value="2"/>
@ -65,10 +64,10 @@
<arg value="dpkg"/> <arg value="dpkg"/>
<arg value="--build"/> <arg value="--build"/>
<arg value="${project.build.directory}/deb"/> <arg value="${project.build.directory}/deb"/>
<arg value="${project.build.directory}/subsonic-${project.version}.deb"/> <arg value="${project.build.directory}/libresonic-${project.version}.deb"/>
</exec> </exec>
<exec executable="lintian"> <exec executable="lintian">
<arg value="${project.build.directory}/subsonic-${project.version}.deb"/> <arg value="${project.build.directory}/libresonic-${project.version}.deb"/>
</exec> </exec>
</target> </target>
</configuration> </configuration>

@ -0,0 +1 @@
/etc/default/libresonic

@ -1,18 +1,18 @@
Package: subsonic Package: libresonic
Version: @VERSION@ Version: @VERSION@
Section: Multimedia Section: Multimedia
Priority: optional Priority: optional
Recommends: ffmpeg Recommends: ffmpeg
Architecture: all Architecture: all
Maintainer: Sindre Mehus <sindre@activeobjects.no> Maintainer: Eugene E. Kashpureff Jr <eugene@kashpureff.org>
Description: A web-based music streamer, jukebox and Podcast receiver Description: A web-based music streamer, jukebox and Podcast receiver
Subsonic is a web-based music streamer, jukebox and Podcast receiver, Libresonic is a web-based music streamer, jukebox and Podcast receiver,
providing access to your music collection wherever you are. Use it providing access to your music collection wherever you are. Use it
to share your music with friends, or to listen to your music while away to share your music with friends, or to listen to your music while away
from home. from home.
. .
Apps for Android, iPhone and Windows Phone are also available. Apps for Android, iPhone and Windows Phone are also available.
. .
Java 1.6 or higher is required to run Subsonic. Java 1.6 or higher is required to run Libresonic.
. .
Subsonic can be found at http://subsonic.org Libresonic can be found at http://libresonic.org

@ -0,0 +1,16 @@
#! /bin/sh
set -e
ln -sf /usr/share/libresonic/libresonic.sh /usr/bin/libresonic
chmod 750 /var/libresonic
# Clear jetty cache.
rm -rf /var/libresonic/jetty
# Configure Libresonic service.
update-rc.d libresonic defaults 99
# Start Libresonic service.
invoke-rc.d libresonic start

@ -3,7 +3,7 @@
set -e set -e
# Remove symlink. # Remove symlink.
rm -f /usr/bin/subsonic rm -f /usr/bin/libresonic
# Remove startup scripts. # Remove startup scripts.
update-rc.d -f subsonic remove update-rc.d -f libresonic remove

@ -0,0 +1,15 @@
#! /bin/sh
set -e
# Stop Libresonic service.
if [ -e /etc/init.d/libresonic ]; then
invoke-rc.d libresonic stop
fi
# Backup database.
if [ -e /var/libresonic/db ]; then
rm -rf /var/libresonic/db.backup
cp -R /var/libresonic/db /var/libresonic/db.backup
fi

@ -0,0 +1,8 @@
#! /bin/sh
set -e
# Stop Libresonic service.
if [ -e /etc/init.d/libresonic ]; then
invoke-rc.d libresonic stop
fi

@ -0,0 +1,25 @@
#
# This is the configuration file for the Libresonic service
# (/etc/init.d/libresonic)
#
# To change the startup parameters of Libresonic, modify
# the LIBRESONIC_ARGS variable below.
#
# Type "/usr/share/libresonic/libresonic.sh --help" on the command line to read an
# explanation of the different options.
#
# For example, to specify that Libresonic should use port 80 (for http)
# and 443 (for https), and use a Java memory heap size of 200 MB, use
# the following:
#
# LIBRESONIC_ARGS="--port=80 --https-port=443 --max-memory=200"
LIBRESONIC_ARGS="--max-memory=150"
# The user which should run the Libresonic process. Default "root".
# Note that non-root users are by default not allowed to use ports
# below 1024. Also make sure to grant the user write permissions in
# the music directories, otherwise changing album art and tags will fail.
LIBRESONIC_USER=root

@ -1,37 +1,37 @@
#! /bin/sh #! /bin/sh
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: subsonic # Provides: libresonic
# Required-Start: $remote_fs $syslog # Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog # Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
# Default-Stop: 0 1 6 # Default-Stop: 0 1 6
# Short-Description: Subsonic daemon # Short-Description: Libresonic daemon
# Description: Starts the Subsonic daemon. Subsonic is a web-based # Description: Starts the Libresonic daemon. Libresonic is a web-based
# music streamer, jukebox and Podcast receiver. # music streamer, jukebox and Podcast receiver.
# See http://subsonic.org for more details. # See http://libresonic.org for more details.
### END INIT INFO ### END INIT INFO
# Author: Sindre Mehus <sindre@activeobjects.no> # Author: Sindre Mehus <sindre@activeobjects.no>
# To change the startup parameters of Subsonic, modify the service # To change the startup parameters of Libresonic, modify the service
# configuration file /etc/default/subsonic rather than this file. # configuration file /etc/default/libresonic rather than this file.
[ -r /etc/default/subsonic ] && . /etc/default/subsonic [ -r /etc/default/libresonic ] && . /etc/default/libresonic
PATH=/sbin:/usr/sbin:/bin:/usr/bin PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Subsonic Daemon" DESC="Libresonic Daemon"
NAME=subsonic NAME=libresonic
PIDFILE=/var/run/$NAME.pid PIDFILE=/var/run/$NAME.pid
DAEMON=/usr/bin/$NAME DAEMON=/usr/bin/$NAME
DAEMON_ARGS="--pidfile=$PIDFILE $SUBSONIC_ARGS" DAEMON_ARGS="--pidfile=$PIDFILE $LIBRESONIC_ARGS"
SCRIPTNAME=/etc/init.d/$NAME SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed # Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0 [ -x "$DAEMON" ] || exit 0
# Run as root if SUBSONIC_USER is not set. # Run as root if LIBRESONIC_USER is not set.
[ "$SUBSONIC_USER" = "" ] && SUBSONIC_USER=root [ "$LIBRESONIC_USER" = "" ] && LIBRESONIC_USER=root
# Make sure Subsonic is started with system locale # Make sure Libresonic is started with system locale
if [ -r /etc/default/locale ]; then if [ -r /etc/default/locale ]; then
. /etc/default/locale . /etc/default/locale
export LANG export LANG
@ -61,11 +61,11 @@ do_start()
fi fi
touch $PIDFILE touch $PIDFILE
chown $SUBSONIC_USER $PIDFILE chown $LIBRESONIC_USER $PIDFILE
[ -e /var/subsonic ] && chown -R $SUBSONIC_USER /var/subsonic [ -e /var/libresonic ] && chown -R $LIBRESONIC_USER /var/libresonic
[ -e /tmp/subsonic ] && chown -R $SUBSONIC_USER /tmp/subsonic [ -e /tmp/libresonic ] && chown -R $LIBRESONIC_USER /tmp/libresonic
start-stop-daemon --start -c $SUBSONIC_USER --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS || return 2 start-stop-daemon --start -c $LIBRESONIC_USER --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS || return 2
} }
# #

@ -2,29 +2,28 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.subsonic</groupId> <artifactId>libresonic-installer-mac</artifactId>
<artifactId>subsonic-installer-mac</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Subsonic Installer for Mac</name> <name>Libresonic Installer for Mac</name>
<parent> <parent>
<groupId>net.sourceforge.subsonic</groupId> <groupId>org.libresonic.player</groupId>
<artifactId>subsonic</artifactId> <artifactId>libresonic</artifactId>
<version>6.0.1</version> <version>6.1.rc1</version>
</parent> </parent>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>net.sourceforge.subsonic</groupId> <groupId>org.libresonic.player</groupId>
<artifactId>subsonic-main</artifactId> <artifactId>libresonic-main</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>war</type> <type>war</type>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sourceforge.subsonic</groupId> <groupId>org.libresonic.player</groupId>
<artifactId>subsonic-booter</artifactId> <artifactId>libresonic-booter</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
@ -52,41 +51,41 @@
<mkdir dir="${project.build.directory}"/> <mkdir dir="${project.build.directory}"/>
<appbundler outputdirectory="target" <appbundler outputdirectory="target"
name="Subsonic" name="Libresonic"
displayname="Subsonic" displayname="Libresonic"
icon="src/subsonic.icns" icon="src/libresonic.icns"
identifier="net.sourceforge.subsonic" identifier="org.libresonic.player"
shortversion="${project.version}" shortversion="${project.version}"
mainclassname="net.sourceforge.subsonic.booter.Main"> mainclassname="org.libresonic.player.booter.Main">
<runtime dir="${env.JAVA_HOME}"/> <runtime dir="${env.JAVA_HOME}"/>
<classpath dir=".."> <classpath dir="..">
<include name="subsonic-booter/target/subsonic-booter-jar-with-dependencies.jar"/> <include name="libresonic-booter/target/libresonic-booter-jar-with-dependencies.jar"/>
<include name="subsonic-main/target/subsonic.war"/> <include name="libresonic-main/target/libresonic.war"/>
</classpath> </classpath>
<option value="-Dsubsonic.war=$APP_ROOT/Contents/Java/subsonic.war"/> <option value="-Dlibresonic.war=$APP_ROOT/Contents/Java/libresonic.war"/>
<option value="-Dsubsonic.home=/Library/Application Support/Subsonic"/> <option value="-Dlibresonic.home=/Library/Application Support/Libresonic"/>
<option value="-Dsubsonic.defaultMusicFolder=/Users/Shared/Music/iTunes/iTunes Media"/> <option value="-Dlibresonic.defaultMusicFolder=/Users/Shared/Music/iTunes/iTunes Media"/>
<option value="-Dsubsonic.defaultPodcastFolder=/Users/Shared/Podcasts"/> <option value="-Dlibresonic.defaultPodcastFolder=/Users/Shared/Podcasts"/>
<option value="-Dsubsonic.defaultPlaylistFolder=/Users/Shared/Playlists"/> <option value="-Dlibresonic.defaultPlaylistFolder=/Users/Shared/Playlists"/>
<option value="-Dsubsonic.port=4040"/> <option value="-Dlibresonic.port=4040"/>
<option value="-Dsubsonic.httpsPort=0"/> <option value="-Dlibresonic.httpsPort=0"/>
<option value="-Dsubsonic.contextPath=/"/> <option value="-Dlibresonic.contextPath=/"/>
<option value="-Dapple.awt.UIElement=true"/> <option value="-Dapple.awt.UIElement=true"/>
<option value="-Xmx150m"/> <option value="-Xmx150m"/>
<argument value="-mac"/> <argument value="-mac"/>
</appbundler> </appbundler>
<!--Requires installation of Packages, see http://s.sudre.free.fr/Software/Packages/about.html or subsonic-tools--> <!--Requires installation of Packages, see http://s.sudre.free.fr/Software/Packages/about.html or libresonic-tools-->
<exec executable="/usr/local/bin/packagesbuild"> <exec executable="/usr/local/bin/packagesbuild">
<arg value="-v"/> <arg value="-v"/>
<arg value="${project.basedir}/src/subsonic.pkgproj"/> <arg value="${project.basedir}/src/libresonic.pkgproj"/>
</exec> </exec>
<exec executable="/usr/bin/productsign"> <exec executable="/usr/bin/productsign">
<arg value="--sign"/> <arg value="--sign"/>
<arg value="Sindre Mehus"/> <arg value="Sindre Mehus"/>
<arg value="${project.build.directory}/subsonic.pkg"/> <arg value="${project.build.directory}/libresonic.pkg"/>
<arg value="${project.build.directory}/subsonic-${project.version}.pkg"/> <arg value="${project.build.directory}/libresonic-${project.version}.pkg"/>
</exec> </exec>
</target> </target>
</configuration> </configuration>

@ -22,7 +22,7 @@
<key>GID</key> <key>GID</key>
<integer>80</integer> <integer>80</integer>
<key>PATH</key> <key>PATH</key>
<string>../target/Subsonic.app</string> <string>../target/Libresonic.app</string>
<key>PATH_TYPE</key> <key>PATH_TYPE</key>
<integer>1</integer> <integer>1</integer>
<key>PERMISSIONS</key> <key>PERMISSIONS</key>
@ -80,7 +80,7 @@
<key>GID</key> <key>GID</key>
<integer>80</integer> <integer>80</integer>
<key>PATH</key> <key>PATH</key>
<string>../../subsonic-transcode/mac/ffmpeg</string> <string>../../libresonic-transcode/mac/ffmpeg</string>
<key>PATH_TYPE</key> <key>PATH_TYPE</key>
<integer>1</integer> <integer>1</integer>
<key>PERMISSIONS</key> <key>PERMISSIONS</key>
@ -108,7 +108,7 @@
<key>GID</key> <key>GID</key>
<integer>80</integer> <integer>80</integer>
<key>PATH</key> <key>PATH</key>
<string>Subsonic</string> <string>Libresonic</string>
<key>PATH_TYPE</key> <key>PATH_TYPE</key>
<integer>0</integer> <integer>0</integer>
<key>PERMISSIONS</key> <key>PERMISSIONS</key>
@ -546,9 +546,9 @@
<key>CONCLUSION_ACTION</key> <key>CONCLUSION_ACTION</key>
<integer>0</integer> <integer>0</integer>
<key>IDENTIFIER</key> <key>IDENTIFIER</key>
<string>net.sourceforge.subsonic</string> <string>org.libresonic.player</string>
<key>NAME</key> <key>NAME</key>
<string>subsonic</string> <string>libresonic</string>
<key>OVERWRITE_PERMISSIONS</key> <key>OVERWRITE_PERMISSIONS</key>
<false/> <false/>
<key>VERSION</key> <key>VERSION</key>
@ -586,7 +586,7 @@
<key>BACKGROUND_PATH</key> <key>BACKGROUND_PATH</key>
<dict> <dict>
<key>PATH</key> <key>PATH</key>
<string>subsonic.png</string> <string>libresonic.png</string>
<key>PATH_TYPE</key> <key>PATH_TYPE</key>
<integer>1</integer> <integer>1</integer>
</dict> </dict>
@ -672,7 +672,7 @@
<key>LANGUAGE</key> <key>LANGUAGE</key>
<string>English</string> <string>English</string>
<key>VALUE</key> <key>VALUE</key>
<string>Subsonic</string> <string>Libresonic</string>
</dict> </dict>
</array> </array>
</dict> </dict>
@ -872,7 +872,7 @@
</dict> </dict>
</array> </array>
<key>NAME</key> <key>NAME</key>
<string>subsonic</string> <string>libresonic</string>
</dict> </dict>
</dict> </dict>
<key>TYPE</key> <key>TYPE</key>

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

@ -0,0 +1,13 @@
#!/bin/bash
LIBRESONIC_HOME="/Library/Application Support/Libresonic"
chmod oug+rwx "$LIBRESONIC_HOME"
chown root:admin "$LIBRESONIC_HOME"
chmod oug+rx "$LIBRESONIC_HOME/transcode"
chown root:admin "$LIBRESONIC_HOME/transcode"
rm -rf "$LIBRESONIC_HOME/jetty"
echo Libresonic installation done

@ -0,0 +1,11 @@
#!/bin/bash
LIBRESONIC_HOME="/Library/Application Support/Libresonic"
# Backup database.
if [ -e "$LIBRESONIC_HOME/db" ]; then
rm -rf "$LIBRESONIC_HOME/db.backup"
cp -R "$LIBRESONIC_HOME/db" "$LIBRESONIC_HOME/db.backup"
fi

@ -2,15 +2,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.subsonic</groupId> <artifactId>libresonic-installer-rpm</artifactId>
<artifactId>subsonic-installer-rpm</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Subsonic Installer for RPM</name> <name>Libresonic Installer for RPM</name>
<parent> <parent>
<groupId>net.sourceforge.subsonic</groupId> <groupId>org.libresonic.player</groupId>
<artifactId>subsonic</artifactId> <artifactId>libresonic</artifactId>
<version>6.0.1</version> <version>6.1.rc1</version>
</parent> </parent>
<profiles> <profiles>
@ -52,7 +51,7 @@
<target> <target>
<echo>Creating RPM package...</echo> <echo>Creating RPM package...</echo>
<copy file="${basedir}/src/subsonic.spec" <copy file="${basedir}/src/libresonic.spec"
todir="${project.build.directory}/rpm/SPECS"> todir="${project.build.directory}/rpm/SPECS">
<filterset> <filterset>
<filter token="VERSION" value="${project.version}"/> <filter token="VERSION" value="${project.version}"/>
@ -61,7 +60,7 @@
</copy> </copy>
<!--Remove ".beta" suffix from version tag.--> <!--Remove ".beta" suffix from version tag.-->
<replace file="${project.build.directory}/rpm/SPECS/subsonic.spec"> <replace file="${project.build.directory}/rpm/SPECS/libresonic.spec">
<replacetoken>.beta1</replacetoken> <replacetoken>.beta1</replacetoken>
<replacetoken>.beta2</replacetoken> <replacetoken>.beta2</replacetoken>
<replacetoken>.beta3</replacetoken> <replacetoken>.beta3</replacetoken>
@ -70,20 +69,20 @@
<mkdir dir="${project.build.directory}/rpm/RPMS/i386"/> <mkdir dir="${project.build.directory}/rpm/RPMS/i386"/>
<copy file="${basedir}/src/etc/init.d/subsonic" <copy file="${basedir}/src/etc/init.d/libresonic"
todir="${project.build.directory}/rpm/buildroot/etc/init.d"/> todir="${project.build.directory}/rpm/buildroot/etc/init.d"/>
<copy file="${basedir}/src/etc/sysconfig/subsonic" <copy file="${basedir}/src/etc/sysconfig/libresonic"
todir="${project.build.directory}/rpm/buildroot/etc/sysconfig"/> todir="${project.build.directory}/rpm/buildroot/etc/sysconfig"/>
<copy file="../subsonic-booter/src/main/script/subsonic.sh" <copy file="../libresonic-booter/src/main/script/libresonic.sh"
todir="${project.build.directory}/rpm/buildroot/usr/share/subsonic"/> todir="${project.build.directory}/rpm/buildroot/usr/share/libresonic"/>
<copy file="../subsonic-booter/target/subsonic-booter-jar-with-dependencies.jar" <copy file="../libresonic-booter/target/libresonic-booter-jar-with-dependencies.jar"
todir="${project.build.directory}/rpm/buildroot/usr/share/subsonic"/> todir="${project.build.directory}/rpm/buildroot/usr/share/libresonic"/>
<copy file="../subsonic-main/target/subsonic.war" <copy file="../libresonic-main/target/libresonic.war"
todir="${project.build.directory}/rpm/buildroot/usr/share/subsonic"/> todir="${project.build.directory}/rpm/buildroot/usr/share/libresonic"/>
<copy file="../subsonic-transcode/linux/ffmpeg" <copy file="../libresonic-transcode/linux/ffmpeg"
todir="${project.build.directory}/rpm/buildroot/var/subsonic/transcode"/> todir="${project.build.directory}/rpm/buildroot/var/libresonic/transcode"/>
<copy file="../subsonic-transcode/linux/lame" <copy file="../libresonic-transcode/linux/lame"
todir="${project.build.directory}/rpm/buildroot/var/subsonic/transcode"/> todir="${project.build.directory}/rpm/buildroot/var/libresonic/transcode"/>
<exec executable="rpmbuild"> <exec executable="rpmbuild">
<arg value="-bb"/> <arg value="-bb"/>
@ -93,17 +92,17 @@
<arg value="_topdir ${project.build.directory}/rpm"/> <arg value="_topdir ${project.build.directory}/rpm"/>
<arg value="--target"/> <arg value="--target"/>
<arg value="i386"/> <arg value="i386"/>
<arg value="${project.build.directory}/rpm/SPECS/subsonic.spec"/> <arg value="${project.build.directory}/rpm/SPECS/libresonic.spec"/>
</exec> </exec>
<copy tofile="${project.build.directory}/subsonic-${project.version}.rpm"> <copy tofile="${project.build.directory}/libresonic-${project.version}.rpm">
<fileset dir="${project.build.directory}/rpm/RPMS/i386"> <fileset dir="${project.build.directory}/rpm/RPMS/i386">
<include name="*.rpm"/> <include name="*.rpm"/>
</fileset> </fileset>
</copy> </copy>
<exec executable="rpmlint"> <exec executable="rpmlint">
<arg value="${project.build.directory}/subsonic-${project.version}.rpm"/> <arg value="${project.build.directory}/libresonic-${project.version}.rpm"/>
</exec> </exec>
</target> </target>
</configuration> </configuration>

@ -1,41 +1,41 @@
#!/bin/bash #!/bin/bash
# #
# subsonic This shell script takes care of starting and stopping Subsonic # libresonic This shell script takes care of starting and stopping Libresonic
# #
# chkconfig: - 80 20 # chkconfig: - 80 20
# #
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: subsonic # Provides: libresonic
# Required-Start: $network $syslog # Required-Start: $network $syslog
# Required-Stop: $network $syslog # Required-Stop: $network $syslog
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
# Default-Stop: 0 1 6 # Default-Stop: 0 1 6
# Short-Description: Subsonic daemon # Short-Description: Libresonic daemon
# Description: Starts the Subsonic daemon. Subsonic is a web-based # Description: Starts the Libresonic daemon. Libresonic is a web-based
# music streamer, jukebox and Podcast receiver. # music streamer, jukebox and Podcast receiver.
# See http://subsonic.org for more details. # See http://libresonic.org for more details.
### END INIT INFO ### END INIT INFO
# Author: Sindre Mehus <sindre@activeobjects.no> # Author: Sindre Mehus <sindre@activeobjects.no>
# To change the startup parameters of Subsonic, modify the service # To change the startup parameters of Libresonic, modify the service
# configuration file /etc/sysconfig/subsonic rather than this file. # configuration file /etc/sysconfig/libresonic rather than this file.
[ -r /etc/sysconfig/subsonic ] && . /etc/sysconfig/subsonic [ -r /etc/sysconfig/libresonic ] && . /etc/sysconfig/libresonic
PATH=/sbin:/usr/sbin:/bin:/usr/bin PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Subsonic Daemon" DESC="Libresonic Daemon"
NAME=subsonic NAME=libresonic
PIDFILE=/var/run/$NAME.pid PIDFILE=/var/run/$NAME.pid
LOCKFILE=/var/lock/subsys/$NAME LOCKFILE=/var/lock/subsys/$NAME
DAEMON=/usr/bin/$NAME DAEMON=/usr/bin/$NAME
DAEMON_ARGS="--pidfile=$PIDFILE $SUBSONIC_ARGS" DAEMON_ARGS="--pidfile=$PIDFILE $LIBRESONIC_ARGS"
SCRIPTNAME=/etc/init.d/$NAME SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed. # Exit if the package is not installed.
[ -x "$DAEMON" ] || exit 0 [ -x "$DAEMON" ] || exit 0
# Run as root if SUBSONIC_USER is not set. # Run as root if LIBRESONIC_USER is not set.
[ "$SUBSONIC_USER" = "" ] && SUBSONIC_USER=root [ "$LIBRESONIC_USER" = "" ] && LIBRESONIC_USER=root
# Source function library. # Source function library.
. /etc/init.d/functions . /etc/init.d/functions
@ -53,12 +53,12 @@ do_start()
fi fi
touch $PIDFILE touch $PIDFILE
chown $SUBSONIC_USER $PIDFILE chown $LIBRESONIC_USER $PIDFILE
[ -e /var/subsonic ] && chown -R $SUBSONIC_USER /var/subsonic [ -e /var/libresonic ] && chown -R $LIBRESONIC_USER /var/libresonic
[ -e /tmp/subsonic ] && chown -R $SUBSONIC_USER /tmp/subsonic [ -e /tmp/libresonic ] && chown -R $LIBRESONIC_USER /tmp/libresonic
echo $"Starting $NAME ..." echo $"Starting $NAME ..."
su -c "$DAEMON $DAEMON_ARGS" $SUBSONIC_USER su -c "$DAEMON $DAEMON_ARGS" $LIBRESONIC_USER
RETVAL=$? RETVAL=$?
echo echo
[ $RETVAL -eq 0 ] && touch $LOCKFILE [ $RETVAL -eq 0 ] && touch $LOCKFILE

@ -0,0 +1,25 @@
#
# This is the configuration file for the Libresonic service
# (/etc/init.d/libresonic)
#
# To change the startup parameters of Libresonic, modify
# the LIBRESONIC_ARGS variable below.
#
# Type "/usr/share/libresonic/libresonic.sh --help" on the command line to read an
# explanation of the different options.
#
# For example, to specify that Libresonic should use port 80 (for http)
# and 443 (for https), and use a Java memory heap size of 200 MB, use
# the following:
#
# LIBRESONIC_ARGS="--port=80 --https-port=443 --max-memory=200"
LIBRESONIC_ARGS="--max-memory=150"
# The user which should run the Libresonic process. Default "root".
# Note that non-root users are by default not allowed to use ports
# below 1024. Also make sure to grant the user write permissions in
# the music directories, otherwise changing album art and tags will fail.
LIBRESONIC_USER=root

@ -0,0 +1,78 @@
Name: libresonic
Version: @VERSION@
Release: @BUILD_NUMBER@
Summary: A web-based music streamer, jukebox and Podcast receiver
Group: Applications/Multimedia
License: GPLv3
URL: http://libresonic.org
%description
Libresonic is a web-based music streamer, jukebox and Podcast receiver,
providing access to your music collection wherever you are. Use it
to share your music with friends, or to listen to your music while away
from home.
Apps for Android, iPhone and Windows Phone are also available.
Java 1.6 or higher is required to run Libresonic.
Libresonic can be found at http://libresonic.org
%files
%defattr(644,root,root,755)
/usr/share/libresonic/libresonic-booter-jar-with-dependencies.jar
/usr/share/libresonic/libresonic.war
%attr(755,root,root) /usr/share/libresonic/libresonic.sh
%attr(755,root,root) /etc/init.d/libresonic
%attr(755,root,root) /var/libresonic/transcode/ffmpeg
%attr(755,root,root) /var/libresonic/transcode/lame
%config(noreplace) /etc/sysconfig/libresonic
%pre
# Stop Libresonic service.
if [ -e /etc/init.d/libresonic ]; then
service libresonic stop
fi
# Backup database.
if [ -e /var/libresonic/db ]; then
rm -rf /var/libresonic/db.backup
cp -R /var/libresonic/db /var/libresonic/db.backup
fi
exit 0
%post
ln -sf /usr/share/libresonic/libresonic.sh /usr/bin/libresonic
chmod 750 /var/libresonic
# Clear jetty cache.
rm -rf /var/libresonic/jetty
# For SELinux: Set security context
chcon -t java_exec_t /etc/init.d/libresonic 2>/dev/null
# Configure and start Libresonic service.
chkconfig --add libresonic
service libresonic start
exit 0
%preun
# Only do it if uninstalling, not upgrading.
if [ $1 = 0 ] ; then
# Stop the service.
[ -e /etc/init.d/libresonic ] && service libresonic stop
# Remove symlink.
rm -f /usr/bin/libresonic
# Remove startup scripts.
chkconfig --del libresonic
fi
exit 0

@ -2,15 +2,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.subsonic</groupId> <artifactId>libresonic-installer-windows</artifactId>
<artifactId>subsonic-installer-windows</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Subsonic Installer for Windows</name> <name>Libresonic Installer for Windows</name>
<parent> <parent>
<groupId>net.sourceforge.subsonic</groupId> <groupId>org.libresonic.player</groupId>
<artifactId>subsonic</artifactId> <artifactId>libresonic</artifactId>
<version>6.0.1</version> <version>6.1.rc1</version>
</parent> </parent>
<properties> <properties>
@ -21,15 +20,15 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>net.sourceforge.subsonic</groupId> <groupId>org.libresonic.player</groupId>
<artifactId>subsonic-main</artifactId> <artifactId>libresonic-main</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>war</type> <type>war</type>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sourceforge.subsonic</groupId> <groupId>org.libresonic.player</groupId>
<artifactId>subsonic-booter</artifactId> <artifactId>libresonic-booter</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
@ -56,20 +55,20 @@
<configuration> <configuration>
<target> <target>
<echo>Compiling exe4j...</echo> <echo>Compiling exe4j...</echo>
<copy file="${basedir}/src/main/exe4j/subsonic-agent.exe.vmoptions" todir="${project.build.directory}"/> <copy file="${basedir}/src/main/exe4j/libresonic-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/libresonic-agent-elevated.exe.vmoptions" todir="${project.build.directory}"/>
<copy file="${basedir}/src/main/exe4j/subsonic-service.exe.vmoptions" todir="${project.build.directory}"/> <copy file="${basedir}/src/main/exe4j/libresonic-service.exe.vmoptions" todir="${project.build.directory}"/>
<exec executable="${exe4j.home}/bin/exe4jc"> <exec executable="${exe4j.home}/bin/exe4jc">
<arg value="--license=L-SINDRE_MEHUS#14926715500010001-1ty7dbe11l10ll#140"/> <arg value="--license=L-SINDRE_MEHUS#14926715500010001-1ty7dbe11l10ll#140"/>
</exec> </exec>
<exec executable="${exe4j.home}/bin/exe4jc"> <exec executable="${exe4j.home}/bin/exe4jc">
<arg value="${basedir}/src/main/exe4j/subsonic-agent.exe4j"/> <arg value="${basedir}/src/main/exe4j/libresonic-agent.exe4j"/>
</exec> </exec>
<exec executable="${exe4j.home}/bin/exe4jc"> <exec executable="${exe4j.home}/bin/exe4jc">
<arg value="${basedir}/src/main/exe4j/subsonic-agent-elevated.exe4j"/> <arg value="${basedir}/src/main/exe4j/libresonic-agent-elevated.exe4j"/>
</exec> </exec>
<exec executable="${exe4j.home}/bin/exe4jc"> <exec executable="${exe4j.home}/bin/exe4jc">
<arg value="${basedir}/src/main/exe4j/subsonic-service.exe4j"/> <arg value="${basedir}/src/main/exe4j/libresonic-service.exe4j"/>
</exec> </exec>
</target> </target>
</configuration> </configuration>
@ -86,8 +85,8 @@
<echo>Compiling NSIS script...</echo> <echo>Compiling NSIS script...</echo>
<mkdir dir="${project.build.directory}"/> <mkdir dir="${project.build.directory}"/>
<exec executable="${nsis.home}/makensis"> <exec executable="${nsis.home}/makensis">
<arg value="${basedir}/src/main/nsis/subsonic.nsi"/> <arg value="${basedir}/src/main/nsis/libresonic.nsi"/>
<arg value="-XOutFile ${project.build.directory}/subsonic-${project.version}-setup.exe"/> <arg value="-XOutFile ${project.build.directory}/libresonic-${project.version}-setup.exe"/>
</exec> </exec>
</target> </target>
</configuration> </configuration>

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<exe4j version="4.4.4" transformSequenceNumber="1"> <exe4j version="4.4.4" transformSequenceNumber="1">
<directoryPresets config="." /> <directoryPresets config="." />
<application name="Subsonic" distributionSourceDir="../../../target"> <application name="Libresonic" distributionSourceDir="../../../target">
<languages> <languages>
<principalLanguage id="en" customLocalizationFile="" /> <principalLanguage id="en" customLocalizationFile="" />
</languages> </languages>
</application> </application>
<executable name="subsonic-agent-elevated" type="1" iconSet="true" iconFile="subsonic-16.ico" executableDir="" redirectStderr="true" stderrFile="log/subsonic-agent.log" stderrMode="overwrite" redirectStdout="false" stdoutFile="output.log" stdoutMode="overwrite" failOnStderrOutput="true" executableMode="1" changeWorkingDirectory="true" workingDirectory="." singleInstance="false" serviceStartType="2" serviceDependencies="" serviceDescription="Subsonic Music Streamer (http://subsonic.org)" jreLocation="" executionLevel="requireAdministrator" checkConsoleParameter="false" globalSingleInstance="false" amd64="false"> <executable name="libresonic-agent-elevated" type="1" iconSet="true" iconFile="libresonic-16.ico" executableDir="" redirectStderr="true" stderrFile="log/libresonic-agent.log" stderrMode="overwrite" redirectStdout="false" stdoutFile="output.log" stdoutMode="overwrite" failOnStderrOutput="true" executableMode="1" changeWorkingDirectory="true" workingDirectory="." singleInstance="false" serviceStartType="2" serviceDependencies="" serviceDescription="Libresonic Music Streamer (http://libresonic.org)" jreLocation="" executionLevel="requireAdministrator" checkConsoleParameter="false" globalSingleInstance="false" amd64="false">
<messageSet> <messageSet>
<message id="NoJvmFound" text="Java was not found on your system. Please download Java from www.java.com." /> <message id="NoJvmFound" text="Java was not found on your system. Please download Java from www.java.com." />
</messageSet> </messageSet>
@ -18,14 +18,14 @@
<versionLine x="0" y="0" text="" font="Arial" fontSize="8" fontColor="0,0,0" fontWeight="500" /> <versionLine x="0" y="0" text="" font="Arial" fontSize="8" fontColor="0,0,0" fontWeight="500" />
</text> </text>
</splashScreen> </splashScreen>
<java mainClass="net.sourceforge.subsonic.booter.Main" vmParameters="" arguments="-agent -elevated" allowVMPassthroughParameters="true" preferredVM="" bundleRuntime="true" minVersion="1.6" maxVersion="" allowBetaVM="true" jdkOnly="false"> <java mainClass="org.libresonic.player.booter.Main" vmParameters="" arguments="-agent -elevated" allowVMPassthroughParameters="true" preferredVM="" bundleRuntime="true" minVersion="1.6" maxVersion="" allowBetaVM="true" jdkOnly="false">
<searchSequence> <searchSequence>
<registry /> <registry />
<envVar name="JAVA_HOME" /> <envVar name="JAVA_HOME" />
<envVar name="JDK_HOME" /> <envVar name="JDK_HOME" />
</searchSequence> </searchSequence>
<classPath> <classPath>
<archive location="./subsonic-booter-jar-with-dependencies.jar" failOnError="false" /> <archive location="./libresonic-booter-jar-with-dependencies.jar" failOnError="false" />
</classPath> </classPath>
<nativeLibraryDirectories /> <nativeLibraryDirectories />
</java> </java>

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<exe4j version="4.5.1" transformSequenceNumber="1"> <exe4j version="4.5.1" transformSequenceNumber="1">
<directoryPresets config="." /> <directoryPresets config="." />
<application name="Subsonic" distributionSourceDir="../../../target"> <application name="Libresonic" distributionSourceDir="../../../target">
<languages> <languages>
<principalLanguage id="en" customLocalizationFile="" /> <principalLanguage id="en" customLocalizationFile="" />
</languages> </languages>
</application> </application>
<executable name="subsonic-agent" type="1" iconSet="true" iconFile="subsonic-16.ico" executableDir="" redirectStderr="true" stderrFile="log/subsonic-agent.log" stderrMode="overwrite" redirectStdout="false" stdoutFile="output.log" stdoutMode="overwrite" failOnStderrOutput="true" executableMode="1" changeWorkingDirectory="true" workingDirectory="." singleInstance="false" serviceStartType="2" serviceDependencies="" serviceDescription="Subsonic Music Streamer (http://subsonic.org)" jreLocation="" executionLevel="asInvoker" checkConsoleParameter="false" globalSingleInstance="false" amd64="false"> <executable name="libresonic-agent" type="1" iconSet="true" iconFile="libresonic-16.ico" executableDir="" redirectStderr="true" stderrFile="log/libresonic-agent.log" stderrMode="overwrite" redirectStdout="false" stdoutFile="output.log" stdoutMode="overwrite" failOnStderrOutput="true" executableMode="1" changeWorkingDirectory="true" workingDirectory="." singleInstance="false" serviceStartType="2" serviceDependencies="" serviceDescription="Libresonic Music Streamer (http://libresonic.org)" jreLocation="" executionLevel="asInvoker" checkConsoleParameter="false" globalSingleInstance="false" amd64="false">
<messageSet> <messageSet>
<message id="NoJvmFound" text="Java was not found on your system. Please download Java (32-bit version) from java.com." /> <message id="NoJvmFound" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
<message id="JvmInPath" text="Java was not found on your system. Please download Java (32-bit version) from java.com." /> <message id="JvmInPath" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
@ -24,14 +24,14 @@
<versionLine x="0" y="0" text="" font="Arial" fontSize="8" fontColor="0,0,0" fontWeight="500" /> <versionLine x="0" y="0" text="" font="Arial" fontSize="8" fontColor="0,0,0" fontWeight="500" />
</text> </text>
</splashScreen> </splashScreen>
<java mainClass="net.sourceforge.subsonic.booter.Main" vmParameters="" arguments="-agent" allowVMPassthroughParameters="true" preferredVM="" bundleRuntime="true" minVersion="1.6" maxVersion="" allowBetaVM="true" jdkOnly="false"> <java mainClass="org.libresonic.player.booter.Main" vmParameters="" arguments="-agent" allowVMPassthroughParameters="true" preferredVM="" bundleRuntime="true" minVersion="1.6" maxVersion="" allowBetaVM="true" jdkOnly="false">
<searchSequence> <searchSequence>
<registry /> <registry />
<envVar name="JAVA_HOME" /> <envVar name="JAVA_HOME" />
<envVar name="JDK_HOME" /> <envVar name="JDK_HOME" />
</searchSequence> </searchSequence>
<classPath> <classPath>
<archive location="./subsonic-booter-jar-with-dependencies.jar" failOnError="false" /> <archive location="./libresonic-booter-jar-with-dependencies.jar" failOnError="false" />
</classPath> </classPath>
<nativeLibraryDirectories /> <nativeLibraryDirectories />
</java> </java>

@ -0,0 +1,6 @@
-Xmx150m
-verbose:gc
-Dlibresonic.host=0.0.0.0
-Dlibresonic.port=4040
-Dlibresonic.httpsPort=0
-Dlibresonic.contextPath=/

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<exe4j version="4.5.1" transformSequenceNumber="1"> <exe4j version="4.5.1" transformSequenceNumber="1">
<directoryPresets config="." /> <directoryPresets config="." />
<application name="Subsonic" distributionSourceDir="../../../target"> <application name="Libresonic" distributionSourceDir="../../../target">
<languages> <languages>
<principalLanguage id="en" customLocalizationFile="" /> <principalLanguage id="en" customLocalizationFile="" />
</languages> </languages>
</application> </application>
<executable name="subsonic-service" type="1" iconSet="true" iconFile="subsonic-16.ico" executableDir="" redirectStderr="true" stderrFile="log/subsonic-service.log" stderrMode="overwrite" redirectStdout="false" stdoutFile="output.log" stdoutMode="overwrite" failOnStderrOutput="true" executableMode="3" changeWorkingDirectory="true" workingDirectory="." singleInstance="true" serviceStartType="2" serviceDependencies="" serviceDescription="Subsonic Music Streamer (http://subsonic.org)" jreLocation="" executionLevel="asInvoker" checkConsoleParameter="false" globalSingleInstance="false" amd64="false"> <executable name="libresonic-service" type="1" iconSet="true" iconFile="libresonic-16.ico" executableDir="" redirectStderr="true" stderrFile="log/libresonic-service.log" stderrMode="overwrite" redirectStdout="false" stdoutFile="output.log" stdoutMode="overwrite" failOnStderrOutput="true" executableMode="3" changeWorkingDirectory="true" workingDirectory="." singleInstance="true" serviceStartType="2" serviceDependencies="" serviceDescription="Libresonic Music Streamer (http://libresonic.org)" jreLocation="" executionLevel="asInvoker" checkConsoleParameter="false" globalSingleInstance="false" amd64="false">
<messageSet> <messageSet>
<message id="NoJvmFound" text="Java was not found on your system. Please download Java (32-bit version) from java.com." /> <message id="NoJvmFound" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
<message id="JvmInPath" text="Java was not found on your system. Please download Java (32-bit version) from java.com." /> <message id="JvmInPath" text="Java was not found on your system. Please download Java (32-bit version) from java.com." />
@ -24,14 +24,14 @@
<versionLine x="0" y="0" text="" font="Arial" fontSize="8" fontColor="0,0,0" fontWeight="500" /> <versionLine x="0" y="0" text="" font="Arial" fontSize="8" fontColor="0,0,0" fontWeight="500" />
</text> </text>
</splashScreen> </splashScreen>
<java mainClass="net.sourceforge.subsonic.booter.Main" vmParameters="-Dsubsonic.createLinkFile=true -Dsubsonic.windowsInstall=true" arguments="" allowVMPassthroughParameters="true" preferredVM="" bundleRuntime="true" minVersion="1.5" maxVersion="" allowBetaVM="true" jdkOnly="false"> <java mainClass="org.libresonic.player.booter.Main" vmParameters="-Dlibresonic.createLinkFile=true -Dlibresonic.windowsInstall=true" arguments="" allowVMPassthroughParameters="true" preferredVM="" bundleRuntime="true" minVersion="1.5" maxVersion="" allowBetaVM="true" jdkOnly="false">
<searchSequence> <searchSequence>
<registry /> <registry />
<envVar name="JAVA_HOME" /> <envVar name="JAVA_HOME" />
<envVar name="JDK_HOME" /> <envVar name="JDK_HOME" />
</searchSequence> </searchSequence>
<classPath> <classPath>
<archive location="./subsonic-booter-jar-with-dependencies.jar" failOnError="false" /> <archive location="./libresonic-booter-jar-with-dependencies.jar" failOnError="false" />
</classPath> </classPath>
<nativeLibraryDirectories /> <nativeLibraryDirectories />
</java> </java>

@ -0,0 +1,213 @@
# libresonic.nsi
!include "WordFunc.nsh"
!include "MUI.nsh"
!insertmacro VersionCompare
# The name of the installer
Name "Libresonic"
# The default installation directory
InstallDir $PROGRAMFILES\Libresonic
# Registry key to check for directory (so if you install again, it will
# overwrite the old one automatically)
InstallDirRegKey HKLM "Software\Libresonic" "Install_Dir"
#--------------------------------
#Interface Configuration
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\orange.bmp"
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Getting Started.html"
!define MUI_FINISHPAGE_SHOWREADME_TEXT "View Getting Started document"
#--------------------------------
# Pages
# This page checks for JRE
Page custom CheckInstalledJRE
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
# Languages
!insertmacro MUI_LANGUAGE "English"
Section "Libresonic"
SectionIn RO
# Install for all users
SetShellVarContext "all"
# Take backup of existing libresonic-service.exe.vmoptions
CopyFiles /SILENT $INSTDIR\libresonic-service.exe.vmoptions $TEMP\libresonic-service.exe.vmoptions
# Silently uninstall existing version.
ExecWait '"$INSTDIR\uninstall.exe" /S _?=$INSTDIR'
# Remove previous Jetty temp directory.
RMDir /r "c:\libresonic\jetty"
# Backup database.
RMDir /r "c:\libresonic\db.backup"
CreateDirectory "c:\libresonic\db.backup"
CopyFiles /SILENT "c:\libresonic\db\*" "c:\libresonic\db.backup"
# Set output path to the installation directory.
SetOutPath $INSTDIR
# Write files.
File ..\..\..\target\libresonic-agent.exe
File ..\..\..\target\libresonic-agent.exe.vmoptions
File ..\..\..\target\libresonic-agent-elevated.exe
File ..\..\..\target\libresonic-agent-elevated.exe.vmoptions
File ..\..\..\target\libresonic-service.exe
File ..\..\..\target\libresonic-service.exe.vmoptions
File ..\..\..\..\libresonic-booter\target\libresonic-booter-jar-with-dependencies.jar
File ..\..\..\..\libresonic-main\README.TXT
File ..\..\..\..\libresonic-main\LICENSE.TXT
File "..\..\..\..\libresonic-main\Getting Started.html"
File ..\..\..\..\libresonic-main\target\libresonic.war
File ..\..\..\..\libresonic-main\target\classes\version.txt
File ..\..\..\..\libresonic-main\target\classes\build_number.txt
# Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\Libresonic "Install_Dir" "$INSTDIR"
# Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Libresonic" "DisplayName" "Libresonic"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Libresonic" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Libresonic" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Libresonic" "NoRepair" 1
WriteUninstaller "uninstall.exe"
# Restore libresonic-service.exe.vmoptions
CopyFiles /SILENT $TEMP\libresonic-service.exe.vmoptions $INSTDIR\libresonic-service.exe.vmoptions
Delete $TEMP\libresonic-service.exe.vmoptions
# Write transcoding pack files.
SetOutPath "c:\libresonic\transcode"
File ..\..\..\..\libresonic-transcode\windows\*.*
# Add Windows Firewall exception.
# (Requires NSIS plugin found on http://nsis.sourceforge.net/NSIS_Simple_Firewall_Plugin to be installed
# as NSIS_HOME/Plugins/SimpleFC.dll)
SimpleFC::AdvAddRule "Libresonic Service (TCP)" "" "6" "1" "1" "7" "1" "$INSTDIR\libresonic-service.exe" "" "" "Libresonic" "" "" "" ""
SimpleFC::AdvAddRule "Libresonic Service (UDP)" "" "17" "1" "1" "7" "1" "$INSTDIR\libresonic-service.exe" "" "" "Libresonic" "" "" "" ""
SimpleFC::AdvAddRule "Libresonic Agent (TCP)" "" "6" "1" "1" "7" "1" "$INSTDIR\libresonic-agent.exe" "" "" "Libresonic" "" "" "" ""
SimpleFC::AdvAddRule "Libresonic Agent (UDP)" "" "17" "1" "1" "7" "1" "$INSTDIR\libresonic-agent.exe" "" "" "Libresonic" "" "" "" ""
SimpleFC::AdvAddRule "Libresonic Agent Elevated (TCP)" "" "6" "1" "1" "7" "1" "$INSTDIR\libresonic-agent-elevated.exe" "" "" "Libresonic" "" "" "" ""
SimpleFC::AdvAddRule "Libresonic Agent Elevated (UDP)" "" "17" "1" "1" "7" "1" "$INSTDIR\libresonic-agent-elevated.exe" "" "" "Libresonic" "" "" "" ""
# Install and start service.
ExecWait '"$INSTDIR\libresonic-service.exe" -install'
ExecWait '"$INSTDIR\libresonic-service.exe" -start'
# Start agent.
Exec '"$INSTDIR\libresonic-agent-elevated.exe" -balloon'
SectionEnd
Section "Start Menu Shortcuts"
CreateDirectory "$SMPROGRAMS\Libresonic"
CreateShortCut "$SMPROGRAMS\Libresonic\Open Libresonic.lnk" "$INSTDIR\libresonic.url" "" "$INSTDIR\libresonic-agent.exe" 0
CreateShortCut "$SMPROGRAMS\Libresonic\Libresonic Tray Icon.lnk" "$INSTDIR\libresonic-agent.exe" "-balloon" "$INSTDIR\libresonic-agent.exe" 0
CreateShortCut "$SMPROGRAMS\Libresonic\Start Libresonic Service.lnk" "$INSTDIR\libresonic-service.exe" "-start" "$INSTDIR\libresonic-service.exe" 0
CreateShortCut "$SMPROGRAMS\Libresonic\Stop Libresonic Service.lnk" "$INSTDIR\libresonic-service.exe" "-stop" "$INSTDIR\libresonic-service.exe" 0
CreateShortCut "$SMPROGRAMS\Libresonic\Uninstall Libresonic.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\Libresonic\Getting Started.lnk" "$INSTDIR\Getting Started.html" "" "$INSTDIR\Getting Started.html" 0
CreateShortCut "$SMSTARTUP\Libresonic.lnk" "$INSTDIR\libresonic-agent.exe" "" "$INSTDIR\libresonic-agent.exe" 0
SectionEnd
# Uninstaller
Section "Uninstall"
# Uninstall for all users
SetShellVarContext "all"
# Stop and uninstall service if present.
ExecWait '"$INSTDIR\libresonic-service.exe" -stop'
ExecWait '"$INSTDIR\libresonic-service.exe" -uninstall'
# Stop agent by killing it.
# (Requires NSIS plugin found on http://nsis.sourceforge.net/Processes_plug-in to be installed
# as NSIS_HOME/Plugins/Processes.dll)
Processes::KillProcess "libresonic-agent"
Processes::KillProcess "libresonic-agent-elevated"
Processes::KillProcess "ffmpeg"
# Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Libresonic"
DeleteRegKey HKLM SOFTWARE\Libresonic
# Remove files.
Delete "$SMSTARTUP\Libresonic.lnk"
RMDir /r "$SMPROGRAMS\Libresonic"
Delete "$INSTDIR\build_number.txt"
Delete "$INSTDIR\elevate.exe"
Delete "$INSTDIR\Getting Started.html"
Delete "$INSTDIR\LICENSE.TXT"
Delete "$INSTDIR\README.TXT"
Delete "$INSTDIR\libresonic.url"
Delete "$INSTDIR\libresonic.war"
Delete "$INSTDIR\libresonic-agent.exe"
Delete "$INSTDIR\libresonic-agent.exe.vmoptions"
Delete "$INSTDIR\libresonic-agent-elevated.exe"
Delete "$INSTDIR\libresonic-agent-elevated.exe.vmoptions"
Delete "$INSTDIR\libresonic-booter-jar-with-dependencies.jar"
Delete "$INSTDIR\libresonic-service.exe"
Delete "$INSTDIR\libresonic-service.exe.vmoptions"
Delete "$INSTDIR\uninstall.exe"
Delete "$INSTDIR\version.txt"
RMDir /r "$INSTDIR\log"
RMDir "$INSTDIR"
# Remove Windows Firewall exception.
# (Requires NSIS plugin found on http://nsis.sourceforge.net/NSIS_Simple_Firewall_Plugin to be installed
# as NSIS_HOME/Plugins/SimpleFC.dll)
SimpleFC::AdvRemoveRule "Libresonic Service (TCP)"
SimpleFC::AdvRemoveRule "Libresonic Service (UDP)"
SimpleFC::AdvRemoveRule "Libresonic Agent (TCP)"
SimpleFC::AdvRemoveRule "Libresonic Agent (UDP)"
SimpleFC::AdvRemoveRule "Libresonic Agent Elevated (TCP)"
SimpleFC::AdvRemoveRule "Libresonic Agent Elevated (UDP)"
SectionEnd
Function CheckInstalledJRE
# Read the value from the registry into the $0 register
ReadRegStr $0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" CurrentVersion
# Check JRE version. At least 1.6 is required.
# $1=0 Versions are equal
# $1=1 Installed version is newer
# $1=2 Installed version is older (or non-existent)
${VersionCompare} $0 "1.6" $1
IntCmp $1 2 InstallJRE 0 0
Return
InstallJRE:
# Launch Java web installer.
MessageBox MB_OK "Java was not found and will now be installed."
File /oname=$TEMP\jre-setup.exe jre-8u31-windows-i586-iftw.exe
ExecWait '"$TEMP\jre-setup.exe"' $0
Delete "$TEMP\jre-setup.exe"
FunctionEnd

@ -0,0 +1,10 @@
<html>
<head>
<meta http-equiv="refresh" content="0;URL=http://libresonic.org/pages/getting-started.jsp">
</head>
<body>
</body>
</html>

@ -84,19 +84,19 @@ java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8.2) (6b18-1.8.2-4ubuntu1~9.04.1) OpenJDK Runtime Environment (IcedTea6 1.8.2) (6b18-1.8.2-4ubuntu1~9.04.1)
OpenJDK Zero VM (build 14.0-b16, mixed mode) OpenJDK Zero VM (build 14.0-b16, mixed mode)
root@ubuntu:/tmp# dpkg -i subsonic-4.4.deb root@ubuntu:/tmp# dpkg -i libresonic-4.4.deb
Selecting previously deselected package subsonic. Selecting previously deselected package libresonic.
(Reading database ... 21622 files and directories currently installed.) (Reading database ... 21622 files and directories currently installed.)
Unpacking subsonic (from subsonic-4.4.deb) ... Unpacking libresonic (from libresonic-4.4.deb) ...
Setting up subsonic (4.4) ... Setting up libresonic (4.4) ...
Adding system startup for /etc/init.d/subsonic ... Adding system startup for /etc/init.d/libresonic ...
/etc/rc0.d/K99subsonic -> ../init.d/subsonic /etc/rc0.d/K99libresonic -> ../init.d/libresonic
/etc/rc1.d/K99subsonic -> ../init.d/subsonic /etc/rc1.d/K99libresonic -> ../init.d/libresonic
/etc/rc6.d/K99subsonic -> ../init.d/subsonic /etc/rc6.d/K99libresonic -> ../init.d/libresonic
/etc/rc2.d/S99subsonic -> ../init.d/subsonic /etc/rc2.d/S99libresonic -> ../init.d/libresonic
/etc/rc3.d/S99subsonic -> ../init.d/subsonic /etc/rc3.d/S99libresonic -> ../init.d/libresonic
/etc/rc4.d/S99subsonic -> ../init.d/subsonic /etc/rc4.d/S99libresonic -> ../init.d/libresonic
/etc/rc5.d/S99subsonic -> ../init.d/subsonic /etc/rc5.d/S99libresonic -> ../init.d/libresonic
Started Subsonic [PID 2596, /var/subsonic/subsonic_sh.log] Started Libresonic [PID 2596, /var/libresonic/libresonic_sh.log]
http://192.168.0.100:4040 http://192.168.0.100:4040

@ -2,28 +2,27 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.subsonic</groupId> <artifactId>libresonic-main</artifactId>
<artifactId>subsonic-main</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<name>Subsonic Main</name> <name>Libresonic Main</name>
<parent> <parent>
<groupId>net.sourceforge.subsonic</groupId> <groupId>org.libresonic.player</groupId>
<artifactId>libresonic</artifactId> <artifactId>libresonic</artifactId>
<version>6.0.1</version> <version>6.1.rc1</version>
</parent> </parent>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>net.sourceforge.subsonic</groupId> <groupId>org.libresonic.player</groupId>
<artifactId>subsonic-rest-api</artifactId> <artifactId>libresonic-rest-api</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sourceforge.subsonic</groupId> <groupId>org.libresonic.player</groupId>
<artifactId>subsonic-sonos-api</artifactId> <artifactId>libresonic-sonos-api</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
@ -254,6 +253,12 @@
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
<version>1.5.5</version>
</dependency>
<dependency> <dependency>
<groupId>taglibs</groupId> <groupId>taglibs</groupId>
<artifactId>standard</artifactId> <artifactId>standard</artifactId>
@ -280,6 +285,7 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- UPNP / DLNA -->
<dependency> <dependency>
<groupId>org.fourthline.cling</groupId> <groupId>org.fourthline.cling</groupId>
<artifactId>cling-core</artifactId> <artifactId>cling-core</artifactId>
@ -295,7 +301,7 @@
<dependency> <dependency>
<groupId>org.seamless</groupId> <groupId>org.seamless</groupId>
<artifactId>seamless-util</artifactId> <artifactId>seamless-util</artifactId>
<version>1.0-alpha2</version> <version>1.1.0</version>
</dependency> </dependency>
<dependency> <dependency>
@ -310,6 +316,7 @@
<version>0.1.2</version> <version>0.1.2</version>
</dependency> </dependency>
<!-- SONOS API / WSDL SUPPORT -->
<dependency> <dependency>
<groupId>org.apache.cxf</groupId> <groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId> <artifactId>cxf-rt-transports-http</artifactId>
@ -382,10 +389,11 @@
</profiles> </profiles>
<build> <build>
<finalName>subsonic</finalName> <finalName>libresonic</finalName>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<executions> <executions>
<execution> <execution>
@ -393,8 +401,8 @@
<configuration> <configuration>
<target> <target>
<tstamp/> <tstamp/>
<copy file="${basedir}/src/main/resources/net/sourceforge/subsonic/i18n/ResourceBundle_en.properties" <copy file="${basedir}/src/main/resources/org/libresonic/player/i18n/ResourceBundle_en.properties"
tofile="${project.build.directory}/classes/net/sourceforge/subsonic/i18n/ResourceBundle.properties"/> tofile="${project.build.directory}/classes/org/libresonic/player/i18n/ResourceBundle.properties"/>
<echo file="${project.build.directory}/classes/build_number.txt">${buildNumber}</echo> <echo file="${project.build.directory}/classes/build_number.txt">${buildNumber}</echo>
<echo file="${project.build.directory}/classes/build_date.txt">${DSTAMP}</echo> <echo file="${project.build.directory}/classes/build_date.txt">${DSTAMP}</echo>
<echo file="${project.build.directory}/classes/version.txt">${project.version}</echo> <echo file="${project.build.directory}/classes/version.txt">${project.version}</echo>

@ -1,26 +1,27 @@
/* /*
This file is part of Subsonic. This file is part of Libresonic.
Subsonic is free software: you can redistribute it and/or modify Libresonic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
Subsonic is distributed in the hope that it will be useful, Libresonic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with Subsonic. If not, see <http://www.gnu.org/licenses/>. along with Libresonic. If not, see <http://www.gnu.org/licenses/>.
Copyright 2009 (C) Sindre Mehus Copyright 2016 (C) Libresonic Authors
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
*/ */
package net.sourceforge.subsonic; package org.libresonic.player;
import net.sourceforge.subsonic.domain.Version; import org.libresonic.player.domain.Version;
import net.sourceforge.subsonic.service.*; import org.libresonic.player.service.*;
import net.sourceforge.subsonic.util.*; import org.libresonic.player.util.*;
import org.apache.commons.lang.exception.*; import org.apache.commons.lang.exception.*;
import java.io.*; import java.io.*;
@ -28,7 +29,7 @@ import java.text.*;
import java.util.*; import java.util.*;
/** /**
* Logger implementation which logs to SUBSONIC_HOME/subsonic.log. * Logger implementation which logs to LIBRESONIC_HOME/libresonic.log.
* <br/> * <br/>
* Note: Third party logging libraries (such as log4j and Commons logging) are intentionally not * Note: Third party logging libraries (such as log4j and Commons logging) are intentionally not
* used. These libraries causes a lot of headache when deploying to some application servers * used. These libraries causes a lot of headache when deploying to some application servers
@ -167,7 +168,7 @@ public class Logger {
try { try {
getPrintWriter().println(entry); getPrintWriter().println(entry);
} catch (IOException x) { } catch (IOException x) {
System.err.println("Failed to write to subsonic.log. " + x); System.err.println("Failed to write to libresonic.log. " + x);
} }
entries.add(entry); entries.add(entry);
} }
@ -180,8 +181,8 @@ public class Logger {
} }
public static File getLogFile() { public static File getLogFile() {
File subsonicHome = SettingsService.getSubsonicHome(); File libresonicHome = SettingsService.getLibresonicHome();
return new File(subsonicHome, "subsonic.log"); return new File(libresonicHome, "libresonic.log");
} }
/** /**

@ -1,27 +1,27 @@
/* /*
* This file is part of Subsonic. * This file is part of Libresonic.
* *
* Subsonic is free software: you can redistribute it and/or modify * Libresonic is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* Subsonic is distributed in the hope that it will be useful, * Libresonic is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with Subsonic. If not, see <http://www.gnu.org/licenses/>. * along with Libresonic. If not, see <http://www.gnu.org/licenses/>.
* *
* Copyright 2014 (C) Sindre Mehus * Copyright 2014 (C) Sindre Mehus
*/ */
package net.sourceforge.subsonic.ajax; package org.libresonic.player.ajax;
import java.util.List; import java.util.List;
import net.sourceforge.subsonic.domain.ArtistBio; import org.libresonic.player.domain.ArtistBio;
/** /**
* @author Sindre Mehus * @author Sindre Mehus

@ -1,26 +1,27 @@
/* /*
This file is part of Subsonic. This file is part of Libresonic.
Subsonic is free software: you can redistribute it and/or modify Libresonic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
Subsonic is distributed in the hope that it will be useful, Libresonic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with Subsonic. If not, see <http://www.gnu.org/licenses/>. along with Libresonic. If not, see <http://www.gnu.org/licenses/>.
Copyright 2009 (C) Sindre Mehus Copyright 2016 (C) Libresonic Authors
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
*/ */
package net.sourceforge.subsonic.ajax; package org.libresonic.player.ajax;
import net.sourceforge.subsonic.Logger; import org.libresonic.player.Logger;
import net.sourceforge.subsonic.service.SecurityService; import org.libresonic.player.service.SecurityService;
import net.sourceforge.subsonic.util.BoundedList; import org.libresonic.player.util.BoundedList;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.directwebremoting.WebContext; import org.directwebremoting.WebContext;
import org.directwebremoting.WebContextFactory; import org.directwebremoting.WebContextFactory;

@ -1,22 +1,23 @@
/* /*
This file is part of Subsonic. This file is part of Libresonic.
Subsonic is free software: you can redistribute it and/or modify Libresonic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
Subsonic is distributed in the hope that it will be useful, Libresonic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with Subsonic. If not, see <http://www.gnu.org/licenses/>. along with Libresonic. If not, see <http://www.gnu.org/licenses/>.
Copyright 2009 (C) Sindre Mehus Copyright 2016 (C) Libresonic Authors
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
*/ */
package net.sourceforge.subsonic.ajax; package org.libresonic.player.ajax;
/** /**
* Contains info about cover art images for an album. * Contains info about cover art images for an album.

@ -1,22 +1,23 @@
/* /*
This file is part of Subsonic. This file is part of Libresonic.
Subsonic is free software: you can redistribute it and/or modify Libresonic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
Subsonic is distributed in the hope that it will be useful, Libresonic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with Subsonic. If not, see <http://www.gnu.org/licenses/>. along with Libresonic. If not, see <http://www.gnu.org/licenses/>.
Copyright 2009 (C) Sindre Mehus Copyright 2016 (C) Libresonic Authors
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
*/ */
package net.sourceforge.subsonic.ajax; package org.libresonic.player.ajax;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
@ -30,11 +31,11 @@ import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.params.HttpConnectionParams; import org.apache.http.params.HttpConnectionParams;
import net.sourceforge.subsonic.Logger; import org.libresonic.player.Logger;
import net.sourceforge.subsonic.domain.MediaFile; import org.libresonic.player.domain.MediaFile;
import net.sourceforge.subsonic.service.MediaFileService; import org.libresonic.player.service.MediaFileService;
import net.sourceforge.subsonic.service.SecurityService; import org.libresonic.player.service.SecurityService;
import net.sourceforge.subsonic.util.StringUtil; import org.libresonic.player.util.StringUtil;
/** /**
* Provides AJAX-enabled services for changing cover art images. * Provides AJAX-enabled services for changing cover art images.

@ -1,22 +1,23 @@
/* /*
This file is part of Subsonic. This file is part of Libresonic.
Subsonic is free software: you can redistribute it and/or modify Libresonic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
Subsonic is distributed in the hope that it will be useful, Libresonic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with Subsonic. If not, see <http://www.gnu.org/licenses/>. along with Libresonic. If not, see <http://www.gnu.org/licenses/>.
Copyright 2009 (C) Sindre Mehus Copyright 2016 (C) Libresonic Authors
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
*/ */
package net.sourceforge.subsonic.ajax; package org.libresonic.player.ajax;
/** /**
* Contains lyrics info for a song. * Contains lyrics info for a song.

@ -1,22 +1,23 @@
/* /*
This file is part of Subsonic. This file is part of Libresonic.
Subsonic is free software: you can redistribute it and/or modify Libresonic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
Subsonic is distributed in the hope that it will be useful, Libresonic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with Subsonic. If not, see <http://www.gnu.org/licenses/>. along with Libresonic. If not, see <http://www.gnu.org/licenses/>.
Copyright 2009 (C) Sindre Mehus Copyright 2016 (C) Libresonic Authors
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
*/ */
package net.sourceforge.subsonic.ajax; package org.libresonic.player.ajax;
import java.io.IOException; import java.io.IOException;
import java.io.StringReader; import java.io.StringReader;
@ -34,8 +35,8 @@ import org.jdom.Element;
import org.jdom.Namespace; import org.jdom.Namespace;
import org.jdom.input.SAXBuilder; import org.jdom.input.SAXBuilder;
import net.sourceforge.subsonic.Logger; import org.libresonic.player.Logger;
import net.sourceforge.subsonic.util.StringUtil; import org.libresonic.player.util.StringUtil;
/** /**
* Provides AJAX-enabled services for retrieving song lyrics from chartlyrics.com. * Provides AJAX-enabled services for retrieving song lyrics from chartlyrics.com.

@ -1,22 +1,23 @@
/* /*
This file is part of Subsonic. This file is part of Libresonic.
Subsonic is free software: you can redistribute it and/or modify Libresonic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
Subsonic is distributed in the hope that it will be useful, Libresonic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with Subsonic. If not, see <http://www.gnu.org/licenses/>. along with Libresonic. If not, see <http://www.gnu.org/licenses/>.
Copyright 2009 (C) Sindre Mehus Copyright 2016 (C) Libresonic Authors
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
*/ */
package net.sourceforge.subsonic.ajax; package org.libresonic.player.ajax;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -27,16 +28,16 @@ import javax.servlet.http.HttpServletRequest;
import org.directwebremoting.WebContextFactory; import org.directwebremoting.WebContextFactory;
import net.sourceforge.subsonic.Logger; import org.libresonic.player.Logger;
import net.sourceforge.subsonic.domain.ArtistBio; import org.libresonic.player.domain.ArtistBio;
import net.sourceforge.subsonic.domain.MediaFile; import org.libresonic.player.domain.MediaFile;
import net.sourceforge.subsonic.domain.MusicFolder; import org.libresonic.player.domain.MusicFolder;
import net.sourceforge.subsonic.domain.UserSettings; import org.libresonic.player.domain.UserSettings;
import net.sourceforge.subsonic.service.LastFmService; import org.libresonic.player.service.LastFmService;
import net.sourceforge.subsonic.service.MediaFileService; import org.libresonic.player.service.MediaFileService;
import net.sourceforge.subsonic.service.NetworkService; import org.libresonic.player.service.NetworkService;
import net.sourceforge.subsonic.service.SecurityService; import org.libresonic.player.service.SecurityService;
import net.sourceforge.subsonic.service.SettingsService; import org.libresonic.player.service.SettingsService;
/** /**
* Provides miscellaneous AJAX-enabled services. * Provides miscellaneous AJAX-enabled services.

@ -1,22 +1,23 @@
/* /*
This file is part of Subsonic. This file is part of Libresonic.
Subsonic is free software: you can redistribute it and/or modify Libresonic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
Subsonic is distributed in the hope that it will be useful, Libresonic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with Subsonic. If not, see <http://www.gnu.org/licenses/>. along with Libresonic. If not, see <http://www.gnu.org/licenses/>.
Copyright 2009 (C) Sindre Mehus Copyright 2016 (C) Libresonic Authors
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
*/ */
package net.sourceforge.subsonic.ajax; package org.libresonic.player.ajax;
import java.util.Date; import java.util.Date;

@ -1,22 +1,23 @@
/* /*
This file is part of Subsonic. This file is part of Libresonic.
Subsonic is free software: you can redistribute it and/or modify Libresonic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
Subsonic is distributed in the hope that it will be useful, Libresonic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with Subsonic. If not, see <http://www.gnu.org/licenses/>. along with Libresonic. If not, see <http://www.gnu.org/licenses/>.
Copyright 2009 (C) Sindre Mehus Copyright 2016 (C) Libresonic Authors
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
*/ */
package net.sourceforge.subsonic.ajax; package org.libresonic.player.ajax;
/** /**
* Details about what a user is currently listening to. * Details about what a user is currently listening to.

@ -1,22 +1,23 @@
/* /*
This file is part of Subsonic. This file is part of Libresonic.
Subsonic is free software: you can redistribute it and/or modify Libresonic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
Subsonic is distributed in the hope that it will be useful, Libresonic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with Subsonic. If not, see <http://www.gnu.org/licenses/>. along with Libresonic. If not, see <http://www.gnu.org/licenses/>.
Copyright 2009 (C) Sindre Mehus Copyright 2016 (C) Libresonic Authors
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
*/ */
package net.sourceforge.subsonic.ajax; package org.libresonic.player.ajax;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
@ -29,17 +30,17 @@ import org.apache.commons.lang.StringUtils;
import org.directwebremoting.WebContext; import org.directwebremoting.WebContext;
import org.directwebremoting.WebContextFactory; import org.directwebremoting.WebContextFactory;
import net.sourceforge.subsonic.Logger; import org.libresonic.player.Logger;
import net.sourceforge.subsonic.domain.AvatarScheme; import org.libresonic.player.domain.AvatarScheme;
import net.sourceforge.subsonic.domain.MediaFile; import org.libresonic.player.domain.MediaFile;
import net.sourceforge.subsonic.domain.PlayStatus; import org.libresonic.player.domain.PlayStatus;
import net.sourceforge.subsonic.domain.Player; import org.libresonic.player.domain.Player;
import net.sourceforge.subsonic.domain.UserSettings; import org.libresonic.player.domain.UserSettings;
import net.sourceforge.subsonic.service.MediaScannerService; import org.libresonic.player.service.MediaScannerService;
import net.sourceforge.subsonic.service.PlayerService; import org.libresonic.player.service.PlayerService;
import net.sourceforge.subsonic.service.SettingsService; import org.libresonic.player.service.SettingsService;
import net.sourceforge.subsonic.service.StatusService; import org.libresonic.player.service.StatusService;
import net.sourceforge.subsonic.util.StringUtil; import org.libresonic.player.util.StringUtil;
/** /**
* Provides AJAX-enabled services for retrieving the currently playing file and directory. * Provides AJAX-enabled services for retrieving the currently playing file and directory.

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save