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

Remove DLLs build in other repo and download new ones from there #889

Merged
merged 6 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ jobs:
$Env:FPCDIR = "c:\newpascal\fpcsrc"
$Env:PATH = "c:\newpascal\fpc\bin\i386-win32;c:\newpascal\binw32;$Env:PATH"
c:\newpascal\lazarus\lazbuild src\ultrastardx-win.lpi --lazarusdir=c:\newpascal\lazarus
- name: Add prebuilt DLLs
run: |
python dldlls.py
7z x -y usdx-dlls-i686.zip -ogame "*.dll"
env:
ARTIFACT_ACCESS_TOKEN: ${{ secrets.MxeActionsReadAccessToken }}
- name: Create installer
run: |
del game\*.debug
Expand Down
19 changes: 11 additions & 8 deletions COMPILING.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Compiling
[Freepascal](http://freepascal.org/) 3.0.0 or newer is required to compile UltraStar Deluxe. If you had some older version of fpc installed before, make sure to remove everything of it correctly before trying to install freepascal (otherwise compiling will fail with various weird error messages). Also, using the 3.0-development branch with current fixes is suggested.
[Free Pascal](http://freepascal.org/) 3.0.0 or newer is required to compile UltraStar Deluxe. If you had some older version of fpc installed before, make sure to remove everything of it correctly before trying to install Free Pascal (otherwise compiling will fail with various weird error messages). Also, using the newest version is suggested.
If you want to help the project by coding patches, we suggest you to use the [Lazarus 1.6](http://www.lazarus-ide.org/) or newer integrated development environment.
For linking and running the game, the following libraries are also required:
- SDL2, SDL2_image
- ffmpeg 2.8 or older
- sqlite
- [bass](http://www.un4seen.com/bass.html)
- FFmpeg 7.0 or older
- SQLite 3
- [BASS](http://www.un4seen.com/bass.html)
- some fonts like DejaVu
- portaudio
- lua 5.1 or 5.2 or 5.3
- opencv if you want webcam support
- projectM if you want audio visualisation support
- PortAudio
- Lua 5.1, 5.2, 5.3 or 5.4
- OpenCV if you want webcam support
- projectM 2,x if you want audio visualisation support

Prebuilt DLLs for SDL2, SDL2_image, FFmpeg, SQLite, PortAudio, and Lua can be found in the releases section of [our MXE fork](https://github.com/UltraStar-Deluxe/mxe). You can use the dldlls.py script to download the DLLs for the checked out code. The remaining DLLs needed for Windows builds are part of this repository.

## Compiling using Lazarus
1. Start Lazarus.
Expand Down Expand Up @@ -83,6 +85,7 @@ Optional libraries:

# Windows installer
The CI does this for you, but if you need to do it manually:
- Complete the set of DLLs in the `game` directory using a matching release from [here](https://github.com/UltraStar-Deluxe/mxe).
- Create Windows portable version: zip the contents of the `game` directory
- Create Windows installer:
* Install NSIS (also install the Graphics and Language components during setup)
Expand Down
80 changes: 80 additions & 0 deletions dldlls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#!/usr/bin/python3

import urllib.request
import shutil
import json
import sys
import os

sha = '67f6a4f9305a2ee1508215ad4a861f23f7b8e3da'
filename = 'usdx-dlls-i686'
urlbase = 'https://api.github.com/repos/UltraStar-Deluxe/mxe/'
headers = {
'Accept': 'application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28'
}

token = os.environ.get('ARTIFACT_ACCESS_TOKEN')
if token != None:
headers['Authorization'] = 'Bearer ' + token

print('Searching for binaries built from commit ' + sha)

def search_releases():
pagesuffix = ''
page = 1
links = '"next"'
while links != None and links.find('"next"') != -1:
req = urllib.request.Request(url = urlbase + 'tags' + pagesuffix,
headers = headers)
rsp = urllib.request.urlopen(req)
links = rsp.headers['link']
for tag in json.load(rsp):
if tag['commit']['sha'] == sha:
req = urllib.request.Request(url = urlbase + 'releases/tags/'
+ tag['name'],
headers = headers)
rsp = urllib.request.urlopen(req)
release = json.load(rsp)
for asset in release['assets']:
if asset['name'].startswith(filename):
print('Found binaries in release ' + release['name'])
headers.clear()
return asset['browser_download_url']
page = page + 1
pagesuffix = '?page={}'.format(page)
print('No release matches')
return None

def search_artifacts():
pagesuffix = ''
page = 1
links = '"next"'
while links != None and links.find('"next"') != -1:
req = urllib.request.Request(url = urlbase
+ 'actions/artifacts'
+ '?name=' + filename
+ pagesuffix,
headers = headers)
rsp = urllib.request.urlopen(req)
links = rsp.headers['link']
for artifact in json.load(rsp)['artifacts']:
if artifact['workflow_run']['head_sha'] == sha and not artifact['expired']:
print('Found binaries in workflow run {}'.format(artifact['workflow_run']['id']))
return artifact['archive_download_url']
page = page + 1
pagesuffix = '&page={}'.format(page)
print('No workflow artifact matches')
return None

dllurl = search_releases()
if dllurl == None and token != None:
dllurl = search_artifacts()
if dllurl == None:
sys.exit(1)
print('Downloading from ' + dllurl)
req = urllib.request.Request(url = dllurl)
for key in headers:
req.add_unredirected_header(key, headers[key])
shutil.copyfileobj(urllib.request.urlopen(req),
open(filename + '.zip', 'wb'))
62 changes: 62 additions & 0 deletions game/LICENSE.bass.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Licence
=======
BASS is free for non-commercial use. If you are a non-commercial entity
(eg. an individual) and you are not making any money from your product
(through sales/advertising/etc), then you can use BASS in it for free.
If you wish to use BASS in commercial products, then please also see the
next section.

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, BASS IS PROVIDED
"AS IS", WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND/OR FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS SHALL NOT BE HELD
LIABLE FOR ANY DAMAGE THAT MAY RESULT FROM THE USE OF BASS. YOU USE
BASS ENTIRELY AT YOUR OWN RISK.

Usage of BASS indicates that you agree to the above conditions.

All trademarks and other registered names contained in the BASS
package are the property of their respective owners.

Commercial licensing
--------------------
BASS is available for use in your commercial products. The licence
types available are as follows:

SHAREWARE: Allows the usage of BASS in an unlimited number of your
shareware ("try before you buy") products, which must sell for no more
than 40 Euros each. Non-shareware products are also permitted, but the
product price limit is 10 Euros in that case. The price limit can be
raised by purchasing duplicate licences, eg. 2 licences doubles it. If
you are an individual (not a corporation) making and selling your own
software, this is the licence for you.

SINGLE COMMERCIAL: Allows the usage of BASS in one commercial product.

UNLIMITED COMMERCIAL: Allows the usage of BASS in an unlimited number
of your commercial products. This licence is on a per-site basis, eg.
if you are creating products with BASS at 2 sites/locations, then 2
licences are required.

Please note the products must be end-user products, eg. not components
used by other products.

These licences only cover your own software, not the publishing of
other's software. If you publish other's software, its developers (or
the software itself) will need to be licensed to use BASS.

These licences are on a per-platform basis, with reductions available
when licensing for multiple platforms. In all cases there are no royalties
to pay, and you can use future BASS updates without further cost.

These licences do not allow reselling/sublicensing of BASS. For example,
if a product is a development system, the users of said product are not
licensed to use BASS in their productions; they will need their own
licences.

If the standard licences do not meet your requirements, or if you have
any questions, please get in touch (email: [email protected]).

Visit the BASS website for the latest pricing:

www.un4seen.com
20 changes: 20 additions & 0 deletions game/LICENSE.bass_fx.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright, Disclaimer, and all that other jazz
==============================================
The BASS_FX library is free, so if anyone tries to charge you
for it, kick 'em where it hurts.

This software is provided "as is", without warranty of ANY KIND,
either expressed or implied, including but not limited to the
implied warranties of merchantability and/or fitness for a
particular purpose. The author shall NOT be held liable for
ANY damage to you, your computer, or to anyone or anything else,
that may result from its use, or misuse. Basically, you use it
at YOUR OWN RISK.

Usage of BASS_FX indicates that you agree to the above conditions.

You may freely distribute the BASS_FX package as long as NO FEE is
charged and all the files remain INTACT AND UNMODIFIED.

All trademarks and other registered names contained in the BASS_FX
package are the property of their respective owners.
74 changes: 74 additions & 0 deletions game/LICENSE.glew.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
The OpenGL Extension Wrangler Library
Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
Copyright (C) 2002, Lev Povalahev
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* The name of the author may be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS''
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.


Mesa 3-D graphics library

Version: 7.0

Copyright (C) 1999-2007 Brian Paul All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the ''Software''),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ''AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Copyright (c) 2007 The Khronos Group Inc.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
''Materials''), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Materials.

THE MATERIALS ARE PROVIDED ''AS IS'', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
2 changes: 1 addition & 1 deletion game/LICENSE.lua.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright © 1994–2023 Lua.org, PUC-Rio.
Copyright (C) 1994–2024 Lua.org, PUC-Rio.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
Expand Down
37 changes: 37 additions & 0 deletions game/LICENSE.opencv.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.

By downloading, copying, installing or using the software you agree to this license.
If you do not agree to this license, do not download, install,
copy or use the software.


License Agreement
For Open Source Computer Vision Library

Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
Copyright (C) 2008-2010, Willow Garage Inc., all rights reserved.
Third party copyrights are property of their respective owners.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistribution's of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

* Redistribution's in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* The name of the copyright holders may not be used to endorse or promote products
derived from this software without specific prior written permission.

This software is provided by the copyright holders and contributors "as is" and
any express or implied warranties, including, but not limited to, the implied
warranties of merchantability and fitness for a particular purpose are disclaimed.
In no event shall the Intel Corporation or contributors be liable for any direct,
indirect, incidental, special, exemplary, or consequential damages
(including, but not limited to, procurement of substitute goods or services;
loss of use, data, or profits; or business interruption) however caused
and on any theory of liability, whether in contract, strict liability,
or tort (including negligence or otherwise) arising in any way out of
the use of this software, even if advised of the possibility of such damage.
Loading