Skip to content

Commit

Permalink
CI-Build 2022-10-11
Browse files Browse the repository at this point in the history
  • Loading branch information
arch1t3cht committed Oct 11, 2022
2 parents 2f31bfc + 2bcf0c7 commit 2317062
Show file tree
Hide file tree
Showing 17 changed files with 138 additions and 84 deletions.
17 changes: 7 additions & 10 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -403,22 +403,19 @@ subdir('tests')
aegisub_cpp_pch = ['src/include/agi_pre.h']
aegisub_c_pch = ['src/include/agi_pre_c.h']

link_args = []
if host_machine.system() == 'windows'
manifest_file = configure_file(copy: true, input: 'src/res/aegisub.exe.manifest', output: 'aegisub.exe.manifest')
link_args += ['/MANIFEST:EMBED', '/MANIFESTINPUT:@0@'.format(manifest_file)]
endif

aegisub = executable('aegisub', aegisub_src, version_h, acconf,
link_with: [libresrc, libluabins, libaegisub],
link_args: link_args,
include_directories: [libaegisub_inc, libresrc_inc, version_inc, deps_inc, include_directories('src')],
cpp_pch: aegisub_cpp_pch,
c_pch: aegisub_c_pch,
install: true,
install_dir: bindir,
dependencies: deps,
win_subsystem: 'windows')

