Skip to content
Snippets Groups Projects
Select Git revision
  • release
  • master default protected
  • patch-1
  • clean_up_soundfield-simulation-related_applications
  • subjectOrientationFeedback
  • combined_wave_and_ga_simulation
  • iks_liebich
  • MCE_sens_device_list
  • BuildingAcoustics
  • kia
  • ita_3da_dev
  • raven-project-unix
  • va_2018_api_change
  • ita-fileformat-cleanup
  • nlms
  • documentationFix
  • Last-SVN-Commit
17 results

ita_toolbox_license.m

Blame
  • Forked from Institute of Technical Acoustics (ITA) / toolbox
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    ita_toolbox_license.m 1.29 KiB
    %% Show the license and its location;
    
    % <ITA-Toolbox>
    % This file is part of the ITA-Toolbox. Some rights reserved.
    % You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
    % </ITA-Toolbox>
    
    
    fid = fopen([ita_toolbox_path filesep 'license.txt']);
    funcTemplate = fread(fid, 'uint8=>char')';
    disp(funcTemplate(1:end-1))
    fclose(fid);
    fprintf(2,'********************************************************************************\n')
    disp(['*** The license can be found at ' ita_toolbox_path filesep 'license.txt ***' ])
    fprintf(2,'********************************************************************************\n')
    
    %% ask
    if usejava('desktop') %Only if jvm available (non_cluster)
        commandwindow();
        choice = questdlg('Do you agree to the terms of the license agreement? The complete license ("license.txt") can be found in the root directory of the ITA-Toolbox.','License Agreement - ITA-Toolbox:', ...
            'Yes','No','No');
        switch lower(choice)
            case 'yes'
                fprintf(2,'You accepted the ITA-Toolbox license agreement\n');
            case 'no'
                fprintf(2,'You did NOT accept to the ITA-Toolbox license agreement\n');
                error('License Agreement not accepted.')
        end
    end
    
    %% set accepted flag in preferences
    ita_preferences('license',true);