diff --git a/doc/lmms.1 b/doc/lmms.1 index bed99fd1d..b9c297caf 100644 --- a/doc/lmms.1 +++ b/doc/lmms.1 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH LMMS 1 "June 23, 2015" +.TH LMMS 1 "February 17, 2016" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -19,13 +19,58 @@ lmms \- software for easy music production .SH SYNOPSIS .B lmms +.RB "[ \--\fBallowroot\fP ]" +.br +.B lmms +.RB "[ \--\fBbitrate\fP \fIbitrate\fP ]" +.br +.B lmms +.RB "[ \--\fBconfig\fP \fIconfigfile\fP ]" +.br +.B lmms +.RB "[ \--\fBdump\fP \fIin\fP ]" +.br +.B lmms +.RB "[ \--\fBfloat\fP ]" +.br +.B lmms +.RB "[ \--\fBformat\fP \fIformat\fP ]" +.br +.B lmms +.RB "[ \--\fBgeometry\fP \fIgeometry\fP ]" +.br +.B lmms +.RB "[ \--\fBhelp\fP ]" +.br +.B lmms +.RB "[ \--\interpolation\fP \fImethod\fP ]" +.br +.B lmms +.RB "[ \--\fBimport\fP \fIin\fP [ \-e ] ]" +.br +.B lmms +.RB "[ \--\fBloop\fP ]" +.br +.B lmms +.RB "[ \--\fBoutput\fP \fIpath\fP ]" +.br +.B lmms +.RB "[ \--\fBoversampling\fP \fIvalue\fP ]" +.br +.B lmms +.RB "[ \--\fBprofile\fP \fIout\fP ]" +.br +.B lmms .RB "[ \--\fBrender\fP \fIfile\fP ] [options]" .br .B lmms +.RB "[ \--\fBsamplerate\fP \fIsamplerate\fP ]" +.br +.B lmms .RB "[ \--\fBupgrade\fP \fIin\fP \fIout\fP ]" .br .B lmms -.RB "[ \--\fBdump\fP \fIin\fP ]" +.RB "[ \--\fBversion\fP ]" .br .B lmms .RI "[ file ]" @@ -40,38 +85,54 @@ LMMS is a free cross-platform alternative to commercial programs like FL Studio LMMS features components such as a Song Editor, a Beat+Bassline Editor, a Piano Roll, an FX Mixer as well as many powerful instruments and effects. .SH OPTIONS -.IP "\fB\-r, --render\fP \fIproject-file\fP -Render given file to either a wav\- or ogg\-file. See \fB\-f\fP for details -.IP "\fB\-r, --rendertracks\fP \fIproject-file\fP -Render each track into a separate wav\- or ogg\-file. See \fB\-f\fP for details +.IP "\fB\-a, --float\fP +32bit float bit depth +.IP "\fB\-b, --bitrate\fP \fIbitrate\fP +Specify output bitrate in KBit/s (for OGG encoding only), default is 160 +.IP "\fB\-c, --config\fP \fIconfigfile\fP +Get the configuration from \fIconfigfile\fP instead of ~/.lmmsrc.xml (default) +.IP "\fB\-d, --dump\fP \fIin\fP +Dump XML of compressed file \fIin\fP (i.e. MMPZ-file) +.IP "\fB\-f, --format\fP \fIformat\fP +Specify format of render-output where \fIformat\fP is either 'wav' or 'ogg' +.IP "\fB\ --geometry\fP \fIgeometry\fP +Specify the prefered size and position of the main window +.br +\fIgeometry\fP syntax is <\fIxsize\fPx\fIysize\fP+\fIxoffset\fP+\fIyoffset\fP>. +.br +Default: full screen +.IP "\fB\-h, --help\fP +Show usage information and exit. +.IP "\fB\-i, --interpolation\fP \fImethod\fP +Specify interpolation method - possible values are \fIlinear\fP, \fIsincfastest\fP (default), \fIsincmedium\fP, \fIsincbest\fP +.IP "\fB\ --import\fP \fIin\fP \fB\-e\fP +Import MIDI file \fIin\fP +.br +If -e is specified lmms exits after importing the file. +.IP "\fB\-l, --loop +Render the given file as a loop, i.e. stop rendering at exactly the end of the song. Additional silence or reverb tails at the end of the song are not rendered. .IP "\fB\-o, --output\fP \fIpath\fP Render into \fIpath\fP .br For --render, this is interpreted as a file path. .br For --render-tracks, this is interpreted as a path to an existing directory. -.IP "\fB\-f, --format\fP \fIformat\fP -Specify format of render-output where \fIformat\fP is either 'wav' or 'ogg' +IP "\fB\-p, --profile\fP \fIout\fP +Dump profiling information to file \fIout\fP +.IP "\fB\-r, --render\fP \fIproject-file\fP +Render given file to either a wav\- or ogg\-file. See \fB\-f\fP for details +.IP "\fB\-r, --rendertracks\fP \fIproject-file\fP +Render each track into a separate wav\- or ogg\-file. See \fB\-f\fP for details .IP "\fB\-s, --samplerate\fP \fIsamplerate\fP Specify output samplerate in Hz - range is 44100 (default) to 192000 -.IP "\fB\-b, --bitrate\fP \fIbitrate\fP -Specify output bitrate in KBit/s (for OGG encoding only), default is 160 -.IP "\fB\-i, --interpolation\fP \fImethod\fP -Specify interpolation method - possible values are \fIlinear\fP, \fIsincfastest\fP (default), \fIsincmedium\fP, \fIsincbest\fP -.IP "\fB\-x, --oversampling\fP \fIvalue\fP -Specify oversampling, possible values: 1, 2 (default), 4, 8 -.IP "\fB\-l, --loop -Render the given file as a loop, i.e. stop rendering at exactly the end of the song. Additional silence or reverb tails at the end of the song are not rendered. .IP "\fB\-u, --upgrade\fP \fIin\fP \fIout\fP Upgrade file \fIin\fP and save as \fIout\fP -.IP "\fB\-d, --dump\fP \fIin\fP -Dump XML of compressed file \fIin\fP (i.e. MMPZ-file) .IP "\fB\-v, --version Show version information and exit. +.IP "\fB\-x, --oversampling\fP \fIvalue\fP +Specify oversampling, possible values: 1, 2 (default), 4, 8 .IP "\fB\ --allowroot Bypass root user startup check (use with caution). -.IP "\fB\-h, --help -Show usage information and exit. .SH SEE ALSO .BR https://lmms.io/ .BR https://lmms.io/documentation/ diff --git a/include/ConfigManager.h b/include/ConfigManager.h index 08224e990..b3b1b326d 100644 --- a/include/ConfigManager.h +++ b/include/ConfigManager.h @@ -230,7 +230,7 @@ public: const QString & value ); void deleteValue( const QString & cls, const QString & attribute); - void loadConfigFile(); + void loadConfigFile( const QString & configFile = "" ); void saveConfigFile(); @@ -260,7 +260,7 @@ private: void upgrade_1_1_90(); void upgrade(); - const QString m_lmmsRcFile; + QString m_lmmsRcFile; QString m_workingDir; QString m_dataDir; QString m_artworkDir; diff --git a/src/core/ConfigManager.cpp b/src/core/ConfigManager.cpp index b81bad200..819e67746 100644 --- a/src/core/ConfigManager.cpp +++ b/src/core/ConfigManager.cpp @@ -63,14 +63,16 @@ ConfigManager::ConfigManager() : if (! qgetenv("LMMS_DATA_DIR").isEmpty()) QDir::addSearchPath("data", QString::fromLocal8Bit(qgetenv("LMMS_DATA_DIR"))); - // If we're in development (lmms is not installed) let's get the source - // directory by reading the CMake Cache + // If we're in development (lmms is not installed) let's get the source and + // binary directories by reading the CMake Cache QFile cmakeCache(qApp->applicationDirPath() + "/CMakeCache.txt"); if (cmakeCache.exists()) { cmakeCache.open(QFile::ReadOnly); QTextStream stream(&cmakeCache); - // Find the line containing something like lmms_SOURCE_DIR:static=