是否可以使用Python库而不是Python I来分发它?我说的是distutils Windows安装程序。如果是,怎么办?模块位于https://code.google.com/p/mathworks/。在
编辑:我在谷歌搜索方面取得了一些进展。这是我的设置脚本,但它找不到Python。也许有人能帮忙。在
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{3B6685C2-D478-4410-B973-57FA36A6DA6D}
AppName=Mathworks
AppVersion=1.3
;AppVerName=Mathworks 1.3
AppPublisherURL=https://code.google.com/p/mathworks/
AppSupportURL=https://code.google.com/p/mathworks/
AppUpdatesURL=https://code.google.com/p/mathworks/
DefaultDirName={code:GetDirName}
DisableDirPage=yes
DefaultGroupName=My Program
DisableProgramGroupPage=yes
LicenseFile=C:\Users\Ryan\Documents\mathworks-git\LICENSE_1_0.txt
OutputDir=C:\Users\Ryan\Desktop
OutputBaseFilename=mathworks-mwver
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
Source: "C:\Users\Ryan\Documents\mathworks-git\__init__.py"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Ryan\Documents\mathworks-git\exponent.py"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Ryan\Documents\mathworks-git\LICENSE_1_0.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Ryan\Documents\mathworks-git\multiples.py"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Ryan\Documents\mathworks-git\ptheorem.py"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Ryan\Documents\mathworks-git\shapes.py"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Code]
var CancelWithoutPrompt: boolean;
function InitializeSetup() : Boolean;
begin
CancelWithoutPrompt := false;
result := true;
end;
function GetDirName(Value: string): string;
var
InstallPath: string;
begin
if RegQueryStringValue(HKLM, 'SOFTWARE\Python\PythonCore\2.7\InstallPath', '(Default)', InstallPath) then
BEGIN
Result := InstallPath
END else
if RegQueryStringValue(HKCU, 'SOFTWARE\Python\PythonCore\2.7\InstallPath', '(Default)', InstallPath) then
BEGIN
Result := InstallPath;
END else
if RegQueryStringValue(HKLM, 'SOFTWARE\Wow6432Node\Python\PythonCore\2.7', '(Default)', InstallPath) then
BEGIN
Result := InstallPath;
END else
MsgBox('Could not find Python',mbError,MB_OK);
CancelWithoutPrompt := true;
WizardForm.Close;
end;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
if CurPageID=wpInstalling then
Confirm := not CancelWithoutPrompt;
end;
我从Inno Setup - Setting DefaultDir using wildcard registry entry?和{a3}得到了代码。在
我想出来了!我的代码:
相关问题 更多 >
编程相关推荐