{"id":312031,"date":"2020-10-26T09:00:43","date_gmt":"2020-10-26T09:00:43","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=312031"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=312031","title":{"rendered":"\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Python, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0439 Apache, Django \u0438 PostgreSQL \u0434\u043b\u044f \u041e\u0421 Windows"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/g3\/un\/ul\/g3unulrbxpdgnxl8xrok74xn6xu.png\"><\/p>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0441\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435\u043c <a href=\"https:\/\/habr.com\/ru\/post\/523842\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/a>, \u0433\u0434\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043e \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0438 Django \u0441\u0442\u0435\u043a\u0430 \u043d\u0430 MS Windows. \u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0442\u0435\u043a\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u0445 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u0438 \u0442.\u0434., \u0433\u0434\u0435 \u0432\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c \u0414\u0430\u043b\u0435\u0435 -&gt; \u0414\u0430\u043b\u0435\u0435 -&gt; \u0413\u043e\u0442\u043e\u0432\u043e.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440:<\/p>\n<ol>\n<li>\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e.<\/li>\n<li>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0435\u0440\u0435\u0434 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439.<\/li>\n<li>\u041f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 Python \u0432 \u0440\u0435\u0435\u0441\u0442\u0440\u0435 Windows.<\/li>\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u0435\u0449\u0451 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u044b Apache \u0438 PostgreSQL, \u0437\u0430\u0442\u0435\u043c \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c \u0438\u0445.<\/li>\n<li>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u043b\u044e\u0441\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u0435\u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0434\u0430\u043b\u0438\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0435\u043a, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0445\u043e\u0447\u0435\u0442.<\/li>\n<\/ol>\n<p>  \u0421\u0440\u0435\u0434\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u043e\u0432 \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a Inno Setup, \u0442.\u043a. \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0438 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432. \u041f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 Wix \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438\u043c\u0435\u0435\u0442 \u0444\u043e\u0440\u043c\u0430\u0442 ini, \u2013 \u043b\u0435\u0433\u0447\u0435 \u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u043c\u0435\u043d\u044f\u0442\u044c, \u0447\u0435\u043c xml. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043a\u043e\u043d\u043a\u0443\u0440\u0438\u0440\u0443\u0435\u0442 \u0438 \u0434\u0430\u0436\u0435 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0438\u0442 \u043c\u043d\u043e\u0433\u0438\u0435 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0438 \u043f\u043e \u043d\u0430\u0431\u043e\u0440\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u041b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0442\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Inno Setup \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043c\u0430\u0441\u0442\u0435\u0440\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0430\u043c\u0438.<\/p>\n<p>  \u041b\u043e\u0433\u0438\u043a\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 \u042f\u041f Pascal, \u0430 \u043d\u0435 \u043d\u0430 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u0445 \u0432 Wix. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u043c \u0435\u0433\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e exe, \u0444\u043e\u0440\u043c\u0430\u0442 \u0444\u0430\u0439\u043b\u043e\u0432 msi \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<h2>\u0428\u0430\u0433 1. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Inno Setup<\/h2>\n<p>  \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u044b, \u0442.\u043a. \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440\u0430 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430.<\/p>\n<h2>\u0428\u0430\u0433 2: \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Inno Setup<\/h2>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Inno Setup (\u0444\u0430\u0439\u043b *.iss) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u041c\u0430\u0441\u0442\u0435\u0440\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ub\/g7\/v0\/ubg7v0zthgvglhoap6mqizlxf7u.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yh\/nx\/uo\/yhnxuogfck2jyyorl91l_ayey_m.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/4f\/-c\/c_\/4f-cc_vl7zpgvkkerc20gr_1ccs.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/eu\/av\/wj\/euavwjiajgi7s6qxvrz21sylmpc.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/k2\/3n\/ck\/k23nck4r3tml5z8wnzdovo82eay.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tm\/fr\/jt\/tmfrjtymtweyd-o0mlbzl1ysr3s.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/it\/vg\/ju\/itvgjubsthq9h_cwpuznhrheycs.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/a2\/no\/rj\/a2norjfh7cou4imu1ujkf7_u7aw.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/nd\/n2\/xc\/ndn2xc_bqvtdl8wvz5wgynq5vbq.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fy\/ys\/w4\/fyysw4mvivmigtgritv-j3k5ksq.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ac\/fu\/te\/acfuteqrtz3x5iilc7gfdbdauia.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ch\/ja\/ar\/chjaarnqzveovnlhroouhkxle0k.png\"><\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d *.iss \u0444\u0430\u0439\u043b \u0441 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/b>                         <\/p>\n<div class=\"spoiler_text\"><code>; Script generated by the Inno Setup Script Wizard.<br \/>  ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!<\/p>\n<p>  #define MyAppName &quot;Severcart&quot;<br \/>  #define MyAppVersion &quot;1.21.0&quot;<br \/>  #define MyAppPublisher &quot;Severcart Inc.&quot;<br \/>  #define MyAppURL &quot;https:\/\/www.severcart.ru\/&quot;<\/p>\n<p>  [Setup]<br \/>  ; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.<br \/>  ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)<br \/>  AppId={{4FAF87DC-4DBD-42CE-A2A2-B6D559E76BDC}<br \/>  AppName={#MyAppName}<br \/>  AppVersion={#MyAppVersion}<br \/>  ;AppVerName={#MyAppName} {#MyAppVersion}<br \/>  AppPublisher={#MyAppPublisher}<br \/>  AppPublisherURL={#MyAppURL}<br \/>  AppSupportURL={#MyAppURL}<br \/>  AppUpdatesURL={#MyAppURL}<br \/>  DefaultDirName=c:\\severcart<br \/>  DefaultGroupName={#MyAppName}<br \/>  ; Uncomment the following line to run in non administrative install mode (install for current user only.)<br \/>  ;PrivilegesRequired=lowest<br \/>  OutputDir=C:\\Users\\Developer\\Desktop\\Output<br \/>  OutputBaseFilename=mysetup<br \/>  Compression=lzma<br \/>  SolidCompression=yes<br \/>  WizardStyle=modern<\/p>\n<p>  [Languages]<br \/>  Name: &quot;russian&quot;; MessagesFile: &quot;compiler:Languages\\Russian.isl&quot;<\/p>\n<p>  [Files]<br \/>  Source: &quot;C:\\severcart\\*&quot;; DestDir: &quot;{app}&quot;; Flags: ignoreversion recursesubdirs createallsubdirs<br \/>  ; NOTE: Don't use &quot;Flags: ignoreversion&quot; on any shared system files<\/p>\n<p>  <\/code>  <\/div>\n<\/p><\/div>\n<h2>\u0428\u0430\u0433 3. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0435\u0440\u0435\u0434 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439<\/h2>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0440\u0435\u0435\u0441\u0442\u0440\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e TCP \u043f\u043e\u0440\u0442\u044b \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b Apache \u0438 PostgreSQL, \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u041e\u0421 Windows, \u0442.\u043a. \u043a\u0430\u043a \u0443\u0436\u0435 \u043e\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u043b\u043e\u0441\u044c \u0432 <a href=\"https:\/\/habr.com\/ru\/post\/523842\/\">\u041f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Python \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 MS Windows 8 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Comparison_of_Microsoft_Windows_versions\" rel=\"nofollow\">(\u0432\u0435\u0440\u0441\u0438\u044f \u044f\u0434\u0440\u0430 6.2)<\/a>. <\/p>\n<p>  \u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0441\u0435\u043a\u0446\u0438\u0435\u0439 <i>[Code]<\/i> \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u0420\u0430\u0437\u0434\u0435\u043b <i>[Code]<\/i> \u2013 \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 Pascal. \u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 Pascal \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 Pascal \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u043f\u044b\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Inno Setup \u0438 \u0443\u043c\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 Pascal \u0438\u043b\u0438, \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435, \u043d\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <code>function IsWindowsVersionOrNewer(Major, Minor: Integer): Boolean;<br \/>  var<br \/>   Version: TWindowsVersion;<br \/>  begin<br \/>   GetWindowsVersionEx(Version);<br \/>   Result := (Version.Major &gt; Major) or ((Version.Major = Major) and (Version.Minor &gt;= Minor));<br \/>  end;<\/p>\n<p>  function IsWindows8OrNewer: Boolean;<br \/>  begin<br \/>   Result := IsWindowsVersionOrNewer(6, 2);<br \/>  end;<br \/>  <\/code><\/p>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 TCP \u043f\u043e\u0440\u0442\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<p>  <code>function CheckPortOccupied(Port:String):Boolean;<br \/>  var<br \/>   ResultCode: Integer;<br \/>  begin<br \/>   Exec(ExpandConstant('{cmd}'), '\/C netstat -na | findstr'+' \/C:&quot;:'+Port+' &quot;', '',0,ewWaitUntilTerminated, ResultCode);<br \/>   if ResultCode &lt;&gt; 1 then <br \/>   begin<br \/>   Log('this port('+Port+') is occupied');<br \/>   Result := True; <br \/>   end else<br \/>   begin<br \/>   Result := False;<br \/>   end;<br \/>  end;<br \/>  <\/code><\/p>\n<p>  \u0412\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u043c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>InitializeSetup<\/i>, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <i>False<\/i>, \u0434\u043b\u044f \u043e\u0442\u043c\u0435\u043d\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 <i>True<\/i>.<\/p>\n<p>  <code>function InitializeSetup(): Boolean;<br \/>  var<br \/>   port_80_check, port_5432_check: boolean;<br \/>  begin<br \/>   if not IsWindows8OrNewer() then begin<br \/>   MsgBox('\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Windows 2012 \u0438 Windows 8.0.',mbError,MB_OK);<br \/>   Abort();<br \/>   Result := False;<br \/>   end;<\/p>\n<p>  port_80_check := CheckPortOccupied('8080');<br \/>   if port_80_check then begin <br \/>   MsgBox('\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430. TCP \u043f\u043e\u0440\u0442 8080 \u0437\u0430\u043d\u044f\u0442.',mbError,MB_OK);<br \/>   Abort();<br \/>   Result := False;<br \/>   end; <\/p>\n<p>   port_5432_check := CheckPortOccupied('5432');<br \/>   if port_5432_check then begin<br \/>   MsgBox('\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430. TCP \u043f\u043e\u0440\u0442 5432 \u0437\u0430\u043d\u044f\u0442.',mbError,MB_OK);<br \/>   Result := False;<br \/>   Abort();<br \/>   end; <br \/>   Result := True;<br \/>  <\/code><\/p>\n<h2>\u0428\u0430\u0433 4. \u041f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c Python \u0432 \u0440\u0435\u0435\u0441\u0442\u0440\u0435 Windows<\/h2>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u044e\u0431\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \/ \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0435\u0441\u0442\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043b\u044e\u0447\u0438 <i>PYTHONPATH<\/i>, <i>PYTHONHOME<\/i> \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <i>Path<\/i>.<\/p>\n<p>  <i>sys.path<\/i> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0440\u043e\u043a, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u043c\u0435\u0441\u0442\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e Python \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041e\u043d \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b <i>PYTHONPATH <\/i>\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438.<\/p>\n<p>  <i>PYTHONHOME<\/i>\u2014 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 Python.<\/p>\n<p>  <i>PATH<\/i> \u2014 \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u041e\u0421 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0438\u043b\u0438 \u043e\u043a\u043d\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430.<\/p>\n<p>  <code>[Registry]<\/p>\n<p>  Root: HKLM; Subkey: &quot;SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment&quot;; \\<br \/>   ValueType: expandsz; ValueName: &quot;Path&quot;; ValueData: &quot;{olddata};{app}\\python;{app}\\python\\Scripts&quot;<\/p>\n<p>  Root: HKLM; Subkey: &quot;SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment&quot;; \\<br \/>   ValueType: expandsz; ValueName: &quot;PYTHONPATH&quot;; ValueData: &quot;{app}\\python&quot;<\/p>\n<p>  Root: HKLM; Subkey: &quot;SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment&quot;; \\<br \/>   ValueType: expandsz; ValueName: &quot;PYTHONHOME&quot;; ValueData: &quot;{app}\\python&quot;<\/p>\n<p>  <\/code><\/p>\n<h2>\u0428\u0430\u0433 5. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0441\u043b\u0443\u0436\u0431 Apache \u0438 PostgreSQL<\/h2>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f 2\u044f Python \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043f\u0443\u0442\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438. <\/p>\n<p>  \u0412\u044b\u0437\u043e\u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <i>[Run]<\/i> \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0430.<\/p>\n<p>  \u0420\u0430\u0437\u0434\u0435\u043b <i>[Run]<\/i> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043b\u044e\u0431\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043d\u043e \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0432 \u044d\u0442\u0443 \u0436\u0435 \u0441\u0435\u043a\u0446\u0438\u044e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043a\u0440\u044b\u0442\u0443\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b Visual Studio \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0436\u0431\u044b Apache \u0438 PostgreSQL \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443\u0442.<\/p>\n<p>  <code>[Run]<\/p>\n<p>  Filename: &quot;{app}\\common\\VC_redist.x86apache.exe&quot;; Parameters: &quot;\/install \/passive&quot;; Flags: waituntilterminated<br \/>  Filename: &quot;{app}\\common\\vcredist_x86pg.exe&quot;; Parameters: &quot;\/install \/passive&quot;; Flags: runhidden;<br \/>  Filename: &quot;{app}\\python\\python.exe&quot; ;Parameters: &quot;{app}\\common\\create_http_conf.py&quot;; Flags: runhidden<br \/>  Filename: &quot;{app}\\python\\python.exe&quot; ;Parameters: &quot;{app}\\common\\edit_pg_conf.py&quot;; Flags: runhidden<br \/>  Filename: &quot;{app}\\common\\install.bat&quot;;Flags: runhidden<br \/>  Filename: &quot;{app}\\common\\services_start.bat&quot;; Flags: runhidden<br \/>  <\/code><\/p>\n<p>  \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 create_http_conf.py<\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python3 # -*- coding:utf-8 -*-  import sys, os   base_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) base_path_un = base_path.replace('\\\\', '\/') apache_conf_path = os.path.join(base_path, 'Apache24', 'conf', 'extra', 'httpd-wsgi.conf')  print('base_path=',base_path)  CONF = &quot;&quot;&quot;  LoadFile &quot;%(base)s\/python\/python39.dll&quot; LoadModule wsgi_module &quot;%(base)s\/python\/lib\/site-packages\/mod_wsgi\/server\/mod_wsgi.cp39-win32.pyd&quot; WSGIPythonHome &quot;%(base)s\/python&quot;   Alias \/static &quot;%(base)s\/app\/static&quot;  Alias \/media &quot;%(base)s\/app\/media&quot;  &lt;Directory &quot;%(base)s\/app\/static&quot;&gt;     # for Apache 2.4     Options Indexes FollowSymLinks     AllowOverride None     Require all granted &lt;\/Directory&gt;  &lt;Directory &quot;%(base)s\/app\/media&quot;&gt;     # for Apache 2.4     Options Indexes FollowSymLinks     AllowOverride None     Require all granted &lt;\/Directory&gt;   WSGIScriptAlias \/ &quot;%(base)s\/app\/conf\/wsgi_prod.py&quot; WSGIPythonPath &quot;%(base)s\/python\/&quot;  &lt;Directory &quot;%(base)s\/app\/conf\/&quot;&gt; &lt;Files wsgi_prod.py&gt;     Require all granted &lt;\/Files&gt;    &lt;\/Directory&gt;  &quot;&quot;&quot; conf_content = CONF % {'base': base_path_un}  with open(apache_conf_path, 'w') as fp:     fp.write(conf_content)   # Read in the file apache_main = os.path.join(base_path, 'Apache24', 'conf', 'httpd.conf') with open(apache_main, 'r') as file : \tfiledata = file.read()  # Replace the target string replace_pattern = 'Define SRVROOT &quot;%(base)s\/Apache24&quot;' % {'base' : base_path_un} find_pattern = 'Define SRVROOT &quot;C:\/severcart\/Apache24&quot;'  filedata = filedata.replace(find_pattern, replace_pattern)  # Write the file out again with open(apache_main, 'w') as file: \tfile.write(filedata)  <\/code><\/pre>\n<p>  \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 edit_pg_conf.py<\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python3 # -*- coding:utf-8 -*-  import sys, os  &quot;&quot;&quot; c:\/djangostack\/postgresql\/bin\/postgres.exe &quot;-D&quot; &quot;c:\\djangostack\\postgresql\\data&quot; &quot;&quot;&quot;   base_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) base_path_un = base_path.replace('\\\\', '\/') pg_conf_path = os.path.join(base_path, 'postgresql', 'data', 'postmaster.opts')   # Read in the file pg_conf_path = os.path.join(base_path, 'postgresql', 'data', 'postmaster.opts') with open(pg_conf_path, 'r') as file : \tfiledata = file.read()   # Replace the target string replace_pattern = base_path_un + '\/' find_pattern = &quot;C:\/severcart\/&quot;   filedata = filedata.replace(find_pattern, replace_pattern)  # Write the file out again with open(pg_conf_path, 'w') as file: \tfile.write(filedata) <\/code><\/pre>\n<p>  \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 install.bat<\/p>\n<p>  <code>@echo off<\/p>\n<p>  ..\\Apache24\\bin\\httpd.exe -k install -n &quot;Apache&quot; &gt; install.log 2&gt;&amp;1<\/p>\n<p>  ..\\postgresql\\bin\\pg_ctl.exe register -N &quot;PostgreSQL&quot; -D ..\\postgresql\\data &gt; install.log 2&gt;&amp;1<br \/>  <\/code><\/p>\n<p>  \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 services_start.bat<\/p>\n<p>  <code>@echo off<\/p>\n<p>  net start &quot;Apache&quot;<\/p>\n<p>  net start &quot;PostgreSQL&quot;<br \/>  <\/code><\/p>\n<h2>\u0428\u0430\u0433 6: \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u0435\u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440<\/h2>\n<p>  \u0414\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440\u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u0435\u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440\u0430. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 Inno Setup \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u0443 \u0440\u0430\u0431\u043e\u0442\u0443 \u0437\u0430 \u043d\u0430\u0441, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0441\u043b\u0435\u0434\u043e\u0432 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u041e\u0421.<\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <i>[UninstallRun]<\/i> \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 bat \u0441\u043a\u0440\u0438\u043f\u0442\u0430 Windows \u0434\u043b\u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043b\u0443\u0436\u0431, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0445 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>  <code>[UninstallRun]<br \/>  Filename: &quot;{app}\\common\\remove.bat&quot;; Flags: runhidden<br \/>  <\/code><\/p>\n<p>  \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 bat \u0441\u043a\u0440\u0438\u043f\u0442\u0430:<\/p>\n<p>  <code>@echo off<\/p>\n<p>  SC STOP Apache<br \/>  SC STOP PostgreSQL<\/p>\n<p>  SC DELETE Apache<br \/>  SC DELETE PostgreSQL<br \/>  <\/code><br \/>  \u0421\u043a\u0440\u0438\u043f\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0441\u043b\u0443\u0436\u0431, \u0437\u0430\u0442\u0435\u043c \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0441\u043b\u0443\u0436\u0431\u044b Apache \u0438 PostgreSQL \u0438\u0437 \u043f\u0435\u0440\u0435\u0447\u043d\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0441\u043b\u0443\u0436\u0431 Windows.<\/p>\n<h2>\u0428\u0430\u0433 7. \u041f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440\u0430 \u042d\u041f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430<\/h2>\n<p>  \u0421\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043a\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0444\u0430\u0439\u043b, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u044b\u043c \u0438 \u043d\u0435 \u0431\u044b\u043b \u0432\u0437\u043b\u043e\u043c\u0430\u043d. \u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u044e\u0442 \u0441\u0432\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0441\u0430\u0439\u0442\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043d\u0438 \u043f\u044b\u0442\u0430\u044e\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c, \u043d\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043e \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c \u0446\u0435\u043d\u0442\u0440\u043e\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u041a\u0443\u043f\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 PFX, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/www.comodoca.com\/code-signing?key5sk1=fb0b9eaeb778d7c347489e42bcf44014e8a226e5&amp;track=14338&amp;af=14576&amp;event=ASCII%20SMB%20IT%20Success%20Summit,%20Boston,%20MA&amp;key5sk0=14338\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0421\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0433\u043e\u0434.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u043d\u0430\u0434 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b signtool.exe \u0434\u043b\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 exe \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 Inno Setup \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442 \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443. SignTool \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0444\u0430\u0439\u043b\u044b \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u044c\u044e, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0438 Windows \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 signtool.exe \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c <a href=\"https:\/\/developer.microsoft.com\/ru-ru\/windows\/downloads\/windows-10-sdk\/\" rel=\"nofollow\">Windows 10 SDK<\/a>.<\/p>\n<p>  \u041f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 signtool.exe \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u0445:<\/p>\n<ul>\n<li>x86 -&gt; c:\\Program Files (x86)\\Windows Kits\\10\\bin\\x86\\<\/li>\n<li>x64 -&gt; c:\\Program Files (x86)\\Windows Kits\\10\\bin\\x64\\<\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/docs.microsoft.com\/ru-ru\/windows\/win32\/seccrypto\/signtool?redirectedfrom=MSDN\" rel=\"nofollow\">\u0441\u0430\u0439\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430<\/a>. \u0412 \u043d\u0435\u043c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0432\u0441\u0435 \u043e\u043f\u0446\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0414\u0432\u0438\u0433\u0430\u0435\u043c\u0441\u044f \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c <i>\u00abConfigure Sign Tools&#8230;\u00bb<\/i> \u0438\u0437 \u043c\u0435\u043d\u044e <i>\u00abTools\u00bb<\/i>.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rw\/-0\/n5\/rw-0n5loq0k2iczj76kx7xo_ywc.png\"><\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u00abAdd\u00bb<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/2h\/pz\/e-\/2hpze-np-nd1bljdmm1u5q-3n-u.png\"><\/p>\n<p>  \u0414\u0430\u0434\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0443 \u0438\u043c\u044f. \u042d\u0442\u043e \u0438\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0443 \u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0430. \u042f \u043d\u0430\u0437\u0432\u0430\u043b \u0441\u0432\u043e\u0439 signtool, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e signtool.exe.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ca\/w4\/iy\/caw4iy-mkrzam05v9govab8czti.png\"><\/p>\n<p>  \u0412\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0442\u0435\u043a\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0434\u043b\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438. \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0438\u043c\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043d\u0430 $f. Inno Setup \u0437\u0430\u043c\u0435\u043d\u0438\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e $f \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c.<\/p>\n<p>  \u00abC:\\Program Files (x86)\\Windows Kits\\10\\bin\\x86\\signtool.exe\u00bb sign \/f \u00abC:\\MY_CODE_SIGNING.PFX\u00bb \/t <a href=\"http:\/\/timestamp.comodoca.com\/authenticode\" rel=\"nofollow\">timestamp.comodoca.com\/authenticode<\/a> \/p MY_PASSWORD $f<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/n7\/_e\/wv\/n7_ewvfqcwlrbojzmu1dotguvai.png\"><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f OK \u0432\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ca\/nc\/kv\/canckvwjzxhieb-4cmhrpvrkmlg.png\"><\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b [Setup], \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u0438. \u042d\u0442\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b \u043d\u0430\u0437\u0432\u0430\u043b\u0438 \u0441\u0432\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 signtool.<\/p>\n<p>  <code>SignTool=signtool<br \/>  <\/code><\/p>\n<h2>\u0428\u0430\u0433 8. \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440<\/h2>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 InnoSetup \u0444\u0430\u0439\u043b \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">#define MyAppName \u00abSevercart\u00bb<br \/>  #define MyAppVersion \u00ab1.21.0\u00bb<br \/>  #define MyAppPublisher \u00abSevercart Inc.\u00bb<br \/>  #define MyAppURL \u00ab<a href=\"https:\/\/www.severcart.ru\/\" rel=\"nofollow\">www.severcart.ru<\/a>\u00bb<\/p>\n<p>  [Setup]<br \/>  ; NOTE: The value of AppId uniquely identifies this application.<br \/>  ; Do not use the same AppId value in installers for other applications.<br \/>  ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)<br \/>  SignTool=signtool<br \/>  AppId={{2CF113D5-B49D-47EF-B85F-AE06EB0E78EB}}<br \/>  AppName={#MyAppName}<br \/>  AppVersion={#MyAppVersion}<br \/>  ;AppVerName={#MyAppName} {#MyAppVersion}<br \/>  AppPublisher={#MyAppPublisher}<br \/>  AppPublisherURL={#MyAppURL}<br \/>  AppSupportURL={#MyAppURL}<br \/>  AppUpdatesURL={#MyAppURL}<br \/>  DefaultDirName=c:\\severcart<br \/>  DefaultGroupName={#MyAppName}<br \/>  OutputBaseFilename=setup<br \/>  Compression=lzma<br \/>  SolidCompression=yes<br \/>  ChangesEnvironment=yes<\/p>\n<p>  ; Uninstall options<br \/>  Uninstallable=yes<br \/>  CreateUninstallRegKey=yes<br \/>  ;WizardSmallImageFile=logo3.bmp<\/p>\n<p>  [Icons]<br \/>  Name: &quot;{userdesktop}\\severcart&quot;; Filename: \u00ab<a href=\"http:\/\/127.0.0.1\" rel=\"nofollow\">127.0.0.1<\/a>:8080\/\u00bb<\/p>\n<p>  [Languages]<br \/>  Name: \u00abrussian\u00bb; MessagesFile: \u00abcompiler:Languages\\Russian.isl\u00bb<\/p>\n<p>  [Files]<br \/>  Source: \u00abC:\\severcart\\*\u00bb; Excludes: &quot;*.pyc&quot;; DestDir: &quot;{app}&quot;; Flags: ignoreversion recursesubdirs createallsubdirs<\/p>\n<p>  [Registry]<br \/>  Root: HKLM; Subkey: \u00abSYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment\u00bb; \\<br \/>   ValueType: expandsz; ValueName: \u00abPath\u00bb; ValueData: &quot;{olddata};{app}\\python;{app}\\python\\Scripts&quot;<\/p>\n<p>  Root: HKLM; Subkey: \u00abSYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment\u00bb; \\<br \/>   ValueType: expandsz; ValueName: \u00abPYTHONPATH\u00bb; ValueData: &quot;{app}\\python&quot;<\/p>\n<p>  Root: HKLM; Subkey: \u00abSYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment\u00bb; \\<br \/>   ValueType: expandsz; ValueName: \u00abPYTHONHOME\u00bb; ValueData: &quot;{app}\\python&quot;<\/p>\n<p>  [Run]<br \/>  Filename: &quot;{app}\\common\\VC_redist.x86apache&quot;; Parameters: &quot;\/install \/passive&quot;; Flags: waituntilterminated<br \/>  Filename: &quot;{app}\\common\\vcredist_x86pg&quot;; Parameters: &quot;\/install \/passive&quot;; Flags: runhidden;<br \/>  Filename: &quot;{app}\\python\\python.exe&quot; ;Parameters: &quot;{app}\\common\\create_http_conf.py&quot;; Flags: runhidden<br \/>  Filename: &quot;{app}\\python\\python.exe&quot; ;Parameters: &quot;{app}\\common\\edit_pg_conf.py&quot;; Flags: runhidden<br \/>  Filename: &quot;{app}\\common\\install.bat&quot;;Flags: runhidden<br \/>  Filename: &quot;{app}\\common\\services_start.bat&quot;; Flags: runhidden<\/p>\n<p>  [UninstallRun]<br \/>  Filename: &quot;{app}\\common\\remove.bat&quot;; Flags: runhidden<\/p>\n<p>  [Code]<br \/>  function IsWindowsVersionOrNewer(Major, Minor: Integer): Boolean;<br \/>  var<br \/>   Version: TWindowsVersion;<br \/>  begin<br \/>   GetWindowsVersionEx(Version);<br \/>   Result :=<br \/>   (Version.Major &gt; Major) or<br \/>   ((Version.Major = Major) and (Version.Minor &gt;= Minor));<br \/>  end;<\/p>\n<p>  function IsWindows8OrNewer: Boolean;<br \/>  begin<br \/>   Result := IsWindowsVersionOrNewer(6, 2);<br \/>  end;<\/p>\n<p>  function CheckPortOccupied(Port:String):Boolean;<br \/>  var<br \/>   ResultCode: Integer;<br \/>  begin<br \/>   Exec(ExpandConstant(&#8216;{cmd}&#8217;), &#8216;\/C netstat -na | findstr&#8217;+&#8217; \/C:&quot;:&#8217;+Port+&#8217; &quot;&#8217;, &#187;,0,ewWaitUntilTerminated, ResultCode);<br \/>   if ResultCode &lt;&gt; 1 then <br \/>   begin<br \/>   Log(&#8216;this port(&#8216;+Port+&#8217;) is occupied&#8217;);<br \/>   Result := True; <br \/>   end else<br \/>   begin<br \/>   Result := False;<br \/>   end;<br \/>  end;<\/p>\n<p>  function InitializeSetup(): Boolean;<br \/>  var<br \/>   port_80_check, port_5432_check: boolean;<br \/>  begin<br \/>   if not IsWindows8OrNewer() then begin<br \/>   MsgBox(&#8216;\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Windows 2012 \u0438 Windows 8.0.&#8217;,mbError,MB_OK);<br \/>   Abort();<br \/>   Result := False;<br \/>   end;<\/p>\n<p>  port_80_check := CheckPortOccupied(&#8216;8080&#8217;);<br \/>   if port_80_check then begin <br \/>   MsgBox(&#8216;\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430. TCP \u043f\u043e\u0440\u0442 8080 \u0437\u0430\u043d\u044f\u0442.&#8217;,mbError,MB_OK);<br \/>   Abort();<br \/>   Result := False;<br \/>   end; <\/p>\n<p>   port_5432_check := CheckPortOccupied(&#8216;5432&#8217;);<br \/>   if port_5432_check then begin<br \/>   MsgBox(&#8216;\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430. TCP \u043f\u043e\u0440\u0442 5432 \u0437\u0430\u043d\u044f\u0442.&#8217;,mbError,MB_OK);<br \/>   Result := False;<br \/>   Abort();<br \/>   end; <br \/>   Result := True;<\/p>\n<p>  end;  <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ej\/tc\/1a\/ejtc1afyptvpku0jdj_vxgt7qig.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dl\/qa\/on\/dlqaonfal2ci8hldyvi4o_vvgjy.png\"><\/p>\n<h2>\u0428\u0430\u0433 9. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440\u0430<\/h2>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sf\/hh\/mv\/sfhhmvseyfegrttd62yc6vqzs3a.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gn\/zi\/4g\/gnzi4gwlt8jkugbfitlfolxuj44.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sc\/ly\/3l\/scly3llcmnjxcgkifyyohukczoy.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hy\/tm\/k7\/hytmk74om7jwsjxio-3mvkcbuzw.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/w1\/z1\/7p\/w1z17pbgwvyut-6ng8jlpwd2v10.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bl\/jd\/66\/bljd66lvtekzbvnnq1dghqcq4ri.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/7z\/qb\/jf\/7zqbjf6trb_bnx1fiod4fyq6wau.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dd\/wa\/0z\/ddwa0zx2rtncjr15entq0dublci.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fa\/id\/gb\/faidgb7xhuusojx9l9untsjpcao.png\"><\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e \u0432\u0441\u0451, \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u0421\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u044b \u0434\u043b\u044f \u041e\u0421 Windows \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 <a href=\"https:\/\/www.severcart.ru\/downloads\/\" rel=\"nofollow\">https:\/\/www.severcart.ru\/downloads\/<\/a>.<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/525028\/\"> https:\/\/habr.com\/ru\/post\/525028\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/g3\/un\/ul\/g3unulrbxpdgnxl8xrok74xn6xu.png\"><\/p>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0441\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435\u043c <a href=\"https:\/\/habr.com\/ru\/post\/523842\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/a>, \u0433\u0434\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043e \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0438 Django \u0441\u0442\u0435\u043a\u0430 \u043d\u0430 MS Windows. \u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0442\u0435\u043a\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u0445 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u0438 \u0442.\u0434., \u0433\u0434\u0435 \u0432\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c \u0414\u0430\u043b\u0435\u0435 -&gt; \u0414\u0430\u043b\u0435\u0435 -&gt; \u0413\u043e\u0442\u043e\u0432\u043e.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-312031","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/312031","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=312031"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/312031\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=312031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=312031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=312031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}