{"id":18838602,"url":"https://github.com/beeware/briefcase-windows-visualstudio-template","last_synced_at":"2025-07-03T21:36:25.016Z","repository":{"id":45205928,"uuid":"513403078","full_name":"beeware/briefcase-windows-VisualStudio-template","owner":"beeware","description":"A template for generating Visual Studio projects for building Windows apps with Briefcase","archived":false,"fork":false,"pushed_at":"2025-06-17T19:04:16.000Z","size":645,"stargazers_count":4,"open_issues_count":5,"forks_count":12,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-17T20:21:58.836Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beeware.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["freakboy3742"],"custom":["http://beeware.org/bee/join"]}},"created_at":"2022-07-13T06:16:14.000Z","updated_at":"2025-06-17T19:04:19.000Z","dependencies_parsed_at":"2024-01-08T23:30:57.253Z","dependency_job_id":"bb881783-522a-4681-a040-3d70ae0214a3","html_url":"https://github.com/beeware/briefcase-windows-VisualStudio-template","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/beeware/briefcase-windows-VisualStudio-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeware%2Fbriefcase-windows-VisualStudio-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeware%2Fbriefcase-windows-VisualStudio-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeware%2Fbriefcase-windows-VisualStudio-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeware%2Fbriefcase-windows-VisualStudio-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beeware","download_url":"https://codeload.github.com/beeware/briefcase-windows-VisualStudio-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeware%2Fbriefcase-windows-VisualStudio-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263408681,"owners_count":23462104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T02:39:59.701Z","updated_at":"2025-07-03T21:36:24.954Z","avatar_url":"https://github.com/beeware.png","language":"C++","funding_links":["https://github.com/sponsors/freakboy3742","http://beeware.org/bee/join"],"categories":[],"sub_categories":[],"readme":"Briefcase Windows Visual Studio Template\n========================================\n\nA `Cookiecutter \u003chttps://github.com/cookiecutter/cookiecutter/\u003e`__ template for\nbuilding Python apps from a Visual Studio project, that can then be packaged\nwith an MSI installer.\n\nUsing this template\n-------------------\n\nThe easiest way to use this project is to not use it at all - at least, not\ndirectly. `Briefcase \u003chttps://github.com/beeware/briefcase/\u003e`__ is a tool that\nuses this template, rolling it out using data extracted from a\n``pyproject.toml`` configuration file.\n\nHowever, if you *do* want use this template directly...\n\n1. Install `cookiecutter`_. This is a tool used to bootstrap complex project\n   templates::\n\n    $ pip install cookiecutter\n\n2. Run ``cookiecutter`` on the template::\n\n    $ cookiecutter https://github.com/beeware/briefcase-windows-visualstudio-template\n\n   This will ask you for a number of details of your application, including the\n   `name` of your application (which should be a valid PyPI identifier), and\n   the `Formal Name` of your application (the full name you use to describe\n   your app). The remainder of these instructions will assume a `name` of\n   ``my-project``, and a formal name of ``My Project``.\n\n3. Build the project. You can do this by opening the solution file in Visual\n   Studio and building the Release configuration, or by using MSBuild:\n\n    $ MSBuild.exe \"My Project.sln\" -target:restore -property:RestorePackagesConfig=true -target:\"My Project\" -property:Configuration=Release\n\n   In order to build the project, you will need to configure Visual Studio\n   to include the following modules:\n\n   * **.NET Desktop development** - default options\n   * **Deskop Development with C++** - default options, plus the \"C++/CLI Support for v143 build tools\".\n\n4. `Obtain a Python Windows Embeddable package`_, and extract it into the\n   ``My Project/x64/Release`` directory generated by the template. This will give you a\n   ``python3.dll`` (amongst other artefacts) in the ``My Project/x64/Release`` folder.\n\n5. Add your code to the template, into the ``My Project/x64/Release/app`` directory.\n   At the very minimum, you need to have an ``app/\u003capp name\u003e/__main__.py`` file\n   that defines an entry point that will start your application.\n\n   If your code has any dependencies, they should be installed under the\n   ``My Project/x64/Release/app_packages`` directory.\n\nIf you've done this correctly, a project with a formal name of ``My Project``,\nwith an app name of ``my-project`` should have a directory structure that\nlooks something like::\n\n    My Project/\n        x64/\n            Release/\n                app/\n                    my_project/\n                        __init__.py\n                        __main__.py\n                        app.py\n                app_packages/\n                    ...\n                python3.dll\n                ...\n                My Project.exe\n                My Project.exe.metagen\n                My Project.pdb\n        My Project/\n            My Project.vcxproj\n            My Project.vcxproj.filters\n            ...\n        My Project.sln\n        briefcase.toml\n        my-project.wxs\n        unicode.wxl\n\nThe executable in ``x64/Release`` will start your application.\n\nThis project can now be compiled with `WiX \u003chttps://wixtoolset.org\u003e`__ to\nproduce an MSI file. This is a three step process. Open a command prompt,\nand change into the ``My Project`` directory. Then:\n\n1. Generate a manifest of the files in your project::\n\n    C:\\...\u003e\"%WIX%\\bin\\heat.exe\" dir x64/Release -gg -sfrag -sreg -srd -scom -dr my_project_ROOTDIR -cg my_project_COMPONENTS -var var.SourceDir -out my-project-manifest.wxs\n\n2. Compile the ``.wxs`` files::\n\n    C:\\...\u003e\"%WIX%\\bin\\candle.exe\" -ext WixUtilExtension -ext WixUIExtension -dSourceDir=x64/Release -arch x64 my-project.wxs my-project-manifest.wxs\n\n3. Link the compiled output to produce the MSI::\n\n    C:\\...\u003e\"%WIX%\\bin\\light.exe\" -ext WixUtilExtension -ext WixUIExtension -loc unicode.wxl my-project.wixobj my-project-manifest.wixobj -o \"My Project.msi\"\n\nThe MSI file can then be used to install your application. When installed, your\napplication will have an entry in your Start menu.\n\nNext steps\n----------\n\nOf course, running Python code isn't very interesting by itself - you won't\nbe able to do any console input or output, because a Windows app doesn't\ndisplay a console.\n\nTo do something interesting, you'll need to work with the native Windows system\nlibraries to draw widgets and respond to screen taps. The `Python for .NET`_\nbridging library can be used to interface with the Windows system libraries.\nAlternatively, you could use a cross-platform widget toolkit that supports\nWindows (such as `Toga`_) to provide a GUI for your application.\n\nIf you have any external library dependencies (like Toga, or anything other\nthird-party library), you should install the library code into the\n``app_packages`` directory. This directory is the same as a  ``site_packages``\ndirectory on a desktop Python install.\n\n.. _cookiecutter: https://github.com/cookiecutter/cookiecutter\n.. _Obtain a Python Windows Embeddable package: https://www.python.org/downloads/windows/\n.. _Python for .NET: http://pythonnet.github.io/\n.. _Toga: https://beeware.org/project/projects/libraries/toga\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeware%2Fbriefcase-windows-visualstudio-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeeware%2Fbriefcase-windows-visualstudio-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeware%2Fbriefcase-windows-visualstudio-template/lists"}