Anyway, I think the library node printer from @tojocky is well maintained, in other hand in the electron-builder documentation they say that you should compile in native for natural reasons. Once you will have it, you'll see that it's a cleaner and pragmatic solution ...
This was my entire process, I hope it helps to someone having the same issue:
- Get VirtualBox (or Parallels but is not free)
- Get iso for W10
- Create a VM with this W10 iso, and you should give to this VM some storage (because some dependency that you'll need to compile), I have assigned 60gb to this VM
- Once I had that VM running, I just installed in that machine Visual Studio 2017 (with their build-tools included, it's necessary)
- And then, I used CMD to make the rest
- Install NodeJS (and NPM, but it comes with)
- Install node-gyp globally
- Install Python 2.7
- Clone your project from git (in my case)
- npm i (in your project), you should have as npm dependency in your package.json the module electron-builder of course. (here I had some troubles because when node-gyp tried to rebuild printer to generate the binary for windows it was failing, this was because it was imposible to find the python executable, so if you face this problem you should add it like:npm config set python "c:\Python27\python.exe" in my case )
- Then try again npm i and Voila!
After all, you should make the build using electron-builder, in my case my npm script command was build --win --x64 but you can use the --ia32 flag as well for 32bits
อย่างที่จ่าหน้าหัวกระทู้ไว้ คือตอนแรกที่โหลดโปรแกรมมา ใช้งานได้เป็นปกติ ไม่มีปัญหาอะไรเลย พอปิดคอมแล้วเปิดใหม่ในวันรุ่งขึ้น ไฟล์ บางไฟล์ก็ขึ้น .exe not valid win32 app บ้าง บางโปรแกรม ดับเบิลคลิกแล้วโปรแกรมไม่รันมั้ง ส่วนบางโปรแกรม จะทำการ Uninstall ก็ ลบไม่ได้ (Uninstall ใน control panel เพราะตัวโปรแกรมไม่มี ไฟล์ Uninstall) ตามหา หลายวิธี ใน Google ก็ไม่เจอ บางวิธีก็ใช้ไม่ได้ เลยอยากจะขอร้อง เพื่อนๆใน Pantip ช่วยหน่อยคับ เพราะ ตอนนี้ทำงานไม่ได้เลย
ปล. ถ้าเป็นเกี่ยวกับไวรัสก็ไม่น่าใช่เพราะ พึ่งล้างฮาทดิส ไปทุก Drive ไม่เหลือเลยแล้วก็ยังเป็นอยู่หลังจากรีเครื่อง ปล2. Window Update ปิดไว้ตลอดไม่เคยเปิด
ขอบคุณ by Kuro・
ตั้งกระทู้ใหม่
คือรันโปรแกรม .exe ทุกอันมันขึ้น is not a valid win32 application หมดเลยอ่ะค่ะ ลองหาวิธีแก้ตามเน็ตแล้วก็ไม่หาย หรือเป็นเพราะไดรฟ์Cเราเต็มคะ? = = เพราะไดรฟ์Cเราว่างแค่100mbเอง
ทำไงดี
18 ต.ค. 55 เวลา 18:59 น.
รายชื่อผู้ถูกใจกระทู้นี้ คน
แสดงความคิดเห็น
5 ความคิดเห็น
19 ต.ค. 55 เวลา 14:04 น. 1
ลองเข้าไปถามที่เพจนี้ซิครับ www.facebook.com/seeteecom  พี่เขาใจดีมากเราก็ใช้บริการอยู่ตลอด  อ่อๆๆ อย่าลืมช่วยเชียร์+กดไลค์ให้พี่เขาด้วยล่ะ ขอให้โชคดี
0
- แก้ไข
- แจ้งลบ
- ปักหมุด
VANillA 21 ต.ค. 55 เวลา 21:15 น. 2
applicationนั้นเสียหายครับ เป็นไปได้ว่า 1.ฮาดดิสก์เกิดBadsectorทำให้ไฟล์เจ๊ง 2.ตอนโหลดหรือกอปมามีข้อผิดพลาดทำให้ไฟล์เสียหาย 3.โดนไวรัสกิน -.-* อันนี้อันตรายมากเลย ผมเคยโดนเหมือนกัน ลามไปทั่วเครื่องเลย สแกนไวรัสใหม่อีกที เจอไวรัสตัวเดียวกันเต็มฮาดดิสเลย -.-
0
- แก้ไข
- แจ้งลบ
- ปักหมุด
รายชื่อผู้ถูกใจความเห็นนี้ คน
แจ้งลบความคิดเห็น
คุณต้องการจะลบความคิดเห็นนี้หรือไม่ ?