diff --git a/README.rst b/README.rst index 6dcf0b1..c753dec 100644 --- a/README.rst +++ b/README.rst @@ -60,21 +60,10 @@ looks something like:: my-project.wxs MyProject.exe -This project can now be compiled with `WiX `__ to -produce an MSI file. This is a three step process. Open a command prompt, -and change into the ``My Project`` directory. Then: +This project can now be compiled with `WiX `__ to produce an MSI +file. Open a command prompt, and change into the ``My Project`` directory. Then:: -1. Generate a manifest of the files in your project:: - - C:\...>"%WIX%\bin\heat.exe" dir src -gg -sfrag -sreg -srd -scom -dr my_project_ROOTDIR -cg my_project_COMPONENTS -var var.SourceDir -out my-project-manifest.wxs - -2. Compile the ``.wxs`` files:: - - C:\...>"%WIX%\bin\candle.exe" -ext WixUtilExtension -ext WixUIExtension -dSourceDir=src my-project.wxs myproject-manifest.wxs - -3. Link the compiled output to produce the MSI:: - - C:\...>"%WIX%\bin\light.exe" -ext WixUtilExtension -ext WixUIExtension my-project.wixobj myproject-manifest.wixobj "My Project.msi" + C:\...>wix build -ext WixToolset.UI.wixext -arch x64 my-project.wxs -loc unicode.wxl -o "My Project.msi" The MSI file can then be used to install your application. When installed, your application will have an entry in your Start menu. diff --git a/cookiecutter.json b/cookiecutter.json index 0d95e7a..e5af61d 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -13,6 +13,7 @@ "guid": "1409c8f5-c276-4cf3-a2fd-defcbdfef9a2", "install_scope": "", "use_full_install_path": true, + "package_path": "C:\\path\\to\\content", "binary_path": "{{ cookiecutter.formal_name }}.exe", "document_types": "", "python_version": "3.X.0", diff --git a/{{ cookiecutter.format }}/briefcase.toml b/{{ cookiecutter.format }}/briefcase.toml index 0491f61..3070572 100644 --- a/{{ cookiecutter.format }}/briefcase.toml +++ b/{{ cookiecutter.format }}/briefcase.toml @@ -1,4 +1,7 @@ # Generated using Python {{ cookiecutter.python_version }} +[briefcase] +target_version = "0.3.24" + [paths] app_path = "src/app" app_packages_path = "src/app_packages" @@ -12,7 +15,7 @@ support_path = "src" "3.12": "support_revision = 9", "3.13": "support_revision = 3", }.get(cookiecutter.python_version|py_tag, "") }} -stub_binary_revision = 8 +stub_binary_revision = 9 icon = "icon.ico" {% for document_type_id, document_type in cookiecutter.document_types.items() -%} document_type_icon.{{ document_type_id }} = "{{ cookiecutter.app_name }}-{{ document_type_id }}.ico" diff --git a/{{ cookiecutter.format }}/unicode.wxl b/{{ cookiecutter.format }}/unicode.wxl index 103504f..97ee277 100644 --- a/{{ cookiecutter.format }}/unicode.wxl +++ b/{{ cookiecutter.format }}/unicode.wxl @@ -1,4 +1,7 @@ - - - [ProductName] will be installed in a per-machine folder and be available for all users. You must have local Administrator privileges. + + + \ No newline at end of file diff --git a/{{ cookiecutter.format }}/{{ cookiecutter.app_name }}.wxs b/{{ cookiecutter.format }}/{{ cookiecutter.app_name }}.wxs index 7fa3bef..8e7b36a 100644 --- a/{{ cookiecutter.format }}/{{ cookiecutter.app_name }}.wxs +++ b/{{ cookiecutter.format }}/{{ cookiecutter.app_name }}.wxs @@ -1,33 +1,18 @@ - - - - - - - - {% if cookiecutter.install_scope == "perUser" -%} - - - {% endif -%} + + + - + + {% if cookiecutter.url -%} @@ -38,141 +23,336 @@ - - - - - - - + + + + + {%- if cookiecutter.use_full_install_path %} - - - - {%- else %} - + {%- endif %} + + {%- if cookiecutter.use_full_install_path %} - {% if cookiecutter.console_app %} - - - - - - - {% endif %} - - - - - - - - + {%- endif %} + + + + + + + + + + + + + - + {% if cookiecutter.document_types -%} - + {% for document_type_id, document_type in cookiecutter.document_types|dictsort -%} - - - - - + + + + + {%- endfor %} {%- endif %} - - - - - + - + {%- for document_type_id in cookiecutter.document_types.keys()|sort %} - + {%- endfor %} + {% if cookiecutter.console_app %} - - ALLUSERS=2 OR MSIINSTALLPERUSER=1 - + + {% set ui_condition = ( + "OR UILevel >= 5" + if cookiecutter.install_scope == "perUserOrMachine" + else "" + ) %} + + + + + + - - ALLUSERS=1 - + + + + + + {% endif %} - - - - {% if not cookiecutter.install_scope -%} - - - {% endif %} - + - - - + + + + + + + + + + - + + + - + + + + + - {% if cookiecutter.install_scope %} - 1 - {% else %} - 1 + - 1 - - WixAppFolder = "WixPerUserFolder" - WixAppFolder = "WixPerUserFolder" + - WixAppFolder = "WixPerMachineFolder" - WixAppFolder = "WixPerMachineFolder" + * If ALLUSERS="" or 1, then: + * Whether elevation is required depends on the "Word Count Summary". + * Some folders are affected by the choice of "" or 1, but ProgramFiles + folders will always point at the per-machine location. + * MSIINSTALLPERUSER has no effect during startup. - 1 - {% endif %} - 1 + * If ALLUSERS=2 and MSIINSTALLPERUSER=1, then: + * Elevation will not be required. + * ProgramFiles folders will point at the per-user location. + * If either phase is started with these values, then ALLUSERS will be + changed to "" before running any actions. However, if the UI phase ends + and both properties still have the same values (ALLUSERS="", + MSIINSTALLPERUSER=1), then it will reset ALLUSERS=2 before invoking the + execution phase. + + * Properties that depend on a ProgramFiles folder are immediately + re-evaluated in the following circumstances. This will be important for + the InstallDirDlg, if we ever add it: + * Setting ALLUSERS=1 sets the per-machine location. + * Setting ALLUSERS="", MSIINSTALLPERUSER=1, in that order, sets the + per-user location. + + * Most standard actions, such as FindRelatedProducts, interpret ALLUSERS="" + as per-user scope, and any other value as per-machine scope. + + Based on this, our UI phase sets the properties to one of two states: + * Per-user: ALLUSERS="", MSIINSTALLPERUSER=1 + * Per machine: ALLUSERS=1, MSIINSTALLPERUSER="" --> + + {% if cookiecutter.install_scope != "perUserOrMachine" %} + + + + {% else %} + + + + + + + + + {% if cookiecutter.console_app %} + + + {% endif %} + + + + + {% if cookiecutter.console_app %} + + + {% endif %} + + + + {% endif %} + + + + + + + + + + - +