AutoPercenty3/updateManager/test/fake_installer.py

19 lines
643 B
Python

# fake_installer.py
import os, sys, time
from datetime import datetime
def main():
# 실행 폴더에 설치 로그 남기기
base = os.path.dirname(sys.executable) if getattr(sys,'frozen',False) else os.getcwd()
logp = os.path.join(base, "installed_log.txt")
with open(logp, "a", encoding="utf-8") as f:
f.write(f"[INSTALL] {datetime.now().isoformat()} - fake installer running...\n")
# 설치 시뮬레이션
time.sleep(3)
with open(logp, "a", encoding="utf-8") as f:
f.write(f"[DONE] {datetime.now().isoformat()} - install OK\n")
return 0
if __name__ == "__main__":
sys.exit(main())