zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 1c07ff8f6afd02da3c740b42775ea9f83f5defa4
parent 8c7e101ca41aec6bdca083e1a0afff6861f9b962
Author: paulnasca <paulnasca>
Date:   Tue, 28 Sep 2004 20:42:48 +0000

*** empty log message ***

Diffstat:
MChangeLog | 4+++-
Msrc/Misc/Master.C | 8++++++++
Msrc/Output/VSTaudiooutput.h | 2++
Msrc/main.C | 6+++---
Azynaddsubfx.nsi | 169+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 185 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -715,5 +715,7 @@ 27 Sep 2004 - Corectat un mic bug la salvare in xml la parametrul FMcoarseDetune din adnote - La VST, daca incerc sa inchid fereastra principala, se minimizeaza - Eliminate setarile cu indice '0' (zero) -28 Sep 2004 - Adaugata salvarea tuturor parametrilor in hostul VST +28 Sep 2004 - Adaugata salvarea tuturor parametrilor in hostul VST (trebuie testat) + - Inceput sa lucrez la installer pt. windows cu NSIS + diff --git a/src/Misc/Master.C b/src/Misc/Master.C @@ -601,7 +601,11 @@ int Master::getalldata(char **data){ XMLwrapper *xml=new XMLwrapper(); xml->beginbranch("MASTER"); + + pthread_mutex_lock(&mutex); add2XML(xml); + pthread_mutex_unlock(&mutex); + xml->endbranch(); *data=xml->getXMLdata(); @@ -617,7 +621,11 @@ void Master::putalldata(char *data,int size){ }; if (xml->enterbranch("MASTER")==0) return; + + pthread_mutex_lock(&mutex); getfromXML(xml); + pthread_mutex_unlock(&mutex); + xml->exitbranch(); delete(xml); diff --git a/src/Output/VSTaudiooutput.h b/src/Output/VSTaudiooutput.h @@ -43,6 +43,8 @@ class VSTSynth:public AudioEffectX{ virtual bool getProductString(char *txt); virtual void resume(); + virtual long getChunk(void** data); + virtual void setChunk(void *data,long size); MasterUI *ui; int Pexitprogram; diff --git a/src/main.C b/src/main.C @@ -634,12 +634,12 @@ return(1); long VSTSynth::getChunk(void** data){ int size=0; - size=vmaster->getalldata(data); + size=vmaster->getalldata((char **)data); return(size); }; -long VSTSynth::setChunk(void *data,long size){ - vmaster->putalldata(data,size); +void VSTSynth::setChunk(void *data,long size){ + vmaster->putalldata((char*)data,size); }; #endif diff --git a/zynaddsubfx.nsi b/zynaddsubfx.nsi @@ -0,0 +1,169 @@ +; Script generated by the HM NIS Edit Script Wizard and modified by Nasca Paul. + +; HM NIS Edit Wizard helper defines +!define PRODUCT_NAME "ZynAddSubFX" +!define PRODUCT_VERSION "2.0.1" +!define PRODUCT_PUBLISHER "Nasca Octavian Paul" +!define PRODUCT_WEB_SITE "http://zynaddsubfx.sourceforge.net" +!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\zynaddsubfx.exe" +!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" +!define PRODUCT_UNINST_ROOT_KEY "HKLM" + +SetCompressor lzma + +; MUI 1.67 compatible ------ +!include "MUI.nsh" + +; MUI Settings +!define MUI_ABORTWARNING +!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" +!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" +/* +var VSTDIR ; + +Function .onInit +; StrCpy "$INSTDIR" $VSTDIR +FunctionEnd +*/ + +; Welcome page +!insertmacro MUI_PAGE_WELCOME +; License page +!insertmacro MUI_PAGE_LICENSE "COPYING.txt" +; Components page +!insertmacro MUI_PAGE_COMPONENTS +; Directory page +!insertmacro MUI_PAGE_DIRECTORY +/* +;VST directory +PageEx directory + DirVar $VSTDIR +PageExEnd +*/ + +; Instfiles page +!insertmacro MUI_PAGE_INSTFILES +; Finish page +!insertmacro MUI_PAGE_FINISH + +; Uninstaller pages +!insertmacro MUI_UNPAGE_INSTFILES + +; Language files +!insertmacro MUI_LANGUAGE "English" + +; Reserve files +!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS + +; MUI end ------ + + +Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" +OutFile "Setup_ZynAddSubFX.exe" +InstallDir "$PROGRAMFILES\ZynAddSubFX" +InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" +;ShowInstDetails show +;ShowUnInstDetails show + + +Section "-Required" SEC01 + SetOutPath "$INSTDIR" + SetOverwrite ifnewer + File "README.txt" + File "HISTORY.txt" + File "FAQ.txt" + File "COPYING.txt" + File "ChangeLog.txt" + File "bugs.txt" + File "Warning.txt" + File /r "banks" + File /r "examples" + File /r "presets" + + SetOutPath "$SYSDIR" + File "pthreadGC.dll" +SectionEnd + +Section "Standalone" SEC02 + SetOutPath "$INSTDIR" + File "zynaddsubfx.exe" + File "launch_zynaddsubfx.bat" + CreateDirectory "$SMPROGRAMS\ZynAddSubFX" + CreateShortCut "$SMPROGRAMS\ZynAddSubFX\ZynAddSubFX low latency.lnk" "$INSTDIR\launch_zynaddsubfx.bat" + CreateShortCut "$SMPROGRAMS\ZynAddSubFX\ZynAddSubFX.lnk" "$INSTDIR\zynaddsubfx.exe" + CreateShortCut "$DESKTOP\ZynAddSubFX.lnk" "$INSTDIR\zynaddsubfx.exe" +; CreateShortCut "$STARTMENU.lnk" "$INSTDIR\launch_zynaddsubfx.bat" +SectionEnd + +Section "VST Plugin" SEC03 + SetOutPath "$INSTDIR\VST" + File "zynaddsubfx_vst.dll" +SectionEnd + +Section "Source Code" SEC04 + SetOutPath "$INSTDIR" + File /r "source code" +SectionEnd + +Section -AdditionalIcons + WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" + CreateShortCut "$SMPROGRAMS\ZynAddSubFX\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url" + +; sa sterg uninstall icon + CreateShortCut "$SMPROGRAMS\ZynAddSubFX\Uninstall.lnk" "$INSTDIR\uninst.exe" +SectionEnd + +Section -Post + WriteUninstaller "$INSTDIR\uninst.exe" + WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\zynaddsubfx.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\zynaddsubfx.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" +SectionEnd + +; Section descriptions +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Required files for ZynAddSubFX " + !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "ZynAddSubFX as a standalone synth" + !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "ZynAddSubFX as a VST plugin" + !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Full source code of ZynAddSubFX" +!insertmacro MUI_FUNCTION_DESCRIPTION_END + +;I don't allow to install zynaddsubfx in a existing directory (because the uninstall will recursively remove the directory) +Function .onVerifyInstDir + IfFileExists $INSTDIR fileexists nofile + fileexists: + Abort ; + nofile: +FunctionEnd + +Function un.onUninstSuccess + HideWindow + MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." +FunctionEnd + +Function un.onInit + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components? $\r (INCLUDING THE USER-MADE INSTRUMENTS,ETC !!!)" IDYES +2 + Abort +FunctionEnd + +Section Uninstall + RMDir /r "$INSTDIR" + + Delete "$SMPROGRAMS\ZynAddSubFX\Uninstall.lnk" + Delete "$SMPROGRAMS\ZynAddSubFX\Website.lnk" + Delete "$STARTMENU.lnk" + Delete "$DESKTOP\ZynAddSubFX.lnk" + Delete "$SMPROGRAMS\ZynAddSubFX\ZynAddSubFX.lnk" + + RMDir "$SMPROGRAMS\ZynAddSubFX" + RMDir "$INSTDIR" + RMDir "" + + DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" + DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" + SetAutoClose true +SectionEnd