appro: sh脚本名称不使用统一的run.sh而是各自名称,方便使用相同公共的库。
This commit is contained in:
parent
95d553e768
commit
da67e39364
@ -7,7 +7,7 @@
|
|||||||
MainWidget::MainWidget(QWidget* parent) : QWidget(parent), ui(new Ui::MainWidget)
|
MainWidget::MainWidget(QWidget* parent) : QWidget(parent), ui(new Ui::MainWidget)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setWindowTitle("packqt v1.0.2");
|
setWindowTitle("packqt v1.0.3");
|
||||||
connect_operator();
|
connect_operator();
|
||||||
control_init();
|
control_init();
|
||||||
}
|
}
|
||||||
@ -301,7 +301,7 @@ bool MainWidget::add_run_sh(const std::string& out_dir, const std::string& exe_n
|
|||||||
std::string run_sh = content.toStdString();
|
std::string run_sh = content.toStdString();
|
||||||
boost::replace_all(run_sh, "replace_string", exe_name);
|
boost::replace_all(run_sh, "replace_string", exe_name);
|
||||||
|
|
||||||
std::string out_sh = fs::path(out_dir).append("run.sh").string();
|
std::string out_sh = fs::path(out_dir).append(exe_name + ".sh").string();
|
||||||
std::ofstream out(out_sh, std::ios::out);
|
std::ofstream out(out_sh, std::ios::out);
|
||||||
if (!out.is_open()) {
|
if (!out.is_open()) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -65,7 +65,7 @@ void AddDesktop::install_to_desktop()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::string binaryName = fs::path(binaryPath).filename().string();
|
std::string binaryName = fs::path(binaryPath).filename().string();
|
||||||
fs::path sh_path = fs::path(binaryPath).parent_path().append("run.sh");
|
fs::path sh_path = fs::path(binaryPath).parent_path().append(binaryName + ".sh");
|
||||||
if (!fs::exists(sh_path)) {
|
if (!fs::exists(sh_path)) {
|
||||||
MainWidget::add_run_sh(sh_path.parent_path().string(), binaryName);
|
MainWidget::add_run_sh(sh_path.parent_path().string(), binaryName);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user