mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-01 17:58:29 +00:00
Applied techtonik patches for typos (issue 78) and installer fix (issue 77). Thanks techtonik!
This commit is contained in:
parent
65f0cb735b
commit
f07dc09dda
@ -1,6 +1,8 @@
|
||||
SetCompressor /SOLID lzma
|
||||
|
||||
!include "MUI.nsh"
|
||||
!include "FileFunc.nsh"
|
||||
!insertmacro DirState
|
||||
|
||||
|
||||
!define TRUE 1
|
||||
@ -14,6 +16,8 @@ SetCompressor /SOLID lzma
|
||||
!define INSTALL_DIR "musikCube 2"
|
||||
|
||||
;----------------------------------------------------------------
|
||||
!define MC2_DB_DIR "$APPDATA\mC2"
|
||||
|
||||
OutFile ".\${INSTALLER_NAME}.exe"
|
||||
|
||||
Name "${PROJECT_NAME} ${SUB_NAME}"
|
||||
@ -31,8 +35,8 @@ InstallDirRegKey HKCU "Software\${INSTALL_DIR}" ""
|
||||
; Installation pages order
|
||||
!insertmacro MUI_PAGE_LICENSE "..\LICENSE.txt"
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
;!insertmacro MUI_PAGE_COMPONENTS
|
||||
Page custom RemoveOldFilesPage RemoveOldFilesLeave ;Custom page
|
||||
;!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
|
||||
@ -59,7 +63,7 @@ Section "mC2installation" main
|
||||
|
||||
IntCmpU $RemoveOldDatabases 0 DoNotRemoveDBFiles
|
||||
; Remove the app data
|
||||
RMDir /r $APPDATA\mC2
|
||||
RMDir /r "${MC2_DB_DIR}"
|
||||
DoNotRemoveDBFiles:
|
||||
|
||||
|
||||
@ -87,8 +91,11 @@ Function .onInit
|
||||
FunctionEnd
|
||||
|
||||
Function RemoveOldFilesPage
|
||||
${DirState} "${MC2_DB_DIR}" $0
|
||||
IntCmp $0 -1 0 +2 +2
|
||||
Abort
|
||||
!insertmacro MUI_HEADER_TEXT "mC2 installation" "Removing old database files"
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "remove_old_db.ini" "Field 2" "Text" "Remove old mC2 databases in $APPDATA\mC2"
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "remove_old_db.ini" "Field 2" "Text" "Remove old mC2 databases in ${MC2_DB_DIR}"
|
||||
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "remove_old_db.ini"
|
||||
FunctionEnd
|
||||
|
||||
|
@ -105,7 +105,7 @@ utfstring Library::LocalDB::GetInfo(){
|
||||
/// musik::core::Library::LocalDB library;
|
||||
/// // Start the library (and indexer that is included)
|
||||
/// library.Startup();
|
||||
/// // The library is now ready to recieve queries
|
||||
/// // The library is now ready to receive queries
|
||||
///\endcode
|
||||
//////////////////////////////////////////
|
||||
bool Library::LocalDB::Startup(){
|
||||
|
@ -203,7 +203,7 @@ void Library::Remote::ReadThread(){
|
||||
}
|
||||
}
|
||||
if(currentQuery){
|
||||
if(currentQuery->RecieveResults(node,this)){
|
||||
if(currentQuery->ReceiveResults(node,this)){
|
||||
boost::mutex::scoped_lock lock(this->libraryMutex);
|
||||
currentQuery->status |= Query::Base::Status::Ended;
|
||||
}else{
|
||||
|
@ -61,15 +61,15 @@ Query::Base::~Base(void){
|
||||
|
||||
//////////////////////////////////////////
|
||||
///\brief
|
||||
///Recieve the query from XML
|
||||
///Receive the query from XML
|
||||
///
|
||||
///\param queryNode
|
||||
///Reference to query XML node
|
||||
///
|
||||
///\returns
|
||||
///true when successfully recieved
|
||||
///true when successfully received
|
||||
//////////////////////////////////////////
|
||||
bool Query::Base::RecieveQuery(musik::core::xml::ParserNode &queryNode){
|
||||
bool Query::Base::ReceiveQuery(musik::core::xml::ParserNode &queryNode){
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -89,15 +89,15 @@ bool Query::Base::SendQuery(musik::core::xml::WriterNode &queryNode){
|
||||
|
||||
//////////////////////////////////////////
|
||||
///\brief
|
||||
///Recieve results from XML
|
||||
///Receive results from XML
|
||||
///
|
||||
///\param queryNode
|
||||
///Reference to query XML node
|
||||
///
|
||||
///\returns
|
||||
///true when successfully recieved
|
||||
///true when successfully received
|
||||
//////////////////////////////////////////
|
||||
bool Query::Base::RecieveResults(musik::core::xml::ParserNode &queryNode,Library::Base *library){
|
||||
bool Query::Base::ReceiveResults(musik::core::xml::ParserNode &queryNode,Library::Base *library){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -202,9 +202,9 @@ class Base : public sigslot::has_slots<> {
|
||||
virtual void PreAddQuery(Library::Base *library){};
|
||||
|
||||
|
||||
virtual bool RecieveQuery(musik::core::xml::ParserNode &queryNode);
|
||||
virtual bool ReceiveQuery(musik::core::xml::ParserNode &queryNode);
|
||||
virtual bool SendQuery(musik::core::xml::WriterNode &queryNode);
|
||||
virtual bool RecieveResults(musik::core::xml::ParserNode &queryNode,Library::Base *library);
|
||||
virtual bool ReceiveResults(musik::core::xml::ParserNode &queryNode,Library::Base *library);
|
||||
virtual bool SendResults(musik::core::xml::WriterNode &queryNode,Library::Base *library);
|
||||
|
||||
public:
|
||||
|
@ -283,10 +283,10 @@ bool Query::ListBase::SendResults(musik::core::xml::WriterNode &queryNode,Librar
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Query::ListBase::RecieveResults(musik::core::xml::ParserNode &queryNode,Library::Base *library){
|
||||
bool Query::ListBase::ReceiveResults(musik::core::xml::ParserNode &queryNode,Library::Base *library){
|
||||
while( musik::core::xml::ParserNode node = queryNode.ChildNode() ){
|
||||
|
||||
// Recieve metadata
|
||||
// Receive metadata
|
||||
if( node.Name()=="metadata"){
|
||||
|
||||
std::string metakey(node.Attributes()["key"]);
|
||||
@ -329,7 +329,7 @@ bool Query::ListBase::RecieveResults(musik::core::xml::ParserNode &queryNode,Lib
|
||||
|
||||
typedef std::vector<std::string> StringVector;
|
||||
|
||||
// Recieve tracks
|
||||
// Receive tracks
|
||||
if( node.Name()=="tracklist"){
|
||||
while( musik::core::xml::ParserNode tracksNode = node.ChildNode("tracks") ){
|
||||
tracksNode.WaitForContent();
|
||||
@ -359,7 +359,7 @@ bool Query::ListBase::RecieveResults(musik::core::xml::ParserNode &queryNode,Lib
|
||||
}
|
||||
|
||||
|
||||
// Recieve trackinfo
|
||||
// Receive trackinfo
|
||||
if( node.Name()=="trackinfo"){
|
||||
node.WaitForContent();
|
||||
|
||||
@ -394,7 +394,7 @@ void Query::ListBase::DummySlotTrackInfo(UINT64,UINT64,UINT64){
|
||||
}
|
||||
|
||||
|
||||
bool Query::ListBase::RecieveQueryStandardNodes(musik::core::xml::ParserNode &node){
|
||||
bool Query::ListBase::ReceiveQueryStandardNodes(musik::core::xml::ParserNode &node){
|
||||
if(node.Name()=="listeners"){
|
||||
|
||||
// Wait for all content
|
||||
|
@ -74,7 +74,7 @@ namespace musik{ namespace core{
|
||||
|
||||
bool ParseTracksSQL(std::string sql,Library::Base *library,db::Connection &db);
|
||||
|
||||
bool RecieveQueryStandardNodes(musik::core::xml::ParserNode &node);
|
||||
bool ReceiveQueryStandardNodes(musik::core::xml::ParserNode &node);
|
||||
bool SendQueryStandardNodes(musik::core::xml::WriterNode &queryNode);
|
||||
|
||||
MetadataResults metadataResults;
|
||||
@ -92,7 +92,7 @@ namespace musik{ namespace core{
|
||||
UINT64 trackInfoSize;
|
||||
|
||||
virtual bool SendResults(musik::core::xml::WriterNode &queryNode,Library::Base *library);
|
||||
virtual bool RecieveResults(musik::core::xml::ParserNode &queryNode,Library::Base *library);
|
||||
virtual bool ReceiveResults(musik::core::xml::ParserNode &queryNode,Library::Base *library);
|
||||
|
||||
public:
|
||||
MetadataSignal& OnMetadataEvent(const char* metatag);
|
||||
|
@ -552,7 +552,7 @@ void Query::ListSelection::QueryForMetadata(const char *metakey,const char *sql,
|
||||
|
||||
//////////////////////////////////////////
|
||||
///\brief
|
||||
///Recieve the query from XML
|
||||
///Receive the query from XML
|
||||
///
|
||||
///\param queryNode
|
||||
///Reference to query XML node
|
||||
@ -569,9 +569,9 @@ void Query::ListSelection::QueryForMetadata(const char *metakey,const char *sql,
|
||||
///\endcode
|
||||
///
|
||||
///\returns
|
||||
///true when successfully recieved
|
||||
///true when successfully received
|
||||
//////////////////////////////////////////
|
||||
bool Query::ListSelection::RecieveQuery(musik::core::xml::ParserNode &queryNode){
|
||||
bool Query::ListSelection::ReceiveQuery(musik::core::xml::ParserNode &queryNode){
|
||||
|
||||
while( musik::core::xml::ParserNode node = queryNode.ChildNode() ){
|
||||
if(node.Name()=="selections"){
|
||||
@ -595,7 +595,7 @@ bool Query::ListSelection::RecieveQuery(musik::core::xml::ParserNode &queryNode)
|
||||
}
|
||||
|
||||
}else{
|
||||
this->RecieveQueryStandardNodes(node);
|
||||
this->ReceiveQueryStandardNodes(node);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -85,7 +85,7 @@ class ListSelection : public Query::ListBase{
|
||||
|
||||
Ptr copy() const;
|
||||
|
||||
virtual bool RecieveQuery(musik::core::xml::ParserNode &queryNode);
|
||||
virtual bool ReceiveQuery(musik::core::xml::ParserNode &queryNode);
|
||||
virtual bool SendQuery(musik::core::xml::WriterNode &queryNode);
|
||||
|
||||
private:
|
||||
|
@ -214,7 +214,7 @@ void Query::SortTracks::ClearTracks(){
|
||||
|
||||
//////////////////////////////////////////
|
||||
///\brief
|
||||
///Recieve the query from XML
|
||||
///Receive the query from XML
|
||||
///
|
||||
///\param queryNode
|
||||
///Reference to query XML node
|
||||
@ -227,9 +227,9 @@ void Query::SortTracks::ClearTracks(){
|
||||
///\endcode
|
||||
///
|
||||
///\returns
|
||||
///true when successfully recieved
|
||||
///true when successfully received
|
||||
//////////////////////////////////////////
|
||||
bool Query::SortTracks::RecieveQuery(musik::core::xml::ParserNode &queryNode){
|
||||
bool Query::SortTracks::ReceiveQuery(musik::core::xml::ParserNode &queryNode){
|
||||
|
||||
while( musik::core::xml::ParserNode node = queryNode.ChildNode() ){
|
||||
if(node.Name()=="sortby"){
|
||||
@ -259,7 +259,7 @@ bool Query::SortTracks::RecieveQuery(musik::core::xml::ParserNode &queryNode){
|
||||
}
|
||||
|
||||
}else{
|
||||
this->RecieveQueryStandardNodes(node);
|
||||
this->ReceiveQueryStandardNodes(node);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -82,7 +82,7 @@ namespace musik{ namespace core{
|
||||
|
||||
virtual std::string Name();
|
||||
virtual bool ParseQuery(Library::Base *library,db::Connection &db);
|
||||
virtual bool RecieveQuery(musik::core::xml::ParserNode &queryNode);
|
||||
virtual bool ReceiveQuery(musik::core::xml::ParserNode &queryNode);
|
||||
virtual bool SendQuery(musik::core::xml::WriterNode &queryNode);
|
||||
|
||||
private:
|
||||
|
@ -213,7 +213,7 @@ void Query::SortTracksWithData::ClearTracks(){
|
||||
|
||||
//////////////////////////////////////////
|
||||
///\brief
|
||||
///Recieve the query from XML
|
||||
///Receive the query from XML
|
||||
///
|
||||
///\param queryNode
|
||||
///Reference to query XML node
|
||||
@ -226,9 +226,9 @@ void Query::SortTracksWithData::ClearTracks(){
|
||||
///\endcode
|
||||
///
|
||||
///\returns
|
||||
///true when successfully recieved
|
||||
///true when successfully received
|
||||
//////////////////////////////////////////
|
||||
bool Query::SortTracksWithData::RecieveQuery(musik::core::xml::ParserNode &queryNode){
|
||||
bool Query::SortTracksWithData::ReceiveQuery(musik::core::xml::ParserNode &queryNode){
|
||||
|
||||
while( musik::core::xml::ParserNode node = queryNode.ChildNode() ){
|
||||
if(node.Name()=="sortby"){
|
||||
@ -393,14 +393,14 @@ bool Query::SortTracksWithData::SendResults(musik::core::xml::WriterNode &queryN
|
||||
|
||||
//////////////////////////////////////////
|
||||
///\brief
|
||||
///Recieve results from the musikServer.
|
||||
///Receive results from the musikServer.
|
||||
//////////////////////////////////////////
|
||||
bool Query::SortTracksWithData::RecieveResults(musik::core::xml::ParserNode &queryNode,Library::Base *library){
|
||||
bool Query::SortTracksWithData::ReceiveResults(musik::core::xml::ParserNode &queryNode,Library::Base *library){
|
||||
while( musik::core::xml::ParserNode node = queryNode.ChildNode() ){
|
||||
|
||||
typedef std::vector<std::string> StringVector;
|
||||
|
||||
// Recieve tracks
|
||||
// Receive tracks
|
||||
if( node.Name()=="tracklist"){
|
||||
while( musik::core::xml::ParserNode trackNode = node.ChildNode("t") ){
|
||||
trackNode.WaitForContent();
|
||||
|
@ -52,7 +52,7 @@ namespace musik{ namespace core{ namespace Query{
|
||||
|
||||
//////////////////////////////////////////
|
||||
///\brief
|
||||
///SortTracksWithData is a query used to recieve sorted tracklists along with the data the tracks are sorted by
|
||||
///SortTracksWithData is a query used to receive sorted tracklists along with the data the tracks are sorted by
|
||||
///
|
||||
///\remarks
|
||||
///First concider to use the SortTracks query instead.
|
||||
@ -102,10 +102,10 @@ class SortTracksWithData : public Query::Base{
|
||||
|
||||
virtual std::string Name();
|
||||
virtual bool ParseQuery(Library::Base *library,db::Connection &db);
|
||||
virtual bool RecieveQuery(musik::core::xml::ParserNode &queryNode);
|
||||
virtual bool ReceiveQuery(musik::core::xml::ParserNode &queryNode);
|
||||
virtual bool SendQuery(musik::core::xml::WriterNode &queryNode);
|
||||
virtual bool SendResults(musik::core::xml::WriterNode &queryNode,Library::Base *library);
|
||||
virtual bool RecieveResults(musik::core::xml::ParserNode &queryNode,Library::Base *library);
|
||||
virtual bool ReceiveResults(musik::core::xml::ParserNode &queryNode,Library::Base *library);
|
||||
bool RunCallbacks(Library::Base *library);
|
||||
|
||||
private:
|
||||
|
@ -306,7 +306,7 @@ std::string TrackMetadata::Name(){
|
||||
}
|
||||
|
||||
|
||||
bool TrackMetadata::RecieveQuery(musik::core::xml::ParserNode &queryNode){
|
||||
bool TrackMetadata::ReceiveQuery(musik::core::xml::ParserNode &queryNode){
|
||||
|
||||
while(musik::core::xml::ParserNode metakeysNode = queryNode.ChildNode()){
|
||||
if(metakeysNode.Name()=="metakeys"){
|
||||
@ -398,7 +398,7 @@ bool TrackMetadata::SendResults(musik::core::xml::WriterNode &queryNode,Library:
|
||||
if( !resultCopy.empty() ){
|
||||
try{
|
||||
for(TrackVector::iterator track=resultCopy.begin();track!=resultCopy.end();++track){
|
||||
// Erase the path.. is translated in the RecieveResults
|
||||
// Erase the path.. is translated in the ReceiveResults
|
||||
(*track)->ClearValue("path");
|
||||
|
||||
musik::core::xml::WriterNode trackNode(queryNode,"t");
|
||||
@ -429,7 +429,7 @@ bool TrackMetadata::SendResults(musik::core::xml::WriterNode &queryNode,Library:
|
||||
}
|
||||
|
||||
|
||||
bool TrackMetadata::RecieveResults(musik::core::xml::ParserNode &queryNode,Library::Base *library){
|
||||
bool TrackMetadata::ReceiveResults(musik::core::xml::ParserNode &queryNode,Library::Base *library){
|
||||
|
||||
bool requestPath( this->requestedFields.find("path")!=this->requestedFields.end() );
|
||||
utfstring pathPrefix(library->BasePath()+UTF("track/?auth_key="));
|
||||
|
@ -96,10 +96,10 @@ class TrackMetadata : public Query::Base {
|
||||
virtual bool ParseQuery(Library::Base *library,db::Connection &db);
|
||||
|
||||
virtual std::string Name();
|
||||
virtual bool RecieveQuery(musik::core::xml::ParserNode &queryNode);
|
||||
virtual bool ReceiveQuery(musik::core::xml::ParserNode &queryNode);
|
||||
virtual bool SendQuery(musik::core::xml::WriterNode &queryNode);
|
||||
virtual bool SendResults(musik::core::xml::WriterNode &queryNode,Library::Base *library);
|
||||
virtual bool RecieveResults(musik::core::xml::ParserNode &queryNode,Library::Base *library);
|
||||
virtual bool ReceiveResults(musik::core::xml::ParserNode &queryNode,Library::Base *library);
|
||||
|
||||
};
|
||||
|
||||
|
@ -152,7 +152,7 @@ void Connection::ReadThread(){
|
||||
query->uniqueId = boost::lexical_cast<unsigned int>(queryNode.Attributes()["uid"]);
|
||||
}catch(...){}
|
||||
|
||||
if(query->RecieveQuery(queryNode)){
|
||||
if(query->ReceiveQuery(queryNode)){
|
||||
|
||||
unsigned int options(0);
|
||||
try{
|
||||
|
@ -191,7 +191,7 @@ class Base : boost::noncopyable{
|
||||
|
||||
//////////////////////////////////////////
|
||||
///\brief
|
||||
///Connect the tracklist to recieve tracks from a ListBase query.
|
||||
///Connect the tracklist to receive tracks from a ListBase query.
|
||||
//////////////////////////////////////////
|
||||
virtual bool ConnectToQuery(musik::core::Query::ListBase &query);
|
||||
|
||||
@ -225,9 +225,9 @@ class Base : boost::noncopyable{
|
||||
typedef sigslot::signal1<std::vector<long>> TrackMetadataEvent;
|
||||
//////////////////////////////////////////
|
||||
///\brief
|
||||
///Event, called when metadata has been recieved.
|
||||
///Event, called when metadata has been received.
|
||||
///
|
||||
///The event reciever will get a std::vector<long>& with
|
||||
///The event receiver will get a std::vector<long>& with
|
||||
///a vector of positions of tracks that has been updated.
|
||||
//////////////////////////////////////////
|
||||
TrackMetadataEvent TrackMetadataUpdated;
|
||||
@ -239,7 +239,7 @@ class Base : boost::noncopyable{
|
||||
///\brief
|
||||
///Event, called when summary has been updated
|
||||
///
|
||||
///The event reciever will get 3 UINT64 parameters
|
||||
///The event receiver will get 3 UINT64 parameters
|
||||
//////////////////////////////////////////
|
||||
SummaryInfoEvent SummaryInfoUpdated;
|
||||
|
||||
@ -250,7 +250,7 @@ class Base : boost::noncopyable{
|
||||
///\brief
|
||||
///Event, called when tracks inside the tracklist has been added/changed
|
||||
///
|
||||
///The event reciever will get a bool set to true if the list has been cleared first
|
||||
///The event receiver will get a bool set to true if the list has been cleared first
|
||||
//////////////////////////////////////////
|
||||
TracklistChangedEvent TracklistChanged;
|
||||
|
||||
@ -261,7 +261,7 @@ class Base : boost::noncopyable{
|
||||
///\brief
|
||||
///Event, called when position in tracklist has been updated
|
||||
///
|
||||
///The event reciever will get the nex position, and the old position
|
||||
///The event receiver will get the nex position, and the old position
|
||||
//////////////////////////////////////////
|
||||
PositionChangedEvent PositionChanged;
|
||||
|
||||
|
@ -388,7 +388,7 @@ bool LibraryList::QueryForTrack(long position){
|
||||
|
||||
//////////////////////////////////////////
|
||||
///\brief
|
||||
///Connect to recieve results from any query based on the musik::core::Query::ListBase
|
||||
///Connect to receive results from any query based on the musik::core::Query::ListBase
|
||||
//////////////////////////////////////////
|
||||
bool LibraryList::ConnectToQuery(musik::core::Query::ListBase &query){
|
||||
query.OnTrackEvent().connect(this,&LibraryList::OnTracksFromQuery);
|
||||
@ -399,7 +399,7 @@ bool LibraryList::ConnectToQuery(musik::core::Query::ListBase &query){
|
||||
|
||||
//////////////////////////////////////////
|
||||
///\brief
|
||||
///Recieve new tracks from a query
|
||||
///Receive new tracks from a query
|
||||
///
|
||||
///\param newTracks
|
||||
///The new tracks
|
||||
@ -426,7 +426,7 @@ void LibraryList::OnTracksFromQuery(musik::core::TrackVector *newTracks,bool cle
|
||||
|
||||
//////////////////////////////////////////
|
||||
///\brief
|
||||
///Called by connected queries to recieve summary from tracklist
|
||||
///Called by connected queries to receive summary from tracklist
|
||||
//////////////////////////////////////////
|
||||
void LibraryList::OnTracksSummaryFromQuery(UINT64 tracks,UINT64 duration,UINT64 filesize){
|
||||
this->SummaryInfoUpdated(tracks,duration,filesize);
|
||||
@ -435,7 +435,7 @@ void LibraryList::OnTracksSummaryFromQuery(UINT64 tracks,UINT64 duration,UINT64
|
||||
|
||||
//////////////////////////////////////////
|
||||
///\brief
|
||||
///Recieves what tracks now have metadata, and pass them forward to the TrackMetadataUpdated signal
|
||||
///Receives what tracks now have metadata, and pass them forward to the TrackMetadataUpdated signal
|
||||
//////////////////////////////////////////
|
||||
void LibraryList::OnTracksMetaFromQuery(musik::core::TrackVector *metaTracks){
|
||||
std::vector<long> updateTrackPositions;
|
||||
|
Loading…
Reference in New Issue
Block a user