Mercurial > mercurial > hgweb_golang.cgi
changeset 52:1c7bf24c63e6
alloc.cpp: small improve.
author | pyon@macmini |
---|---|
date | Tue, 12 May 2020 20:00:11 +0900 |
parents | 4e14902379da |
children | 8df74a781c8c |
files | src/kaigo/horori/alloc/alloc.cpp |
diffstat | 1 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/kaigo/horori/alloc/alloc.cpp Fri May 01 23:45:22 2020 +0900 +++ b/src/kaigo/horori/alloc/alloc.cpp Tue May 12 20:00:11 2020 +0900 @@ -1,5 +1,5 @@ // Filename : alloc.cpp -// Last Change: 2020-04-27 月 14:11:08. +// Last Change: 2020-05-12 火 16:28:18. // #include <wx/dir.h> #include <wx/filefn.h> @@ -96,8 +96,12 @@ void AllocFrame::Pdf2Tif() { - wxCopyFile(m_filePickerPdf1->GetPath(), m_dirPickerWork->GetPath() + wxFILE_SEP_PATH + wxT("1.pdf")); - wxCopyFile(m_filePickerPdf2->GetPath(), m_dirPickerWork->GetPath() + wxFILE_SEP_PATH + wxT("2.pdf")); + wxString kanso = m_filePickerPdf1->GetPath(); + wxString normal = m_filePickerPdf2->GetPath(); + + if (!kanso.IsEmpty()) + wxCopyFile(kanso, m_dirPickerWork->GetPath() + wxFILE_SEP_PATH + wxT("1.pdf")); + wxCopyFile(normal, m_dirPickerWork->GetPath() + wxFILE_SEP_PATH + wxT("2.pdf")); wxString batchfile = m_dirPickerWork->GetPath() + wxFILE_SEP_PATH + wxT("alloc.bat"); wxTextFile textfile; @@ -108,7 +112,10 @@ cmd = wxT("cd ") + m_dirPickerWork->GetPath(); textfile.AddLine(cmd); - cmd = wxT("\"C:\\Program Files\\gs\\gs9.50\\bin\\gswin64c.exe\" -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=a.pdf 1.pdf 2.pdf"); + //cmd = wxT("\"C:\\Program Files\\gs\\gs9.50\\bin\\gswin64c.exe\" -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=a.pdf 1.pdf 2.pdf"); + cmd = wxT("\"C:\\Program Files\\gs\\gs9.50\\bin\\gswin64c.exe\" -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=a.pdf "); + if (!kanso.IsEmpty()) cmd += wxT("1.pdf "); + cmd += wxT("2.pdf"); textfile.AddLine(cmd); for (int i = 0; i < 50; i++) {