@ -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/ |
||||
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! |
@ -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. |
@ -1,4 +1,4 @@ |
||||
package net.sourceforge.subsonic.booter.deployer; |
||||
package org.libresonic.player.booter.deployer; |
||||
|
||||
import java.util.Date; |
||||
import java.io.Serializable; |
@ -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(); |
||||
} |
@ -0,0 +1,2 @@ |
||||
Manifest-Version: 1.0 |
||||
Main-Class: org.libresonic.player.booter.Main |
Before Width: | Height: | Size: 734 B After Width: | Height: | Size: 734 B |
Before Width: | Height: | Size: 673 B After Width: | Height: | Size: 673 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 810 B After Width: | Height: | Size: 810 B |
Before Width: | Height: | Size: 771 B After Width: | Height: | Size: 771 B |
@ -1,24 +1,24 @@ |
||||
<?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 |
||||
~ the Free Software Foundation, either version 3 of the License, or |
||||
~ (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 |
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
~ GNU General Public License for more details. |
||||
~ |
||||
~ 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 |
||||
--> |
||||
|
||||
<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" |
||||
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 |
||||
|
@ -0,0 +1 @@ |
||||
/etc/default/libresonic |
@ -1,18 +1,18 @@ |
||||
Package: subsonic |
||||
Package: libresonic |
||||
Version: @VERSION@ |
||||
Section: Multimedia |
||||
Priority: optional |
||||
Recommends: ffmpeg |
||||
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 |
||||
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 |
||||
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 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 |
@ -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 |
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 |
||||
|
@ -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 |
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,6 @@ |
||||
-Xmx150m |
||||
-verbose:gc |
||||
-Dlibresonic.host=0.0.0.0 |
||||
-Dlibresonic.port=4040 |
||||
-Dlibresonic.httpsPort=0 |
||||
-Dlibresonic.contextPath=/ |
@ -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> |
@ -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 |
||||
* the Free Software Foundation, either version 3 of the License, or |
||||
* (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 |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
* |
||||
* 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 |
||||
*/ |
||||
|
||||
package net.sourceforge.subsonic.ajax; |
||||
package org.libresonic.player.ajax; |
||||
|
||||
import java.util.List; |
||||
|
||||
import net.sourceforge.subsonic.domain.ArtistBio; |
||||
import org.libresonic.player.domain.ArtistBio; |
||||
|
||||
/** |
||||
* @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 |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(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 |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
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 net.sourceforge.subsonic.service.SecurityService; |
||||
import net.sourceforge.subsonic.util.BoundedList; |
||||
import org.libresonic.player.Logger; |
||||
import org.libresonic.player.service.SecurityService; |
||||
import org.libresonic.player.util.BoundedList; |
||||
import org.apache.commons.lang.StringUtils; |
||||
import org.directwebremoting.WebContext; |
||||
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 |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(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 |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
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. |
@ -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 |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(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 |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
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. |
@ -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 |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(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 |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
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; |
||||
|
@ -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 |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(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 |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
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. |