diff --git a/docs/index.html b/docs/index.html index 5304476529..1b5ad1d272 100644 --- a/docs/index.html +++ b/docs/index.html @@ -47,7 +47,7 @@

libRoadrunner

import roadrunner import roadrunner.testing rr = roadrunner.RoadRunner() -rr.load("roadrunner.testing.getData('feedback.xml')") +rr.load(roadrunner.testing.getData('feedback.xml')) result = rr.simulate() roadrunner.plot(result) diff --git a/installer/windows/libRoadRunner-python-win32_setup.iss b/installer/windows/libRoadRunner-python-win32_setup.iss deleted file mode 100644 index 90626e543b..0000000000 --- a/installer/windows/libRoadRunner-python-win32_setup.iss +++ /dev/null @@ -1,302 +0,0 @@ -; Script generated by the Inno Setup Script Wizard. -; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! - -#define MyAppName "roadrunner" -#define MyAppVersion "1.0.0" -#define MyAppPublisher "University of Washington, Seattle, WA, USA" -#define MyAppURL "http://libroadrunner.org/" -#define PyInstaller "python-2.7.6.msi" -#define NumpyInstaller "numpy-1.8.0-win32-superpack-python2.7.exe" -#define MatplotlibInstaller "matplotlib-1.3.1.win32-py2.7.exe" -;downloads turned off, installers packaged -#define PyInstallerURL "http://python.org/ftp/python/2.7.6/python-2.7.6.msi" -#define NumpyInstallerURL "http://downloads.sourceforge.net/project/numpy/NumPy/1.8.0/numpy-1.8.0-win32-superpack-python2.7.exe?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fnumpy%2Ffiles%2FNumPy%2F&ts=1390956336&use_mirror=softlayer-ams" -#define MatplotlibInstallerURL "https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.3.1/matplotlib-1.3.1.win32-py2.7.exe" - -#define Py "Python" -#define PyVer "2.7" -#define Numpy "Numpy" -#define NumpyVer "1.0" -#define Matplotlib "Matplotlib" -#define MatplotlibVer "1.0" -#define AppDir "roadrunner" -;Used for downloader -;#include ReadReg(HKEY_LOCAL_MACHINE,'Software\Sherlock Software\InnoTools\Downloader','ScriptPath',''); - -[Setup] -; NOTE: The value of AppId uniquely identifies this application. -; Do not use the same AppId value in installers for other applications. -; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) -AppId={{3B0C903B-773D-48DE-84D5-EA90B0BF67AE} -AppName={#MyAppName} -AppVersion={#MyAppVersion} -;AppVerName={#MyAppName} {#MyAppVersion} -AppPublisher={#MyAppPublisher} -AppPublisherURL={#MyAppURL} -AppSupportURL={#MyAppURL} -AppUpdatesURL={#MyAppURL} -DisableWelcomePage=yes -DefaultDirName={code:SetDefaultAppDirName} -;DefaultDirName=C:\Python27\Lib\site-packages\{#AppDir} - -;enable the next line for debug only -;DisableDirPage=yes - - -DefaultGroupName=libRoadRunner -DisableProgramGroupPage=yes -;LicenseFile=..\..\LICENSE.txt -;InfoBeforeFile=..\..\NOTICE.txt -DisableReadyPage=yes -DisableFinishedPage=yes -OutputDir=. -OutputBaseFilename=libRoadRunner-python-setup -SetupIconFile=libroadrunner_logo_tan.ico -Compression=lzma -SolidCompression=yes - -[Languages] -Name: "english"; MessagesFile: "compiler:Default.isl" - -[Files] -Source: "..\..\site-packages\roadrunner\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs -; NOTE: Don't use "Flags: ignoreversion" on any shared system files - -[Code] -////////////////////////////////////////////////////////////////////////////// -const - appDir = '{#AppDir}'; - pyReg = 'SOFTWARE\{#Py}\PythonCore\{#PyVer}\InstallPath'; - pyRegWow6443Node = 'SOFTWARE\Wow6432Node\{#Py}\PythonCore\{#PyVer}\InstallPath'; - -var - installPython, installMatplot, installNumpy: Boolean; - DefaultAppDirName: String; - - -////////////////////////////////////////////////////////////////////////////// -procedure ExitProcess(exitCode:integer); - external 'ExitProcess@kernel32.dll stdcall'; - -////////////////////////////////////////////////////////////////////////////// -function GetPathForPythonSitePackages(): string; -var - InstallPath: string; -begin - - if RegQueryStringValue(HKLM, pyReg, '', InstallPath) then - begin - Result := InstallPath + 'Lib\site-packages\' + appDir; - end - else - if RegQueryStringValue(HKCU, pyReg, '', InstallPath) then - begin - Result := InstallPath + 'Lib\site-packages\' + appDir; - end - else - if RegQueryStringValue(HKLM, pyRegWow6443Node, '', InstallPath) then - begin - Result := InstallPath + 'Lib\site-packages\' + appDir; - end - else - begin - MsgBox('Could not find Python',mbError,MB_OK); - ExitProcess(1); - end -end; - -////////////////////////////////////////////////////////////////////////////// -function IsPythonInstalled(): Boolean; -var - InstallPath: string; //not really used here -begin - - if RegQueryStringValue(HKLM, pyReg, '', InstallPath) then - begin - Result := True; - end - else - if RegQueryStringValue(HKCU, pyReg, '', InstallPath) then - begin - Result := True; - end - else - if RegQueryStringValue(HKLM, pyRegWow6443Node, '', InstallPath) then - begin - Result := True; - end - else - begin - Result := False; - end -end; - -////////////////////////////////////////////////////////////////////////////// -function SetDefaultAppDirName(Value: String): String; -begin - Result := DefaultAppDirName; -end; - -////////////////////////////////////////////////////////////////////////////// -function IsInstalled(name: string; version: string): boolean; -var - InstallPath: string; - reg : string; -begin - reg := 'Software\' + name + '\' + version - // + '\InstallPath' - Log('reg Python: ' + reg) - - //if python installed (also gets its install path, not used here) - if RegQueryStringValue(HKEY_CURRENT_USER, reg, 'InstallPath', InstallPath) then - begin - Result := True; - end - else - begin - Result := False; - end; -end; - -////////////////////////////////////////////////////////////////////////////// -procedure RunMsiInstaller(execName: string); -var - ResultCode: Integer; - ExecPath: String; - ExecCommand: String; -begin - ExecPath := ExpandConstant('{tmp}\') + execName; - ExecCommand := '/i ' + ExecPath + ''; //+ ' /qb'; //qb does it silently - - //Check that the msi installer file is present - if FileExists(ExecPath) then - begin - Log('ExecPath exists : ' + ExecPath); - end - else - begin - Log('ExecPath doe not exist : ' + ExecPath); - MsgBox('Could not find ' + execName + ' installer',mbError,MB_OK); - ExitProcess(1); - //something went wrong: hell or high water python installer must be there - end; - - //execute msi installer, otherwie error and exit - if not ShellExec('', 'msiexec.exe', ExecCommand, '', SW_SHOWNORMAL, - ewWaitUntilTerminated, ResultCode) then - //msi exec not working - MsgBox('Msi installer failed to run!' + #13#10 + ExecCommand + ' ' + - SysErrorMessage(ResultCode), mbError, MB_OK); -end; - -////////////////////////////////////////////////////////////////////////////// -function InitializeSetup(): Boolean; -begin - //if python installed get path for python site-packages - //if isInstalled('{#Py}\PythonCore','{#PyVer}') then - if IsPythonInstalled() then - begin - Log('Python: ' + 'True'); - installPython := False; - DefaultAppDirName := GetPathForPythonSitePackages() - end - else //Add Python to tmp folder [ // or download list.. ] - begin - Log('Python: ' + 'False'); - installPython := True; - filecopy(ExpandConstant('{#PyInstaller}'),ExpandConstant('{tmp}\{#PyInstaller}'),false); - //DefaultAppDirName := 'C:\Python27\Lib\site-packages\{#AppDir}' //pretend default path - //will be used when python is installed. - //itd_addfile('{#PyInstallerURL}',ExpandConstant('{tmp}\{#PyInstaller}')); - //itd_addfile('http://sbol.bhi.washington.edu/ppp/setup-dummyPython.exe',ExpandConstant('{tmp}\setup-dummyPython.exe')); - end; - - Result := True; //Required for fwd progress, false would exist -end; - -////////////////////////////////////////////////////////////////////////////// -procedure InitializeWizard(); -begin - //itd_init; //turned off when packaging installers - - //Install Python now if needed, we want it in place before anything else is done - if (installPython) then - RunMsiInstaller('{#PyInstaller}'); - - //Check if Numpy is installed - if IsInstalled('{#Numpy}','{#NumpyVer}') then - begin - Log('Numpy: ' + 'True'); - installNumpy := False; - end - else - //Add Numpy to d/l list - begin - Log('Numpy: ' + 'False'); - installNumpy := True; - - filecopy(ExpandConstant('{#NumpyInstaller}'),ExpandConstant('{tmp}\{#NumpyInstaller}'),false); - - //The following were used to test downloader srategy - //itd_addfile('http://sbol.bhi.washington.edu/ppp/setup-dummyNump.exe', - // ExpandConstant('{tmp}\setup-dummyNump.exe')); - end; - - //Check if Matplotlib is installed - if IsInstalled('{#Matplotlib}','{#MatplotlibVer}') then - begin - Log('Matplotlib: ' + 'True'); - installMatplot := False; - end - else - //Add Matplotlib to d/l list - begin - Log('Matplotlib: ' + 'False'); - installMatplot := True; - - filecopy(ExpandConstant('{#MatplotlibInstaller}'),ExpandConstant('{tmp}\{#MatplotlibInstaller}'),false); - - //The following were used to test downloader srategy - //td_addfile('http://sbol.bhi.washington.edu/ppp/setup-dummyMatplot.exe', - // ExpandConstant('{tmp}\setup-dummyMatplot.exe')); - end; - - //Downloads turned off, packaging installers. - //Start the download after the "Ready to install" screen is shown - //itd_downloadafter(wpReady); -end; - -////////////////////////////////////////////////////////////////////////////// -procedure RunOtherInstaller(execName: string); -var - ResultCode: Integer; -begin - if not Exec(ExpandConstant('{tmp}\' + execName), '', '', SW_SHOWNORMAL, - ewWaitUntilTerminated, ResultCode) - then - MsgBox('Other installer failed to run!' + #13#10 + execName + - SysErrorMessage(ResultCode), mbError, MB_OK); -end; - -////////////////////////////////////////////////////////////////////////////// -// Install Numpy and Matplotlib if mising -procedure CurStepChanged(CurStep: TSetupStep); -var - ResultCode: Integer; -begin - if CurStep=ssInstall then //If on the installation step - //Lets install those files that were downloaded for us - begin - if ForceDirectories(ExpandConstant('{app}')) then - begin - Log('app: ' + ExpandConstant('{app}')); - if (installNumpy) then - RunOtherInstaller('{#NumpyInstaller}'); - if (installMatplot) then - RunOtherInstaller('{#MatplotlibInstaller}'); - end; - end; -end; - - - diff --git a/installer/windows/libroadrunner-win32_setup.iss b/installer/windows/libroadrunner-win32_setup.iss deleted file mode 100644 index b822c01045..0000000000 --- a/installer/windows/libroadrunner-win32_setup.iss +++ /dev/null @@ -1,85 +0,0 @@ -; Script generated by the Inno Setup Script Wizard. -; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! - -#define MyAppName "libRoadRunner" -#define MyAppVersion "1.0.0" -#define MyAppPublisher "University of Washington, Seattle, WA, USA" -#define MyAppURL "http://libroadrunner.org/" -#define MyAppExeName "doc\index.html" - -[Setup] -; NOTE: The value of AppId uniquely identifies this application. -; Do not use the same AppId value in installers for other applications. -; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) -AppId={{FB797316-1356-4A0A-B8CC-55E2938D35CC} -AppName={#MyAppName} -AppVersion={#MyAppVersion} -;AppVerName={#MyAppName} {#MyAppVersion} -AppPublisher={#MyAppPublisher} -AppPublisherURL={#MyAppURL} -AppSupportURL={#MyAppURL} -AppUpdatesURL={#MyAppURL} -DefaultDirName={pf}\{#MyAppName} - -;disable the following when debugging -;turns off choosing destination -;DisableDirPage=yes -;turns off welcome -;DisableWelcomePage=yes -;turn off finished -;DisableFinishedPage=yes - -DefaultGroupName={#MyAppName} -DisableProgramGroupPage=yes - -;disable these when debugging - turns off choosing license and view notice -LicenseFile=..\..\LICENSE.txt - -;Dropped the readme and view, too many steps -;InfoBeforeFile=..\..\NOTICE.txt -;InfoAfterFile=..\..\README.txt -;turn off ready -DisableReadyPage=yes - -OutputBaseFilename=install-libRoadRunner-1.0.0 -OutputDir=. - -;UninstallDisplayIcon does not seem to work - likely "Obsolete since 5.0.0", like the other Uninstall* -;UninstallDisplayIcon=trash.ico -;SetupIconFile=libroadrunner_logo_tan.ico -Compression=lzma -SolidCompression=yes - - -[Languages] -Name: "english"; MessagesFile: "compiler:Default.isl" - -[Files] -Source: "..\..\*"; Excludes: "*.~*, \installer\*, \site-packages\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: exec_libs -;for debugging the install script -; Source: "..\*"; Excludes: "*.~*, \installer\*, \site-packages\*, \plugins\*, \compilers\*, \include\*, \doc\*, \bin\*, \lib\*, \Temp\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: exec_libs -Source: "trash.ico"; DestDir: "{app}\icons"; Flags: ignoreversion; Components: exec_libs -Source: "libroadrunner_logo_tan.ico"; DestDir: "{app}\icons"; Flags: ignoreversion; Components: exec_libs -Source: "libRoadRunner-python-setup.exe"; DestDir: "{tmp}"; Components: python -; NOTE: Don't use "Flags: ignoreversion" on any shared system files - -[Icons] -Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\icons\libroadrunner_logo_tan.ico"; Components: exec_libs -Name: "{app}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; IconFilename: "{app}\icons\trash.ico"; Components: exec_libs -Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}" -Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; IconFilename: "{app}\icons\trash.ico" - - - -[Components] -Name: "python"; Description: "Python API bindings (roadrunner.py)"; Types: full -Name: "exec_libs"; Description: "Executable with C/C++ Libraries"; Types: full - -[Registry] -Root: "HKLM"; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; ValueName: "ROADRUNNER_HOME"; ValueData: "{app}"; Flags: createvalueifdoesntexist - -[Run] -Filename: "{tmp}\libRoadRunner-python-setup.exe"; StatusMsg: "Installing roadrunner Python package..."; Flags: skipifdoesntexist; -;Parameters: "/silent"; - -Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: shellexec postinstall skipifsilent \ No newline at end of file