我使用Inno setup来创建我的第一个安装程序.但是当安装程序启动时,在Windows屏幕要求执行此文件的权限之前,我有一个窗口出现此错误:
; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Facturation"
#define MyAppVersion "1.0"
#define MyAppPublisher "JoWe"
#define MyAppURL "http://www.jowe.fr/"
#define MyAppExeName "facturation.exe"
[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={{B8DF3E83-4622-48AB-9DD5-C75D4951BEDE}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} …Run Code Online (Sandbox Code Playgroud) 我开始使用 Inno Setup,但 INI 文件编码存在一些问题。
\n我想将用户输入保存在 INI 文件中,并且该输入可以包含重音符号。
我使用 Inno Setup Unicode,我的 setupScript.iss 是 UTF-8 编码的,这是我的代码(一部分):
\n\n[INI]\nFilename: "{app}\\www\\conf\\config.ini"; Section: "Settings"; Key: "ca.plafondAnnuel"; String: "{code:GetUser|Plafond}"\nFilename: "{app}\\www\\conf\\config.ini"; Section: "Settings"; Key: "app.siren"; String: "{code:GetUser|Siren}"\nFilename: "{app}\\www\\conf\\config.ini"; Section: "Settings"; Key: "app.adresse"; String: "{code:GetUser|Adresse}"\n\n\n[Code]\nvar\n UserPage: TInputQueryWizardPage;\n ExamplePage : TInputOptionWizardPage;\n ImmatriculationPage : TInputOptionWizardPage;\n FakeElemIndex: Integer;\n FakeElem: TCustomEdit;\n AdresseTextarea: TNewMemo;\n\nprocedure InitializeWizard;\nbegin\n UserPage := CreateInputQueryPage(wpWelcome,\n \'Configuration de l\'\'application\', \'\',\n \'Configurez ici votre application. Une fois install\xc3\xa9e, vous pourrez modifier ces valeurs.\');\n\n UserPage.Add(\'Siren :\', False);\n UserPage.Add(\'Plafond annuel (utilis\xc3\xa9 …Run Code Online (Sandbox Code Playgroud) 我使用了 Symfony 序列化器来序列化我的Recherche对象。在一个Recherche对象中,我有子对象 :Categorie和Lieu。
当我反序列化我的Recherche对象时,所有子对象都被转换成数组。我希望它们再次成为对象。
这就是我序列化对象的方式:
$encoders = array(new JsonEncoder());
$normalizer = new ObjectNormalizer();
$normalizer->setIgnoredAttributes(array('parent', 'enfants'));
$normalizer->setCircularReferenceHandler(function ($object) {
return $object->getCode();
});
$normalizers = array($normalizer);
$serializer = new Serializer($normalizers, $encoders);
$rechercheJson= $serializer->serialize($recherche, 'json');
Run Code Online (Sandbox Code Playgroud)
这就是我反序列化它的方式:
$encoders = array(new JsonEncoder());
$normalizer = new ObjectNormalizer();
$normalizer->setIgnoredAttributes(array('parent', 'enfants'));
$normalizer->setCircularReferenceHandler(function ($object) {
return $object->getCode();
});
$normalizers = array($normalizer);
$serializer = new Serializer($normalizers, $encoders);
$recherche = $serializer->deserialize($recherche_json, Recherche::class, 'json');
Run Code Online (Sandbox Code Playgroud)
我认为可能与规范化器有关,但我在文档中找不到任何对我有帮助的内容。
任何人都有帮助的想法?
谢谢 !
编辑:看到这篇文章后:使用 symfony …
我正在尝试在我的 Symfony3-Sylius 应用程序上安装一个时事通讯包(https://github.com/ibrows/IbrowsNewsletterBundle)(我没有找到 Symfony3 时事通讯包,所以我尝试安装这个)。我的 App 用户必须实现 MandantUserInterface。在此之前,我使用的是 Sylius 默认用户系统,因此我必须覆盖它才能实现此接口。
我试图覆盖 AdminUser,但我没有在我的 config.yml 文件中找到要覆盖的模型;我试过 :
sylius_core:
resources:
admin_user:
classes:
model: AppBundle\Entity\UserAdmin
Run Code Online (Sandbox Code Playgroud)
但是我在 sylius_core 配置中看到,我没有 admin_user 条目。我在配置文件中搜索“用户”条目,我找到的唯一一个是
sylius_user:
resources:
user:
classes:
model: AppBundle\Entity\UserAdmin
Run Code Online (Sandbox Code Playgroud)
我在 Sylius\Bundle\UserBundle\DependencyInjection\Configuration.php 文件中看到了这个配置。但是如果我把这个 conf 放在我的 config.yml 文件中,我有这个错误:
Unrecognized option "classes" under "sylius_user.resources.user"
Run Code Online (Sandbox Code Playgroud)
我的问题是:如何MandantUserInterface在我的用户对象中实现以使用此 newsletterBundle ?
谢谢你的帮助 !
我尝试使用 Sylius Grid 系统来简化我的文章管理。因此,我按照Sylius 文档进行操作,看到了显示我的文章的网格。然后我添加了操作按钮,但是当我想使用它们时,出现错误(仅适用于编辑和创建。删除效果很好):Class "form" is not configured for resource "blog.article".
我知道它找不到任何 FormClass 来呈现我的文章,但是文档中没有此信息,我想我在文档(我不记得是哪个)上看到表单是根据实体。
这是我的代码:
资源声明:
sylius_resource:
resources:
blog.article:
driver: doctrine/orm
classes:
model: BlogBundle\Entity\Article
Run Code Online (Sandbox Code Playgroud)
网格配置:
sylius_grid:
grids:
blog_admin_article:
driver:
name: doctrine/orm
options:
class: BlogBundle\Entity\Article
sorting:
date: asc
fields:
titre:
type: string
label: sylius.ui.title
sortable: ~
date:
type: datetime
label: sylius.ui.date
sortable: ~
resume:
type: string
label: sylius.ui.resume
sortable: ~
filters:
search:
type: string
label: sylius.ui.search
options:
fields: [titre, resume ]
actions:
main:
create:
type: create
label: …Run Code Online (Sandbox Code Playgroud) inno-setup ×2
sylius ×2
symfony ×2
codepages ×1
crud ×1
encoding ×1
grid ×1
ini ×1
phpdesktop ×1
symfony-3.4 ×1
utf-8 ×1