<% use ui::cmn; my ($opts,$errcodes,$sign_cmdline,$bundle_name,$is_longtask) = @_;  
my (%errs); foreach (@$errcodes) { $errs{$_} = 1; }
$bundle_name =~ s,\.app,,; #strip .app extension as it's not visible in Finder

%>


<style type=text/css>
pre { 
    background: rgba(244,244,244,0.8); border: solid 1px rgba(244,104,104,0.3); padding: 1em; 
    font-family: 'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace; 
 }

code { font-family: 'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace;
     }
</style>


<% if (@$errcodes) { %>
<h2><%= __('The following errors were encountered:') %></h2>
<ul>

<% 	if ($errs{project_not_optimized}) { %>
<li>	    <%$ __('Directory structure has to be optimized! Please go <a class=menuref href=pack.optimize>here</a> to optimize it.') %>
<% 	} %>


<% 	if ($errs{can_sign_only_on_osx}) { %>
<li>	    <%$ __('It is possible to sign macOS apps only when running on macOS. ') %>


    <% $forge->include('wgt-optional-start','other_box',__('Can I just sign on macOS, but keep developing my app on Windows or Linux?')) %>
    <%$ sprintf(__('If macOS is not your primary development environment, just send the zipped <code>%s</code> from your Prototype output directory, and unzip it on the Mac that has Apple Developer Certificates installed, then type this in command line while being in the folder where it was unzipped to: <pre>%s</pre>and then zip <code>%s</code>, transfer it to your primary computer and unzip it to Prototype Output Directory.'),
	    $bundle_name, $sign_cmdline, $bundle_name) %>
    <% $forge->include('wgt-optional-end','other_box') %>

<% 	} %>




</ul>
<% } else { %>
    <%= $is_longtask ? __('Codesigning completed successfully.') :
	 __('Codesigning has been started in a new Terminal window. Do not close it before it completes!') %>


<% } %>

<div class="ui container">
<%$ __('Once your Prototype is signed, you can use any of <i>Create ..</i> menu items <a class=menuref href=menu.pack>Optimize &amp; Pack Prototype</a> menu.') %>
</div>
