Revision 6066
trunk/install/launcher/izpack-launcher-1.3/src/Makefile.mingw | ||
---|---|---|
14 | 14 |
copy $(TARGET).exe ..\dist\launcher-Win32.exe |
15 | 15 |
strip ../dist/launcher-Win32.exe |
16 | 16 |
copy launcher.exe.manifest ..\dist\launcher-Win32.exe.manifest |
17 |
copy launcher.ini ..\dist |
|
17 |
if not exist ..\dist\launcher.ini copy launcher.ini ..\dist
|
|
18 | 18 |
|
19 | 19 |
install_lang: |
20 | 20 |
if not exist ..\dist\fr mkdir ..\dist\fr |
trunk/install/launcher/izpack-launcher-1.3/src/Makefile.wxconfig | ||
---|---|---|
45 | 45 |
install: all install_lang |
46 | 46 |
cp ${EXEC} ../dist/${EXEC}-${OS} |
47 | 47 |
strip ../dist/${EXEC}-${OS} |
48 |
cp ${EXEC}.ini ../dist/${EXEC}.ini |
|
48 | 49 |
|
49 | 50 |
install_lang: |
50 | 51 |
mkdir -p ../dist/fr ../dist/de ../dist/da ../dist/pt-BR ../dist/es ../dist/it ../dist/nl |
trunk/install/launcher/izpack-launcher-1.3/src/launcher.cpp | ||
---|---|---|
53 | 53 |
} |
54 | 54 |
|
55 | 55 |
|
56 |
long LAUNCHAPP_TIMER_ID = wxNewId(); |
|
56 | 57 |
|
58 |
BEGIN_EVENT_TABLE(LauncherApp, wxApp) |
|
59 |
EVT_TIMER(LAUNCHAPP_TIMER_ID, LauncherApp::OnTimer) |
|
60 |
END_EVENT_TABLE() |
|
61 |
|
|
62 |
|
|
57 | 63 |
/* Main Application $Revision$ |
58 | 64 |
* |
59 | 65 |
* $Id$ |
... | ... | |
162 | 168 |
isStatusDialogVisible = true; |
163 | 169 |
|
164 | 170 |
showStatusMsg(_("Intializing...")); |
171 |
|
|
172 |
myTimer = new wxTimer(this,LAUNCHAPP_TIMER_ID); |
|
173 |
myTimer->Start(150,true); |
|
174 |
|
|
175 |
return true; |
|
176 |
/* |
|
165 | 177 |
|
166 |
|
|
167 | 178 |
if (!searchJRE()) |
168 | 179 |
{ |
169 | 180 |
jreInstall(); |
... | ... | |
180 | 191 |
exit(0); |
181 | 192 |
|
182 | 193 |
return false; |
194 |
*/ |
|
183 | 195 |
} |
184 | 196 |
|
185 | 197 |
void LauncherApp::fixSystemJREConfig(){ |
... | ... | |
547 | 559 |
echo("isOk = false"); |
548 | 560 |
} |
549 | 561 |
*/ |
550 |
delete in_stream;
|
|
562 |
delete in_stream; |
|
551 | 563 |
//echo("end"); |
552 | 564 |
return isOk; |
553 | 565 |
|
... | ... | |
586 | 598 |
statusDialog->showStatus(msg); |
587 | 599 |
} |
588 | 600 |
} |
601 |
|
|
602 |
void LauncherApp::run(){ |
|
603 |
|
|
604 |
if (!searchJRE()) |
|
605 |
{ |
|
606 |
jreInstall(); |
|
607 |
} |
|
608 |
|
|
609 |
fixSystemJREConfig(); |
|
610 |
|
|
611 |
jaiInstall(); |
|
612 |
|
|
613 |
jaiIoInstall(); |
|
614 |
|
|
615 |
runJRE(); |
|
616 |
|
|
617 |
exit(0); |
|
618 |
|
|
619 |
} |
|
620 |
|
|
621 |
void LauncherApp::OnTimer(wxTimerEvent& event) { |
|
622 |
run(); |
|
623 |
} |
trunk/install/launcher/izpack-launcher-1.3/src/statusdialog.cpp | ||
---|---|---|
4 | 4 |
#include "package.xpm" |
5 | 5 |
#endif |
6 | 6 |
|
7 |
long TIMER_ID = wxNewId(); |
|
7 |
void echo(const wxString &msg) |
|
8 |
{ |
|
9 |
wxMessageDialog dlg(0, msg, "echo", wxOK); |
|
10 |
dlg.ShowModal(); |
|
11 |
} |
|
8 | 12 |
|
13 |
long STATUSDIALOG_TIMER_ID = wxNewId(); |
|
14 |
|
|
9 | 15 |
BEGIN_EVENT_TABLE(StatusDialog, wxFrame) |
10 |
EVT_TIMER(TIMER_ID, StatusDialog::OnTimer) |
|
16 |
EVT_TIMER(STATUSDIALOG_TIMER_ID, StatusDialog::OnTimer)
|
|
11 | 17 |
EVT_BUTTON(wxID_CANCEL, StatusDialog::OnCancel) |
12 | 18 |
EVT_CLOSE(StatusDialog::OnCancel) |
13 | 19 |
END_EVENT_TABLE() |
... | ... | |
37 | 43 |
sizer = new wxBoxSizer(wxVERTICAL); |
38 | 44 |
// Widgets |
39 | 45 |
|
46 |
cancelButton= new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition); |
|
40 | 47 |
icon = new wxStaticBitmap(this, -1,wxICON(package),wxDefaultPosition,wxSize(32,32)); |
48 |
icon->SetBackgroundColour(cancelButton->GetBackgroundColour()); |
|
41 | 49 |
sizerDesc->Add(icon,0, wxALIGN_LEFT | wxALL ,5); |
42 | 50 |
explanationText = new wxStaticText(this, -1, explanationMsg, wxDefaultPosition); |
51 |
explanationText->SetBackgroundColour(cancelButton->GetBackgroundColour()); |
|
43 | 52 |
sizerDesc->Add(explanationText, 1,wxALIGN_CENTRE | wxEXPAND | wxALL,5); |
44 | 53 |
sizer->Add(sizerDesc,1,wxALIGN_LEFT | wxALIGN_TOP | wxEXPAND | wxALL,10); |
45 | 54 |
statusMsgText = new wxStaticText(this, -1, statusMsg, wxDefaultPosition); |
55 |
statusMsgText->SetBackgroundColour(cancelButton->GetBackgroundColour()); |
|
46 | 56 |
sizer->Add(statusMsgText, 0, wxALIGN_LEFT | wxALL, 5); |
47 |
cancelButton= new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition); |
|
48 |
sizer->Add(cancelButton, 0, wxALIGN_RIGHT | wxALL, 5); |
|
49 | 57 |
|
58 |
cancelButton->Hide(); |
|
59 |
//sizer->Add(cancelButton, 0, wxALIGN_RIGHT | wxALL, 5); |
|
50 | 60 |
|
61 |
this->SetBackgroundColour(cancelButton->GetBackgroundColour()); |
|
51 | 62 |
|
52 | 63 |
|
64 |
|
|
65 |
|
|
53 | 66 |
// Sizer |
54 | 67 |
SetSizer(sizer); |
55 | 68 |
sizer->SetSizeHints(this); |
56 | 69 |
|
57 | 70 |
//Timer |
58 |
wxTimer myTimer(this); |
|
71 |
myTimer = new wxTimer(this,STATUSDIALOG_TIMER_ID); |
|
72 |
|
|
59 | 73 |
} |
60 | 74 |
|
61 | 75 |
void StatusDialog::showStatus(const wxString statusString) { |
62 |
myTimer.Start(150,false); |
|
76 |
myTimer->Start(100,false); |
|
77 |
//echo(" StatusDialog::showStatus "); |
|
63 | 78 |
count = 0; |
64 | 79 |
statusMsg = statusString; |
65 | 80 |
statusMsgText->SetLabel(statusMsg); |
66 |
/* |
|
67 |
if (!myTimer.IsRunning()) { |
|
68 |
myTimer.Start(1000); |
|
81 |
|
|
82 |
if (!this->myTimer->IsRunning()) { |
|
83 |
//echo(" timer not running "); |
|
84 |
} else { |
|
85 |
//echo(" timer running "); |
|
69 | 86 |
} |
70 |
*/ |
|
87 |
|
|
71 | 88 |
} |
72 | 89 |
|
73 | 90 |
void StatusDialog::OnTimer(wxTimerEvent& event){ |
91 |
//echo("StatusDialog::OnTimer"); |
|
74 | 92 |
wxString cad; |
75 | 93 |
switch (count) |
76 | 94 |
{ |
... | ... | |
84 | 102 |
} |
85 | 103 |
|
86 | 104 |
void StatusDialog::OnCancel(wxEvent& event) { |
105 |
//echo("StatusDialog::OnCancel"); |
|
87 | 106 |
this->canceled = true; |
88 | 107 |
} |
89 | 108 |
|
trunk/install/launcher/izpack-launcher-1.3/src/launcher.h | ||
---|---|---|
61 | 61 |
bool paramsEnabledDownload; |
62 | 62 |
StatusDialog* statusDialog; |
63 | 63 |
bool isStatusDialogVisible; |
64 |
wxTimer* myTimer; |
|
64 | 65 |
|
65 | 66 |
|
66 | 67 |
|
... | ... | |
122 | 123 |
virtual ~LauncherApp(); |
123 | 124 |
|
124 | 125 |
virtual bool OnInit(); |
126 |
|
|
127 |
virtual void OnTimer(wxTimerEvent& event); |
|
128 |
|
|
129 |
protected: |
|
130 |
DECLARE_EVENT_TABLE() |
|
131 |
|
|
125 | 132 |
}; |
126 | 133 |
|
127 | 134 |
#endif |
trunk/install/launcher/izpack-launcher-1.3/src/statusdialog.h | ||
---|---|---|
15 | 15 |
wxStaticText* statusMsgText; |
16 | 16 |
wxString statusMsg; |
17 | 17 |
wxButton* cancelButton; |
18 |
wxTimer myTimer; |
|
18 |
wxTimer* myTimer;
|
|
19 | 19 |
bool canceled; |
20 | 20 |
int count; |
21 | 21 |
void buildUI(); |
Also available in: Unified diff