From da67e39364c77c182aff8ac05109ff4b5fd91d5b Mon Sep 17 00:00:00 2001 From: taynpg Date: Fri, 12 Apr 2024 09:52:26 +0800 Subject: [PATCH] =?UTF-8?q?appro:=20sh=E8=84=9A=E6=9C=AC=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E4=B8=8D=E4=BD=BF=E7=94=A8=E7=BB=9F=E4=B8=80=E7=9A=84run.sh?= =?UTF-8?q?=E8=80=8C=E6=98=AF=E5=90=84=E8=87=AA=E5=90=8D=E7=A7=B0=EF=BC=8C?= =?UTF-8?q?=E6=96=B9=E4=BE=BF=E4=BD=BF=E7=94=A8=E7=9B=B8=E5=90=8C=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E7=9A=84=E5=BA=93=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MainWidget.cpp | 4 ++-- adddesktop.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MainWidget.cpp b/MainWidget.cpp index 407bfeb..30d9e5e 100644 --- a/MainWidget.cpp +++ b/MainWidget.cpp @@ -7,7 +7,7 @@ MainWidget::MainWidget(QWidget* parent) : QWidget(parent), ui(new Ui::MainWidget) { ui->setupUi(this); - setWindowTitle("packqt v1.0.2"); + setWindowTitle("packqt v1.0.3"); connect_operator(); 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(); 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); if (!out.is_open()) { return false; diff --git a/adddesktop.cpp b/adddesktop.cpp index 24753b7..e940fda 100644 --- a/adddesktop.cpp +++ b/adddesktop.cpp @@ -65,7 +65,7 @@ void AddDesktop::install_to_desktop() return; } 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)) { MainWidget::add_run_sh(sh_path.parent_path().string(), binaryName); }