Skip to content

Commit b839425

Browse files
committed
Lots of changes
globals.cpp, Info_cocoa.plist ~ forwarded version to 1.2 interface, form.fpb ~ changed OpenWith version picker to wxListBox interface_derived.hpp, open_with_dlg.cpp ~ updated calls in OpenWithDlg to reflect change to wxListBox interface_derived.cpp ~ fixed reveal menu having wrong keyboard shortcut project.pbxproj ~ MacDynamic no longer embeds wxdynamic binary ~ wxcocoa now uses native architecture of build machine
1 parent 6ac5661 commit b839425

File tree

10 files changed

+49
-66
lines changed

10 files changed

+49
-66
lines changed

mac.xcodeproj/project.pbxproj

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
41B5AAEF22DB8BB400347CC8 /* interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41B5AAEC22DB8BB300347CC8 /* interface.cpp */; };
1212
AA012114224C24D4000F4F82 /* wxmac.icns in Resources */ = {isa = PBXBuildFile; fileRef = AA012113224C24D4000F4F82 /* wxmac.icns */; };
1313
AA012115224C24D4000F4F82 /* wxmac.icns in Resources */ = {isa = PBXBuildFile; fileRef = AA012113224C24D4000F4F82 /* wxmac.icns */; };
14-
AA14A0EE222A1217002C4553 /* libwx_osx_cocoa.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = AA1D0F81222A0A1D00678304 /* libwx_osx_cocoa.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
1514
AA14A0F3222A1219002C4553 /* libwx_osx_cocoa.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1D0F81222A0A1D00678304 /* libwx_osx_cocoa.dylib */; };
1615
AA56E9702321F67C002BB5E1 /* globals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA56E96F2321F67C002BB5E1 /* globals.cpp */; };
1716
AA56E98A2321F67E002BB5E1 /* globals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA56E96F2321F67C002BB5E1 /* globals.cpp */; };
@@ -219,20 +218,6 @@
219218
};
220219
/* End PBXContainerItemProxy section */
221220

222-
/* Begin PBXCopyFilesBuildPhase section */
223-
AA14A0F1222A1217002C4553 /* Embed Libraries */ = {
224-
isa = PBXCopyFilesBuildPhase;
225-
buildActionMask = 2147483647;
226-
dstPath = "";
227-
dstSubfolderSpec = 10;
228-
files = (
229-
AA14A0EE222A1217002C4553 /* libwx_osx_cocoa.dylib in Embed Libraries */,
230-
);
231-
name = "Embed Libraries";
232-
runOnlyForDeploymentPostprocessing = 0;
233-
};
234-
/* End PBXCopyFilesBuildPhase section */
235-
236221
/* Begin PBXFileReference section */
237222
41B5AAEC22DB8BB300347CC8 /* interface.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = interface.cpp; sourceTree = "<group>"; };
238223
41B5AAED22DB8BB400347CC8 /* interface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = interface.h; sourceTree = "<group>"; };
@@ -385,7 +370,6 @@
385370
AA1D0F4A222A09A600678304 /* Sources */,
386371
AA1D0F4B222A09A600678304 /* Frameworks */,
387372
AA1D0F4C222A09A600678304 /* Resources */,
388-
AA14A0F1222A1217002C4553 /* Embed Libraries */,
389373
);
390374
buildRules = (
391375
);
@@ -829,11 +813,13 @@
829813
CODE_SIGN_IDENTITY = "-";
830814
CODE_SIGN_STYLE = Automatic;
831815
COMBINE_HIDPI_IMAGES = YES;
816+
CURRENT_PROJECT_VERSION = 1.2;
832817
INFOPLIST_FILE = "$(SRCROOT)/source/Info_cocoa.plist";
833818
LD_RUNPATH_SEARCH_PATHS = (
834819
"$(inherited)",
835820
"@executable_path/../Frameworks",
836821
);
822+
MARKETING_VERSION = 1.2;
837823
OTHER_LDFLAGS = "$(OTHER_LDFLAGS)";
838824
PRODUCT_BUNDLE_IDENTIFIER = com.ravbug.UnityHubNativeDynamic;
839825
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -846,11 +832,13 @@
846832
CODE_SIGN_IDENTITY = "-";
847833
CODE_SIGN_STYLE = Automatic;
848834
COMBINE_HIDPI_IMAGES = YES;
835+
CURRENT_PROJECT_VERSION = 1.2;
849836
INFOPLIST_FILE = "$(SRCROOT)/source/Info_cocoa.plist";
850837
LD_RUNPATH_SEARCH_PATHS = (
851838
"$(inherited)",
852839
"@executable_path/../Frameworks",
853840
);
841+
MARKETING_VERSION = 1.2;
854842
OTHER_LDFLAGS = "$(OTHER_LDFLAGS)";
855843
PRODUCT_BUNDLE_IDENTIFIER = com.ravbug.UnityHubNativeDynamic;
856844
PRODUCT_NAME = "$(TARGET_NAME)";

source/Info_cocoa.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
<key>CFBundlePackageType</key>
2929
<string>APPL</string>
3030
<key>CFBundleShortVersionString</key>
31-
<string>1.0</string>
31+
<string>$(MARKETING_VERSION)</string>
3232
<key>CFBundleSignature</key>
3333
<string>????</string>
3434
<key>CFBundleVersion</key>
35-
<string>1.0</string>
35+
<string>$(CURRENT_PROJECT_VERSION)</string>
3636
<key>LSApplicationCategoryType</key>
3737
<string>public.app-category.developer-tools</string>
3838
<key>NSHumanReadableCopyright</key>

source/form.fbp

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
<property name="bitmap"></property>
121121
<property name="label">Projects</property>
122122
<property name="select">0</property>
123-
<object class="wxPanel" expanded="1">
123+
<object class="wxPanel" expanded="0">
124124
<property name="BottomDockable">1</property>
125125
<property name="LeftDockable">1</property>
126126
<property name="RightDockable">1</property>
@@ -171,7 +171,7 @@
171171
<property name="window_extra_style"></property>
172172
<property name="window_name"></property>
173173
<property name="window_style">wxTAB_TRAVERSAL</property>
174-
<object class="wxGridBagSizer" expanded="1">
174+
<object class="wxGridBagSizer" expanded="0">
175175
<property name="empty_cell_size"></property>
176176
<property name="flexible_direction">wxBOTH</property>
177177
<property name="growablecols">1</property>
@@ -247,23 +247,23 @@
247247
<property name="window_style"></property>
248248
</object>
249249
</object>
250-
<object class="gbsizeritem" expanded="1">
250+
<object class="gbsizeritem" expanded="0">
251251
<property name="border">5</property>
252252
<property name="colspan">2</property>
253253
<property name="column">0</property>
254254
<property name="flag">wxEXPAND</property>
255255
<property name="row">0</property>
256256
<property name="rowspan">1</property>
257-
<object class="wxBoxSizer" expanded="1">
257+
<object class="wxBoxSizer" expanded="0">
258258
<property name="minimum_size"></property>
259259
<property name="name">pManSizer</property>
260260
<property name="orient">wxHORIZONTAL</property>
261261
<property name="permission">none</property>
262-
<object class="sizeritem" expanded="1">
262+
<object class="sizeritem" expanded="0">
263263
<property name="border">5</property>
264264
<property name="flag">wxALL</property>
265265
<property name="proportion">0</property>
266-
<object class="wxButton" expanded="1">
266+
<object class="wxButton" expanded="0">
267267
<property name="BottomDockable">1</property>
268268
<property name="LeftDockable">1</property>
269269
<property name="RightDockable">1</property>
@@ -331,7 +331,7 @@
331331
<property name="window_style"></property>
332332
</object>
333333
</object>
334-
<object class="sizeritem" expanded="1">
334+
<object class="sizeritem" expanded="0">
335335
<property name="border">5</property>
336336
<property name="flag">wxALL</property>
337337
<property name="proportion">0</property>
@@ -403,7 +403,7 @@
403403
<property name="window_style"></property>
404404
</object>
405405
</object>
406-
<object class="sizeritem" expanded="1">
406+
<object class="sizeritem" expanded="0">
407407
<property name="border">5</property>
408408
<property name="flag">wxALL</property>
409409
<property name="proportion">0</property>
@@ -475,7 +475,7 @@
475475
<property name="window_style"></property>
476476
</object>
477477
</object>
478-
<object class="sizeritem" expanded="1">
478+
<object class="sizeritem" expanded="0">
479479
<property name="border">5</property>
480480
<property name="flag">wxALL</property>
481481
<property name="proportion">0</property>
@@ -547,11 +547,11 @@
547547
<property name="window_style"></property>
548548
</object>
549549
</object>
550-
<object class="sizeritem" expanded="1">
550+
<object class="sizeritem" expanded="0">
551551
<property name="border">5</property>
552552
<property name="flag">wxALL</property>
553553
<property name="proportion">0</property>
554-
<object class="wxButton" expanded="1">
554+
<object class="wxButton" expanded="0">
555555
<property name="BottomDockable">1</property>
556556
<property name="LeftDockable">1</property>
557557
<property name="RightDockable">1</property>
@@ -2153,7 +2153,7 @@
21532153
<property name="hidden">0</property>
21542154
<property name="id">wxID_ANY</property>
21552155
<property name="maximum_size"></property>
2156-
<property name="minimum_size">330,215</property>
2156+
<property name="minimum_size">230,215</property>
21572157
<property name="name">OpenWithEditorDlgBase</property>
21582158
<property name="pos"></property>
21592159
<property name="size">-1,-1</property>
@@ -2246,7 +2246,7 @@
22462246
<property name="flag">wxALL|wxEXPAND</property>
22472247
<property name="row">1</property>
22482248
<property name="rowspan">1</property>
2249-
<object class="wxListCtrl" expanded="1">
2249+
<object class="wxListBox" expanded="1">
22502250
<property name="BottomDockable">1</property>
22512251
<property name="LeftDockable">1</property>
22522252
<property name="RightDockable">1</property>
@@ -2260,6 +2260,7 @@
22602260
<property name="caption"></property>
22612261
<property name="caption_visible">1</property>
22622262
<property name="center_pane">0</property>
2263+
<property name="choices"></property>
22632264
<property name="close_button">1</property>
22642265
<property name="context_help"></property>
22652266
<property name="context_menu">1</property>
@@ -2281,7 +2282,7 @@
22812282
<property name="minimize_button">0</property>
22822283
<property name="minimum_size"></property>
22832284
<property name="moveable">1</property>
2284-
<property name="name">editorsListCtrl</property>
2285+
<property name="name">editorsListBox</property>
22852286
<property name="pane_border">1</property>
22862287
<property name="pane_position"></property>
22872288
<property name="pane_size"></property>
@@ -2291,7 +2292,7 @@
22912292
<property name="resize">Resizable</property>
22922293
<property name="show">1</property>
22932294
<property name="size"></property>
2294-
<property name="style">wxLC_NO_HEADER|wxLC_REPORT</property>
2295+
<property name="style">wxLB_HSCROLL|wxLB_NEEDED_SB|wxLB_SINGLE</property>
22952296
<property name="subclass">; ; forward_declare</property>
22962297
<property name="toolbar_pane">0</property>
22972298
<property name="tooltip"></property>
@@ -2308,7 +2309,7 @@
23082309
<property name="border">5</property>
23092310
<property name="colspan">1</property>
23102311
<property name="column">1</property>
2311-
<property name="flag">wxALL</property>
2312+
<property name="flag">wxALL|wxEXPAND|wxALIGN_RIGHT</property>
23122313
<property name="row">2</property>
23132314
<property name="rowspan">1</property>
23142315
<object class="wxButton" expanded="1">
@@ -2383,7 +2384,7 @@
23832384
<property name="border">5</property>
23842385
<property name="colspan">1</property>
23852386
<property name="column">2</property>
2386-
<property name="flag">wxALL</property>
2387+
<property name="flag">wxALL|wxALIGN_RIGHT</property>
23872388
<property name="row">2</property>
23882389
<property name="rowspan">1</property>
23892390
<object class="wxButton" expanded="1">

source/globals.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ using namespace std;
1616
static const string projectsFile = "projects.txt";
1717
static const string editorPathsFile = "editorPaths.txt";
1818
static const string templatePrefix = "com.unity.template";
19-
static const string AppVersion = "v1.1";
19+
static const string AppVersion = "v1.2";
2020

2121
//structure for representing an editor and for locating it
2222
struct editor{

source/interface.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ CreateProjectDialog::~CreateProjectDialog()
242242

243243
OpenWithEditorDlgBase::OpenWithEditorDlgBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
244244
{
245-
this->SetSizeHints( wxSize( 330,215 ), wxDefaultSize );
245+
this->SetSizeHints( wxSize( 230,215 ), wxDefaultSize );
246246

247247
wxGridBagSizer* gbSizer4;
248248
gbSizer4 = new wxGridBagSizer( 0, 0 );
@@ -253,18 +253,18 @@ OpenWithEditorDlgBase::OpenWithEditorDlgBase( wxWindow* parent, wxWindowID id, c
253253
m_staticText7->Wrap( -1 );
254254
gbSizer4->Add( m_staticText7, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
255255

256-
editorsListCtrl = new wxListCtrl( this, VERSIONS_LIST, wxDefaultPosition, wxDefaultSize, wxLC_NO_HEADER|wxLC_REPORT );
257-
gbSizer4->Add( editorsListCtrl, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxALL|wxEXPAND, 5 );
256+
editorsListBox = new wxListBox( this, VERSIONS_LIST, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL|wxLB_NEEDED_SB|wxLB_SINGLE );
257+
gbSizer4->Add( editorsListBox, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxALL|wxEXPAND, 5 );
258258

259259
dlgCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
260-
gbSizer4->Add( dlgCancel, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 );
260+
gbSizer4->Add( dlgCancel, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND|wxALIGN_RIGHT, 5 );
261261

262262
openBtn = new wxButton( this, wxID_OPEN, wxT("Open"), wxDefaultPosition, wxDefaultSize, 0 );
263263

264264
openBtn->SetDefault();
265265
openBtn->Enable( false );
266266

267-
gbSizer4->Add( openBtn, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALL, 5 );
267+
gbSizer4->Add( openBtn, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_RIGHT, 5 );
268268

269269

270270
gbSizer4->AddGrowableCol( 0 );

source/interface.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <wx/textctrl.h>
3030
#include <wx/choice.h>
3131
#include <wx/dialog.h>
32+
#include <wx/listbox.h>
3233

3334
///////////////////////////////////////////////////////////////////////////
3435

@@ -112,7 +113,7 @@ class OpenWithEditorDlgBase : public wxDialog
112113

113114
protected:
114115
wxStaticText* m_staticText7;
115-
wxListCtrl* editorsListCtrl;
116+
wxListBox* editorsListBox;
116117
wxButton* dlgCancel;
117118
wxButton* openBtn;
118119

source/interface_derived.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ MainFrameDerived::MainFrameDerived() : MainFrame(NULL){
5555
//make the data folder if it does not already exist (with readwrite for all groups)
5656
#if defined __APPLE__ || defined __linux__
5757
int status = mkdir(datapath.c_str(),S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
58-
menuReveal->SetItemLabel("Reveal In Finder\tCtrl-R");
58+
menuReveal->SetItemLabel("Reveal In Finder\tCtrl-F");
5959
#elif defined _WIN32
6060
int status = mkdir(datapath.c_str());
6161
//on windows also make the main window background white
6262
this->SetBackgroundColour(*wxWHITE);
6363
//high DPI scaling fixes
6464
dpi_scale(this);
6565
//set reveal label
66-
menuReveal->SetItemLabel("Reveal In File Explorer\tCtrl-R");
66+
menuReveal->SetItemLabel("Reveal In File Explorer\tCtrl-F");
6767
#endif
6868
if (status != 0){
6969
ReloadData();

source/interface_derived.hpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,9 @@ class OpenWithDlg : OpenWithEditorDlgBase{
152152
this->EndModal(0);
153153
this->Destroy();
154154
}
155-
void OnSelect(wxListEvent& event){
156-
openBtn->Enable(true);
157-
}
158-
void OnDeselect(wxListEvent& event){
159-
openBtn->Enable(false);
155+
//enable or disable the continue button if there is a selection
156+
void OnSelectionChange(wxCommandEvent& event){
157+
openBtn->Enable(editorsListBox->GetSelection() != wxNOT_FOUND );
160158
}
161159

162160
void OnOpen(wxCommandEvent& event);

source/open_with_dlg.cpp

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,22 @@
99
wxBEGIN_EVENT_TABLE(OpenWithDlg, wxDialog)
1010
EVT_BUTTON(wxID_CANCEL,OpenWithDlg::OnCancel)
1111
EVT_BUTTON(wxID_OPEN,OpenWithDlg::OnOpen)
12-
EVT_LIST_ITEM_SELECTED(VERSIONS_LIST,OpenWithDlg::OnSelect)
13-
EVT_LIST_ITEM_DESELECTED(VERSIONS_LIST, OpenWithDlg::OnDeselect)
12+
EVT_LISTBOX(VERSIONS_LIST, OpenWithDlg::OnSelectionChange)
1413
wxEND_EVENT_TABLE()
1514

1615
OpenWithDlg::OpenWithDlg(wxWindow* parent, const project& project, const vector<editor>& versions, const OpenWithCallback& callback): OpenWithEditorDlgBase(parent){
1716

1817
//fix window size
1918
fitWindowMinSize(this);
2019

21-
//add column
22-
editorsListCtrl->AppendColumn("Select Editor Version to open current project", wxLIST_FORMAT_CENTER, wxLIST_AUTOSIZE_USEHEADER);
23-
20+
2421
//populate list ctrl in reverse so ids match
25-
for (long x = versions.size()-1; x >= 0; x--){
26-
editor e = versions[x];
27-
wxListItem i;
28-
i.SetId(0);
29-
i.SetColumn(0);
30-
string label = e.name + " - " + e.path;
31-
i.SetText(label);
32-
33-
editorsListCtrl->InsertItem(i);
22+
wxArrayString a;
23+
for (const editor& e : versions){
24+
a.Add(e.name + " - " + e.path);
3425
}
26+
editorsListBox->InsertItems( a, 0);
27+
3528
//update members
3629
editors = versions;
3730
p = project;
@@ -42,9 +35,9 @@ OpenWithDlg::OpenWithDlg(wxWindow* parent, const project& project, const vector<
4235
Called when the Open button in the dialog is pressed
4336
*/
4437
void OpenWithDlg::OnOpen(wxCommandEvent& event){
45-
long selectedIndex = wxListCtrl_get_selected(editorsListCtrl);
46-
editor e = editors[selectedIndex];
47-
if (selectedIndex > -1){
38+
long selectedIndex = editorsListBox->GetSelection();
39+
if (selectedIndex != wxNOT_FOUND){
40+
editor e = editors[selectedIndex];
4841
callback(p,e);
4942
//close and dispose self
5043
this->EndModal(0);

wxWidgets/build/osx/wxcocoa.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10949,6 +10949,7 @@
1094910949
isa = XCBuildConfiguration;
1095010950
baseConfigurationReference = 7DEBE1EB2B94305E8E8D6EA5 /* wxcocoa.xcconfig */;
1095110951
buildSettings = {
10952+
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
1095210953
CLANG_ENABLE_OBJC_WEAK = YES;
1095310954
EXECUTABLE_PREFIX = lib;
1095410955
GCC_PREPROCESSOR_DEFINITIONS = (
@@ -11284,6 +11285,7 @@
1128411285
isa = XCBuildConfiguration;
1128511286
baseConfigurationReference = 7DEBE1EB2B94305E8E8D6EA5 /* wxcocoa.xcconfig */;
1128611287
buildSettings = {
11288+
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
1128711289
CLANG_ENABLE_OBJC_WEAK = YES;
1128811290
EXECUTABLE_PREFIX = lib;
1128911291
GCC_PREPROCESSOR_DEFINITIONS = (

0 commit comments

Comments
 (0)