Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows build should be packable via dotnet pack #125

Closed
smoogipoo opened this issue May 18, 2022 · 1 comment · Fixed by #171
Closed

Windows build should be packable via dotnet pack #125

smoogipoo opened this issue May 18, 2022 · 1 comment · Fixed by #171

Comments

@smoogipoo
Copy link
Contributor

smoogipoo commented May 18, 2022

This is just to document my findings for if they're needed in the future.

The windows build currently uses nuget.exe to make the resultant package. It should use dotnet pack instead since nuget.exe is deprecated. So are some of the options in the .nuspec such as iconUrl and the net45 target for files (we don't use net45).

The following seems to work:

diff --git a/osu.Desktop/osu.Desktop.csproj b/osu.Desktop/osu.Desktop.csproj
index a4f9e2671b..7f10246946 100644
--- a/osu.Desktop/osu.Desktop.csproj
+++ b/osu.Desktop/osu.Desktop.csproj
@@ -11,6 +11,7 @@
     <ApplicationManifest>app.manifest</ApplicationManifest>
     <Version>0.0.0</Version>
     <FileVersion>0.0.0</FileVersion>
+    <IsPackable>true</IsPackable>
   </PropertyGroup>
   <PropertyGroup>
     <StartupObject>osu.Desktop.Program</StartupObject>
diff --git a/osu.Desktop/osu.nuspec b/osu.Desktop/osu.nuspec
index db58c325bd..898110b6a8 100644
--- a/osu.Desktop/osu.nuspec
+++ b/osu.Desktop/osu.nuspec
@@ -7,17 +7,20 @@
         <authors>ppy Pty Ltd</authors>
         <owners>Dean Herbert</owners>
         <projectUrl>https://osu.ppy.sh/</projectUrl>
-        <iconUrl>https://puu.sh/tYyXZ/9a01a5d1b0.ico</iconUrl>
         <requireLicenseAcceptance>false</requireLicenseAcceptance>
         <description>A free-to-win rhythm game. Rhythm is just a *click* away!</description>
         <releaseNotes>testing</releaseNotes>
         <copyright>Copyright (c) 2022 ppy Pty Ltd</copyright>
         <language>en-AU</language>
+        <dependencies>
+            <group targetFramework=".NET6.0"/>
+        </dependencies>
     </metadata>
     <files>
-      <file src="**.exe" target="lib\net45\" exclude="**vshost**"/>
-      <file src="**.dll" target="lib\net45\"/>
-      <file src="**.config" target="lib\net45\"/>
-      <file src="**.json" target="lib\net45\"/>
+      <file src="**.exe" target="lib\net6.0\" exclude="**vshost**"/>
+      <file src="**.dll" target="lib\net6.0\"/>
+      <file src="**.config" target="lib\net6.0\"/>
+      <file src="**.json" target="lib\net6.0\"/>
     </files>
 </package>
dotnet publish -c:Release -r:win-x64 -o out
dotnet pack --no-build --no-restore -c:Release -p:NuspecFile=osu.nuspec -p:NuspecBasePath=out

However, .nuspec itself is deprecated when using dotnet pack, so these should all be moved into the .csproj (and would remove the requirement for <IsPackable>).

@caesay
Copy link

caesay commented May 19, 2022

Just to be clear, if you're planning on sticking with Squirrel you should probably migrate to the Squirrel.exe pack command rather than the dotnet pack command.

@smallketchup82 smallketchup82 mentioned this issue Jun 30, 2024
19 tasks
@peppy peppy closed this as completed in #171 Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants