質問編集履歴
3
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,7 +6,10 @@
|
|
6
6
|
|
7
7
|
setup.pyを書く際に[こちら](https://qiita.com/memakura/items/83517bb8e02bf791c53d)のサイトを参考にさせてもらいました.
|
8
8
|
|
9
|
+
色々調べたんですが具体的なのが見つからなかったので考えられる解決策は上のようにdesktopとかに保存するようにするか別のexe化pyinstallerとかを試すとかが自分ができる解決案ですかね.
|
10
|
+
pyinstallerはファイルを一つにできたりと便利ですが起動が遅くなるのであまり使いたくはないんですが
|
9
11
|
|
12
|
+
|
10
13
|
setup.pyのコードを一応乗せておきます
|
11
14
|
```Python
|
12
15
|
import sys
|
2
コードの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,4 +4,69 @@
|
|
4
4
|
|
5
5
|
ちなみにデスクトップなどにインストールすると管理者権限なしでちゃんと動作します.
|
6
6
|
|
7
|
-
setup.pyを書く際に[こちら](https://qiita.com/memakura/items/83517bb8e02bf791c53d)のサイトを参考にさせてもらいました.
|
7
|
+
setup.pyを書く際に[こちら](https://qiita.com/memakura/items/83517bb8e02bf791c53d)のサイトを参考にさせてもらいました.
|
8
|
+
|
9
|
+
|
10
|
+
setup.pyのコードを一応乗せておきます
|
11
|
+
```Python
|
12
|
+
import sys
|
13
|
+
from cx_Freeze import setup, Executable
|
14
|
+
|
15
|
+
name = "Name"
|
16
|
+
version = "1.0"
|
17
|
+
description = "test"
|
18
|
+
author = "author"
|
19
|
+
|
20
|
+
shortcut_table = [
|
21
|
+
('DesktopShortcut', # Shortcut
|
22
|
+
'DesktopFolder', # Directory_
|
23
|
+
"QRDecoder", # Name
|
24
|
+
'TARGETDIR', # Component_
|
25
|
+
'[TARGETDIR]test.exe', # Target
|
26
|
+
None, # Arguments
|
27
|
+
None, # Description
|
28
|
+
None, # Hotkey
|
29
|
+
None, # Icon
|
30
|
+
None, # IconIndex
|
31
|
+
None, # ShowCmd
|
32
|
+
'TARGETDIR', # WkDir
|
33
|
+
)
|
34
|
+
]
|
35
|
+
|
36
|
+
|
37
|
+
# Table dictionary
|
38
|
+
msi_data = {'Shortcut': shortcut_table}
|
39
|
+
|
40
|
+
build_exe_options = {'packages': ["os"],
|
41
|
+
'excludes': ["PyQt4","PyQt5"],
|
42
|
+
'includes': ["sys","tkinter","PIL","pyzbar"],
|
43
|
+
'include_files': ["icons/"]}
|
44
|
+
|
45
|
+
bdist_msi_options = {'upgrade_code': upgrade_code,
|
46
|
+
'add_to_path': False,
|
47
|
+
'data': msi_data
|
48
|
+
}
|
49
|
+
|
50
|
+
options = {
|
51
|
+
'build_exe': build_exe_options,
|
52
|
+
'bdist_msi': bdist_msi_options
|
53
|
+
}
|
54
|
+
|
55
|
+
base = None
|
56
|
+
|
57
|
+
if sys.platform == "win32" : base = "Win32GUI"
|
58
|
+
|
59
|
+
exe = Executable(script = "test.py",
|
60
|
+
targetName="test.exe",
|
61
|
+
base= base,
|
62
|
+
icon = "icons/icon.ico")
|
63
|
+
|
64
|
+
setup(name=name,
|
65
|
+
version=version,
|
66
|
+
author=author,
|
67
|
+
description=description,
|
68
|
+
options=options,
|
69
|
+
executables=[exe]
|
70
|
+
)
|
71
|
+
|
72
|
+
```
|
1
タイトル修正
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
cx_freezeのsetup.pyの設定?
|
1
|
+
cx_freezeのsetup.pyの設定?管理者権限で起動させたい
|
body
CHANGED
File without changes
|