# HG changeset patch # User pyon@macmini # Date 1589281211 -32400 # Node ID 1c7bf24c63e63a05ebcded3d5b72f1b3eb5b5123 # Parent 4e14902379da19f10f513cf9d6afe9ff0430e6ae alloc.cpp: small improve. diff -r 4e14902379da -r 1c7bf24c63e6 src/kaigo/horori/alloc/alloc.cpp --- 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 #include @@ -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++) {