if host_machine.system() == 'windows'
mt_exe = find_program('mt.exe')
apply_manifest = find_program(meson.project_source_root() / 'tools/apply-manifest.py')
custom_target('apply-manifest',
input: aegisub,
output: 'applied_manifest',
command: [apply_manifest, mt_exe, '@INPUT@'],
build_by_default: true)
endif
7 changes: 6 additions & 1 deletion src/dialog_about.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ void ShowAboutDialog(wxWindow *parent) {
wxChar copySymbol = 0xA9;
aboutString.Replace("(c)", wxString(copySymbol));

wxTextCtrl *textctrl = new wxTextCtrl(&d, -1, aboutString, wxDefaultPosition, wxSize(-1, 200), wxTE_MULTILINE | wxTE_READONLY | wxBORDER_NONE);
wxTextCtrl *textctrl = new wxTextCtrl(&d, -1, aboutString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY | wxBORDER_NONE);
#if defined(__WXGTK__) && !wxCHECK_VERSION(3, 1, 3)
// Workaround for https://trac.wxwidgets.org/ticket/18507
textctrl->InvalidateBestSize();
textctrl->SetInitialSize();
#endif

wxSizer *MainSizer = new wxBoxSizer(wxVERTICAL);
MainSizer->Add(new wxStaticBitmap(&d, -1, GETIMAGE(splash)), 0, wxCENTER, 0);
Expand Down
9 changes: 5 additions & 4 deletions src/dialog_colorpicker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,9 +569,10 @@ DialogColorPicker::DialogColorPicker(wxWindow *parent, agi::Color initial_color,
wxString modes[] = { _("RGB/R"), _("RGB/G"), _("RGB/B"), _("HSL/L"), _("HSV/H") };
colorspace_choice = new wxChoice(this, -1, wxDefaultPosition, wxDefaultSize, 5, modes);

wxSize colorinput_size = GetTextExtent(" &H10117B& ");
colorinput_size.SetHeight(-1);
wxSize colorinput_labelsize(40, -1);
ass_input = new wxTextCtrl(this, -1);
wxSize colorinput_size = ass_input->GetSizeFromTextSize(GetTextExtent(wxS("&H10117B&")));
ass_input->SetMinSize(colorinput_size);
ass_input->SetSize(colorinput_size);

wxSizer *rgb_box = new wxStaticBoxSizer(wxHORIZONTAL, this, _("RGB color"));
wxSizer *hsl_box = new wxStaticBoxSizer(wxVERTICAL, this, _("HSL color"));
Expand All @@ -580,7 +581,7 @@ DialogColorPicker::DialogColorPicker(wxWindow *parent, agi::Color initial_color,
for (auto& elem : rgb_input)
elem = new wxSpinCtrl(this, -1, "", wxDefaultPosition, colorinput_size, wxSP_ARROW_KEYS, 0, 255);

ass_input = new wxTextCtrl(this, -1, "", wxDefaultPosition, colorinput_size);
// ass_input = new wxTextCtrl(this, -1, "", wxDefaultPosition, colorinput_size);
html_input = new wxTextCtrl(this, -1, "", wxDefaultPosition, colorinput_size);
alpha_input = new wxSpinCtrl(this, -1, "", wxDefaultPosition, colorinput_size, wxSP_ARROW_KEYS, 0, 255);

Expand Down
5 changes: 3 additions & 2 deletions src/dialog_dummy_video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,14 @@ static ResolutionShortcut resolutions[] = {
};

wxSpinCtrl *spin_ctrl(wxWindow *parent, int min, int max, int *value) {
auto ctrl = new wxSpinCtrl(parent, -1, "", wxDefaultPosition, wxSize(50, -1), wxSP_ARROW_KEYS, min, max, *value);
auto ctrl = new wxSpinCtrl(parent, -1, "", wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, *value);
ctrl->SetValidator(wxGenericValidator(value));
return ctrl;
}

// FIXME: change the misleading function name, this is TextCtrl in fact
wxControl *spin_ctrl(wxWindow *parent, double min, double max, double *value) {
return new wxTextCtrl(parent, -1, "", wxDefaultPosition, wxSize(50, -1), 0, DoubleValidator(value, min, max));
return new wxTextCtrl(parent, -1, "", wxDefaultPosition, wxDefaultSize, 0, DoubleValidator(value, min, max));
}

wxComboBox *resolution_shortcuts(wxWindow *parent, int width, int height) {
Expand Down
6 changes: 5 additions & 1 deletion src/dialog_export_ebu3264.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ int ShowEbuExportConfigurationDialog(wxWindow *owner, EbuExportSettings &s) {
wxRadioBox *tv_standard_box = new wxRadioBox(&d, -1, _("TV standard"), wxDefaultPosition, wxDefaultSize, 6, tv_standards, 0, wxRA_SPECIFY_ROWS);

wxTextCtrl *timecode_offset_entry = new wxTextCtrl(&d, -1, "00:00:00:00");
timecode_offset_entry->SetMinSize(timecode_offset_entry->GetSizeFromTextSize(timecode_offset_entry->GetTextExtent(wxS("00:00:00:00"))));
timecode_offset_entry->SetSize(timecode_offset_entry->GetSizeFromTextSize(timecode_offset_entry->GetTextExtent(wxS("00:00:00:00"))));
wxCheckBox *inclusive_end_times_check = new wxCheckBox(&d, -1, _("Out-times are inclusive"));

wxString text_encodings[] = {
Expand All @@ -129,7 +131,9 @@ int ShowEbuExportConfigurationDialog(wxWindow *owner, EbuExportSettings &s) {
_("Skip lines that are too long")
};

wxSpinCtrl *max_line_length_ctrl = new wxSpinCtrl(&d, -1, wxString(), wxDefaultPosition, wxSize(65, -1));
wxSpinCtrl *max_line_length_ctrl = new wxSpinCtrl(&d, -1, wxString());
max_line_length_ctrl->SetMinSize(max_line_length_ctrl->GetSizeFromTextSize(max_line_length_ctrl->GetTextExtent(wxS("00"))));
max_line_length_ctrl->SetSize(max_line_length_ctrl->GetSizeFromTextSize(max_line_length_ctrl->GetTextExtent(wxS("00"))));
wxComboBox *wrap_mode_ctrl = new wxComboBox(&d, -1, wrap_modes[0], wxDefaultPosition, wxDefaultSize, 4, wrap_modes, wxCB_DROPDOWN | wxCB_READONLY);
wxCheckBox *translate_alignments_check = new wxCheckBox(&d, -1, _("Translate alignments"));

Expand Down
6 changes: 3 additions & 3 deletions src/dialog_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ DialogProperties::DialogProperties(agi::Context *c)
TopSizer->Add(TopSizerGrid,1,wxALL | wxEXPAND,0);

// Resolution box
ResX = new wxTextCtrl(&d,-1,"",wxDefaultPosition,wxSize(50, -1),0,IntValidator(c->ass->GetScriptInfoAsInt("PlayResX")));
ResY = new wxTextCtrl(&d,-1,"",wxDefaultPosition,wxSize(50, -1),0,IntValidator(c->ass->GetScriptInfoAsInt("PlayResY")));
ResX = new wxTextCtrl(&d,-1,"",wxDefaultPosition,wxDefaultSize,0,IntValidator(c->ass->GetScriptInfoAsInt("PlayResX")));
ResY = new wxTextCtrl(&d,-1,"",wxDefaultPosition,wxDefaultSize,0,IntValidator(c->ass->GetScriptInfoAsInt("PlayResY")));

wxButton *FromVideo = new wxButton(&d,-1,_("From &video"));
if (!c->project->VideoProvider())
Expand Down Expand Up @@ -176,7 +176,7 @@ DialogProperties::DialogProperties(agi::Context *c)
}

void DialogProperties::AddProperty(wxSizer *sizer, wxString const& label, std::string const& property) {
wxTextCtrl *ctrl = new wxTextCtrl(&d, -1, to_wx(c->ass->GetScriptInfo(property)), wxDefaultPosition, wxSize(200, -1));
wxTextCtrl *ctrl = new wxTextCtrl(&d, -1, to_wx(c->ass->GetScriptInfo(property)));
sizer->Add(new wxStaticText(&d, -1, label), wxSizerFlags().Center().Left());
sizer->Add(ctrl, wxSizerFlags(1).Expand());
properties.push_back({property, ctrl});
Expand Down
10 changes: 5 additions & 5 deletions src/dialog_resample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ DialogResample::DialogResample(agi::Context *c, ResampleSettings &settings)

// Create all controls and set validators
for (size_t i = 0; i < 4; ++i) {
margin_ctrl[i] = new wxSpinCtrl(&d, -1, "0", wxDefaultPosition, wxSize(50, -1), wxSP_ARROW_KEYS, -9999, 9999, 0);
margin_ctrl[i] = new wxSpinCtrl(&d, -1, "0", wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -9999, 9999, 0);
margin_ctrl[i]->SetValidator(wxGenericValidator(&settings.margin[i]));
}

Expand All @@ -122,12 +122,12 @@ DialogResample::DialogResample(agi::Context *c, ResampleSettings &settings)
margin_ctrl[RIGHT]->Enable(false);
margin_ctrl[BOTTOM]->Enable(false);

source_x = new wxSpinCtrl(&d, -1, "", wxDefaultPosition, wxSize(50, -1), wxSP_ARROW_KEYS, 1, INT_MAX);
source_y = new wxSpinCtrl(&d, -1, "", wxDefaultPosition, wxSize(50, -1), wxSP_ARROW_KEYS, 1, INT_MAX);
source_x = new wxSpinCtrl(&d, -1, "", wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, INT_MAX);
source_y = new wxSpinCtrl(&d, -1, "", wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, INT_MAX);
source_matrix = new wxComboBox(&d, -1, "", wxDefaultPosition,
wxDefaultSize, to_wx(MatrixNames()), wxCB_READONLY);
dest_x = new wxSpinCtrl(&d, -1, "", wxDefaultPosition, wxSize(50, -1), wxSP_ARROW_KEYS, 1, INT_MAX);
dest_y = new wxSpinCtrl(&d, -1, "", wxDefaultPosition, wxSize(50, -1), wxSP_ARROW_KEYS, 1, INT_MAX);
dest_x = new wxSpinCtrl(&d, -1, "", wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, INT_MAX);
dest_y = new wxSpinCtrl(&d, -1, "", wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, INT_MAX);
dest_matrix = new wxComboBox(&d, -1, "", wxDefaultPosition, wxDefaultSize,
to_wx(MatrixNames()), wxCB_READONLY);

Expand Down
7 changes: 4 additions & 3 deletions src/dialog_shift_times.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,12 @@ DialogShiftTimes::DialogShiftTimes(agi::Context *context)
shift_frames->Disable();

// Position controls
wxSizer *shift_amount_sizer = new wxFlexGridSizer(2, 2, 5, 5);
wxFlexGridSizer* shift_amount_sizer = new wxFlexGridSizer(2, 2, 5, 5);
shift_amount_sizer->AddGrowableCol(1, 1);
shift_amount_sizer->Add(shift_by_time, wxSizerFlags(0).Align(wxALIGN_CENTER_VERTICAL));
shift_amount_sizer->Add(shift_time, wxSizerFlags(1));
shift_amount_sizer->Add(shift_time, wxSizerFlags().Expand());
shift_amount_sizer->Add(shift_by_frames, wxSizerFlags(0).Align(wxALIGN_CENTER_VERTICAL));
shift_amount_sizer->Add(shift_frames, wxSizerFlags(1));
shift_amount_sizer->Add(shift_frames, wxSizerFlags().Expand());

wxSizer *shift_direction_sizer = new wxBoxSizer(wxHORIZONTAL);
shift_direction_sizer->Add(shift_forward, wxSizerFlags(1).Expand());
Expand Down
10 changes: 6 additions & 4 deletions src/dialog_style_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ DialogStyleEditor::DialogStyleEditor(wxWindow *parent, AssStyle *style, agi::Con

auto num_text_ctrl = [&](double *value, double min, double max, double step) -> wxSpinCtrlDouble * {
auto scd = new wxSpinCtrlDouble(this, -1, "", wxDefaultPosition,
wxSize(75, -1), wxSP_ARROW_KEYS, min, max, *value, step);
wxDefaultSize, wxSP_ARROW_KEYS, min, max, *value, step);
scd->SetValidator(DoubleSpinValidator(value));
scd->Bind(wxEVT_SPINCTRLDOUBLE, [=](wxSpinDoubleEvent &evt) {
evt.Skip();
Expand Down Expand Up @@ -197,10 +197,12 @@ DialogStyleEditor::DialogStyleEditor(wxWindow *parent, AssStyle *style, agi::Con
new ColourButton(this, wxSize(55, 16), true, style->outline, ColorValidator(&work->outline)),
new ColourButton(this, wxSize(55, 16), true, style->shadow, ColorValidator(&work->shadow))
};
for (int i = 0; i < 3; i++)
for (int i = 0; i < 3; i++) {
margin[i] = new wxSpinCtrl(this, -1, std::to_wstring(style->Margin[i]),
wxDefaultPosition, wxSize(60, -1),
wxSP_ARROW_KEYS, -9999, 99999, style->Margin[i]);
wxDefaultPosition, wxDefaultSize,
wxSP_ARROW_KEYS, -9999, 9999, style->Margin[i]);
margin[i]->SetInitialSize(margin[i]->GetSizeFromTextSize(GetTextExtent(wxS("0000"))));
}

Alignment = new wxRadioBox(this, -1, _("Alignment"), wxDefaultPosition, wxDefaultSize, 9, alignValues, 3, wxRA_SPECIFY_COLS);
auto Outline = num_text_ctrl(&work->outline_w, 0.0, 1000.0, 0.1);
Expand Down
2 changes: 1 addition & 1 deletion src/dialog_timing_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ DialogTimingProcessor::DialogTimingProcessor(agi::Context *c)
make_ctrl(&d, adjBoxes, _("Max overlap:"), &adjOverlap, adjsEnable,
_("Maximum overlap between the end and start time for two subtitles to be made continuous, in milliseconds"));

adjacentBias = new wxSlider(&d, -1, mid<int>(0, OPT_GET("Tool/Timing Post Processor/Adjacent Bias")->GetDouble() * 100, 100), 0, 100, wxDefaultPosition, wxSize(-1,20));
adjacentBias = new wxSlider(&d, -1, mid<int>(0, OPT_GET("Tool/Timing Post Processor/Adjacent Bias")->GetDouble() * 100, 100), 0, 100);
adjacentBias->SetToolTip(_("Sets how to set the adjoining of lines. If set totally to left, it will extend or shrink start time of the second line; if totally to right, it will extend or shrink the end time of the first line."));

auto adjSliderSizer = new wxBoxSizer(wxHORIZONTAL);
Expand Down
14 changes: 7 additions & 7 deletions src/export_framerate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ wxWindow *AssTransformFramerateFilter::GetConfigDialogWindow(wxWindow *parent, a
initialInput = "23.976";
FromVideo->Enable(false);
}
InputFramerate = new wxTextCtrl(base,-1,initialInput,wxDefaultPosition,wxSize(60,20));
InputSizer->Add(InputFramerate,0,wxEXPAND | wxLEFT,5);
InputSizer->Add(FromVideo,0,wxEXPAND | wxLEFT,5);
InputFramerate = new wxTextCtrl(base,-1,initialInput);
InputSizer->Add(InputFramerate, 0, wxEXPAND);
InputSizer->Add(FromVideo, 0, wxEXPAND | wxLEFT, 5);
InputSizer->AddStretchSpacer(1);

// Output sizers
Expand All @@ -90,7 +90,7 @@ wxWindow *AssTransformFramerateFilter::GetConfigDialogWindow(wxWindow *parent, a

// Output top line
RadioOutputVFR = new wxRadioButton(base,-1,_("V&ariable"),wxDefaultPosition,wxDefaultSize,wxRB_GROUP);
OutputSizerTop->Add(RadioOutputVFR,0,wxEXPAND,0);
OutputSizerTop->Add(RadioOutputVFR, wxEXPAND);

// Output bottom line
RadioOutputCFR = new wxRadioButton(base,-1,_("&Constant: "));
Expand All @@ -99,9 +99,9 @@ wxWindow *AssTransformFramerateFilter::GetConfigDialogWindow(wxWindow *parent, a
RadioOutputVFR->Enable(false);
RadioOutputCFR->SetValue(true);
}
OutputFramerate = new wxTextCtrl(base,-1,initialOutput,wxDefaultPosition,wxSize(60,20));
OutputSizerBottom->Add(RadioOutputCFR,0,wxEXPAND,0);
OutputSizerBottom->Add(OutputFramerate,0,wxEXPAND | wxLEFT,5);
OutputFramerate = new wxTextCtrl(base,-1,initialOutput);
OutputSizerBottom->Add(RadioOutputCFR, wxEXPAND);
OutputSizerBottom->Add(OutputFramerate, 0, wxEXPAND | wxLEFT, 5);
OutputSizerBottom->AddStretchSpacer(1);

// Reverse checkbox
Expand Down
24 changes: 24 additions & 0 deletions src/res/aegisub.exe.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<description>Aegisub subtitle editor</description>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 and Windows 11 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
</application>
</compatibility>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2,PerMonitor</dpiAwareness>
</windowsSettings>
</application>
</assembly>
Loading

0 comments on commit 2317062

Please sign in to comment.